diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad36eda --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +test.zip +.vscode +.history \ No newline at end of file diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..243cd89 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,3 @@ +{ + "esversion" : 6 +} \ No newline at end of file diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..22ac4b2 --- /dev/null +++ b/action.yml @@ -0,0 +1,29 @@ +name: 'Gross Cloud Network EBS Production' +description: 'Configure aws eb environment variables' +author: 'Gross Corporation' +runs: + using: 'node12' + main: 'env.js' +inputs: + aws_access_key: + description: 'AWS Access Key' + required: true + aws_secret_key: + description: 'AWS Secret Key' + required: true + environment: + description: 'Node environment variable' + required: true + secret_name: + description: 'Secret name' + required: true + slug: + description: 'Custom app slug for variants' + required: true + region: + description: 'AWS Region' + required: true + +branding: + icon: 'arrow-up' + color: 'green' diff --git a/bash.sh b/bash.sh new file mode 100644 index 0000000..5c85ee6 --- /dev/null +++ b/bash.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +# Check if jq is installed +if ! command -v jq &> /dev/null; then + echo "jq is required but it's not installed. Install jq and try again." + exit 1 +fi + +# Set default region +REGION=${INPUT_REGION:-${AWS_REGION:-us-east-1}} + +# Set secret name +SECRET_NAME=${INPUT_SECRET_NAME:-${SECRET_NAME}} + +# Load environment variables from .env if it exists +if [ -f .env ]; then + export $(cat .env | xargs) +fi + +# Check if running in GitHub Actions +IS_GITHUB_ACTION=${GITHUB_ACTIONS:-false} + +# Application name or slug +APP_NAME=${1:-${INPUT_SLUG}} + +# Logging function +log() { + echo '###############################################################' + echo "$1" + echo '###############################################################' +} + +log "APP_SLUG ENV ~ $APP_NAME" +log "REGION ~ $REGION" +log "SECRET NAME ~ $SECRET_NAME" + +# Fetch secrets from AWS Secrets Manager +fetch_secrets() { + aws secretsmanager get-secret-value --region "$REGION" --secret-id "$SECRET_NAME" --query SecretString --output text +} + +# Process and write secrets to files +process_secrets() { + local secrets_json + secrets_json=$(fetch_secrets) + if [ -z "$secrets_json" ]; then + echo "Failed to fetch secrets or secret is empty" + exit 1 + fi + + local env_file="" + local eb_file="" + + # Loop through each key-value pair in the JSON + echo "$secrets_json" | jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' | while IFS= read -r line; do + key=$(echo $line | cut -d'=' -f1) + value=$(echo $line | cut -d'=' -f2) + env_file+="${key}=${value}\n" + eb_file+=" ${key}: ${value}\n" + done + + local eb_map="option_settings: + aws:elasticbeanstalk:application:environment: +$eb_file" + + if [ "$IS_GITHUB_ACTION" = true ]; then + echo -e "$eb_map" > ./.ebextensions/options.config + echo -e "$env_file" > ./.env + log "GITHUB_ACTION EB ~ $APP_NAME" + fi +} + +# Main execution +process_secrets + +# Dummy wait to replicate original JavaScript delay +sleep 5 + +echo "done" diff --git a/env.js b/env.js new file mode 100644 index 0000000..ebd6cab --- /dev/null +++ b/env.js @@ -0,0 +1,82 @@ +#!/usr/bin/env node// Author: Gross Corporation, https://github.com/grosscorporation/eb-environment-variables + + + +const { SecretsManager } = require('@aws-sdk/client-secrets-manager'); + +let fs = require('fs') +try { + if (process.env.NODE_ENV === 'development') { + require('dotenv').config({ path: process.cwd() + '/.env' }) + } +} catch (e) {} + +const IS_GITHUB_ACTION = !!process.env.GITHUB_ACTIONS + +const appName = process.argv.splice(2)[0] || process.env.INPUT_SLUG +const region = process.env.INPUT_REGION || 'eu-west-1' + +const secretName = process.env.INPUT_SECRET_NAME +const releaseTag = process.env.INPUT_RELEASE_TAG || (new Date() * 1000).toString() + +console.log('###############################################################') +console.log('APP_SLUG ENV ~ ', appName) +console.log('###############################################################') + +console.log('###############################################################') +console.log('REGION ~ ', region) +console.log('###############################################################') + +console.log('###############################################################') +console.log('RELEASE TAG ~ ', releaseTag) +console.log('###############################################################') + +console.log('###############################################################') +console.log('SECRET NAME ~ ', secretName) +console.log('###############################################################') + +const awsConfig = { + region, + accessKeyId: process.env.INPUT_AWS_ACCESS_KEY || process.env.AWS_ACCESS_KEY_ID, + secretAccessKey: process.env.INPUT_AWS_SECRET_KEY || process.env.AWS_SECRET_ACCESS_KEY +} + +const client = new SecretsManager(awsConfig) + +client.getSecretValue({ SecretId: secretName }, (err, data) => { + if (err) { + throw err + } else { + if ('SecretString' in data) { + const secrets = JSON.parse(data.SecretString) + secrets.CURRENT_RELEASE = releaseTag + + let envFile = '' + let ebFile = '' + for (const key of Object.keys(secrets)) { + envFile += `${key}=${secrets[key]}\n` + ebFile += ` ${key}: ${secrets[key]}\n` + } + + const ebMap = `option_settings: + aws:elasticbeanstalk:application:environment: +${ebFile}` + + if (IS_GITHUB_ACTION) { + fs.writeFileSync('./.ebextensions/options.config', ebMap, function (err) { + if (err) { + throw err + } else { + console.log('###############################################################') + console.log('GITHUB_ACTION EB ~ ', appName) + console.log('###############################################################') + } + }) + } + } + } +}) + +setTimeout(() => {}, 5000) + +return 'done' diff --git a/node_modules/.bin/fxparser b/node_modules/.bin/fxparser new file mode 120000 index 0000000..75327ed --- /dev/null +++ b/node_modules/.bin/fxparser @@ -0,0 +1 @@ +../fast-xml-parser/src/cli/cli.js \ No newline at end of file diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 120000 index 0000000..f02319d --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1 @@ +../@smithy/middleware-retry/node_modules/uuid/dist/bin/uuid \ No newline at end of file diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity new file mode 100644 index 0000000..2d1e8a7 --- /dev/null +++ b/node_modules/.yarn-integrity @@ -0,0 +1,95 @@ +{ + "systemParams": "darwin-x64-108", + "modulesFolders": [ + "node_modules" + ], + "flags": [], + "linkedModules": [], + "topLevelPatterns": [ + "@aws-sdk/client-secrets-manager@^3.535.0" + ], + "lockfileEntries": { + "@aws-crypto/crc32@3.0.0": "https://registry.yarnpkg.com/@aws-crypto/crc32/-/crc32-3.0.0.tgz#07300eca214409c33e3ff769cd5697b57fdd38fa", + "@aws-crypto/ie11-detection@^3.0.0": "https://registry.yarnpkg.com/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz#640ae66b4ec3395cee6a8e94ebcd9f80c24cd688", + "@aws-crypto/sha256-browser@3.0.0": "https://registry.yarnpkg.com/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz#05f160138ab893f1c6ba5be57cfd108f05827766", + "@aws-crypto/sha256-js@3.0.0": "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz#f06b84d550d25521e60d2a0e2a90139341e007c2", + "@aws-crypto/sha256-js@^3.0.0": "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz#f06b84d550d25521e60d2a0e2a90139341e007c2", + "@aws-crypto/supports-web-crypto@^3.0.0": "https://registry.yarnpkg.com/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz#5d1bf825afa8072af2717c3e455f35cda0103ec2", + "@aws-crypto/util@^3.0.0": "https://registry.yarnpkg.com/@aws-crypto/util/-/util-3.0.0.tgz#1c7ca90c29293f0883468ad48117937f0fe5bfb0", + "@aws-sdk/client-secrets-manager@^3.535.0": "https://registry.yarnpkg.com/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.535.0.tgz#54d24822e65c045121b09109e2396040f806da2b", + "@aws-sdk/client-sso-oidc@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.535.0.tgz#64666c2f7bed8510938ba2b481429fea8f97473d", + "@aws-sdk/client-sso@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.535.0.tgz#c405aaf880cb695aa2f5070a8827955274fc9df2", + "@aws-sdk/client-sts@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.535.0.tgz#0f518fe338c6b7a8b8a897e2ccee65d06dc0040f", + "@aws-sdk/core@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/core/-/core-3.535.0.tgz#f3a726c297cea9634d19a1db4e958c918c506c8b", + "@aws-sdk/credential-provider-env@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.535.0.tgz#26248e263a8107953d5496cb3760d4e7c877abcf", + "@aws-sdk/credential-provider-http@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/credential-provider-http/-/credential-provider-http-3.535.0.tgz#0a42f6b1a61d927bbce9f4afd25112f486bd05da", + "@aws-sdk/credential-provider-ini@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.535.0.tgz#b121b1aba2916e3f45745cd690b4082421a7c286", + "@aws-sdk/credential-provider-node@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.535.0.tgz#6739b4b52a9cce29dc8e70c9a7290b89cdc4b904", + "@aws-sdk/credential-provider-process@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.535.0.tgz#ea1e8a38a32e36bbdc3f75eb03352e6eafa0c659", + "@aws-sdk/credential-provider-sso@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.535.0.tgz#dfc7c2f39f9ca965becd7e5b9414cd1bb2217490", + "@aws-sdk/credential-provider-web-identity@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.535.0.tgz#f1d3a72ff958cbd7e052c5109755379745ac35e0", + "@aws-sdk/middleware-host-header@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.535.0.tgz#d5264f813592f5e77df25e5a14bbb0e6441812db", + "@aws-sdk/middleware-logger@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.535.0.tgz#1a8ffd6c368edd6cb32e1edf7b1dced95c1820ee", + "@aws-sdk/middleware-recursion-detection@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.535.0.tgz#6aa1e1bd1e84730d58a73021b745e20d4341a92d", + "@aws-sdk/middleware-user-agent@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.535.0.tgz#2877ff5e42d943dd0c488e8b1ad82bd9da121227", + "@aws-sdk/region-config-resolver@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.535.0.tgz#20a30fb5fbbe27ab70f2ed16327bae7e367b5cec", + "@aws-sdk/token-providers@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.535.0.tgz#0d5aa221449d5b56730427b28d3319005c5700ed", + "@aws-sdk/types@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.535.0.tgz#5e6479f31299dd9df170e63f4d10fe739008cf04", + "@aws-sdk/types@^3.222.0": "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.535.0.tgz#5e6479f31299dd9df170e63f4d10fe739008cf04", + "@aws-sdk/util-endpoints@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.535.0.tgz#46f4b61b2661d6414ded8c98e4ad3c82a0bf597b", + "@aws-sdk/util-locate-window@^3.0.0": "https://registry.yarnpkg.com/@aws-sdk/util-locate-window/-/util-locate-window-3.535.0.tgz#0200a336fddd47dd6567ce15d01f62be50a315d7", + "@aws-sdk/util-user-agent-browser@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.535.0.tgz#d67d72e8b933051620f18ddb1c2be225f79f588f", + "@aws-sdk/util-user-agent-node@3.535.0": "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.535.0.tgz#f5c26fb6f3f561d3cf35f96f303b1775afad0a5b", + "@aws-sdk/util-utf8-browser@^3.0.0": "https://registry.yarnpkg.com/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz#3275a6f5eb334f96ca76635b961d3c50259fd9ff", + "@smithy/abort-controller@^2.2.0": "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-2.2.0.tgz#18983401a5e2154b5c94057730024a7d14cbcd35", + "@smithy/config-resolver@^2.2.0": "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-2.2.0.tgz#54f40478bb61709b396960a3535866dba5422757", + "@smithy/core@^1.4.0": "https://registry.yarnpkg.com/@smithy/core/-/core-1.4.0.tgz#5f9f86b681b9cbf23904041dad6f0531efe8375e", + "@smithy/credential-provider-imds@^2.3.0": "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-2.3.0.tgz#326ce401b82e53f3c7ee4862a066136959a06166", + "@smithy/eventstream-codec@^2.2.0": "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-2.2.0.tgz#63d74fa817188995eb55e792a38060b0ede98dc4", + "@smithy/fetch-http-handler@^2.5.0": "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-2.5.0.tgz#0b8e1562807fdf91fe7dd5cde620d7a03ddc10ac", + "@smithy/hash-node@^2.2.0": "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-2.2.0.tgz#df29e1e64811be905cb3577703b0e2d0b07fc5cc", + "@smithy/invalid-dependency@^2.2.0": "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-2.2.0.tgz#ee3d8980022cb5edb514ac187d159b3e773640f0", + "@smithy/is-array-buffer@^2.2.0": "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz#f84f0d9f9a36601a9ca9381688bd1b726fd39111", + "@smithy/middleware-content-length@^2.2.0": "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-2.2.0.tgz#a82e97bd83d8deab69e07fea4512563bedb9461a", + "@smithy/middleware-endpoint@^2.5.0": "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-2.5.0.tgz#9f1459e9b4cbf00fadfd99e98f88d4b1a2aeb987", + "@smithy/middleware-retry@^2.2.0": "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-2.2.0.tgz#ff48ac01ad57394eeea15a0146a86079cf6364b7", + "@smithy/middleware-serde@^2.3.0": "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-2.3.0.tgz#a7615ba646a88b6f695f2d55de13d8158181dd13", + "@smithy/middleware-stack@^2.2.0": "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-2.2.0.tgz#3fb49eae6313f16f6f30fdaf28e11a7321f34d9f", + "@smithy/node-config-provider@^2.3.0": "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-2.3.0.tgz#9fac0c94a14c5b5b8b8fa37f20c310a844ab9922", + "@smithy/node-http-handler@^2.5.0": "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-2.5.0.tgz#7b5e0565dd23d340380489bd5fe4316d2bed32de", + "@smithy/property-provider@^2.2.0": "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-2.2.0.tgz#37e3525a3fa3e11749f86a4f89f0fd7765a6edb0", + "@smithy/protocol-http@^3.3.0": "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-3.3.0.tgz#a37df7b4bb4960cdda560ce49acfd64c455e4090", + "@smithy/querystring-builder@^2.2.0": "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-2.2.0.tgz#22937e19fcd0aaa1a3e614ef8cb6f8e86756a4ef", + "@smithy/querystring-parser@^2.2.0": "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-2.2.0.tgz#24a5633f4b3806ff2888d4c2f4169e105fdffd79", + "@smithy/service-error-classification@^2.1.5": "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-2.1.5.tgz#0568a977cc0db36299d8703a5d8609c1f600c005", + "@smithy/shared-ini-file-loader@^2.4.0": "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.4.0.tgz#1636d6eb9bff41e36ac9c60364a37fd2ffcb9947", + "@smithy/signature-v4@^2.2.0": "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-2.2.0.tgz#8fe6a574188b71fba6056111b88d50c84babb060", + "@smithy/smithy-client@^2.5.0": "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-2.5.0.tgz#8de4fff221d232dda34a8e706d6a4f2911dffe2e", + "@smithy/types@^2.12.0": "https://registry.yarnpkg.com/@smithy/types/-/types-2.12.0.tgz#c44845f8ba07e5e8c88eda5aed7e6a0c462da041", + "@smithy/url-parser@^2.2.0": "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-2.2.0.tgz#6fcda6116391a4f61fef5580eb540e128359b3c0", + "@smithy/util-base64@^2.3.0": "https://registry.yarnpkg.com/@smithy/util-base64/-/util-base64-2.3.0.tgz#312dbb4d73fb94249c7261aee52de4195c2dd8e2", + "@smithy/util-body-length-browser@^2.2.0": "https://registry.yarnpkg.com/@smithy/util-body-length-browser/-/util-body-length-browser-2.2.0.tgz#25620645c6b62b42594ef4a93b66e6ab70e27d2c", + "@smithy/util-body-length-node@^2.3.0": "https://registry.yarnpkg.com/@smithy/util-body-length-node/-/util-body-length-node-2.3.0.tgz#d065a9b5e305ff899536777bbfe075cdc980136f", + "@smithy/util-buffer-from@^2.2.0": "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz#6fc88585165ec73f8681d426d96de5d402021e4b", + "@smithy/util-config-provider@^2.3.0": "https://registry.yarnpkg.com/@smithy/util-config-provider/-/util-config-provider-2.3.0.tgz#bc79f99562d12a1f8423100ca662a6fb07cde943", + "@smithy/util-defaults-mode-browser@^2.2.0": "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.2.0.tgz#963a9d3c3351272764dd1c5dc07c26f2c8abcb02", + "@smithy/util-defaults-mode-node@^2.3.0": "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.3.0.tgz#5005058ca0a299f0948b47c288f7c3d4f36cb26e", + "@smithy/util-endpoints@^1.2.0": "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-1.2.0.tgz#b8b805f47e8044c158372f69b88337703117665d", + "@smithy/util-hex-encoding@^2.2.0": "https://registry.yarnpkg.com/@smithy/util-hex-encoding/-/util-hex-encoding-2.2.0.tgz#87edb7c88c2f422cfca4bb21f1394ae9602c5085", + "@smithy/util-middleware@^2.2.0": "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-2.2.0.tgz#80cfad40f6cca9ffe42a5899b5cb6abd53a50006", + "@smithy/util-retry@^2.2.0": "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-2.2.0.tgz#e8e019537ab47ba6b2e87e723ec51ee223422d85", + "@smithy/util-stream@^2.2.0": "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-2.2.0.tgz#b1279e417992a0f74afa78d7501658f174ed7370", + "@smithy/util-uri-escape@^2.2.0": "https://registry.yarnpkg.com/@smithy/util-uri-escape/-/util-uri-escape-2.2.0.tgz#56f5764051a33b67bc93fdd2a869f971b0635406", + "@smithy/util-utf8@^2.3.0": "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-2.3.0.tgz#dd96d7640363259924a214313c3cf16e7dd329c5", + "bowser@^2.11.0": "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f", + "fast-xml-parser@4.2.5": "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz#a6747a09296a6cb34f2ae634019bf1738f3b421f", + "strnum@^1.0.5": "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db", + "tslib@^1.11.1": "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00", + "tslib@^2.3.1": "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae", + "tslib@^2.6.2": "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae", + "uuid@^8.3.2": "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2", + "uuid@^9.0.1": "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + }, + "files": [], + "artifacts": {} +} \ No newline at end of file diff --git a/node_modules/@aws-crypto/crc32/CHANGELOG.md b/node_modules/@aws-crypto/crc32/CHANGELOG.md new file mode 100644 index 0000000..631f846 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/CHANGELOG.md @@ -0,0 +1,76 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.2...v3.0.0) (2023-01-12) + +- feat!: replace Hash implementations with Checksum interface (#492) ([da43dc0](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/da43dc0fdf669d9ebb5bfb1b1f7c79e46c4aaae1)), closes [#492](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/492) + +### BREAKING CHANGES + +- All classes that implemented `Hash` now implement `Checksum`. + +## [2.0.2](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.1...v2.0.2) (2022-09-07) + +### Bug Fixes + +- **#337:** update @aws-sdk/types ([#373](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/373)) ([b26a811](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/b26a811a392f5209c7ec7e57251500d4d78f97ff)), closes [#337](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/337) + +## [2.0.1](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.0...v2.0.1) (2021-12-09) + +**Note:** Version bump only for package @aws-crypto/crc32 + +# [2.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.2...v2.0.0) (2021-10-25) + +**Note:** Version bump only for package @aws-crypto/crc32 + +## [1.2.2](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.1...v1.2.2) (2021-10-12) + +### Bug Fixes + +- **crc32c:** ie11 does not support Array.from ([#221](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/221)) ([5f49547](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/5f495472ab8988cf203e0f2a70a51f7e1fcd7e60)) + +## [1.2.1](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.0...v1.2.1) (2021-09-17) + +**Note:** Version bump only for package @aws-crypto/crc32 + +# [1.2.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.1.1...v1.2.0) (2021-09-17) + +### Features + +- Add AwsCrc32 Hash ([f5d7e81](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/f5d7e815fcbe0f8da1edb855fea3bd33eb1edc15)) + +# [1.1.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/crc32@1.0.0...@aws-crypto/crc32@1.1.0) (2021-08-11) + +### Features + +- Create CRC-32C implementation ([#201](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/201)) ([e43c7ec](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/e43c7ecd30d6499fa696f5839ecc30502a34b8b6)) + +# [1.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/crc32@1.0.0-alpha.0...@aws-crypto/crc32@1.0.0) (2020-10-22) + +**Note:** Version bump only for package @aws-crypto/crc32 + +# [1.0.0-alpha.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/crc32@0.1.0-preview.4...@aws-crypto/crc32@1.0.0-alpha.0) (2020-02-07) + +**Note:** Version bump only for package @aws-crypto/crc32 + +# [0.1.0-preview.4](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/crc32@0.1.0-preview.2...@aws-crypto/crc32@0.1.0-preview.4) (2020-01-16) + +### Bug Fixes + +- Changed package.json files to point to the right Git repo ([#9](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/9)) ([028245d](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/028245d72e642ca98d82226afb300eb154503c4a)), closes [#8](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/8) +- lerna version maintains package-lock ([#14](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/14)) ([2ef29e1](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/2ef29e13779703a5c9b32e93d18918fcb33b7272)), closes [#13](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/13) + +# [0.1.0-preview.3](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/crc32@0.1.0-preview.2...@aws-crypto/crc32@0.1.0-preview.3) (2019-11-15) + +### Bug Fixes + +- Changed package.json files to point to the right Git repo ([#9](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/9)) ([028245d](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/028245d72e642ca98d82226afb300eb154503c4a)), closes [#8](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/8) +- lerna version maintains package-lock ([#14](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/14)) ([2ef29e1](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/2ef29e13779703a5c9b32e93d18918fcb33b7272)), closes [#13](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/13) + +# [0.1.0-preview.2](https://github.com/aws/aws-javascript-crypto-helpers/compare/@aws-crypto/crc32@0.1.0-preview.1...@aws-crypto/crc32@0.1.0-preview.2) (2019-10-30) + +### Bug Fixes + +- remove /src/ from .npmignore (for sourcemaps) ([#5](https://github.com/aws/aws-javascript-crypto-helpers/issues/5)) ([ec52056](https://github.com/aws/aws-javascript-crypto-helpers/commit/ec52056)) diff --git a/node_modules/@aws-crypto/crc32/LICENSE b/node_modules/@aws-crypto/crc32/LICENSE new file mode 100644 index 0000000..980a15a --- /dev/null +++ b/node_modules/@aws-crypto/crc32/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-crypto/crc32/README.md b/node_modules/@aws-crypto/crc32/README.md new file mode 100644 index 0000000..b54737a --- /dev/null +++ b/node_modules/@aws-crypto/crc32/README.md @@ -0,0 +1,16 @@ +# @aws-crypto/crc32 + +Pure JS implementation of CRC32 https://en.wikipedia.org/wiki/Cyclic_redundancy_check + +## Usage + +``` +import { Crc32 } from '@aws-crypto/crc32'; + +const crc32Digest = (new Crc32).update(buffer).digest() + +``` + +## Test + +`npm test` diff --git a/node_modules/@aws-crypto/crc32/build/aws_crc32.d.ts b/node_modules/@aws-crypto/crc32/build/aws_crc32.d.ts new file mode 100644 index 0000000..c91c2a5 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/build/aws_crc32.d.ts @@ -0,0 +1,7 @@ +import { SourceData, Checksum } from "@aws-sdk/types"; +export declare class AwsCrc32 implements Checksum { + private crc32; + update(toHash: SourceData): void; + digest(): Promise; + reset(): void; +} diff --git a/node_modules/@aws-crypto/crc32/build/aws_crc32.js b/node_modules/@aws-crypto/crc32/build/aws_crc32.js new file mode 100644 index 0000000..09c304c --- /dev/null +++ b/node_modules/@aws-crypto/crc32/build/aws_crc32.js @@ -0,0 +1,31 @@ +"use strict"; +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AwsCrc32 = void 0; +var tslib_1 = require("tslib"); +var util_1 = require("@aws-crypto/util"); +var index_1 = require("./index"); +var AwsCrc32 = /** @class */ (function () { + function AwsCrc32() { + this.crc32 = new index_1.Crc32(); + } + AwsCrc32.prototype.update = function (toHash) { + if ((0, util_1.isEmptyData)(toHash)) + return; + this.crc32.update((0, util_1.convertToBuffer)(toHash)); + }; + AwsCrc32.prototype.digest = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + return [2 /*return*/, (0, util_1.numToUint8)(this.crc32.digest())]; + }); + }); + }; + AwsCrc32.prototype.reset = function () { + this.crc32 = new index_1.Crc32(); + }; + return AwsCrc32; +}()); +exports.AwsCrc32 = AwsCrc32; +//# sourceMappingURL=aws_crc32.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/crc32/build/aws_crc32.js.map b/node_modules/@aws-crypto/crc32/build/aws_crc32.js.map new file mode 100644 index 0000000..8914c30 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/build/aws_crc32.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aws_crc32.js","sourceRoot":"","sources":["../src/aws_crc32.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,sCAAsC;;;;AAGtC,yCAA4E;AAC5E,iCAAgC;AAEhC;IAAA;QACU,UAAK,GAAG,IAAI,aAAK,EAAE,CAAC;IAe9B,CAAC;IAbC,yBAAM,GAAN,UAAO,MAAkB;QACvB,IAAI,IAAA,kBAAW,EAAC,MAAM,CAAC;YAAE,OAAO;QAEhC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAA,sBAAe,EAAC,MAAM,CAAC,CAAC,CAAC;IAC7C,CAAC;IAEK,yBAAM,GAAZ;;;gBACE,sBAAO,IAAA,iBAAU,EAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAC;;;KACxC;IAED,wBAAK,GAAL;QACE,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,EAAE,CAAC;IAC3B,CAAC;IACH,eAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,4BAAQ"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/crc32/build/index.d.ts b/node_modules/@aws-crypto/crc32/build/index.d.ts new file mode 100644 index 0000000..7521071 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/build/index.d.ts @@ -0,0 +1,7 @@ +export declare function crc32(data: Uint8Array): number; +export declare class Crc32 { + private checksum; + update(data: Uint8Array): this; + digest(): number; +} +export { AwsCrc32 } from "./aws_crc32"; diff --git a/node_modules/@aws-crypto/crc32/build/index.js b/node_modules/@aws-crypto/crc32/build/index.js new file mode 100644 index 0000000..fa78968 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/build/index.js @@ -0,0 +1,108 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AwsCrc32 = exports.Crc32 = exports.crc32 = void 0; +var tslib_1 = require("tslib"); +var util_1 = require("@aws-crypto/util"); +function crc32(data) { + return new Crc32().update(data).digest(); +} +exports.crc32 = crc32; +var Crc32 = /** @class */ (function () { + function Crc32() { + this.checksum = 0xffffffff; + } + Crc32.prototype.update = function (data) { + var e_1, _a; + try { + for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = + (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff]; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1); + } + finally { if (e_1) throw e_1.error; } + } + return this; + }; + Crc32.prototype.digest = function () { + return (this.checksum ^ 0xffffffff) >>> 0; + }; + return Crc32; +}()); +exports.Crc32 = Crc32; +// prettier-ignore +var a_lookUpTable = [ + 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, + 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, + 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, + 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, + 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, + 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, + 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, + 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, + 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, + 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, + 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, + 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, + 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, + 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, + 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, + 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, + 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, + 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, + 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, + 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, + 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, + 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, + 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, + 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, + 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, + 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, + 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, + 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, + 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, + 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, + 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, + 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, + 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, + 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, + 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, + 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, + 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, + 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, + 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, + 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, + 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, + 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, + 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, + 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, + 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, + 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, + 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, + 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, + 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, + 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, + 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, + 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, + 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, + 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, + 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, + 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, + 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, + 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, + 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, + 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, + 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, + 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, + 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, + 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D, +]; +var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable); +var aws_crc32_1 = require("./aws_crc32"); +Object.defineProperty(exports, "AwsCrc32", { enumerable: true, get: function () { return aws_crc32_1.AwsCrc32; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/crc32/build/index.js.map b/node_modules/@aws-crypto/crc32/build/index.js.map new file mode 100644 index 0000000..41c45e6 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/build/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,yCAAiD;AAEjD,SAAgB,KAAK,CAAC,IAAgB;IACpC,OAAO,IAAI,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;AAC3C,CAAC;AAFD,sBAEC;AAED;IAAA;QACU,aAAQ,GAAG,UAAU,CAAC;IAchC,CAAC;IAZC,sBAAM,GAAN,UAAO,IAAgB;;;YACrB,KAAmB,IAAA,SAAA,iBAAA,IAAI,CAAA,0BAAA,4CAAE;gBAApB,IAAM,IAAI,iBAAA;gBACb,IAAI,CAAC,QAAQ;oBACX,CAAC,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;aACtE;;;;;;;;;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sBAAM,GAAN;QACE,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IACH,YAAC;AAAD,CAAC,AAfD,IAeC;AAfY,sBAAK;AAiBlB,kBAAkB;AAClB,IAAM,aAAa,GAAG;IACpB,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAC9C,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;CAC/C,CAAC;AACF,IAAM,WAAW,GAAgB,IAAA,sBAAe,EAAC,aAAa,CAAC,CAAA;AAC/D,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/CopyrightNotice.txt b/node_modules/@aws-crypto/crc32/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 0000000..3d4c823 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/LICENSE.txt b/node_modules/@aws-crypto/crc32/node_modules/tslib/LICENSE.txt new file mode 100644 index 0000000..bfe6430 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/README.md b/node_modules/@aws-crypto/crc32/node_modules/tslib/README.md new file mode 100644 index 0000000..a5b2692 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/README.md @@ -0,0 +1,142 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 2.3.3 or later +npm install tslib + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 2.3.3 or later +yarn add tslib + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 2.3.3 or later +bower install tslib + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 2.3.3 or later +jspm install tslib + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/modules/index.js b/node_modules/@aws-crypto/crc32/node_modules/tslib/modules/index.js new file mode 100644 index 0000000..d241d04 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/modules/package.json b/node_modules/@aws-crypto/crc32/node_modules/tslib/modules/package.json new file mode 100644 index 0000000..aafa0e4 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/package.json b/node_modules/@aws-crypto/crc32/node_modules/tslib/package.json new file mode 100644 index 0000000..f8c2a53 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/package.json @@ -0,0 +1,37 @@ +{ + "name": "tslib", + "author": "Microsoft Corp.", + "homepage": "https://www.typescriptlang.org/", + "version": "1.14.1", + "license": "0BSD", + "description": "Runtime library for TypeScript helper functions", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/tslib.git" + }, + "main": "tslib.js", + "module": "tslib.es6.js", + "jsnext:main": "tslib.es6.js", + "typings": "tslib.d.ts", + "sideEffects": false, + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + } +} diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js b/node_modules/@aws-crypto/crc32/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js new file mode 100644 index 0000000..0c1b613 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js @@ -0,0 +1,23 @@ +// When on node 14, it validates that all of the commonjs exports +// are correctly re-exported for es modules importers. + +const nodeMajor = Number(process.version.split(".")[0].slice(1)) +if (nodeMajor < 14) { + console.log("Skipping because node does not support module exports.") + process.exit(0) +} + +// ES Modules import via the ./modules folder +import * as esTSLib from "../../modules/index.js" + +// Force a commonjs resolve +import { createRequire } from "module"; +const commonJSTSLib = createRequire(import.meta.url)("../../tslib.js"); + +for (const key in commonJSTSLib) { + if (commonJSTSLib.hasOwnProperty(key)) { + if(!esTSLib[key]) throw new Error(`ESModules is missing ${key} - it needs to be re-exported in ./modules/index.js`) + } +} + +console.log("All exports in commonjs are available for es module consumers.") diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json b/node_modules/@aws-crypto/crc32/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json new file mode 100644 index 0000000..166e509 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "scripts": { + "test": "node index.js" + } +} diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.d.ts b/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.d.ts new file mode 100644 index 0000000..0756b28 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, exports: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; \ No newline at end of file diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.es6.html b/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.es6.html new file mode 100644 index 0000000..b122e41 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.es6.js b/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.es6.js new file mode 100644 index 0000000..0e0d8d0 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.es6.js @@ -0,0 +1,218 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export function __createBinding(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +} + +export function __exportStar(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.html b/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.html new file mode 100644 index 0000000..44c9ba5 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.js b/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.js new file mode 100644 index 0000000..e5b7c9b --- /dev/null +++ b/node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.js @@ -0,0 +1,284 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@aws-crypto/crc32/package.json b/node_modules/@aws-crypto/crc32/package.json new file mode 100644 index 0000000..d7383d9 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/package.json @@ -0,0 +1,28 @@ +{ + "name": "@aws-crypto/crc32", + "version": "3.0.0", + "scripts": { + "prepublishOnly": "tsc", + "pretest": "tsc -p tsconfig.test.json", + "test": "mocha --require ts-node/register test/**/*test.ts" + }, + "main": "./build/index.js", + "types": "./build/index.d.ts", + "repository": { + "type": "git", + "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" + }, + "author": { + "name": "AWS Crypto Tools Team", + "email": "aws-cryptools@amazon.com", + "url": "https://docs.aws.amazon.com/aws-crypto-tools/index.html?id=docs_gateway#lang/en_us" + }, + "homepage": "https://github.com/aws/aws-sdk-js-crypto-helpers/tree/master/packages/crc32", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + }, + "gitHead": "7f56cee8f62bd65cd397eeec29c3c997215bd80c" +} diff --git a/node_modules/@aws-crypto/crc32/src/aws_crc32.ts b/node_modules/@aws-crypto/crc32/src/aws_crc32.ts new file mode 100644 index 0000000..bee48c9 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/src/aws_crc32.ts @@ -0,0 +1,24 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import { SourceData, Checksum } from "@aws-sdk/types"; +import { convertToBuffer, isEmptyData, numToUint8 } from "@aws-crypto/util"; +import { Crc32 } from "./index"; + +export class AwsCrc32 implements Checksum { + private crc32 = new Crc32(); + + update(toHash: SourceData) { + if (isEmptyData(toHash)) return; + + this.crc32.update(convertToBuffer(toHash)); + } + + async digest(): Promise { + return numToUint8(this.crc32.digest()); + } + + reset(): void { + this.crc32 = new Crc32(); + } +} diff --git a/node_modules/@aws-crypto/crc32/src/index.ts b/node_modules/@aws-crypto/crc32/src/index.ts new file mode 100644 index 0000000..4762386 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/src/index.ts @@ -0,0 +1,92 @@ +import {uint32ArrayFrom} from "@aws-crypto/util"; + +export function crc32(data: Uint8Array): number { + return new Crc32().update(data).digest(); +} + +export class Crc32 { + private checksum = 0xffffffff; + + update(data: Uint8Array): this { + for (const byte of data) { + this.checksum = + (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff]; + } + + return this; + } + + digest(): number { + return (this.checksum ^ 0xffffffff) >>> 0; + } +} + +// prettier-ignore +const a_lookUpTable = [ + 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, + 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, + 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, + 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, + 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, + 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, + 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, + 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, + 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, + 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, + 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, + 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, + 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, + 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, + 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, + 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, + 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, + 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, + 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, + 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, + 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, + 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, + 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, + 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, + 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, + 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, + 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, + 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, + 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, + 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, + 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, + 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, + 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, + 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, + 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, + 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, + 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, + 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, + 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, + 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, + 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, + 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, + 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, + 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, + 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, + 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, + 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, + 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, + 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, + 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, + 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, + 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, + 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, + 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, + 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, + 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, + 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, + 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, + 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, + 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, + 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, + 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, + 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, + 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D, +]; +const lookupTable: Uint32Array = uint32ArrayFrom(a_lookUpTable) +export { AwsCrc32 } from "./aws_crc32"; diff --git a/node_modules/@aws-crypto/crc32/tsconfig.json b/node_modules/@aws-crypto/crc32/tsconfig.json new file mode 100644 index 0000000..1691089 --- /dev/null +++ b/node_modules/@aws-crypto/crc32/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "declaration": true, + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./build" + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules/**"] +} diff --git a/node_modules/@aws-crypto/ie11-detection/CHANGELOG.md b/node_modules/@aws-crypto/ie11-detection/CHANGELOG.md new file mode 100644 index 0000000..8232cc3 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/CHANGELOG.md @@ -0,0 +1,46 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.2...v3.0.0) (2023-01-12) + +**Note:** Version bump only for package @aws-crypto/ie11-detection + +## [2.0.2](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.1...v2.0.2) (2022-09-07) + +**Note:** Version bump only for package @aws-crypto/ie11-detection + +# [2.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.2...v2.0.0) (2021-10-25) + +**Note:** Version bump only for package @aws-crypto/ie11-detection + +# [1.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/ie11-detection@1.0.0-alpha.0...@aws-crypto/ie11-detection@1.0.0) (2020-10-22) + +### Bug Fixes + +- replace `sourceRoot` -> `rootDir` in tsconfig ([#169](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/169)) ([d437167](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/d437167b51d1c56a4fcc2bb8a446b74a7e3b7e06)) + +# [1.0.0-alpha.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/ie11-detection@0.1.0-preview.4...@aws-crypto/ie11-detection@1.0.0-alpha.0) (2020-02-07) + +**Note:** Version bump only for package @aws-crypto/ie11-detection + +# [0.1.0-preview.4](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/ie11-detection@0.1.0-preview.2...@aws-crypto/ie11-detection@0.1.0-preview.4) (2020-01-16) + +### Bug Fixes + +- Changed package.json files to point to the right Git repo ([#9](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/9)) ([028245d](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/028245d72e642ca98d82226afb300eb154503c4a)), closes [#8](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/8) +- lerna version maintains package-lock ([#14](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/14)) ([2ef29e1](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/2ef29e13779703a5c9b32e93d18918fcb33b7272)), closes [#13](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/13) + +# [0.1.0-preview.3](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/ie11-detection@0.1.0-preview.2...@aws-crypto/ie11-detection@0.1.0-preview.3) (2019-11-15) + +### Bug Fixes + +- Changed package.json files to point to the right Git repo ([#9](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/9)) ([028245d](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/028245d72e642ca98d82226afb300eb154503c4a)), closes [#8](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/8) +- lerna version maintains package-lock ([#14](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/14)) ([2ef29e1](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/2ef29e13779703a5c9b32e93d18918fcb33b7272)), closes [#13](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/13) + +# [0.1.0-preview.2](https://github.com/aws/aws-javascript-crypto-helpers/compare/@aws-crypto/ie11-detection@0.1.0-preview.1...@aws-crypto/ie11-detection@0.1.0-preview.2) (2019-10-30) + +### Bug Fixes + +- remove /src/ from .npmignore (for sourcemaps) ([#5](https://github.com/aws/aws-javascript-crypto-helpers/issues/5)) ([ec52056](https://github.com/aws/aws-javascript-crypto-helpers/commit/ec52056)) diff --git a/node_modules/@aws-crypto/ie11-detection/LICENSE b/node_modules/@aws-crypto/ie11-detection/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-crypto/ie11-detection/README.md b/node_modules/@aws-crypto/ie11-detection/README.md new file mode 100644 index 0000000..9e411b0 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/README.md @@ -0,0 +1,20 @@ +# @aws-crypto/ie11-detection + +Functions for interact with IE11 browsers Crypto. The IE11 `window.subtle` functions are unique. +This library is used to identify an IE11 `window` and then offering types for crypto functions. +For example see @aws-crypto/random-source-browser + +## Usage + +``` +import {isMsWindow} from '@aws-crypto/ie11-detection' + +if (isMsWindow(window)) { + // use `window.subtle.mscrypto` +} + +``` + +## Test + +`npm test` diff --git a/node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.d.ts b/node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.d.ts new file mode 100644 index 0000000..c647f80 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.d.ts @@ -0,0 +1,19 @@ +import { Key } from "./Key"; +/** + * Represents a cryptographic operation that has been instantiated but not + * necessarily fed all data or finalized. + * + * @see https://msdn.microsoft.com/en-us/library/dn280996(v=vs.85).aspx + */ +export interface CryptoOperation { + readonly algorithm: string; + readonly key: Key; + onabort: (event: Event) => void; + oncomplete: (event: Event) => void; + onerror: (event: Event) => void; + onprogress: (event: Event) => void; + readonly result: ArrayBuffer | undefined; + abort(): void; + finish(): void; + process(buffer: ArrayBufferView): void; +} diff --git a/node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.js b/node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.js new file mode 100644 index 0000000..ea035c9 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=CryptoOperation.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.js.map b/node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.js.map new file mode 100644 index 0000000..95c3ef7 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/CryptoOperation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CryptoOperation.js","sourceRoot":"","sources":["../src/CryptoOperation.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/Key.d.ts b/node_modules/@aws-crypto/ie11-detection/build/Key.d.ts new file mode 100644 index 0000000..c8bd3b3 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/Key.d.ts @@ -0,0 +1,12 @@ +/** + * The result of a successful KeyOperation. + * + * @see {KeyOperation} + * @see https://msdn.microsoft.com/en-us/library/dn302313(v=vs.85).aspx + */ +export interface Key { + readonly algorithm: string; + readonly extractable: boolean; + readonly keyUsage: Array; + readonly type: string; +} diff --git a/node_modules/@aws-crypto/ie11-detection/build/Key.js b/node_modules/@aws-crypto/ie11-detection/build/Key.js new file mode 100644 index 0000000..b24b9af --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/Key.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=Key.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/Key.js.map b/node_modules/@aws-crypto/ie11-detection/build/Key.js.map new file mode 100644 index 0000000..c0454ea --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/Key.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Key.js","sourceRoot":"","sources":["../src/Key.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/KeyOperation.d.ts b/node_modules/@aws-crypto/ie11-detection/build/KeyOperation.d.ts new file mode 100644 index 0000000..2e7c9a6 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/KeyOperation.d.ts @@ -0,0 +1,12 @@ +import { Key } from "./Key"; +/** + * Represents the return of a key-related operation that may or may not have + * been completed. + * + * @see https://msdn.microsoft.com/en-us/library/dn302314(v=vs.85).aspx + */ +export interface KeyOperation { + oncomplete: (event: Event) => void; + onerror: (event: Event) => void; + readonly result: Key | undefined; +} diff --git a/node_modules/@aws-crypto/ie11-detection/build/KeyOperation.js b/node_modules/@aws-crypto/ie11-detection/build/KeyOperation.js new file mode 100644 index 0000000..0447098 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/KeyOperation.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=KeyOperation.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/KeyOperation.js.map b/node_modules/@aws-crypto/ie11-detection/build/KeyOperation.js.map new file mode 100644 index 0000000..3b343d3 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/KeyOperation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"KeyOperation.js","sourceRoot":"","sources":["../src/KeyOperation.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.d.ts b/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.d.ts new file mode 100644 index 0000000..f52063a --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.d.ts @@ -0,0 +1,33 @@ +import { CryptoOperation } from "./CryptoOperation"; +import { Key } from "./Key"; +import { KeyOperation } from "./KeyOperation"; +export type KeyUsage = "encrypt" | "decrypt" | "sign" | "verify" | "derive" | "wrapKey" | "unwrapKey" | "importKey"; +export type EncryptionOrVerificationAlgorithm = "RSAES-PKCS1-v1_5"; +export type Ie11EncryptionAlgorithm = "AES-CBC" | "AES-GCM" | "RSA-OAEP" | EncryptionOrVerificationAlgorithm; +export type Ie11DigestAlgorithm = "SHA-1" | "SHA-256" | "SHA-384"; +export interface HashAlgorithm { + name: Ie11DigestAlgorithm; +} +export interface HmacAlgorithm { + name: "HMAC"; + hash: HashAlgorithm; +} +export type SigningAlgorithm = HmacAlgorithm; +/** + * Represent ths SubtleCrypto interface as implemented in Internet Explorer 11. + * This implementation was based on an earlier version of the WebCrypto API and + * differs from the `window.crypto.subtle` object exposed in Chrome, Safari, + * Firefox, and MS Edge. + * + * @see https://msdn.microsoft.com/en-us/library/dn302325(v=vs.85).aspx + */ +export interface MsSubtleCrypto { + decrypt(algorithm: Ie11EncryptionAlgorithm, key: Key, buffer?: ArrayBufferView): CryptoOperation; + digest(algorithm: Ie11DigestAlgorithm, buffer?: ArrayBufferView): CryptoOperation; + encrypt(algorithm: Ie11EncryptionAlgorithm, key: Key, buffer?: ArrayBufferView): CryptoOperation; + exportKey(format: string, key: Key): KeyOperation; + generateKey(algorithm: SigningAlgorithm | Ie11EncryptionAlgorithm, extractable?: boolean, keyUsages?: Array): KeyOperation; + importKey(format: string, keyData: ArrayBufferView, algorithm: any, extractable?: boolean, keyUsages?: Array): KeyOperation; + sign(algorithm: SigningAlgorithm, key: Key, buffer?: ArrayBufferView): CryptoOperation; + verify(algorithm: SigningAlgorithm | EncryptionOrVerificationAlgorithm, key: Key, signature: ArrayBufferView, buffer?: ArrayBufferView): CryptoOperation; +} diff --git a/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.js b/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.js new file mode 100644 index 0000000..479b08a --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=MsSubtleCrypto.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.js.map b/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.js.map new file mode 100644 index 0000000..1955d28 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MsSubtleCrypto.js","sourceRoot":"","sources":["../src/MsSubtleCrypto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/MsWindow.d.ts b/node_modules/@aws-crypto/ie11-detection/build/MsWindow.d.ts new file mode 100644 index 0000000..d5aaada --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/MsWindow.d.ts @@ -0,0 +1,21 @@ +import { MsSubtleCrypto } from "./MsSubtleCrypto"; +/** + * The value accessible as `window.msCrypto` in Internet Explorer 11. + */ +export interface MsCrypto { + getRandomValues: (toFill: Uint8Array) => void; + subtle: MsSubtleCrypto; +} +/** + * The `window` object in Internet Explorer 11. This interface does not + * exhaustively document the prefixed features of `window` in IE11. + */ +export interface MsWindow extends Window { + MSInputMethodContext: any; + msCrypto: MsCrypto; +} +/** + * Determines if the provided window is (or is like) the window object one would + * expect to encounter in Internet Explorer 11. + */ +export declare function isMsWindow(window: Window): window is MsWindow; diff --git a/node_modules/@aws-crypto/ie11-detection/build/MsWindow.js b/node_modules/@aws-crypto/ie11-detection/build/MsWindow.js new file mode 100644 index 0000000..ceeb8f5 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/MsWindow.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isMsWindow = void 0; +var msSubtleCryptoMethods = [ + "decrypt", + "digest", + "encrypt", + "exportKey", + "generateKey", + "importKey", + "sign", + "verify" +]; +function quacksLikeAnMsWindow(window) { + return "MSInputMethodContext" in window && "msCrypto" in window; +} +/** + * Determines if the provided window is (or is like) the window object one would + * expect to encounter in Internet Explorer 11. + */ +function isMsWindow(window) { + if (quacksLikeAnMsWindow(window) && window.msCrypto.subtle !== undefined) { + var _a = window.msCrypto, getRandomValues = _a.getRandomValues, subtle_1 = _a.subtle; + return msSubtleCryptoMethods + .map(function (methodName) { return subtle_1[methodName]; }) + .concat(getRandomValues) + .every(function (method) { return typeof method === "function"; }); + } + return false; +} +exports.isMsWindow = isMsWindow; +//# sourceMappingURL=MsWindow.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/MsWindow.js.map b/node_modules/@aws-crypto/ie11-detection/build/MsWindow.js.map new file mode 100644 index 0000000..34223c9 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/MsWindow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MsWindow.js","sourceRoot":"","sources":["../src/MsWindow.ts"],"names":[],"mappings":";;;AAYA,IAAM,qBAAqB,GAA8B;IACvD,SAAS;IACT,QAAQ;IACR,SAAS;IACT,WAAW;IACX,aAAa;IACb,WAAW;IACX,MAAM;IACN,QAAQ;CACT,CAAC;AAmBF,SAAS,oBAAoB,CAAC,MAAc;IAC1C,OAAO,sBAAsB,IAAI,MAAM,IAAI,UAAU,IAAI,MAAM,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,SAAgB,UAAU,CAAC,MAAc;IACvC,IAAI,oBAAoB,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE;QAClE,IAAA,KAA8B,MAAM,CAAC,QAAQ,EAA3C,eAAe,qBAAA,EAAE,QAAM,YAAoB,CAAC;QACpD,OAAO,qBAAqB;aACzB,GAAG,CAAW,UAAA,UAAU,IAAI,OAAA,QAAM,CAAC,UAAU,CAAC,EAAlB,CAAkB,CAAC;aAC/C,MAAM,CAAC,eAAe,CAAC;aACvB,KAAK,CAAC,UAAA,MAAM,IAAI,OAAA,OAAO,MAAM,KAAK,UAAU,EAA5B,CAA4B,CAAC,CAAC;KAClD;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAVD,gCAUC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/index.d.ts b/node_modules/@aws-crypto/ie11-detection/build/index.d.ts new file mode 100644 index 0000000..1e8c5e3 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/index.d.ts @@ -0,0 +1,5 @@ +export * from "./CryptoOperation"; +export * from "./Key"; +export * from "./KeyOperation"; +export * from "./MsSubtleCrypto"; +export * from "./MsWindow"; diff --git a/node_modules/@aws-crypto/ie11-detection/build/index.js b/node_modules/@aws-crypto/ie11-detection/build/index.js new file mode 100644 index 0000000..2de39c1 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/index.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +tslib_1.__exportStar(require("./CryptoOperation"), exports); +tslib_1.__exportStar(require("./Key"), exports); +tslib_1.__exportStar(require("./KeyOperation"), exports); +tslib_1.__exportStar(require("./MsSubtleCrypto"), exports); +tslib_1.__exportStar(require("./MsWindow"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/build/index.js.map b/node_modules/@aws-crypto/ie11-detection/build/index.js.map new file mode 100644 index 0000000..8430e7a --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/build/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,gDAAsB;AACtB,yDAA+B;AAC/B,2DAAiC;AACjC,qDAA2B"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/CopyrightNotice.txt b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 0000000..3d4c823 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/LICENSE.txt b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/LICENSE.txt new file mode 100644 index 0000000..bfe6430 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/README.md b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/README.md new file mode 100644 index 0000000..a5b2692 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/README.md @@ -0,0 +1,142 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 2.3.3 or later +npm install tslib + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 2.3.3 or later +yarn add tslib + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 2.3.3 or later +bower install tslib + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 2.3.3 or later +jspm install tslib + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/modules/index.js b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/modules/index.js new file mode 100644 index 0000000..d241d04 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/modules/package.json b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/modules/package.json new file mode 100644 index 0000000..aafa0e4 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/package.json b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/package.json new file mode 100644 index 0000000..f8c2a53 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/package.json @@ -0,0 +1,37 @@ +{ + "name": "tslib", + "author": "Microsoft Corp.", + "homepage": "https://www.typescriptlang.org/", + "version": "1.14.1", + "license": "0BSD", + "description": "Runtime library for TypeScript helper functions", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/tslib.git" + }, + "main": "tslib.js", + "module": "tslib.es6.js", + "jsnext:main": "tslib.es6.js", + "typings": "tslib.d.ts", + "sideEffects": false, + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + } +} diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js new file mode 100644 index 0000000..0c1b613 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js @@ -0,0 +1,23 @@ +// When on node 14, it validates that all of the commonjs exports +// are correctly re-exported for es modules importers. + +const nodeMajor = Number(process.version.split(".")[0].slice(1)) +if (nodeMajor < 14) { + console.log("Skipping because node does not support module exports.") + process.exit(0) +} + +// ES Modules import via the ./modules folder +import * as esTSLib from "../../modules/index.js" + +// Force a commonjs resolve +import { createRequire } from "module"; +const commonJSTSLib = createRequire(import.meta.url)("../../tslib.js"); + +for (const key in commonJSTSLib) { + if (commonJSTSLib.hasOwnProperty(key)) { + if(!esTSLib[key]) throw new Error(`ESModules is missing ${key} - it needs to be re-exported in ./modules/index.js`) + } +} + +console.log("All exports in commonjs are available for es module consumers.") diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json new file mode 100644 index 0000000..166e509 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "scripts": { + "test": "node index.js" + } +} diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.d.ts b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.d.ts new file mode 100644 index 0000000..0756b28 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, exports: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.es6.html b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.es6.html new file mode 100644 index 0000000..b122e41 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.es6.js b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.es6.js new file mode 100644 index 0000000..0e0d8d0 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.es6.js @@ -0,0 +1,218 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export function __createBinding(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +} + +export function __exportStar(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.html b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.html new file mode 100644 index 0000000..44c9ba5 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.js b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.js new file mode 100644 index 0000000..e5b7c9b --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/node_modules/tslib/tslib.js @@ -0,0 +1,284 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@aws-crypto/ie11-detection/package.json b/node_modules/@aws-crypto/ie11-detection/package.json new file mode 100644 index 0000000..1349971 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/package.json @@ -0,0 +1,26 @@ +{ + "name": "@aws-crypto/ie11-detection", + "version": "3.0.0", + "description": "Provides functions and types for detecting if the host environment is IE11", + "scripts": { + "pretest": "tsc -p tsconfig.json", + "test": "mocha --require ts-node/register test/**/*test.ts" + }, + "repository": { + "type": "git", + "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" + }, + "author": { + "name": "AWS Crypto Tools Team", + "email": "aws-cryptools@amazon.com", + "url": "https://docs.aws.amazon.com/aws-crypto-tools/index.html?id=docs_gateway#lang/en_us" + }, + "homepage": "https://github.com/aws/aws-sdk-js-crypto-helpers/tree/master/packages/ie11-detection", + "license": "Apache-2.0", + "main": "./build/index.js", + "types": "./build/index.d.ts", + "dependencies": { + "tslib": "^1.11.1" + }, + "gitHead": "7f56cee8f62bd65cd397eeec29c3c997215bd80c" +} diff --git a/node_modules/@aws-crypto/ie11-detection/src/CryptoOperation.ts b/node_modules/@aws-crypto/ie11-detection/src/CryptoOperation.ts new file mode 100644 index 0000000..528024b --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/src/CryptoOperation.ts @@ -0,0 +1,21 @@ +import { Key } from "./Key"; + +/** + * Represents a cryptographic operation that has been instantiated but not + * necessarily fed all data or finalized. + * + * @see https://msdn.microsoft.com/en-us/library/dn280996(v=vs.85).aspx + */ +export interface CryptoOperation { + readonly algorithm: string; + readonly key: Key; + onabort: (event: Event) => void; + oncomplete: (event: Event) => void; + onerror: (event: Event) => void; + onprogress: (event: Event) => void; + readonly result: ArrayBuffer | undefined; + + abort(): void; + finish(): void; + process(buffer: ArrayBufferView): void; +} diff --git a/node_modules/@aws-crypto/ie11-detection/src/Key.ts b/node_modules/@aws-crypto/ie11-detection/src/Key.ts new file mode 100644 index 0000000..46d171f --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/src/Key.ts @@ -0,0 +1,12 @@ +/** + * The result of a successful KeyOperation. + * + * @see {KeyOperation} + * @see https://msdn.microsoft.com/en-us/library/dn302313(v=vs.85).aspx + */ +export interface Key { + readonly algorithm: string; + readonly extractable: boolean; + readonly keyUsage: Array; + readonly type: string; +} diff --git a/node_modules/@aws-crypto/ie11-detection/src/KeyOperation.ts b/node_modules/@aws-crypto/ie11-detection/src/KeyOperation.ts new file mode 100644 index 0000000..87b61fb --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/src/KeyOperation.ts @@ -0,0 +1,13 @@ +import { Key } from "./Key"; + +/** + * Represents the return of a key-related operation that may or may not have + * been completed. + * + * @see https://msdn.microsoft.com/en-us/library/dn302314(v=vs.85).aspx + */ +export interface KeyOperation { + oncomplete: (event: Event) => void; + onerror: (event: Event) => void; + readonly result: Key | undefined; +} diff --git a/node_modules/@aws-crypto/ie11-detection/src/MsSubtleCrypto.ts b/node_modules/@aws-crypto/ie11-detection/src/MsSubtleCrypto.ts new file mode 100644 index 0000000..9d1d656 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/src/MsSubtleCrypto.ts @@ -0,0 +1,88 @@ +import { CryptoOperation } from "./CryptoOperation"; +import { Key } from "./Key"; +import { KeyOperation } from "./KeyOperation"; + +export type KeyUsage = + | "encrypt" + | "decrypt" + | "sign" + | "verify" + | "derive" + | "wrapKey" + | "unwrapKey" + | "importKey"; + +export type EncryptionOrVerificationAlgorithm = "RSAES-PKCS1-v1_5"; +export type Ie11EncryptionAlgorithm = + | "AES-CBC" + | "AES-GCM" + | "RSA-OAEP" + | EncryptionOrVerificationAlgorithm; +export type Ie11DigestAlgorithm = "SHA-1" | "SHA-256" | "SHA-384"; + +export interface HashAlgorithm { + name: Ie11DigestAlgorithm; +} + +export interface HmacAlgorithm { + name: "HMAC"; + hash: HashAlgorithm; +} + +export type SigningAlgorithm = HmacAlgorithm; + +/** + * Represent ths SubtleCrypto interface as implemented in Internet Explorer 11. + * This implementation was based on an earlier version of the WebCrypto API and + * differs from the `window.crypto.subtle` object exposed in Chrome, Safari, + * Firefox, and MS Edge. + * + * @see https://msdn.microsoft.com/en-us/library/dn302325(v=vs.85).aspx + */ +export interface MsSubtleCrypto { + decrypt( + algorithm: Ie11EncryptionAlgorithm, + key: Key, + buffer?: ArrayBufferView + ): CryptoOperation; + + digest( + algorithm: Ie11DigestAlgorithm, + buffer?: ArrayBufferView + ): CryptoOperation; + + encrypt( + algorithm: Ie11EncryptionAlgorithm, + key: Key, + buffer?: ArrayBufferView + ): CryptoOperation; + + exportKey(format: string, key: Key): KeyOperation; + + generateKey( + algorithm: SigningAlgorithm | Ie11EncryptionAlgorithm, + extractable?: boolean, + keyUsages?: Array + ): KeyOperation; + + importKey( + format: string, + keyData: ArrayBufferView, + algorithm: any, + extractable?: boolean, + keyUsages?: Array + ): KeyOperation; + + sign( + algorithm: SigningAlgorithm, + key: Key, + buffer?: ArrayBufferView + ): CryptoOperation; + + verify( + algorithm: SigningAlgorithm | EncryptionOrVerificationAlgorithm, + key: Key, + signature: ArrayBufferView, + buffer?: ArrayBufferView + ): CryptoOperation; +} diff --git a/node_modules/@aws-crypto/ie11-detection/src/MsWindow.ts b/node_modules/@aws-crypto/ie11-detection/src/MsWindow.ts new file mode 100644 index 0000000..0510cfe --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/src/MsWindow.ts @@ -0,0 +1,59 @@ +import { MsSubtleCrypto } from "./MsSubtleCrypto"; + +type SubtleCryptoMethod = + | "decrypt" + | "digest" + | "encrypt" + | "exportKey" + | "generateKey" + | "importKey" + | "sign" + | "verify"; + +const msSubtleCryptoMethods: Array = [ + "decrypt", + "digest", + "encrypt", + "exportKey", + "generateKey", + "importKey", + "sign", + "verify" +]; + +/** + * The value accessible as `window.msCrypto` in Internet Explorer 11. + */ +export interface MsCrypto { + getRandomValues: (toFill: Uint8Array) => void; + subtle: MsSubtleCrypto; +} + +/** + * The `window` object in Internet Explorer 11. This interface does not + * exhaustively document the prefixed features of `window` in IE11. + */ +export interface MsWindow extends Window { + MSInputMethodContext: any; + msCrypto: MsCrypto; +} + +function quacksLikeAnMsWindow(window: Window): window is MsWindow { + return "MSInputMethodContext" in window && "msCrypto" in window; +} + +/** + * Determines if the provided window is (or is like) the window object one would + * expect to encounter in Internet Explorer 11. + */ +export function isMsWindow(window: Window): window is MsWindow { + if (quacksLikeAnMsWindow(window) && window.msCrypto.subtle !== undefined) { + const { getRandomValues, subtle } = window.msCrypto; + return msSubtleCryptoMethods + .map(methodName => subtle[methodName]) + .concat(getRandomValues) + .every(method => typeof method === "function"); + } + + return false; +} diff --git a/node_modules/@aws-crypto/ie11-detection/src/index.ts b/node_modules/@aws-crypto/ie11-detection/src/index.ts new file mode 100644 index 0000000..1e8c5e3 --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/src/index.ts @@ -0,0 +1,5 @@ +export * from "./CryptoOperation"; +export * from "./Key"; +export * from "./KeyOperation"; +export * from "./MsSubtleCrypto"; +export * from "./MsWindow"; diff --git a/node_modules/@aws-crypto/ie11-detection/tsconfig.json b/node_modules/@aws-crypto/ie11-detection/tsconfig.json new file mode 100644 index 0000000..501a62f --- /dev/null +++ b/node_modules/@aws-crypto/ie11-detection/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["dom", "es5", "es2015.collection"], + "strict": true, + "sourceMap": true, + "declaration": true, + "stripInternal": true, + "rootDir": "./src", + "outDir": "./build", + "importHelpers": true, + "noEmitHelpers": true + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules/**"] +} diff --git a/node_modules/@aws-crypto/sha256-browser/CHANGELOG.md b/node_modules/@aws-crypto/sha256-browser/CHANGELOG.md new file mode 100644 index 0000000..92148fc --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/CHANGELOG.md @@ -0,0 +1,88 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.2...v3.0.0) (2023-01-12) + +### Bug Fixes + +- **docs:** sha256 packages, clarify hmac support ([#455](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/455)) ([1be5043](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/1be5043325991f3f5ccb52a8dd928f004b4d442e)) + +- feat!: replace Hash implementations with Checksum interface (#492) ([da43dc0](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/da43dc0fdf669d9ebb5bfb1b1f7c79e46c4aaae1)), closes [#492](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/492) + +### BREAKING CHANGES + +- All classes that implemented `Hash` now implement `Checksum`. + +## [2.0.2](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.1...v2.0.2) (2022-09-07) + +### Bug Fixes + +- **#337:** update @aws-sdk/types ([#373](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/373)) ([b26a811](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/b26a811a392f5209c7ec7e57251500d4d78f97ff)), closes [#337](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/337) + +## [2.0.1](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.0...v2.0.1) (2021-12-09) + +**Note:** Version bump only for package @aws-crypto/sha256-browser + +# [2.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.2...v2.0.0) (2021-10-25) + +**Note:** Version bump only for package @aws-crypto/sha256-browser + +## [1.2.2](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.1...v1.2.2) (2021-10-12) + +**Note:** Version bump only for package @aws-crypto/sha256-browser + +## [1.2.1](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.0...v1.2.1) (2021-09-17) + +**Note:** Version bump only for package @aws-crypto/sha256-browser + +# [1.2.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.1.1...v1.2.0) (2021-09-17) + +### Features + +- add @aws-crypto/util ([8f489cb](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/8f489cbe4c0e134f826bac66f1bf5172597048b9)) + +## [1.1.1](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-browser@1.1.0...@aws-crypto/sha256-browser@1.1.1) (2021-07-13) + +### Bug Fixes + +- **sha256-browser:** throw errors not string ([#194](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/194)) ([7fa7ac4](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/7fa7ac445ef7a04dfb1ff479e7114aba045b2b2c)) + +# [1.1.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-browser@1.0.0...@aws-crypto/sha256-browser@1.1.0) (2021-01-13) + +### Bug Fixes + +- remove package lock ([6002a5a](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/6002a5ab9218dc8798c19dc205d3eebd3bec5b43)) +- **aws-crypto:** export explicit dependencies on [@aws-types](https://github.com/aws-types) ([6a1873a](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/6a1873a4dcc2aaa4a1338595703cfa7099f17b8c)) +- **deps-dev:** move @aws-sdk/types to devDependencies ([#188](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/188)) ([08efdf4](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/08efdf46dcc612d88c441e29945d787f253ee77d)) + +# [1.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-browser@1.0.0-alpha.0...@aws-crypto/sha256-browser@1.0.0) (2020-10-22) + +**Note:** Version bump only for package @aws-crypto/sha256-browser + +# [1.0.0-alpha.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-browser@0.1.0-preview.4...@aws-crypto/sha256-browser@1.0.0-alpha.0) (2020-02-07) + +**Note:** Version bump only for package @aws-crypto/sha256-browser + +# [0.1.0-preview.4](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-browser@0.1.0-preview.2...@aws-crypto/sha256-browser@0.1.0-preview.4) (2020-01-16) + +### Bug Fixes + +- Changed package.json files to point to the right Git repo ([#9](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/9)) ([028245d](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/028245d72e642ca98d82226afb300eb154503c4a)), closes [#8](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/8) +- es2015.iterable required ([#10](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/10)) ([6e08d83](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/6e08d83c33667ad8cbeeaaa7cedf1bbe05f79ed8)) +- lerna version maintains package-lock ([#14](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/14)) ([2ef29e1](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/2ef29e13779703a5c9b32e93d18918fcb33b7272)), closes [#13](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/13) + +# [0.1.0-preview.3](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-browser@0.1.0-preview.2...@aws-crypto/sha256-browser@0.1.0-preview.3) (2019-11-15) + +### Bug Fixes + +- Changed package.json files to point to the right Git repo ([#9](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/9)) ([028245d](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/028245d72e642ca98d82226afb300eb154503c4a)), closes [#8](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/8) +- es2015.iterable required ([#10](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/10)) ([6e08d83](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/6e08d83c33667ad8cbeeaaa7cedf1bbe05f79ed8)) +- lerna version maintains package-lock ([#14](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/14)) ([2ef29e1](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/2ef29e13779703a5c9b32e93d18918fcb33b7272)), closes [#13](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/13) + +# [0.1.0-preview.2](https://github.com/aws/aws-javascript-crypto-helpers/compare/@aws-crypto/sha256-browser@0.1.0-preview.1...@aws-crypto/sha256-browser@0.1.0-preview.2) (2019-10-30) + +### Bug Fixes + +- remove /src/ from .npmignore (for sourcemaps) ([#5](https://github.com/aws/aws-javascript-crypto-helpers/issues/5)) ([ec52056](https://github.com/aws/aws-javascript-crypto-helpers/commit/ec52056)) diff --git a/node_modules/@aws-crypto/sha256-browser/LICENSE b/node_modules/@aws-crypto/sha256-browser/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-crypto/sha256-browser/README.md b/node_modules/@aws-crypto/sha256-browser/README.md new file mode 100644 index 0000000..75bf105 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/README.md @@ -0,0 +1,31 @@ +# @aws-crypto/sha256-browser + +SHA256 wrapper for browsers that prefers `window.crypto.subtle` but will +fall back to a pure JS implementation in @aws-crypto/sha256-js +to provide a consistent interface for SHA256. + +## Usage + +- To hash "some data" +``` +import {Sha256} from '@aws-crypto/sha256-browser' + +const hash = new Sha256(); +hash.update('some data'); +const result = await hash.digest(); + +``` + +- To hmac "some data" with "a key" +``` +import {Sha256} from '@aws-crypto/sha256-browser' + +const hash = new Sha256('a key'); +hash.update('some data'); +const result = await hash.digest(); + +``` + +## Test + +`npm test` diff --git a/node_modules/@aws-crypto/sha256-browser/build/constants.d.ts b/node_modules/@aws-crypto/sha256-browser/build/constants.d.ts new file mode 100644 index 0000000..fe8def7 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/constants.d.ts @@ -0,0 +1,10 @@ +export declare const SHA_256_HASH: { + name: "SHA-256"; +}; +export declare const SHA_256_HMAC_ALGO: { + name: "HMAC"; + hash: { + name: "SHA-256"; + }; +}; +export declare const EMPTY_DATA_SHA_256: Uint8Array; diff --git a/node_modules/@aws-crypto/sha256-browser/build/constants.js b/node_modules/@aws-crypto/sha256-browser/build/constants.js new file mode 100644 index 0000000..acb5c55 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/constants.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EMPTY_DATA_SHA_256 = exports.SHA_256_HMAC_ALGO = exports.SHA_256_HASH = void 0; +exports.SHA_256_HASH = { name: "SHA-256" }; +exports.SHA_256_HMAC_ALGO = { + name: "HMAC", + hash: exports.SHA_256_HASH +}; +exports.EMPTY_DATA_SHA_256 = new Uint8Array([ + 227, + 176, + 196, + 66, + 152, + 252, + 28, + 20, + 154, + 251, + 244, + 200, + 153, + 111, + 185, + 36, + 39, + 174, + 65, + 228, + 100, + 155, + 147, + 76, + 164, + 149, + 153, + 27, + 120, + 82, + 184, + 85 +]); +//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/constants.js.map b/node_modules/@aws-crypto/sha256-browser/build/constants.js.map new file mode 100644 index 0000000..d7cd826 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/constants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAwB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAExD,QAAA,iBAAiB,GAAgD;IAC5E,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,oBAAY;CACnB,CAAC;AAEW,QAAA,kBAAkB,GAAG,IAAI,UAAU,CAAC;IAC/C,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,GAAG;IACH,GAAG;IACH,EAAE;IACF,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,EAAE;IACF,GAAG;IACH,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,GAAG;IACH,EAAE;IACF,GAAG;IACH,EAAE;CACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.d.ts b/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.d.ts new file mode 100644 index 0000000..055d3ef --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.d.ts @@ -0,0 +1,8 @@ +import { Checksum, SourceData } from "@aws-sdk/types"; +export declare class Sha256 implements Checksum { + private hash; + constructor(secret?: SourceData); + update(data: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void; + digest(): Promise; + reset(): void; +} diff --git a/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js b/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js new file mode 100644 index 0000000..f2f74e8 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Sha256 = void 0; +var ie11Sha256_1 = require("./ie11Sha256"); +var webCryptoSha256_1 = require("./webCryptoSha256"); +var sha256_js_1 = require("@aws-crypto/sha256-js"); +var supports_web_crypto_1 = require("@aws-crypto/supports-web-crypto"); +var ie11_detection_1 = require("@aws-crypto/ie11-detection"); +var util_locate_window_1 = require("@aws-sdk/util-locate-window"); +var util_1 = require("@aws-crypto/util"); +var Sha256 = /** @class */ (function () { + function Sha256(secret) { + if ((0, supports_web_crypto_1.supportsWebCrypto)((0, util_locate_window_1.locateWindow)())) { + this.hash = new webCryptoSha256_1.Sha256(secret); + } + else if ((0, ie11_detection_1.isMsWindow)((0, util_locate_window_1.locateWindow)())) { + this.hash = new ie11Sha256_1.Sha256(secret); + } + else { + this.hash = new sha256_js_1.Sha256(secret); + } + } + Sha256.prototype.update = function (data, encoding) { + this.hash.update((0, util_1.convertToBuffer)(data)); + }; + Sha256.prototype.digest = function () { + return this.hash.digest(); + }; + Sha256.prototype.reset = function () { + this.hash.reset(); + }; + return Sha256; +}()); +exports.Sha256 = Sha256; +//# sourceMappingURL=crossPlatformSha256.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js.map b/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js.map new file mode 100644 index 0000000..204968f --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js.map @@ -0,0 +1 @@ +{"version":3,"file":"crossPlatformSha256.js","sourceRoot":"","sources":["../src/crossPlatformSha256.ts"],"names":[],"mappings":";;;AAAA,2CAAoD;AACpD,qDAA8D;AAC9D,mDAA2D;AAE3D,uEAAoE;AACpE,6DAAwD;AACxD,kEAA2D;AAC3D,yCAAmD;AAEnD;IAGE,gBAAY,MAAmB;QAC7B,IAAI,IAAA,uCAAiB,EAAC,IAAA,iCAAY,GAAE,CAAC,EAAE;YACrC,IAAI,CAAC,IAAI,GAAG,IAAI,wBAAe,CAAC,MAAM,CAAC,CAAC;SACzC;aAAM,IAAI,IAAA,2BAAU,EAAC,IAAA,iCAAY,GAAE,CAAC,EAAE;YACrC,IAAI,CAAC,IAAI,GAAG,IAAI,mBAAU,CAAC,MAAM,CAAC,CAAC;SACpC;aAAM;YACL,IAAI,CAAC,IAAI,GAAG,IAAI,kBAAQ,CAAC,MAAM,CAAC,CAAC;SAClC;IACH,CAAC;IAED,uBAAM,GAAN,UAAO,IAAgB,EAAE,QAAsC;QAC7D,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAA,sBAAe,EAAC,IAAI,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,uBAAM,GAAN;QACE,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC;IAED,sBAAK,GAAL;QACE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;IACH,aAAC;AAAD,CAAC,AAxBD,IAwBC;AAxBY,wBAAM"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.d.ts b/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.d.ts new file mode 100644 index 0000000..ab0e1bd --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.d.ts @@ -0,0 +1,9 @@ +import { Checksum, SourceData } from "@aws-sdk/types"; +export declare class Sha256 implements Checksum { + private readonly secret?; + private operation; + constructor(secret?: SourceData); + update(toHash: SourceData): void; + digest(): Promise; + reset(): void; +} diff --git a/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js b/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js new file mode 100644 index 0000000..f84c630 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Sha256 = void 0; +var isEmptyData_1 = require("./isEmptyData"); +var constants_1 = require("./constants"); +var util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser"); +var util_locate_window_1 = require("@aws-sdk/util-locate-window"); +var Sha256 = /** @class */ (function () { + function Sha256(secret) { + this.secret = secret; + this.reset(); + } + Sha256.prototype.update = function (toHash) { + var _this = this; + if ((0, isEmptyData_1.isEmptyData)(toHash)) { + return; + } + this.operation = this.operation.then(function (operation) { + operation.onerror = function () { + _this.operation = Promise.reject(new Error("Error encountered updating hash")); + }; + operation.process(toArrayBufferView(toHash)); + return operation; + }); + this.operation.catch(function () { }); + }; + Sha256.prototype.digest = function () { + return this.operation.then(function (operation) { + return new Promise(function (resolve, reject) { + operation.onerror = function () { + reject(new Error("Error encountered finalizing hash")); + }; + operation.oncomplete = function () { + if (operation.result) { + resolve(new Uint8Array(operation.result)); + } + reject(new Error("Error encountered finalizing hash")); + }; + operation.finish(); + }); + }); + }; + Sha256.prototype.reset = function () { + if (this.secret) { + this.operation = getKeyPromise(this.secret).then(function (keyData) { + return (0, util_locate_window_1.locateWindow)().msCrypto.subtle.sign(constants_1.SHA_256_HMAC_ALGO, keyData); + }); + this.operation.catch(function () { }); + } + else { + this.operation = Promise.resolve((0, util_locate_window_1.locateWindow)().msCrypto.subtle.digest("SHA-256")); + } + }; + return Sha256; +}()); +exports.Sha256 = Sha256; +function getKeyPromise(secret) { + return new Promise(function (resolve, reject) { + var keyOperation = (0, util_locate_window_1.locateWindow)().msCrypto.subtle.importKey("raw", toArrayBufferView(secret), constants_1.SHA_256_HMAC_ALGO, false, ["sign"]); + keyOperation.oncomplete = function () { + if (keyOperation.result) { + resolve(keyOperation.result); + } + reject(new Error("ImportKey completed without importing key.")); + }; + keyOperation.onerror = function () { + reject(new Error("ImportKey failed to import key.")); + }; + }); +} +function toArrayBufferView(data) { + if (typeof data === "string") { + return (0, util_utf8_browser_1.fromUtf8)(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +//# sourceMappingURL=ie11Sha256.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js.map b/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js.map new file mode 100644 index 0000000..cbf50aa --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ie11Sha256.js","sourceRoot":"","sources":["../src/ie11Sha256.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,yCAAgD;AAEhD,gEAAsD;AAEtD,kEAA2D;AAE3D;IAIE,gBAAY,MAAmB;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,uBAAM,GAAN,UAAO,MAAkB;QAAzB,iBAgBC;QAfC,IAAI,IAAA,yBAAW,EAAC,MAAM,CAAC,EAAE;YACvB,OAAO;SACR;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAA,SAAS;YAC5C,SAAS,CAAC,OAAO,GAAG;gBAClB,KAAI,CAAC,SAAS,GAAG,OAAO,CAAC,MAAM,CAC7B,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAC7C,CAAC;YACJ,CAAC,CAAC;YACF,SAAS,CAAC,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;YAE7C,OAAO,SAAS,CAAC;QACnB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAO,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,uBAAM,GAAN;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CACxB,UAAA,SAAS;YACP,OAAA,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;gBAC1B,SAAS,CAAC,OAAO,GAAG;oBAClB,MAAM,CAAC,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC;gBACzD,CAAC,CAAC;gBACF,SAAS,CAAC,UAAU,GAAG;oBACrB,IAAI,SAAS,CAAC,MAAM,EAAE;wBACpB,OAAO,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;qBAC3C;oBACD,MAAM,CAAC,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC;gBACzD,CAAC,CAAC;gBAEF,SAAS,CAAC,MAAM,EAAE,CAAC;YACrB,CAAC,CAAC;QAZF,CAYE,CACL,CAAC;IACJ,CAAC;IAED,sBAAK,GAAL;QACE,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,UAAA,OAAO;gBACpD,OAAC,IAAA,iCAAY,GAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAC7C,6BAAiB,EACjB,OAAO,CACV;YAHD,CAGC,CACJ,CAAC;YACF,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAO,CAAC,CAAC,CAAC;SAChC;aAAM;YACL,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,OAAO,CAC3B,IAAA,iCAAY,GAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CACjE,CAAC;SACH;IACH,CAAC;IACH,aAAC;AAAD,CAAC,AA7DD,IA6DC;AA7DY,wBAAM;AA+DnB,SAAS,aAAa,CAAC,MAAkB;IACvC,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QACjC,IAAM,YAAY,GAAI,IAAA,iCAAY,GAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CACzE,KAAK,EACL,iBAAiB,CAAC,MAAM,CAAC,EACzB,6BAAiB,EACjB,KAAK,EACL,CAAC,MAAM,CAAC,CACT,CAAC;QAEF,YAAY,CAAC,UAAU,GAAG;YACxB,IAAI,YAAY,CAAC,MAAM,EAAE;gBACvB,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;aAC9B;YAED,MAAM,CAAC,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC,CAAC;QAClE,CAAC,CAAC;QACF,YAAY,CAAC,OAAO,GAAG;YACrB,MAAM,CAAC,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC,CAAC;QACvD,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAgB;IACzC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,IAAA,4BAAQ,EAAC,IAAI,CAAC,CAAC;KACvB;IAED,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QAC5B,OAAO,IAAI,UAAU,CACnB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,iBAAiB,CAC/C,CAAC;KACH;IAED,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/index.d.ts b/node_modules/@aws-crypto/sha256-browser/build/index.d.ts new file mode 100644 index 0000000..2e6617e --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/index.d.ts @@ -0,0 +1,3 @@ +export * from "./crossPlatformSha256"; +export { Sha256 as Ie11Sha256 } from "./ie11Sha256"; +export { Sha256 as WebCryptoSha256 } from "./webCryptoSha256"; diff --git a/node_modules/@aws-crypto/sha256-browser/build/index.js b/node_modules/@aws-crypto/sha256-browser/build/index.js new file mode 100644 index 0000000..220f981 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/index.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WebCryptoSha256 = exports.Ie11Sha256 = void 0; +var tslib_1 = require("tslib"); +tslib_1.__exportStar(require("./crossPlatformSha256"), exports); +var ie11Sha256_1 = require("./ie11Sha256"); +Object.defineProperty(exports, "Ie11Sha256", { enumerable: true, get: function () { return ie11Sha256_1.Sha256; } }); +var webCryptoSha256_1 = require("./webCryptoSha256"); +Object.defineProperty(exports, "WebCryptoSha256", { enumerable: true, get: function () { return webCryptoSha256_1.Sha256; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/index.js.map b/node_modules/@aws-crypto/sha256-browser/build/index.js.map new file mode 100644 index 0000000..810f6f7 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,gEAAsC;AACtC,2CAAoD;AAA3C,wGAAA,MAAM,OAAc;AAC7B,qDAA8D;AAArD,kHAAA,MAAM,OAAmB"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.d.ts b/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.d.ts new file mode 100644 index 0000000..43ae4a7 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.d.ts @@ -0,0 +1,2 @@ +import { SourceData } from "@aws-sdk/types"; +export declare function isEmptyData(data: SourceData): boolean; diff --git a/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js b/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js new file mode 100644 index 0000000..fe91548 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEmptyData = void 0; +function isEmptyData(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +exports.isEmptyData = isEmptyData; +//# sourceMappingURL=isEmptyData.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js.map b/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js.map new file mode 100644 index 0000000..d504ac5 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isEmptyData.js","sourceRoot":"","sources":["../src/isEmptyData.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,IAAgB;IAC1C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;KAC1B;IAED,OAAO,IAAI,CAAC,UAAU,KAAK,CAAC,CAAC;AAC/B,CAAC;AAND,kCAMC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.d.ts b/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.d.ts new file mode 100644 index 0000000..ec0e214 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.d.ts @@ -0,0 +1,10 @@ +import { Checksum, SourceData } from "@aws-sdk/types"; +export declare class Sha256 implements Checksum { + private readonly secret?; + private key; + private toHash; + constructor(secret?: SourceData); + update(data: SourceData): void; + digest(): Promise; + reset(): void; +} diff --git a/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js b/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js new file mode 100644 index 0000000..778fdd9 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Sha256 = void 0; +var util_1 = require("@aws-crypto/util"); +var constants_1 = require("./constants"); +var util_locate_window_1 = require("@aws-sdk/util-locate-window"); +var Sha256 = /** @class */ (function () { + function Sha256(secret) { + this.toHash = new Uint8Array(0); + this.secret = secret; + this.reset(); + } + Sha256.prototype.update = function (data) { + if ((0, util_1.isEmptyData)(data)) { + return; + } + var update = (0, util_1.convertToBuffer)(data); + var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength); + typedArray.set(this.toHash, 0); + typedArray.set(update, this.toHash.byteLength); + this.toHash = typedArray; + }; + Sha256.prototype.digest = function () { + var _this = this; + if (this.key) { + return this.key.then(function (key) { + return (0, util_locate_window_1.locateWindow)() + .crypto.subtle.sign(constants_1.SHA_256_HMAC_ALGO, key, _this.toHash) + .then(function (data) { return new Uint8Array(data); }); + }); + } + if ((0, util_1.isEmptyData)(this.toHash)) { + return Promise.resolve(constants_1.EMPTY_DATA_SHA_256); + } + return Promise.resolve() + .then(function () { + return (0, util_locate_window_1.locateWindow)().crypto.subtle.digest(constants_1.SHA_256_HASH, _this.toHash); + }) + .then(function (data) { return Promise.resolve(new Uint8Array(data)); }); + }; + Sha256.prototype.reset = function () { + var _this = this; + this.toHash = new Uint8Array(0); + if (this.secret && this.secret !== void 0) { + this.key = new Promise(function (resolve, reject) { + (0, util_locate_window_1.locateWindow)() + .crypto.subtle.importKey("raw", (0, util_1.convertToBuffer)(_this.secret), constants_1.SHA_256_HMAC_ALGO, false, ["sign"]) + .then(resolve, reject); + }); + this.key.catch(function () { }); + } + }; + return Sha256; +}()); +exports.Sha256 = Sha256; +//# sourceMappingURL=webCryptoSha256.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js.map b/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js.map new file mode 100644 index 0000000..bc30e87 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webCryptoSha256.js","sourceRoot":"","sources":["../src/webCryptoSha256.ts"],"names":[],"mappings":";;;AACA,yCAAgE;AAChE,yCAIqB;AACrB,kEAA2D;AAE3D;IAKE,gBAAY,MAAmB;QAFvB,WAAM,GAAe,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;QAG7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,uBAAM,GAAN,UAAO,IAAgB;QACrB,IAAI,IAAA,kBAAW,EAAC,IAAI,CAAC,EAAE;YACrB,OAAO;SACR;QAED,IAAM,MAAM,GAAG,IAAA,sBAAe,EAAC,IAAI,CAAC,CAAC;QACrC,IAAM,UAAU,GAAG,IAAI,UAAU,CAC/B,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAC3C,CAAC;QACF,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAC/B,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;IAC3B,CAAC;IAED,uBAAM,GAAN;QAAA,iBAkBC;QAjBC,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAC,GAAG;gBACvB,OAAA,IAAA,iCAAY,GAAE;qBACX,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,6BAAiB,EAAE,GAAG,EAAE,KAAI,CAAC,MAAM,CAAC;qBACvD,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,UAAU,CAAC,IAAI,CAAC,EAApB,CAAoB,CAAC;YAFvC,CAEuC,CACxC,CAAC;SACH;QAED,IAAI,IAAA,kBAAW,EAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YAC5B,OAAO,OAAO,CAAC,OAAO,CAAC,8BAAkB,CAAC,CAAC;SAC5C;QAED,OAAO,OAAO,CAAC,OAAO,EAAE;aACrB,IAAI,CAAC;YACJ,OAAA,IAAA,iCAAY,GAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,wBAAY,EAAE,KAAI,CAAC,MAAM,CAAC;QAA9D,CAA8D,CAC/D;aACA,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,OAAO,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,EAArC,CAAqC,CAAC,CAAC;IAC3D,CAAC;IAED,sBAAK,GAAL;QAAA,iBAgBC;QAfC,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,EAAE;YACzC,IAAI,CAAC,GAAG,GAAG,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;gBACrC,IAAA,iCAAY,GAAE;qBACT,MAAM,CAAC,MAAM,CAAC,SAAS,CACxB,KAAK,EACL,IAAA,sBAAe,EAAC,KAAI,CAAC,MAAoB,CAAC,EAC1C,6BAAiB,EACjB,KAAK,EACL,CAAC,MAAM,CAAC,CACX;qBACI,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,cAAO,CAAC,CAAC,CAAC;SAC1B;IACH,CAAC;IACH,aAAC;AAAD,CAAC,AA7DD,IA6DC;AA7DY,wBAAM"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/CopyrightNotice.txt b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 0000000..3d4c823 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/LICENSE.txt b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/LICENSE.txt new file mode 100644 index 0000000..bfe6430 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/README.md b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/README.md new file mode 100644 index 0000000..a5b2692 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/README.md @@ -0,0 +1,142 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 2.3.3 or later +npm install tslib + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 2.3.3 or later +yarn add tslib + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 2.3.3 or later +bower install tslib + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 2.3.3 or later +jspm install tslib + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/modules/index.js b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/modules/index.js new file mode 100644 index 0000000..d241d04 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/modules/package.json b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/modules/package.json new file mode 100644 index 0000000..aafa0e4 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/package.json b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/package.json new file mode 100644 index 0000000..f8c2a53 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/package.json @@ -0,0 +1,37 @@ +{ + "name": "tslib", + "author": "Microsoft Corp.", + "homepage": "https://www.typescriptlang.org/", + "version": "1.14.1", + "license": "0BSD", + "description": "Runtime library for TypeScript helper functions", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/tslib.git" + }, + "main": "tslib.js", + "module": "tslib.es6.js", + "jsnext:main": "tslib.es6.js", + "typings": "tslib.d.ts", + "sideEffects": false, + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + } +} diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js new file mode 100644 index 0000000..0c1b613 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js @@ -0,0 +1,23 @@ +// When on node 14, it validates that all of the commonjs exports +// are correctly re-exported for es modules importers. + +const nodeMajor = Number(process.version.split(".")[0].slice(1)) +if (nodeMajor < 14) { + console.log("Skipping because node does not support module exports.") + process.exit(0) +} + +// ES Modules import via the ./modules folder +import * as esTSLib from "../../modules/index.js" + +// Force a commonjs resolve +import { createRequire } from "module"; +const commonJSTSLib = createRequire(import.meta.url)("../../tslib.js"); + +for (const key in commonJSTSLib) { + if (commonJSTSLib.hasOwnProperty(key)) { + if(!esTSLib[key]) throw new Error(`ESModules is missing ${key} - it needs to be re-exported in ./modules/index.js`) + } +} + +console.log("All exports in commonjs are available for es module consumers.") diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json new file mode 100644 index 0000000..166e509 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "scripts": { + "test": "node index.js" + } +} diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.d.ts b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.d.ts new file mode 100644 index 0000000..0756b28 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, exports: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.es6.html b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.es6.html new file mode 100644 index 0000000..b122e41 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.es6.js b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.es6.js new file mode 100644 index 0000000..0e0d8d0 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.es6.js @@ -0,0 +1,218 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export function __createBinding(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +} + +export function __exportStar(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.html b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.html new file mode 100644 index 0000000..44c9ba5 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.js b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.js new file mode 100644 index 0000000..e5b7c9b --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/node_modules/tslib/tslib.js @@ -0,0 +1,284 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@aws-crypto/sha256-browser/package.json b/node_modules/@aws-crypto/sha256-browser/package.json new file mode 100644 index 0000000..fb4dfd2 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/package.json @@ -0,0 +1,33 @@ +{ + "name": "@aws-crypto/sha256-browser", + "version": "3.0.0", + "scripts": { + "prepublishOnly": "tsc", + "pretest": "tsc -p tsconfig.test.json", + "test": "mocha --require ts-node/register test/**/*test.ts" + }, + "repository": { + "type": "git", + "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" + }, + "author": { + "name": "AWS Crypto Tools Team", + "email": "aws-cryptools@amazon.com", + "url": "https://docs.aws.amazon.com/aws-crypto-tools/index.html?id=docs_gateway#lang/en_us" + }, + "homepage": "https://github.com/aws/aws-sdk-js-crypto-helpers/tree/master/packages/sha256-browser", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/sha256-js": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + }, + "main": "./build/index.js", + "types": "./build/index.d.ts", + "gitHead": "7f56cee8f62bd65cd397eeec29c3c997215bd80c" +} diff --git a/node_modules/@aws-crypto/sha256-browser/src/constants.ts b/node_modules/@aws-crypto/sha256-browser/src/constants.ts new file mode 100644 index 0000000..7f68e2a --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/src/constants.ts @@ -0,0 +1,41 @@ +export const SHA_256_HASH: { name: "SHA-256" } = { name: "SHA-256" }; + +export const SHA_256_HMAC_ALGO: { name: "HMAC"; hash: { name: "SHA-256" } } = { + name: "HMAC", + hash: SHA_256_HASH +}; + +export const EMPTY_DATA_SHA_256 = new Uint8Array([ + 227, + 176, + 196, + 66, + 152, + 252, + 28, + 20, + 154, + 251, + 244, + 200, + 153, + 111, + 185, + 36, + 39, + 174, + 65, + 228, + 100, + 155, + 147, + 76, + 164, + 149, + 153, + 27, + 120, + 82, + 184, + 85 +]); diff --git a/node_modules/@aws-crypto/sha256-browser/src/crossPlatformSha256.ts b/node_modules/@aws-crypto/sha256-browser/src/crossPlatformSha256.ts new file mode 100644 index 0000000..3014127 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/src/crossPlatformSha256.ts @@ -0,0 +1,34 @@ +import { Sha256 as Ie11Sha256 } from "./ie11Sha256"; +import { Sha256 as WebCryptoSha256 } from "./webCryptoSha256"; +import { Sha256 as JsSha256 } from "@aws-crypto/sha256-js"; +import { Checksum, SourceData } from "@aws-sdk/types"; +import { supportsWebCrypto } from "@aws-crypto/supports-web-crypto"; +import { isMsWindow } from "@aws-crypto/ie11-detection"; +import { locateWindow } from "@aws-sdk/util-locate-window"; +import { convertToBuffer } from "@aws-crypto/util"; + +export class Sha256 implements Checksum { + private hash: Checksum; + + constructor(secret?: SourceData) { + if (supportsWebCrypto(locateWindow())) { + this.hash = new WebCryptoSha256(secret); + } else if (isMsWindow(locateWindow())) { + this.hash = new Ie11Sha256(secret); + } else { + this.hash = new JsSha256(secret); + } + } + + update(data: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void { + this.hash.update(convertToBuffer(data)); + } + + digest(): Promise { + return this.hash.digest(); + } + + reset(): void { + this.hash.reset(); + } +} diff --git a/node_modules/@aws-crypto/sha256-browser/src/ie11Sha256.ts b/node_modules/@aws-crypto/sha256-browser/src/ie11Sha256.ts new file mode 100644 index 0000000..937fb94 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/src/ie11Sha256.ts @@ -0,0 +1,108 @@ +import { isEmptyData } from "./isEmptyData"; +import { SHA_256_HMAC_ALGO } from "./constants"; +import { Checksum, SourceData } from "@aws-sdk/types"; +import { fromUtf8 } from "@aws-sdk/util-utf8-browser"; +import { CryptoOperation, Key, MsWindow } from "@aws-crypto/ie11-detection"; +import { locateWindow } from "@aws-sdk/util-locate-window"; + +export class Sha256 implements Checksum { + private readonly secret?: SourceData; + private operation!: Promise; + + constructor(secret?: SourceData) { + this.secret = secret; + this.reset(); + } + + update(toHash: SourceData): void { + if (isEmptyData(toHash)) { + return; + } + + this.operation = this.operation.then(operation => { + operation.onerror = () => { + this.operation = Promise.reject( + new Error("Error encountered updating hash") + ); + }; + operation.process(toArrayBufferView(toHash)); + + return operation; + }); + this.operation.catch(() => {}); + } + + digest(): Promise { + return this.operation.then( + operation => + new Promise((resolve, reject) => { + operation.onerror = () => { + reject(new Error("Error encountered finalizing hash")); + }; + operation.oncomplete = () => { + if (operation.result) { + resolve(new Uint8Array(operation.result)); + } + reject(new Error("Error encountered finalizing hash")); + }; + + operation.finish(); + }) + ); + } + + reset(): void { + if (this.secret) { + this.operation = getKeyPromise(this.secret).then(keyData => + (locateWindow() as MsWindow).msCrypto.subtle.sign( + SHA_256_HMAC_ALGO, + keyData + ) + ); + this.operation.catch(() => {}); + } else { + this.operation = Promise.resolve( + (locateWindow() as MsWindow).msCrypto.subtle.digest("SHA-256") + ); + } + } +} + +function getKeyPromise(secret: SourceData): Promise { + return new Promise((resolve, reject) => { + const keyOperation = (locateWindow() as MsWindow).msCrypto.subtle.importKey( + "raw", + toArrayBufferView(secret), + SHA_256_HMAC_ALGO, + false, + ["sign"] + ); + + keyOperation.oncomplete = () => { + if (keyOperation.result) { + resolve(keyOperation.result); + } + + reject(new Error("ImportKey completed without importing key.")); + }; + keyOperation.onerror = () => { + reject(new Error("ImportKey failed to import key.")); + }; + }); +} + +function toArrayBufferView(data: SourceData): Uint8Array { + if (typeof data === "string") { + return fromUtf8(data); + } + + if (ArrayBuffer.isView(data)) { + return new Uint8Array( + data.buffer, + data.byteOffset, + data.byteLength / Uint8Array.BYTES_PER_ELEMENT + ); + } + + return new Uint8Array(data); +} diff --git a/node_modules/@aws-crypto/sha256-browser/src/index.ts b/node_modules/@aws-crypto/sha256-browser/src/index.ts new file mode 100644 index 0000000..2e6617e --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/src/index.ts @@ -0,0 +1,3 @@ +export * from "./crossPlatformSha256"; +export { Sha256 as Ie11Sha256 } from "./ie11Sha256"; +export { Sha256 as WebCryptoSha256 } from "./webCryptoSha256"; diff --git a/node_modules/@aws-crypto/sha256-browser/src/isEmptyData.ts b/node_modules/@aws-crypto/sha256-browser/src/isEmptyData.ts new file mode 100644 index 0000000..538971f --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/src/isEmptyData.ts @@ -0,0 +1,9 @@ +import { SourceData } from "@aws-sdk/types"; + +export function isEmptyData(data: SourceData): boolean { + if (typeof data === "string") { + return data.length === 0; + } + + return data.byteLength === 0; +} diff --git a/node_modules/@aws-crypto/sha256-browser/src/webCryptoSha256.ts b/node_modules/@aws-crypto/sha256-browser/src/webCryptoSha256.ts new file mode 100644 index 0000000..fe4db57 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/src/webCryptoSha256.ts @@ -0,0 +1,71 @@ +import { Checksum, SourceData } from "@aws-sdk/types"; +import { isEmptyData, convertToBuffer } from "@aws-crypto/util"; +import { + EMPTY_DATA_SHA_256, + SHA_256_HASH, + SHA_256_HMAC_ALGO, +} from "./constants"; +import { locateWindow } from "@aws-sdk/util-locate-window"; + +export class Sha256 implements Checksum { + private readonly secret?: SourceData; + private key: Promise | undefined; + private toHash: Uint8Array = new Uint8Array(0); + + constructor(secret?: SourceData) { + this.secret = secret; + this.reset(); + } + + update(data: SourceData): void { + if (isEmptyData(data)) { + return; + } + + const update = convertToBuffer(data); + const typedArray = new Uint8Array( + this.toHash.byteLength + update.byteLength + ); + typedArray.set(this.toHash, 0); + typedArray.set(update, this.toHash.byteLength); + this.toHash = typedArray; + } + + digest(): Promise { + if (this.key) { + return this.key.then((key) => + locateWindow() + .crypto.subtle.sign(SHA_256_HMAC_ALGO, key, this.toHash) + .then((data) => new Uint8Array(data)) + ); + } + + if (isEmptyData(this.toHash)) { + return Promise.resolve(EMPTY_DATA_SHA_256); + } + + return Promise.resolve() + .then(() => + locateWindow().crypto.subtle.digest(SHA_256_HASH, this.toHash) + ) + .then((data) => Promise.resolve(new Uint8Array(data))); + } + + reset(): void { + this.toHash = new Uint8Array(0); + if (this.secret && this.secret !== void 0) { + this.key = new Promise((resolve, reject) => { + locateWindow() + .crypto.subtle.importKey( + "raw", + convertToBuffer(this.secret as SourceData), + SHA_256_HMAC_ALGO, + false, + ["sign"] + ) + .then(resolve, reject); + }); + this.key.catch(() => {}); + } + } +} diff --git a/node_modules/@aws-crypto/sha256-browser/tsconfig.json b/node_modules/@aws-crypto/sha256-browser/tsconfig.json new file mode 100644 index 0000000..9b37394 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-browser/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable" + ], + "declaration": true, + "sourceMap": true, + "strict": true, + "rootDir": "./src", + "outDir": "./build", + "importHelpers": true, + "noEmitHelpers": true + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules/**"] +} diff --git a/node_modules/@aws-crypto/sha256-js/CHANGELOG.md b/node_modules/@aws-crypto/sha256-js/CHANGELOG.md new file mode 100644 index 0000000..45b6d5d --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/CHANGELOG.md @@ -0,0 +1,86 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.2...v3.0.0) (2023-01-12) + +### Bug Fixes + +- **docs:** sha256 packages, clarify hmac support ([#455](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/455)) ([1be5043](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/1be5043325991f3f5ccb52a8dd928f004b4d442e)) + +- feat!: replace Hash implementations with Checksum interface (#492) ([da43dc0](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/da43dc0fdf669d9ebb5bfb1b1f7c79e46c4aaae1)), closes [#492](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/492) + +### BREAKING CHANGES + +- All classes that implemented `Hash` now implement `Checksum`. + +## [2.0.2](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.1...v2.0.2) (2022-09-07) + +### Bug Fixes + +- **#337:** update @aws-sdk/types ([#373](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/373)) ([b26a811](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/b26a811a392f5209c7ec7e57251500d4d78f97ff)), closes [#337](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/337) + +## [2.0.1](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.0...v2.0.1) (2021-12-09) + +**Note:** Version bump only for package @aws-crypto/sha256-js + +# [2.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.2...v2.0.0) (2021-10-25) + +**Note:** Version bump only for package @aws-crypto/sha256-js + +## [1.2.2](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.1...v1.2.2) (2021-10-12) + +**Note:** Version bump only for package @aws-crypto/sha256-js + +## [1.2.1](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.0...v1.2.1) (2021-09-17) + +**Note:** Version bump only for package @aws-crypto/sha256-js + +# [1.2.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.1.1...v1.2.0) (2021-09-17) + +### Features + +- add @aws-crypto/util ([8f489cb](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/8f489cbe4c0e134f826bac66f1bf5172597048b9)) + +# [1.1.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-js@1.0.0...@aws-crypto/sha256-js@1.1.0) (2021-01-13) + +### Bug Fixes + +- remove package lock ([6002a5a](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/6002a5ab9218dc8798c19dc205d3eebd3bec5b43)) +- **aws-crypto:** export explicit dependencies on [@aws-types](https://github.com/aws-types) ([6a1873a](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/6a1873a4dcc2aaa4a1338595703cfa7099f17b8c)) +- **deps-dev:** move @aws-sdk/types to devDependencies ([#188](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/188)) ([08efdf4](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/08efdf46dcc612d88c441e29945d787f253ee77d)) + +# [1.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-js@1.0.0-alpha.0...@aws-crypto/sha256-js@1.0.0) (2020-10-22) + +**Note:** Version bump only for package @aws-crypto/sha256-js + +# [1.0.0-alpha.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-js@0.1.0-preview.4...@aws-crypto/sha256-js@1.0.0-alpha.0) (2020-02-07) + +**Note:** Version bump only for package @aws-crypto/sha256-js + +# [0.1.0-preview.4](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-js@0.1.0-preview.2...@aws-crypto/sha256-js@0.1.0-preview.4) (2020-01-16) + +### Bug Fixes + +- Changed package.json files to point to the right Git repo ([#9](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/9)) ([028245d](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/028245d72e642ca98d82226afb300eb154503c4a)), closes [#8](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/8) +- es2015.iterable required ([#10](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/10)) ([6e08d83](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/6e08d83c33667ad8cbeeaaa7cedf1bbe05f79ed8)) +- lerna version maintains package-lock ([#14](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/14)) ([2ef29e1](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/2ef29e13779703a5c9b32e93d18918fcb33b7272)), closes [#13](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/13) + +# [0.1.0-preview.3](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/sha256-js@0.1.0-preview.2...@aws-crypto/sha256-js@0.1.0-preview.3) (2019-11-15) + +### Bug Fixes + +- Changed package.json files to point to the right Git repo ([#9](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/9)) ([028245d](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/028245d72e642ca98d82226afb300eb154503c4a)), closes [#8](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/8) +- es2015.iterable required ([#10](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/10)) ([6e08d83](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/6e08d83c33667ad8cbeeaaa7cedf1bbe05f79ed8)) +- lerna version maintains package-lock ([#14](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/14)) ([2ef29e1](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/2ef29e13779703a5c9b32e93d18918fcb33b7272)), closes [#13](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/13) + +# [0.1.0-preview.2](https://github.com/aws/aws-javascript-crypto-helpers/compare/@aws-crypto/sha256-js@0.1.0-preview.1...@aws-crypto/sha256-js@0.1.0-preview.2) (2019-10-30) + +### Bug Fixes + +- remove /src/ from .npmignore (for sourcemaps) ([#5](https://github.com/aws/aws-javascript-crypto-helpers/issues/5)) ([ec52056](https://github.com/aws/aws-javascript-crypto-helpers/commit/ec52056)) + +### Features + +- **sha256-js:** expose synchronous digest ([#7](https://github.com/aws/aws-javascript-crypto-helpers/issues/7)) ([9edaef7](https://github.com/aws/aws-javascript-crypto-helpers/commit/9edaef7)), closes [#6](https://github.com/aws/aws-javascript-crypto-helpers/issues/6) diff --git a/node_modules/@aws-crypto/sha256-js/LICENSE b/node_modules/@aws-crypto/sha256-js/LICENSE new file mode 100644 index 0000000..ad410e1 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/README.md b/node_modules/@aws-crypto/sha256-js/README.md new file mode 100644 index 0000000..f769f5b --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/README.md @@ -0,0 +1,29 @@ +# crypto-sha256-js + +A pure JS implementation SHA256. + +## Usage + +- To hash "some data" +``` +import {Sha256} from '@aws-crypto/sha256-js'; + +const hash = new Sha256(); +hash.update('some data'); +const result = await hash.digest(); + +``` + +- To hmac "some data" with "a key" +``` +import {Sha256} from '@aws-crypto/sha256-js'; + +const hash = new Sha256('a key'); +hash.update('some data'); +const result = await hash.digest(); + +``` + +## Test + +`npm test` diff --git a/node_modules/@aws-crypto/sha256-js/build/RawSha256.d.ts b/node_modules/@aws-crypto/sha256-js/build/RawSha256.d.ts new file mode 100644 index 0000000..1f580b2 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/RawSha256.d.ts @@ -0,0 +1,17 @@ +/** + * @internal + */ +export declare class RawSha256 { + private state; + private temp; + private buffer; + private bufferLength; + private bytesHashed; + /** + * @internal + */ + finished: boolean; + update(data: Uint8Array): void; + digest(): Uint8Array; + private hashBuffer; +} diff --git a/node_modules/@aws-crypto/sha256-js/build/RawSha256.js b/node_modules/@aws-crypto/sha256-js/build/RawSha256.js new file mode 100644 index 0000000..68ceacc --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/RawSha256.js @@ -0,0 +1,124 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RawSha256 = void 0; +var constants_1 = require("./constants"); +/** + * @internal + */ +var RawSha256 = /** @class */ (function () { + function RawSha256() { + this.state = Int32Array.from(constants_1.INIT); + this.temp = new Int32Array(64); + this.buffer = new Uint8Array(64); + this.bufferLength = 0; + this.bytesHashed = 0; + /** + * @internal + */ + this.finished = false; + } + RawSha256.prototype.update = function (data) { + if (this.finished) { + throw new Error("Attempted to update an already finished hash."); + } + var position = 0; + var byteLength = data.byteLength; + this.bytesHashed += byteLength; + if (this.bytesHashed * 8 > constants_1.MAX_HASHABLE_LENGTH) { + throw new Error("Cannot hash more than 2^53 - 1 bits"); + } + while (byteLength > 0) { + this.buffer[this.bufferLength++] = data[position++]; + byteLength--; + if (this.bufferLength === constants_1.BLOCK_SIZE) { + this.hashBuffer(); + this.bufferLength = 0; + } + } + }; + RawSha256.prototype.digest = function () { + if (!this.finished) { + var bitsHashed = this.bytesHashed * 8; + var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength); + var undecoratedLength = this.bufferLength; + bufferView.setUint8(this.bufferLength++, 0x80); + // Ensure the final block has enough room for the hashed length + if (undecoratedLength % constants_1.BLOCK_SIZE >= constants_1.BLOCK_SIZE - 8) { + for (var i = this.bufferLength; i < constants_1.BLOCK_SIZE; i++) { + bufferView.setUint8(i, 0); + } + this.hashBuffer(); + this.bufferLength = 0; + } + for (var i = this.bufferLength; i < constants_1.BLOCK_SIZE - 8; i++) { + bufferView.setUint8(i, 0); + } + bufferView.setUint32(constants_1.BLOCK_SIZE - 8, Math.floor(bitsHashed / 0x100000000), true); + bufferView.setUint32(constants_1.BLOCK_SIZE - 4, bitsHashed); + this.hashBuffer(); + this.finished = true; + } + // The value in state is little-endian rather than big-endian, so flip + // each word into a new Uint8Array + var out = new Uint8Array(constants_1.DIGEST_LENGTH); + for (var i = 0; i < 8; i++) { + out[i * 4] = (this.state[i] >>> 24) & 0xff; + out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff; + out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff; + out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff; + } + return out; + }; + RawSha256.prototype.hashBuffer = function () { + var _a = this, buffer = _a.buffer, state = _a.state; + var state0 = state[0], state1 = state[1], state2 = state[2], state3 = state[3], state4 = state[4], state5 = state[5], state6 = state[6], state7 = state[7]; + for (var i = 0; i < constants_1.BLOCK_SIZE; i++) { + if (i < 16) { + this.temp[i] = + ((buffer[i * 4] & 0xff) << 24) | + ((buffer[i * 4 + 1] & 0xff) << 16) | + ((buffer[i * 4 + 2] & 0xff) << 8) | + (buffer[i * 4 + 3] & 0xff); + } + else { + var u = this.temp[i - 2]; + var t1_1 = ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10); + u = this.temp[i - 15]; + var t2_1 = ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3); + this.temp[i] = + ((t1_1 + this.temp[i - 7]) | 0) + ((t2_1 + this.temp[i - 16]) | 0); + } + var t1 = ((((((state4 >>> 6) | (state4 << 26)) ^ + ((state4 >>> 11) | (state4 << 21)) ^ + ((state4 >>> 25) | (state4 << 7))) + + ((state4 & state5) ^ (~state4 & state6))) | + 0) + + ((state7 + ((constants_1.KEY[i] + this.temp[i]) | 0)) | 0)) | + 0; + var t2 = ((((state0 >>> 2) | (state0 << 30)) ^ + ((state0 >>> 13) | (state0 << 19)) ^ + ((state0 >>> 22) | (state0 << 10))) + + ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) | + 0; + state7 = state6; + state6 = state5; + state5 = state4; + state4 = (state3 + t1) | 0; + state3 = state2; + state2 = state1; + state1 = state0; + state0 = (t1 + t2) | 0; + } + state[0] += state0; + state[1] += state1; + state[2] += state2; + state[3] += state3; + state[4] += state4; + state[5] += state5; + state[6] += state6; + state[7] += state7; + }; + return RawSha256; +}()); +exports.RawSha256 = RawSha256; +//# sourceMappingURL=RawSha256.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/build/RawSha256.js.map b/node_modules/@aws-crypto/sha256-js/build/RawSha256.js.map new file mode 100644 index 0000000..1067717 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/RawSha256.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RawSha256.js","sourceRoot":"","sources":["../src/RawSha256.ts"],"names":[],"mappings":";;;AAAA,yCAMqB;AAErB;;GAEG;AACH;IAAA;QACU,UAAK,GAAe,UAAU,CAAC,IAAI,CAAC,gBAAI,CAAC,CAAC;QAC1C,SAAI,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QACtC,WAAM,GAAe,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QACxC,iBAAY,GAAW,CAAC,CAAC;QACzB,gBAAW,GAAW,CAAC,CAAC;QAEhC;;WAEG;QACH,aAAQ,GAAY,KAAK,CAAC;IA8I5B,CAAC;IA5IC,0BAAM,GAAN,UAAO,IAAgB;QACrB,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;SAClE;QAED,IAAI,QAAQ,GAAG,CAAC,CAAC;QACX,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAC1B,IAAI,CAAC,WAAW,IAAI,UAAU,CAAC;QAE/B,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,+BAAmB,EAAE;YAC9C,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;SACxD;QAED,OAAO,UAAU,GAAG,CAAC,EAAE;YACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YACpD,UAAU,EAAE,CAAC;YAEb,IAAI,IAAI,CAAC,YAAY,KAAK,sBAAU,EAAE;gBACpC,IAAI,CAAC,UAAU,EAAE,CAAC;gBAClB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;aACvB;SACF;IACH,CAAC;IAED,0BAAM,GAAN;QACE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAM,UAAU,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;YACxC,IAAM,UAAU,GAAG,IAAI,QAAQ,CAC7B,IAAI,CAAC,MAAM,CAAC,MAAM,EAClB,IAAI,CAAC,MAAM,CAAC,UAAU,EACtB,IAAI,CAAC,MAAM,CAAC,UAAU,CACvB,CAAC;YAEF,IAAM,iBAAiB,GAAG,IAAI,CAAC,YAAY,CAAC;YAC5C,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,CAAC;YAE/C,+DAA+D;YAC/D,IAAI,iBAAiB,GAAG,sBAAU,IAAI,sBAAU,GAAG,CAAC,EAAE;gBACpD,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,GAAG,sBAAU,EAAE,CAAC,EAAE,EAAE;oBACnD,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;iBAC3B;gBACD,IAAI,CAAC,UAAU,EAAE,CAAC;gBAClB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;aACvB;YAED,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,GAAG,sBAAU,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;gBACvD,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aAC3B;YACD,UAAU,CAAC,SAAS,CAClB,sBAAU,GAAG,CAAC,EACd,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,WAAW,CAAC,EACpC,IAAI,CACL,CAAC;YACF,UAAU,CAAC,SAAS,CAAC,sBAAU,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;YAEjD,IAAI,CAAC,UAAU,EAAE,CAAC;YAElB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;SACtB;QAED,sEAAsE;QACtE,kCAAkC;QAClC,IAAM,GAAG,GAAG,IAAI,UAAU,CAAC,yBAAa,CAAC,CAAC;QAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAC1B,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;YAC3C,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;YAC/C,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;YAC9C,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;SAC/C;QAED,OAAO,GAAG,CAAC;IACb,CAAC;IAEO,8BAAU,GAAlB;QACQ,IAAA,KAAoB,IAAI,EAAtB,MAAM,YAAA,EAAE,KAAK,WAAS,CAAC;QAE/B,IAAI,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,EACnB,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,EACjB,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,EACjB,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,EACjB,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,EACjB,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,EACjB,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,EACjB,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAEpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,sBAAU,EAAE,CAAC,EAAE,EAAE;YACnC,IAAI,CAAC,GAAG,EAAE,EAAE;gBACV,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;oBACV,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;wBAC9B,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;wBAClC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;wBACjC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;aAC9B;iBAAM;gBACL,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACzB,IAAM,IAAE,GACN,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;gBAEnE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;gBACtB,IAAM,IAAE,GACN,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBAEjE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;oBACV,CAAC,CAAC,IAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;aAClE;YAED,IAAM,EAAE,GACN,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;gBACnC,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;gBAClC,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;gBAClC,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;gBACzC,CAAC,CAAC;gBACF,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,eAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACjD,CAAC,CAAC;YAEJ,IAAM,EAAE,GACN,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;gBACjC,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;gBAClC,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;gBACnC,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;gBAC9D,CAAC,CAAC;YAEJ,MAAM,GAAG,MAAM,CAAC;YAChB,MAAM,GAAG,MAAM,CAAC;YAChB,MAAM,GAAG,MAAM,CAAC;YAChB,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;YAC3B,MAAM,GAAG,MAAM,CAAC;YAChB,MAAM,GAAG,MAAM,CAAC;YAChB,MAAM,GAAG,MAAM,CAAC;YAChB,MAAM,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;SACxB;QAED,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;IACrB,CAAC;IACH,gBAAC;AAAD,CAAC,AAxJD,IAwJC;AAxJY,8BAAS"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/build/constants.d.ts b/node_modules/@aws-crypto/sha256-js/build/constants.d.ts new file mode 100644 index 0000000..63bd764 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/constants.d.ts @@ -0,0 +1,20 @@ +/** + * @internal + */ +export declare const BLOCK_SIZE: number; +/** + * @internal + */ +export declare const DIGEST_LENGTH: number; +/** + * @internal + */ +export declare const KEY: Uint32Array; +/** + * @internal + */ +export declare const INIT: number[]; +/** + * @internal + */ +export declare const MAX_HASHABLE_LENGTH: number; diff --git a/node_modules/@aws-crypto/sha256-js/build/constants.js b/node_modules/@aws-crypto/sha256-js/build/constants.js new file mode 100644 index 0000000..c83aa09 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/constants.js @@ -0,0 +1,98 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MAX_HASHABLE_LENGTH = exports.INIT = exports.KEY = exports.DIGEST_LENGTH = exports.BLOCK_SIZE = void 0; +/** + * @internal + */ +exports.BLOCK_SIZE = 64; +/** + * @internal + */ +exports.DIGEST_LENGTH = 32; +/** + * @internal + */ +exports.KEY = new Uint32Array([ + 0x428a2f98, + 0x71374491, + 0xb5c0fbcf, + 0xe9b5dba5, + 0x3956c25b, + 0x59f111f1, + 0x923f82a4, + 0xab1c5ed5, + 0xd807aa98, + 0x12835b01, + 0x243185be, + 0x550c7dc3, + 0x72be5d74, + 0x80deb1fe, + 0x9bdc06a7, + 0xc19bf174, + 0xe49b69c1, + 0xefbe4786, + 0x0fc19dc6, + 0x240ca1cc, + 0x2de92c6f, + 0x4a7484aa, + 0x5cb0a9dc, + 0x76f988da, + 0x983e5152, + 0xa831c66d, + 0xb00327c8, + 0xbf597fc7, + 0xc6e00bf3, + 0xd5a79147, + 0x06ca6351, + 0x14292967, + 0x27b70a85, + 0x2e1b2138, + 0x4d2c6dfc, + 0x53380d13, + 0x650a7354, + 0x766a0abb, + 0x81c2c92e, + 0x92722c85, + 0xa2bfe8a1, + 0xa81a664b, + 0xc24b8b70, + 0xc76c51a3, + 0xd192e819, + 0xd6990624, + 0xf40e3585, + 0x106aa070, + 0x19a4c116, + 0x1e376c08, + 0x2748774c, + 0x34b0bcb5, + 0x391c0cb3, + 0x4ed8aa4a, + 0x5b9cca4f, + 0x682e6ff3, + 0x748f82ee, + 0x78a5636f, + 0x84c87814, + 0x8cc70208, + 0x90befffa, + 0xa4506ceb, + 0xbef9a3f7, + 0xc67178f2 +]); +/** + * @internal + */ +exports.INIT = [ + 0x6a09e667, + 0xbb67ae85, + 0x3c6ef372, + 0xa54ff53a, + 0x510e527f, + 0x9b05688c, + 0x1f83d9ab, + 0x5be0cd19 +]; +/** + * @internal + */ +exports.MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1; +//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/build/constants.js.map b/node_modules/@aws-crypto/sha256-js/build/constants.js.map new file mode 100644 index 0000000..409d2b1 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/constants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,UAAU,GAAW,EAAE,CAAC;AAErC;;GAEG;AACU,QAAA,aAAa,GAAW,EAAE,CAAC;AAExC;;GAEG;AACU,QAAA,GAAG,GAAG,IAAI,WAAW,CAAC;IACjC,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,IAAI,GAAG;IAClB,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;CACX,CAAC;AAEF;;GAEG;AACU,QAAA,mBAAmB,GAAG,SAAA,CAAC,EAAI,EAAE,CAAA,GAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/build/index.d.ts b/node_modules/@aws-crypto/sha256-js/build/index.d.ts new file mode 100644 index 0000000..4554d8a --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/index.d.ts @@ -0,0 +1 @@ +export * from "./jsSha256"; diff --git a/node_modules/@aws-crypto/sha256-js/build/index.js b/node_modules/@aws-crypto/sha256-js/build/index.js new file mode 100644 index 0000000..4329f10 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +tslib_1.__exportStar(require("./jsSha256"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/build/index.js.map b/node_modules/@aws-crypto/sha256-js/build/index.js.map new file mode 100644 index 0000000..518010f --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/build/jsSha256.d.ts b/node_modules/@aws-crypto/sha256-js/build/jsSha256.d.ts new file mode 100644 index 0000000..d813b25 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/jsSha256.d.ts @@ -0,0 +1,12 @@ +import { Checksum, SourceData } from "@aws-sdk/types"; +export declare class Sha256 implements Checksum { + private readonly secret?; + private hash; + private outer?; + private error; + constructor(secret?: SourceData); + update(toHash: SourceData): void; + digestSync(): Uint8Array; + digest(): Promise; + reset(): void; +} diff --git a/node_modules/@aws-crypto/sha256-js/build/jsSha256.js b/node_modules/@aws-crypto/sha256-js/build/jsSha256.js new file mode 100644 index 0000000..2a4f2f1 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/jsSha256.js @@ -0,0 +1,85 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Sha256 = void 0; +var tslib_1 = require("tslib"); +var constants_1 = require("./constants"); +var RawSha256_1 = require("./RawSha256"); +var util_1 = require("@aws-crypto/util"); +var Sha256 = /** @class */ (function () { + function Sha256(secret) { + this.secret = secret; + this.hash = new RawSha256_1.RawSha256(); + this.reset(); + } + Sha256.prototype.update = function (toHash) { + if ((0, util_1.isEmptyData)(toHash) || this.error) { + return; + } + try { + this.hash.update((0, util_1.convertToBuffer)(toHash)); + } + catch (e) { + this.error = e; + } + }; + /* This synchronous method keeps compatibility + * with the v2 aws-sdk. + */ + Sha256.prototype.digestSync = function () { + if (this.error) { + throw this.error; + } + if (this.outer) { + if (!this.outer.finished) { + this.outer.update(this.hash.digest()); + } + return this.outer.digest(); + } + return this.hash.digest(); + }; + /* The underlying digest method here is synchronous. + * To keep the same interface with the other hash functions + * the default is to expose this as an async method. + * However, it can sometimes be useful to have a sync method. + */ + Sha256.prototype.digest = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + return [2 /*return*/, this.digestSync()]; + }); + }); + }; + Sha256.prototype.reset = function () { + this.hash = new RawSha256_1.RawSha256(); + if (this.secret) { + this.outer = new RawSha256_1.RawSha256(); + var inner = bufferFromSecret(this.secret); + var outer = new Uint8Array(constants_1.BLOCK_SIZE); + outer.set(inner); + for (var i = 0; i < constants_1.BLOCK_SIZE; i++) { + inner[i] ^= 0x36; + outer[i] ^= 0x5c; + } + this.hash.update(inner); + this.outer.update(outer); + // overwrite the copied key in memory + for (var i = 0; i < inner.byteLength; i++) { + inner[i] = 0; + } + } + }; + return Sha256; +}()); +exports.Sha256 = Sha256; +function bufferFromSecret(secret) { + var input = (0, util_1.convertToBuffer)(secret); + if (input.byteLength > constants_1.BLOCK_SIZE) { + var bufferHash = new RawSha256_1.RawSha256(); + bufferHash.update(input); + input = bufferHash.digest(); + } + var buffer = new Uint8Array(constants_1.BLOCK_SIZE); + buffer.set(input); + return buffer; +} +//# sourceMappingURL=jsSha256.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/build/jsSha256.js.map b/node_modules/@aws-crypto/sha256-js/build/jsSha256.js.map new file mode 100644 index 0000000..1a90ca4 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/jsSha256.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsSha256.js","sourceRoot":"","sources":["../src/jsSha256.ts"],"names":[],"mappings":";;;;AAAA,yCAAyC;AACzC,yCAAwC;AAExC,yCAAgE;AAEhE;IAME,gBAAY,MAAmB;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,qBAAS,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,uBAAM,GAAN,UAAO,MAAkB;QACvB,IAAI,IAAA,kBAAW,EAAC,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE;YACrC,OAAO;SACR;QAED,IAAI;YACF,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAA,sBAAe,EAAC,MAAM,CAAC,CAAC,CAAC;SAC3C;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;SAChB;IACH,CAAC;IAED;;OAEG;IACH,2BAAU,GAAV;QACE,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,IAAI,CAAC,KAAK,CAAC;SAClB;QAED,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;gBACxB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;aACvC;YAED,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;SAC5B;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACG,uBAAM,GAAZ;;;gBACE,sBAAO,IAAI,CAAC,UAAU,EAAE,EAAC;;;KAC1B;IAED,sBAAK,GAAL;QACE,IAAI,CAAC,IAAI,GAAG,IAAI,qBAAS,EAAE,CAAC;QAC5B,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAS,EAAE,CAAC;YAC7B,IAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5C,IAAM,KAAK,GAAG,IAAI,UAAU,CAAC,sBAAU,CAAC,CAAC;YACzC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAEjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,sBAAU,EAAE,CAAC,EAAE,EAAE;gBACnC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;gBACjB,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;aAClB;YAED,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACxB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAEzB,qCAAqC;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE;gBACzC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;aACd;SACF;IACH,CAAC;IACH,aAAC;AAAD,CAAC,AA1ED,IA0EC;AA1EY,wBAAM;AA4EnB,SAAS,gBAAgB,CAAC,MAAkB;IAC1C,IAAI,KAAK,GAAG,IAAA,sBAAe,EAAC,MAAM,CAAC,CAAC;IAEpC,IAAI,KAAK,CAAC,UAAU,GAAG,sBAAU,EAAE;QACjC,IAAM,UAAU,GAAG,IAAI,qBAAS,EAAE,CAAC;QACnC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC;KAC7B;IAED,IAAM,MAAM,GAAG,IAAI,UAAU,CAAC,sBAAU,CAAC,CAAC;IAC1C,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClB,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.d.ts b/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.d.ts new file mode 100644 index 0000000..d880343 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.d.ts @@ -0,0 +1,5 @@ +export declare const hashTestVectors: Array<[Uint8Array, Uint8Array]>; +/** + * @see https://tools.ietf.org/html/rfc4231 + */ +export declare const hmacTestVectors: Array<[Uint8Array, Uint8Array, Uint8Array]>; diff --git a/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.js b/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.js new file mode 100644 index 0000000..3f0dd2f --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.js @@ -0,0 +1,322 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hmacTestVectors = exports.hashTestVectors = void 0; +var util_hex_encoding_1 = require("@aws-sdk/util-hex-encoding"); +var millionChars = new Uint8Array(1000000); +for (var i = 0; i < 1000000; i++) { + millionChars[i] = 97; +} +exports.hashTestVectors = [ + [ + Uint8Array.from([97, 98, 99]), + (0, util_hex_encoding_1.fromHex)("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad") + ], + [ + new Uint8Array(0), + (0, util_hex_encoding_1.fromHex)("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + ], + [ + (0, util_hex_encoding_1.fromHex)("61"), + (0, util_hex_encoding_1.fromHex)("ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161"), + (0, util_hex_encoding_1.fromHex)("961b6dd3ede3cb8ecbaacbd68de040cd78eb2ed5889130cceb4c49268ea4d506") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161"), + (0, util_hex_encoding_1.fromHex)("9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161"), + (0, util_hex_encoding_1.fromHex)("61be55a8e2f6b4e172338bddf184d6dbee29c98853e0a0485ecee7f27b9af0b4") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161"), + (0, util_hex_encoding_1.fromHex)("ed968e840d10d2d313a870bc131a4e2c311d7ad09bdf32b3418147221f51a6e2") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161"), + (0, util_hex_encoding_1.fromHex)("ed02457b5c41d964dbd2f2a609d63fe1bb7528dbe55e1abf5b52c249cd735797") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161"), + (0, util_hex_encoding_1.fromHex)("e46240714b5db3a23eee60479a623efba4d633d27fe4f03c904b9e219a7fbe60") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161"), + (0, util_hex_encoding_1.fromHex)("1f3ce40415a2081fa3eee75fc39fff8e56c22270d1a978a7249b592dcebd20b4") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161"), + (0, util_hex_encoding_1.fromHex)("f2aca93b80cae681221f0445fa4e2cae8a1f9f8fa1e1741d9639caad222f537d") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161"), + (0, util_hex_encoding_1.fromHex)("bf2cb58a68f684d95a3b78ef8f661c9a4e5b09e82cc8f9cc88cce90528caeb27") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("28cb017dfc99073aa1b47c1b30f413e3ce774c4991eb4158de50f9dbb36d8043") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("f24abc34b13fade76e805799f71187da6cd90b9cac373ae65ed57f143bd664e5") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("a689d786e81340e45511dec6c7ab2d978434e5db123362450fe10cfac70d19d0") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("82cab7df0abfb9d95dca4e5937ce2968c798c726fea48c016bf9763221efda13") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("ef2df0b539c6c23de0f4cbe42648c301ae0e22e887340a4599fb4ef4e2678e48") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("0c0beacef8877bbf2416eb00f2b5dc96354e26dd1df5517320459b1236860f8c") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("b860666ee2966dd8f903be44ee605c6e1366f926d9f17a8f49937d11624eb99d") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("c926defaaa3d13eda2fc63a553bb7fb7326bece6e7cb67ca5296e4727d89bab4") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("a0b4aaab8a966e2193ba172d68162c4656860197f256b5f45f0203397ff3f99c") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("42492da06234ad0ac76f5d5debdb6d1ae027cffbe746a1c13b89bb8bc0139137") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("7df8e299c834de198e264c3e374bc58ecd9382252a705c183beb02f275571e3b") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("ec7c494df6d2a7ea36668d656e6b8979e33641bfea378c15038af3964db057a3") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("897d3e95b65f26676081f8b9f3a98b6ee4424566303e8d4e7c7522ebae219eab") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("09f61f8d9cd65e6a0c258087c485b6293541364e42bd97b2d7936580c8aa3c54") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("2f521e2a7d0bd812cbc035f4ed6806eb8d851793b04ba147e8f66b72f5d1f20f") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("9976d549a25115dab4e36d0c1fb8f31cb07da87dd83275977360eb7dc09e88de") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("cc0616e61cbd6e8e5e34e9fb2d320f37de915820206f5696c31f1fbd24aa16de") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("9c547cb8115a44883b9f70ba68f75117cd55359c92611875e386f8af98c172ab") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("6913c9c7fd42fe23df8b6bcd4dbaf1c17748948d97f2980b432319c39eddcf6c") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("3a54fc0cbc0b0ef48b6507b7788096235d10292dd3ae24e22f5aa062d4f9864a") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("61c60b487d1a921e0bcc9bf853dda0fb159b30bf57b2e2d2c753b00be15b5a09") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("3ba3f5f43b92602683c19aee62a20342b084dd5971ddd33808d81a328879a547") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("852785c805c77e71a22340a54e9d95933ed49121e7d2bf3c2d358854bc1359ea") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("a27c896c4859204843166af66f0e902b9c3b3ed6d2fd13d435abc020065c526f") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("629362afc62c74497caed2272e30f8125ecd0965f8d8d7cfc4e260f7f8dd319d") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("22c1d24bcd03e9aee9832efccd6da613fc702793178e5f12c945c7b67ddda933") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("21ec055b38ce759cd4d0f477e9bdec2c5b8199945db4439bae334a964df6246c") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("365a9c3e2c2af0a56e47a9dac51c2c5381bf8f41273bad3175e0e619126ad087") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("b4d5e56e929ba4cda349e9274e3603d0be246b82016bca20f363963c5f2d6845") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("e33cdf9c7f7120b98e8c78408953e07f2ecd183006b5606df349b4c212acf43e") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("c0f8bd4dbc2b0c03107c1c37913f2a7501f521467f45dd0fef6958e9a4692719") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("7a538607fdaab9296995929f451565bbb8142e1844117322aafd2b3d76b01aff") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("66d34fba71f8f450f7e45598853e53bfc23bbd129027cbb131a2f4ffd7878cd0") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("16849877c6c21ef0bfa68e4f6747300ddb171b170b9f00e189edc4c2fc4db93e") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("52789e3423b72beeb898456a4f49662e46b0cbb960784c5ef4b1399d327e7c27") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("6643110c5628fff59edf76d82d5bf573bf800f16a4d65dfb1e5d6f1a46296d0b") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("11eaed932c6c6fddfc2efc394e609facf4abe814fc6180d03b14fce13a07d0e5") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("97daac0ee9998dfcad6c9c0970da5ca411c86233a944c25b47566f6a7bc1ddd5") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("8f9bec6a62dd28ebd36d1227745592de6658b36974a3bb98a4c582f683ea6c42") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("160b4e433e384e05e537dc59b467f7cb2403f0214db15c5db58862a3f1156d2e") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("bfc5fe0e360152ca98c50fab4ed7e3078c17debc2917740d5000913b686ca129") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("6c1b3dc7a706b9dc81352a6716b9c666c608d8626272c64b914ab05572fc6e84") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("abe346a7259fc90b4c27185419628e5e6af6466b1ae9b5446cac4bfc26cf05c4") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("a3f01b6939256127582ac8ae9fb47a382a244680806a3f613a118851c1ca1d47") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("9f4390f8d30c2dd92ec9f095b65e2b9ae9b0a925a5258e241c9f1e910f734318") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("b35439a4ac6f0948b6d6f9e3c6af0f5f590ce20f1bde7090ef7970686ec6738a") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("f13b2d724659eb3bf47f2dd6af1accc87b81f09f59f2b75e5c0bed6589dfe8c6") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("d5c039b748aa64665782974ec3dc3025c042edf54dcdc2b5de31385b094cb678") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("111bb261277afd65f0744b247cd3e47d386d71563d0ed995517807d5ebd4fba3") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("11ee391211c6256460b6ed375957fadd8061cafbb31daf967db875aebd5aaad4") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("35d5fc17cfbbadd00f5e710ada39f194c5ad7c766ad67072245f1fad45f0f530") + ], + [ + (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("f506898cc7c2e092f9eb9fadae7ba50383f5b46a2a4fe5597dbb553a78981268") + ], + [ + (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("7d3e74a05d7db15bce4ad9ec0658ea98e3f06eeecf16b4c6fff2da457ddc2f34") + ], + [ + (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"), + (0, util_hex_encoding_1.fromHex)("ffe054fe7ae0cb6dc65c3af9b61d5209f439851db43d0ba5997337df154668eb") + ], + [ + (0, util_hex_encoding_1.fromHex)("de188941a3375d3a8a061e67576e926dc71a7fa3f0cceb97452b4d3227965f9ea8cc75076d9fb9c5417aa5cb30fc22198b34982dbb629e"), + (0, util_hex_encoding_1.fromHex)("038051e9c324393bd1ca1978dd0952c2aa3742ca4f1bd5cd4611cea83892d382") + ], + [ + millionChars, + (0, util_hex_encoding_1.fromHex)("cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0") + ], + [ + (0, util_hex_encoding_1.fromHex)("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), + (0, util_hex_encoding_1.fromHex)("45ad4b37c6e2fc0a2cfcc1b5da524132ec707615c2cae1dbbc43c97aa521db81") + ] +]; +/** + * @see https://tools.ietf.org/html/rfc4231 + */ +exports.hmacTestVectors = [ + [ + (0, util_hex_encoding_1.fromHex)("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"), + (0, util_hex_encoding_1.fromHex)("4869205468657265"), + (0, util_hex_encoding_1.fromHex)("b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7") + ], + [ + (0, util_hex_encoding_1.fromHex)("4a656665"), + (0, util_hex_encoding_1.fromHex)("7768617420646f2079612077616e7420666f72206e6f7468696e673f"), + (0, util_hex_encoding_1.fromHex)("5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843") + ], + [ + (0, util_hex_encoding_1.fromHex)("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), + (0, util_hex_encoding_1.fromHex)("dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"), + (0, util_hex_encoding_1.fromHex)("773ea91e36800e46854db8ebd09181a72959098b3ef8c122d9635514ced565fe") + ], + [ + (0, util_hex_encoding_1.fromHex)("0102030405060708090a0b0c0d0e0f10111213141516171819"), + (0, util_hex_encoding_1.fromHex)("cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd"), + (0, util_hex_encoding_1.fromHex)("82558a389a443c0ea4cc819899f2083a85f0faa3e578f8077a2e3ff46729665b") + ], + [ + (0, util_hex_encoding_1.fromHex)("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), + (0, util_hex_encoding_1.fromHex)("54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b6579202d2048617368204b6579204669727374"), + (0, util_hex_encoding_1.fromHex)("60e431591ee0b67f0d8a26aacbf5b77f8e0bc6213728c5140546040f0ee37f54") + ], + [ + (0, util_hex_encoding_1.fromHex)("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), + (0, util_hex_encoding_1.fromHex)("5468697320697320612074657374207573696e672061206c6172676572207468616e20626c6f636b2d73697a65206b657920616e642061206c6172676572207468616e20626c6f636b2d73697a6520646174612e20546865206b6579206e6565647320746f20626520686173686564206265666f7265206265696e6720757365642062792074686520484d414320616c676f726974686d2e"), + (0, util_hex_encoding_1.fromHex)("9b09ffa71b942fcb27635fbcd5b0e944bfdc63644f0713938a7f51535c3a35e2") + ] +]; +//# sourceMappingURL=knownHashes.fixture.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.js.map b/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.js.map new file mode 100644 index 0000000..6ea6a7d --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.js.map @@ -0,0 +1 @@ +{"version":3,"file":"knownHashes.fixture.js","sourceRoot":"","sources":["../src/knownHashes.fixture.ts"],"names":[],"mappings":";;;AAAA,gEAAqD;AAErD,IAAM,YAAY,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;AAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;IAChC,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;CACtB;AAEY,QAAA,eAAe,GAAoC;IAC9D;QACE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAC7B,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAI,UAAU,CAAC,CAAC,CAAC;QACjB,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,IAAI,CAAC;QACb,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,MAAM,CAAC;QACf,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,QAAQ,CAAC;QACjB,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,UAAU,CAAC;QACnB,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,YAAY,CAAC;QACrB,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,cAAc,CAAC;QACvB,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,gBAAgB,CAAC;QACzB,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,kBAAkB,CAAC;QAC3B,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,oBAAoB,CAAC;QAC7B,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,sBAAsB,CAAC;QAC/B,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,wBAAwB,CAAC;QACjC,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,0BAA0B,CAAC;QACnC,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,4BAA4B,CAAC;QACrC,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,8BAA8B,CAAC;QACvC,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,gCAAgC,CAAC;QACzC,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,kCAAkC,CAAC;QAC3C,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,oCAAoC,CAAC;QAC7C,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,sCAAsC,CAAC;QAC/C,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,wCAAwC,CAAC;QACjD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,0CAA0C,CAAC;QACnD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,4CAA4C,CAAC;QACrD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,8CAA8C,CAAC;QACvD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,gDAAgD,CAAC;QACzD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,kDAAkD,CAAC;QAC3D,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,oDAAoD,CAAC;QAC7D,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,sDAAsD,CAAC;QAC/D,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,wDAAwD,CAAC;QACjE,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,0DAA0D,CAAC;QACnE,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,4DAA4D,CAAC;QACrE,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,8DAA8D,CAAC;QACvE,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,gEAAgE,CAAC;QACzE,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,kEAAkE,CAAC;QAC3E,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,oEAAoE,CACrE;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,sEAAsE,CACvE;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,wEAAwE,CACzE;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,0EAA0E,CAC3E;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,4EAA4E,CAC7E;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,8EAA8E,CAC/E;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,gFAAgF,CACjF;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,kFAAkF,CACnF;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,oFAAoF,CACrF;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,sFAAsF,CACvF;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,wFAAwF,CACzF;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,0FAA0F,CAC3F;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,4FAA4F,CAC7F;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,8FAA8F,CAC/F;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,gGAAgG,CACjG;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,kGAAkG,CACnG;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,oGAAoG,CACrG;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,sGAAsG,CACvG;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,wGAAwG,CACzG;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,0GAA0G,CAC3G;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,4GAA4G,CAC7G;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,8GAA8G,CAC/G;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,gHAAgH,CACjH;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,kHAAkH,CACnH;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,oHAAoH,CACrH;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,sHAAsH,CACvH;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,wHAAwH,CACzH;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,0HAA0H,CAC3H;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,4HAA4H,CAC7H;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,8HAA8H,CAC/H;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,gIAAgI,CACjI;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,kIAAkI,CACnI;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,gHAAgH,CACjH;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,YAAY;QACZ,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,wQAAwQ,CACzQ;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,eAAe,GAAgD;IAC1E;QACE,IAAA,2BAAO,EAAC,0CAA0C,CAAC;QACnD,IAAA,2BAAO,EAAC,kBAAkB,CAAC;QAC3B,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,UAAU,CAAC;QACnB,IAAA,2BAAO,EAAC,0DAA0D,CAAC;QACnE,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,0CAA0C,CAAC;QACnD,IAAA,2BAAO,EACL,sGAAsG,CACvG;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EAAC,oDAAoD,CAAC;QAC7D,IAAA,2BAAO,EACL,sGAAsG,CACvG;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,wQAAwQ,CACzQ;QACD,IAAA,2BAAO,EACL,8GAA8G,CAC/G;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;IACD;QACE,IAAA,2BAAO,EACL,wQAAwQ,CACzQ;QACD,IAAA,2BAAO,EACL,kTAAkT,CACnT;QACD,IAAA,2BAAO,EAAC,kEAAkE,CAAC;KAC5E;CACF,CAAC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/CopyrightNotice.txt b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 0000000..3d4c823 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/LICENSE.txt b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/LICENSE.txt new file mode 100644 index 0000000..bfe6430 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/README.md b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/README.md new file mode 100644 index 0000000..a5b2692 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/README.md @@ -0,0 +1,142 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 2.3.3 or later +npm install tslib + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 2.3.3 or later +yarn add tslib + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 2.3.3 or later +bower install tslib + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 2.3.3 or later +jspm install tslib + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/modules/index.js b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/modules/index.js new file mode 100644 index 0000000..d241d04 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/modules/package.json b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/modules/package.json new file mode 100644 index 0000000..aafa0e4 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/package.json b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/package.json new file mode 100644 index 0000000..f8c2a53 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/package.json @@ -0,0 +1,37 @@ +{ + "name": "tslib", + "author": "Microsoft Corp.", + "homepage": "https://www.typescriptlang.org/", + "version": "1.14.1", + "license": "0BSD", + "description": "Runtime library for TypeScript helper functions", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/tslib.git" + }, + "main": "tslib.js", + "module": "tslib.es6.js", + "jsnext:main": "tslib.es6.js", + "typings": "tslib.d.ts", + "sideEffects": false, + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + } +} diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js new file mode 100644 index 0000000..0c1b613 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js @@ -0,0 +1,23 @@ +// When on node 14, it validates that all of the commonjs exports +// are correctly re-exported for es modules importers. + +const nodeMajor = Number(process.version.split(".")[0].slice(1)) +if (nodeMajor < 14) { + console.log("Skipping because node does not support module exports.") + process.exit(0) +} + +// ES Modules import via the ./modules folder +import * as esTSLib from "../../modules/index.js" + +// Force a commonjs resolve +import { createRequire } from "module"; +const commonJSTSLib = createRequire(import.meta.url)("../../tslib.js"); + +for (const key in commonJSTSLib) { + if (commonJSTSLib.hasOwnProperty(key)) { + if(!esTSLib[key]) throw new Error(`ESModules is missing ${key} - it needs to be re-exported in ./modules/index.js`) + } +} + +console.log("All exports in commonjs are available for es module consumers.") diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json new file mode 100644 index 0000000..166e509 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "scripts": { + "test": "node index.js" + } +} diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.d.ts b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.d.ts new file mode 100644 index 0000000..0756b28 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, exports: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.es6.html b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.es6.html new file mode 100644 index 0000000..b122e41 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.es6.js b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.es6.js new file mode 100644 index 0000000..0e0d8d0 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.es6.js @@ -0,0 +1,218 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export function __createBinding(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +} + +export function __exportStar(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.html b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.html new file mode 100644 index 0000000..44c9ba5 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.js b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.js new file mode 100644 index 0000000..e5b7c9b --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/node_modules/tslib/tslib.js @@ -0,0 +1,284 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@aws-crypto/sha256-js/package.json b/node_modules/@aws-crypto/sha256-js/package.json new file mode 100644 index 0000000..4e2621c --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/package.json @@ -0,0 +1,28 @@ +{ + "name": "@aws-crypto/sha256-js", + "version": "3.0.0", + "scripts": { + "prepublishOnly": "tsc", + "pretest": "tsc -p tsconfig.test.json", + "test": "mocha --require ts-node/register test/**/*test.ts" + }, + "main": "./build/index.js", + "types": "./build/index.d.ts", + "repository": { + "type": "git", + "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" + }, + "author": { + "name": "AWS Crypto Tools Team", + "email": "aws-cryptools@amazon.com", + "url": "https://docs.aws.amazon.com/aws-crypto-tools/index.html?id=docs_gateway#lang/en_us" + }, + "homepage": "https://github.com/aws/aws-sdk-js-crypto-helpers/tree/master/packages/sha256-js", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + }, + "gitHead": "7f56cee8f62bd65cd397eeec29c3c997215bd80c" +} diff --git a/node_modules/@aws-crypto/sha256-js/src/RawSha256.ts b/node_modules/@aws-crypto/sha256-js/src/RawSha256.ts new file mode 100644 index 0000000..f4a385c --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/src/RawSha256.ts @@ -0,0 +1,164 @@ +import { + BLOCK_SIZE, + DIGEST_LENGTH, + INIT, + KEY, + MAX_HASHABLE_LENGTH +} from "./constants"; + +/** + * @internal + */ +export class RawSha256 { + private state: Int32Array = Int32Array.from(INIT); + private temp: Int32Array = new Int32Array(64); + private buffer: Uint8Array = new Uint8Array(64); + private bufferLength: number = 0; + private bytesHashed: number = 0; + + /** + * @internal + */ + finished: boolean = false; + + update(data: Uint8Array): void { + if (this.finished) { + throw new Error("Attempted to update an already finished hash."); + } + + let position = 0; + let { byteLength } = data; + this.bytesHashed += byteLength; + + if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) { + throw new Error("Cannot hash more than 2^53 - 1 bits"); + } + + while (byteLength > 0) { + this.buffer[this.bufferLength++] = data[position++]; + byteLength--; + + if (this.bufferLength === BLOCK_SIZE) { + this.hashBuffer(); + this.bufferLength = 0; + } + } + } + + digest(): Uint8Array { + if (!this.finished) { + const bitsHashed = this.bytesHashed * 8; + const bufferView = new DataView( + this.buffer.buffer, + this.buffer.byteOffset, + this.buffer.byteLength + ); + + const undecoratedLength = this.bufferLength; + bufferView.setUint8(this.bufferLength++, 0x80); + + // Ensure the final block has enough room for the hashed length + if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) { + for (let i = this.bufferLength; i < BLOCK_SIZE; i++) { + bufferView.setUint8(i, 0); + } + this.hashBuffer(); + this.bufferLength = 0; + } + + for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) { + bufferView.setUint8(i, 0); + } + bufferView.setUint32( + BLOCK_SIZE - 8, + Math.floor(bitsHashed / 0x100000000), + true + ); + bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed); + + this.hashBuffer(); + + this.finished = true; + } + + // The value in state is little-endian rather than big-endian, so flip + // each word into a new Uint8Array + const out = new Uint8Array(DIGEST_LENGTH); + for (let i = 0; i < 8; i++) { + out[i * 4] = (this.state[i] >>> 24) & 0xff; + out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff; + out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff; + out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff; + } + + return out; + } + + private hashBuffer(): void { + const { buffer, state } = this; + + let state0 = state[0], + state1 = state[1], + state2 = state[2], + state3 = state[3], + state4 = state[4], + state5 = state[5], + state6 = state[6], + state7 = state[7]; + + for (let i = 0; i < BLOCK_SIZE; i++) { + if (i < 16) { + this.temp[i] = + ((buffer[i * 4] & 0xff) << 24) | + ((buffer[i * 4 + 1] & 0xff) << 16) | + ((buffer[i * 4 + 2] & 0xff) << 8) | + (buffer[i * 4 + 3] & 0xff); + } else { + let u = this.temp[i - 2]; + const t1 = + ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10); + + u = this.temp[i - 15]; + const t2 = + ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3); + + this.temp[i] = + ((t1 + this.temp[i - 7]) | 0) + ((t2 + this.temp[i - 16]) | 0); + } + + const t1 = + ((((((state4 >>> 6) | (state4 << 26)) ^ + ((state4 >>> 11) | (state4 << 21)) ^ + ((state4 >>> 25) | (state4 << 7))) + + ((state4 & state5) ^ (~state4 & state6))) | + 0) + + ((state7 + ((KEY[i] + this.temp[i]) | 0)) | 0)) | + 0; + + const t2 = + ((((state0 >>> 2) | (state0 << 30)) ^ + ((state0 >>> 13) | (state0 << 19)) ^ + ((state0 >>> 22) | (state0 << 10))) + + ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) | + 0; + + state7 = state6; + state6 = state5; + state5 = state4; + state4 = (state3 + t1) | 0; + state3 = state2; + state2 = state1; + state1 = state0; + state0 = (t1 + t2) | 0; + } + + state[0] += state0; + state[1] += state1; + state[2] += state2; + state[3] += state3; + state[4] += state4; + state[5] += state5; + state[6] += state6; + state[7] += state7; + } +} diff --git a/node_modules/@aws-crypto/sha256-js/src/constants.ts b/node_modules/@aws-crypto/sha256-js/src/constants.ts new file mode 100644 index 0000000..8cede57 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/src/constants.ts @@ -0,0 +1,98 @@ +/** + * @internal + */ +export const BLOCK_SIZE: number = 64; + +/** + * @internal + */ +export const DIGEST_LENGTH: number = 32; + +/** + * @internal + */ +export const KEY = new Uint32Array([ + 0x428a2f98, + 0x71374491, + 0xb5c0fbcf, + 0xe9b5dba5, + 0x3956c25b, + 0x59f111f1, + 0x923f82a4, + 0xab1c5ed5, + 0xd807aa98, + 0x12835b01, + 0x243185be, + 0x550c7dc3, + 0x72be5d74, + 0x80deb1fe, + 0x9bdc06a7, + 0xc19bf174, + 0xe49b69c1, + 0xefbe4786, + 0x0fc19dc6, + 0x240ca1cc, + 0x2de92c6f, + 0x4a7484aa, + 0x5cb0a9dc, + 0x76f988da, + 0x983e5152, + 0xa831c66d, + 0xb00327c8, + 0xbf597fc7, + 0xc6e00bf3, + 0xd5a79147, + 0x06ca6351, + 0x14292967, + 0x27b70a85, + 0x2e1b2138, + 0x4d2c6dfc, + 0x53380d13, + 0x650a7354, + 0x766a0abb, + 0x81c2c92e, + 0x92722c85, + 0xa2bfe8a1, + 0xa81a664b, + 0xc24b8b70, + 0xc76c51a3, + 0xd192e819, + 0xd6990624, + 0xf40e3585, + 0x106aa070, + 0x19a4c116, + 0x1e376c08, + 0x2748774c, + 0x34b0bcb5, + 0x391c0cb3, + 0x4ed8aa4a, + 0x5b9cca4f, + 0x682e6ff3, + 0x748f82ee, + 0x78a5636f, + 0x84c87814, + 0x8cc70208, + 0x90befffa, + 0xa4506ceb, + 0xbef9a3f7, + 0xc67178f2 +]); + +/** + * @internal + */ +export const INIT = [ + 0x6a09e667, + 0xbb67ae85, + 0x3c6ef372, + 0xa54ff53a, + 0x510e527f, + 0x9b05688c, + 0x1f83d9ab, + 0x5be0cd19 +]; + +/** + * @internal + */ +export const MAX_HASHABLE_LENGTH = 2 ** 53 - 1; diff --git a/node_modules/@aws-crypto/sha256-js/src/index.ts b/node_modules/@aws-crypto/sha256-js/src/index.ts new file mode 100644 index 0000000..4554d8a --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/src/index.ts @@ -0,0 +1 @@ +export * from "./jsSha256"; diff --git a/node_modules/@aws-crypto/sha256-js/src/jsSha256.ts b/node_modules/@aws-crypto/sha256-js/src/jsSha256.ts new file mode 100644 index 0000000..f7bd993 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/src/jsSha256.ts @@ -0,0 +1,94 @@ +import { BLOCK_SIZE } from "./constants"; +import { RawSha256 } from "./RawSha256"; +import { Checksum, SourceData } from "@aws-sdk/types"; +import { isEmptyData, convertToBuffer } from "@aws-crypto/util"; + +export class Sha256 implements Checksum { + private readonly secret?: SourceData; + private hash: RawSha256; + private outer?: RawSha256; + private error: any; + + constructor(secret?: SourceData) { + this.secret = secret; + this.hash = new RawSha256(); + this.reset(); + } + + update(toHash: SourceData): void { + if (isEmptyData(toHash) || this.error) { + return; + } + + try { + this.hash.update(convertToBuffer(toHash)); + } catch (e) { + this.error = e; + } + } + + /* This synchronous method keeps compatibility + * with the v2 aws-sdk. + */ + digestSync(): Uint8Array { + if (this.error) { + throw this.error; + } + + if (this.outer) { + if (!this.outer.finished) { + this.outer.update(this.hash.digest()); + } + + return this.outer.digest(); + } + + return this.hash.digest(); + } + + /* The underlying digest method here is synchronous. + * To keep the same interface with the other hash functions + * the default is to expose this as an async method. + * However, it can sometimes be useful to have a sync method. + */ + async digest(): Promise { + return this.digestSync(); + } + + reset(): void { + this.hash = new RawSha256(); + if (this.secret) { + this.outer = new RawSha256(); + const inner = bufferFromSecret(this.secret); + const outer = new Uint8Array(BLOCK_SIZE); + outer.set(inner); + + for (let i = 0; i < BLOCK_SIZE; i++) { + inner[i] ^= 0x36; + outer[i] ^= 0x5c; + } + + this.hash.update(inner); + this.outer.update(outer); + + // overwrite the copied key in memory + for (let i = 0; i < inner.byteLength; i++) { + inner[i] = 0; + } + } + } +} + +function bufferFromSecret(secret: SourceData): Uint8Array { + let input = convertToBuffer(secret); + + if (input.byteLength > BLOCK_SIZE) { + const bufferHash = new RawSha256(); + bufferHash.update(input); + input = bufferHash.digest(); + } + + const buffer = new Uint8Array(BLOCK_SIZE); + buffer.set(input); + return buffer; +} diff --git a/node_modules/@aws-crypto/sha256-js/src/knownHashes.fixture.ts b/node_modules/@aws-crypto/sha256-js/src/knownHashes.fixture.ts new file mode 100644 index 0000000..c83dae2 --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/src/knownHashes.fixture.ts @@ -0,0 +1,401 @@ +import { fromHex } from "@aws-sdk/util-hex-encoding"; + +const millionChars = new Uint8Array(1000000); +for (let i = 0; i < 1000000; i++) { + millionChars[i] = 97; +} + +export const hashTestVectors: Array<[Uint8Array, Uint8Array]> = [ + [ + Uint8Array.from([97, 98, 99]), + fromHex("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad") + ], + [ + new Uint8Array(0), + fromHex("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + ], + [ + fromHex("61"), + fromHex("ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb") + ], + [ + fromHex("6161"), + fromHex("961b6dd3ede3cb8ecbaacbd68de040cd78eb2ed5889130cceb4c49268ea4d506") + ], + [ + fromHex("616161"), + fromHex("9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0") + ], + [ + fromHex("61616161"), + fromHex("61be55a8e2f6b4e172338bddf184d6dbee29c98853e0a0485ecee7f27b9af0b4") + ], + [ + fromHex("6161616161"), + fromHex("ed968e840d10d2d313a870bc131a4e2c311d7ad09bdf32b3418147221f51a6e2") + ], + [ + fromHex("616161616161"), + fromHex("ed02457b5c41d964dbd2f2a609d63fe1bb7528dbe55e1abf5b52c249cd735797") + ], + [ + fromHex("61616161616161"), + fromHex("e46240714b5db3a23eee60479a623efba4d633d27fe4f03c904b9e219a7fbe60") + ], + [ + fromHex("6161616161616161"), + fromHex("1f3ce40415a2081fa3eee75fc39fff8e56c22270d1a978a7249b592dcebd20b4") + ], + [ + fromHex("616161616161616161"), + fromHex("f2aca93b80cae681221f0445fa4e2cae8a1f9f8fa1e1741d9639caad222f537d") + ], + [ + fromHex("61616161616161616161"), + fromHex("bf2cb58a68f684d95a3b78ef8f661c9a4e5b09e82cc8f9cc88cce90528caeb27") + ], + [ + fromHex("6161616161616161616161"), + fromHex("28cb017dfc99073aa1b47c1b30f413e3ce774c4991eb4158de50f9dbb36d8043") + ], + [ + fromHex("616161616161616161616161"), + fromHex("f24abc34b13fade76e805799f71187da6cd90b9cac373ae65ed57f143bd664e5") + ], + [ + fromHex("61616161616161616161616161"), + fromHex("a689d786e81340e45511dec6c7ab2d978434e5db123362450fe10cfac70d19d0") + ], + [ + fromHex("6161616161616161616161616161"), + fromHex("82cab7df0abfb9d95dca4e5937ce2968c798c726fea48c016bf9763221efda13") + ], + [ + fromHex("616161616161616161616161616161"), + fromHex("ef2df0b539c6c23de0f4cbe42648c301ae0e22e887340a4599fb4ef4e2678e48") + ], + [ + fromHex("61616161616161616161616161616161"), + fromHex("0c0beacef8877bbf2416eb00f2b5dc96354e26dd1df5517320459b1236860f8c") + ], + [ + fromHex("6161616161616161616161616161616161"), + fromHex("b860666ee2966dd8f903be44ee605c6e1366f926d9f17a8f49937d11624eb99d") + ], + [ + fromHex("616161616161616161616161616161616161"), + fromHex("c926defaaa3d13eda2fc63a553bb7fb7326bece6e7cb67ca5296e4727d89bab4") + ], + [ + fromHex("61616161616161616161616161616161616161"), + fromHex("a0b4aaab8a966e2193ba172d68162c4656860197f256b5f45f0203397ff3f99c") + ], + [ + fromHex("6161616161616161616161616161616161616161"), + fromHex("42492da06234ad0ac76f5d5debdb6d1ae027cffbe746a1c13b89bb8bc0139137") + ], + [ + fromHex("616161616161616161616161616161616161616161"), + fromHex("7df8e299c834de198e264c3e374bc58ecd9382252a705c183beb02f275571e3b") + ], + [ + fromHex("61616161616161616161616161616161616161616161"), + fromHex("ec7c494df6d2a7ea36668d656e6b8979e33641bfea378c15038af3964db057a3") + ], + [ + fromHex("6161616161616161616161616161616161616161616161"), + fromHex("897d3e95b65f26676081f8b9f3a98b6ee4424566303e8d4e7c7522ebae219eab") + ], + [ + fromHex("616161616161616161616161616161616161616161616161"), + fromHex("09f61f8d9cd65e6a0c258087c485b6293541364e42bd97b2d7936580c8aa3c54") + ], + [ + fromHex("61616161616161616161616161616161616161616161616161"), + fromHex("2f521e2a7d0bd812cbc035f4ed6806eb8d851793b04ba147e8f66b72f5d1f20f") + ], + [ + fromHex("6161616161616161616161616161616161616161616161616161"), + fromHex("9976d549a25115dab4e36d0c1fb8f31cb07da87dd83275977360eb7dc09e88de") + ], + [ + fromHex("616161616161616161616161616161616161616161616161616161"), + fromHex("cc0616e61cbd6e8e5e34e9fb2d320f37de915820206f5696c31f1fbd24aa16de") + ], + [ + fromHex("61616161616161616161616161616161616161616161616161616161"), + fromHex("9c547cb8115a44883b9f70ba68f75117cd55359c92611875e386f8af98c172ab") + ], + [ + fromHex("6161616161616161616161616161616161616161616161616161616161"), + fromHex("6913c9c7fd42fe23df8b6bcd4dbaf1c17748948d97f2980b432319c39eddcf6c") + ], + [ + fromHex("616161616161616161616161616161616161616161616161616161616161"), + fromHex("3a54fc0cbc0b0ef48b6507b7788096235d10292dd3ae24e22f5aa062d4f9864a") + ], + [ + fromHex("61616161616161616161616161616161616161616161616161616161616161"), + fromHex("61c60b487d1a921e0bcc9bf853dda0fb159b30bf57b2e2d2c753b00be15b5a09") + ], + [ + fromHex("6161616161616161616161616161616161616161616161616161616161616161"), + fromHex("3ba3f5f43b92602683c19aee62a20342b084dd5971ddd33808d81a328879a547") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("852785c805c77e71a22340a54e9d95933ed49121e7d2bf3c2d358854bc1359ea") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("a27c896c4859204843166af66f0e902b9c3b3ed6d2fd13d435abc020065c526f") + ], + [ + fromHex( + "6161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("629362afc62c74497caed2272e30f8125ecd0965f8d8d7cfc4e260f7f8dd319d") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("22c1d24bcd03e9aee9832efccd6da613fc702793178e5f12c945c7b67ddda933") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("21ec055b38ce759cd4d0f477e9bdec2c5b8199945db4439bae334a964df6246c") + ], + [ + fromHex( + "6161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("365a9c3e2c2af0a56e47a9dac51c2c5381bf8f41273bad3175e0e619126ad087") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("b4d5e56e929ba4cda349e9274e3603d0be246b82016bca20f363963c5f2d6845") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("e33cdf9c7f7120b98e8c78408953e07f2ecd183006b5606df349b4c212acf43e") + ], + [ + fromHex( + "6161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("c0f8bd4dbc2b0c03107c1c37913f2a7501f521467f45dd0fef6958e9a4692719") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("7a538607fdaab9296995929f451565bbb8142e1844117322aafd2b3d76b01aff") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("66d34fba71f8f450f7e45598853e53bfc23bbd129027cbb131a2f4ffd7878cd0") + ], + [ + fromHex( + "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("16849877c6c21ef0bfa68e4f6747300ddb171b170b9f00e189edc4c2fc4db93e") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("52789e3423b72beeb898456a4f49662e46b0cbb960784c5ef4b1399d327e7c27") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("6643110c5628fff59edf76d82d5bf573bf800f16a4d65dfb1e5d6f1a46296d0b") + ], + [ + fromHex( + "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("11eaed932c6c6fddfc2efc394e609facf4abe814fc6180d03b14fce13a07d0e5") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("97daac0ee9998dfcad6c9c0970da5ca411c86233a944c25b47566f6a7bc1ddd5") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("8f9bec6a62dd28ebd36d1227745592de6658b36974a3bb98a4c582f683ea6c42") + ], + [ + fromHex( + "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("160b4e433e384e05e537dc59b467f7cb2403f0214db15c5db58862a3f1156d2e") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("bfc5fe0e360152ca98c50fab4ed7e3078c17debc2917740d5000913b686ca129") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("6c1b3dc7a706b9dc81352a6716b9c666c608d8626272c64b914ab05572fc6e84") + ], + [ + fromHex( + "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("abe346a7259fc90b4c27185419628e5e6af6466b1ae9b5446cac4bfc26cf05c4") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("a3f01b6939256127582ac8ae9fb47a382a244680806a3f613a118851c1ca1d47") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("9f4390f8d30c2dd92ec9f095b65e2b9ae9b0a925a5258e241c9f1e910f734318") + ], + [ + fromHex( + "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("b35439a4ac6f0948b6d6f9e3c6af0f5f590ce20f1bde7090ef7970686ec6738a") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("f13b2d724659eb3bf47f2dd6af1accc87b81f09f59f2b75e5c0bed6589dfe8c6") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("d5c039b748aa64665782974ec3dc3025c042edf54dcdc2b5de31385b094cb678") + ], + [ + fromHex( + "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("111bb261277afd65f0744b247cd3e47d386d71563d0ed995517807d5ebd4fba3") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("11ee391211c6256460b6ed375957fadd8061cafbb31daf967db875aebd5aaad4") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("35d5fc17cfbbadd00f5e710ada39f194c5ad7c766ad67072245f1fad45f0f530") + ], + [ + fromHex( + "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("f506898cc7c2e092f9eb9fadae7ba50383f5b46a2a4fe5597dbb553a78981268") + ], + [ + fromHex( + "616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("7d3e74a05d7db15bce4ad9ec0658ea98e3f06eeecf16b4c6fff2da457ddc2f34") + ], + [ + fromHex( + "61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161" + ), + fromHex("ffe054fe7ae0cb6dc65c3af9b61d5209f439851db43d0ba5997337df154668eb") + ], + [ + fromHex( + "de188941a3375d3a8a061e67576e926dc71a7fa3f0cceb97452b4d3227965f9ea8cc75076d9fb9c5417aa5cb30fc22198b34982dbb629e" + ), + fromHex("038051e9c324393bd1ca1978dd0952c2aa3742ca4f1bd5cd4611cea83892d382") + ], + [ + millionChars, + fromHex("cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0") + ], + [ + fromHex( + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ), + fromHex("45ad4b37c6e2fc0a2cfcc1b5da524132ec707615c2cae1dbbc43c97aa521db81") + ] +]; + +/** + * @see https://tools.ietf.org/html/rfc4231 + */ +export const hmacTestVectors: Array<[Uint8Array, Uint8Array, Uint8Array]> = [ + [ + fromHex("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"), + fromHex("4869205468657265"), + fromHex("b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7") + ], + [ + fromHex("4a656665"), + fromHex("7768617420646f2079612077616e7420666f72206e6f7468696e673f"), + fromHex("5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843") + ], + [ + fromHex("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), + fromHex( + "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" + ), + fromHex("773ea91e36800e46854db8ebd09181a72959098b3ef8c122d9635514ced565fe") + ], + [ + fromHex("0102030405060708090a0b0c0d0e0f10111213141516171819"), + fromHex( + "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd" + ), + fromHex("82558a389a443c0ea4cc819899f2083a85f0faa3e578f8077a2e3ff46729665b") + ], + [ + fromHex( + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ), + fromHex( + "54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b6579202d2048617368204b6579204669727374" + ), + fromHex("60e431591ee0b67f0d8a26aacbf5b77f8e0bc6213728c5140546040f0ee37f54") + ], + [ + fromHex( + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ), + fromHex( + "5468697320697320612074657374207573696e672061206c6172676572207468616e20626c6f636b2d73697a65206b657920616e642061206c6172676572207468616e20626c6f636b2d73697a6520646174612e20546865206b6579206e6565647320746f20626520686173686564206265666f7265206265696e6720757365642062792074686520484d414320616c676f726974686d2e" + ), + fromHex("9b09ffa71b942fcb27635fbcd5b0e944bfdc63644f0713938a7f51535c3a35e2") + ] +]; diff --git a/node_modules/@aws-crypto/sha256-js/tsconfig.json b/node_modules/@aws-crypto/sha256-js/tsconfig.json new file mode 100644 index 0000000..c242acb --- /dev/null +++ b/node_modules/@aws-crypto/sha256-js/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "declaration": true, + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "lib": ["es5", "es2015.promise", "es2015.collection", "es2015.iterable"], + "rootDir": "./src", + "outDir": "./build", + "importHelpers": true, + "noEmitHelpers": true + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules/**"] +} diff --git a/node_modules/@aws-crypto/supports-web-crypto/CHANGELOG.md b/node_modules/@aws-crypto/supports-web-crypto/CHANGELOG.md new file mode 100644 index 0000000..f4a929b --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/CHANGELOG.md @@ -0,0 +1,46 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.2...v3.0.0) (2023-01-12) + +**Note:** Version bump only for package @aws-crypto/supports-web-crypto + +## [2.0.2](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.1...v2.0.2) (2022-09-07) + +**Note:** Version bump only for package @aws-crypto/supports-web-crypto + +# [2.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.2...v2.0.0) (2021-10-25) + +**Note:** Version bump only for package @aws-crypto/supports-web-crypto + +# [1.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/supports-web-crypto@1.0.0-alpha.0...@aws-crypto/supports-web-crypto@1.0.0) (2020-10-22) + +### Bug Fixes + +- replace `sourceRoot` -> `rootDir` in tsconfig ([#169](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/169)) ([d437167](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/d437167b51d1c56a4fcc2bb8a446b74a7e3b7e06)) + +# [1.0.0-alpha.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/supports-web-crypto@0.1.0-preview.4...@aws-crypto/supports-web-crypto@1.0.0-alpha.0) (2020-02-07) + +**Note:** Version bump only for package @aws-crypto/supports-web-crypto + +# [0.1.0-preview.4](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/supports-web-crypto@0.1.0-preview.2...@aws-crypto/supports-web-crypto@0.1.0-preview.4) (2020-01-16) + +### Bug Fixes + +- Changed package.json files to point to the right Git repo ([#9](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/9)) ([028245d](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/028245d72e642ca98d82226afb300eb154503c4a)), closes [#8](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/8) +- lerna version maintains package-lock ([#14](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/14)) ([2ef29e1](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/2ef29e13779703a5c9b32e93d18918fcb33b7272)), closes [#13](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/13) + +# [0.1.0-preview.3](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/@aws-crypto/supports-web-crypto@0.1.0-preview.2...@aws-crypto/supports-web-crypto@0.1.0-preview.3) (2019-11-15) + +### Bug Fixes + +- Changed package.json files to point to the right Git repo ([#9](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/9)) ([028245d](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/028245d72e642ca98d82226afb300eb154503c4a)), closes [#8](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/8) +- lerna version maintains package-lock ([#14](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/14)) ([2ef29e1](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/2ef29e13779703a5c9b32e93d18918fcb33b7272)), closes [#13](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/13) + +# [0.1.0-preview.2](https://github.com/aws/aws-javascript-crypto-helpers/compare/@aws-crypto/supports-web-crypto@0.1.0-preview.1...@aws-crypto/supports-web-crypto@0.1.0-preview.2) (2019-10-30) + +### Bug Fixes + +- remove /src/ from .npmignore (for sourcemaps) ([#5](https://github.com/aws/aws-javascript-crypto-helpers/issues/5)) ([ec52056](https://github.com/aws/aws-javascript-crypto-helpers/commit/ec52056)) diff --git a/node_modules/@aws-crypto/supports-web-crypto/LICENSE b/node_modules/@aws-crypto/supports-web-crypto/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-crypto/supports-web-crypto/README.md b/node_modules/@aws-crypto/supports-web-crypto/README.md new file mode 100644 index 0000000..7891357 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/README.md @@ -0,0 +1,32 @@ +# @aws-crypto/supports-web-crypto + +Functions to check web crypto support for browsers. + +## Usage + +``` +import {supportsWebCrypto} from '@aws-crypto/supports-web-crypto'; + +if (supportsWebCrypto(window)) { + // window.crypto.subtle.encrypt will exist +} + +``` + +## supportsWebCrypto + +Used to make sure `window.crypto.subtle` exists and implements crypto functions +as well as a cryptographic secure random source exists. + +## supportsSecureRandom + +Used to make sure that a cryptographic secure random source exists. +Does not check for `window.crypto.subtle`. + +## supportsSubtleCrypto + +## supportsZeroByteGCM + +## Test + +`npm test` diff --git a/node_modules/@aws-crypto/supports-web-crypto/build/index.d.ts b/node_modules/@aws-crypto/supports-web-crypto/build/index.d.ts new file mode 100644 index 0000000..9725c9c --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/build/index.d.ts @@ -0,0 +1 @@ +export * from "./supportsWebCrypto"; diff --git a/node_modules/@aws-crypto/supports-web-crypto/build/index.js b/node_modules/@aws-crypto/supports-web-crypto/build/index.js new file mode 100644 index 0000000..4d82b8d --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/build/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +tslib_1.__exportStar(require("./supportsWebCrypto"), exports); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOERBQW9DIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vc3VwcG9ydHNXZWJDcnlwdG9cIjtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/@aws-crypto/supports-web-crypto/build/supportsWebCrypto.d.ts b/node_modules/@aws-crypto/supports-web-crypto/build/supportsWebCrypto.d.ts new file mode 100644 index 0000000..f2723dc --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/build/supportsWebCrypto.d.ts @@ -0,0 +1,4 @@ +export declare function supportsWebCrypto(window: Window): boolean; +export declare function supportsSecureRandom(window: Window): boolean; +export declare function supportsSubtleCrypto(subtle: SubtleCrypto): boolean; +export declare function supportsZeroByteGCM(subtle: SubtleCrypto): Promise; diff --git a/node_modules/@aws-crypto/supports-web-crypto/build/supportsWebCrypto.js b/node_modules/@aws-crypto/supports-web-crypto/build/supportsWebCrypto.js new file mode 100644 index 0000000..a079bec --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/build/supportsWebCrypto.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.supportsZeroByteGCM = exports.supportsSubtleCrypto = exports.supportsSecureRandom = exports.supportsWebCrypto = void 0; +var tslib_1 = require("tslib"); +var subtleCryptoMethods = [ + "decrypt", + "digest", + "encrypt", + "exportKey", + "generateKey", + "importKey", + "sign", + "verify" +]; +function supportsWebCrypto(window) { + if (supportsSecureRandom(window) && + typeof window.crypto.subtle === "object") { + var subtle = window.crypto.subtle; + return supportsSubtleCrypto(subtle); + } + return false; +} +exports.supportsWebCrypto = supportsWebCrypto; +function supportsSecureRandom(window) { + if (typeof window === "object" && typeof window.crypto === "object") { + var getRandomValues = window.crypto.getRandomValues; + return typeof getRandomValues === "function"; + } + return false; +} +exports.supportsSecureRandom = supportsSecureRandom; +function supportsSubtleCrypto(subtle) { + return (subtle && + subtleCryptoMethods.every(function (methodName) { return typeof subtle[methodName] === "function"; })); +} +exports.supportsSubtleCrypto = supportsSubtleCrypto; +function supportsZeroByteGCM(subtle) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var key, zeroByteAuthTag, _a; + return tslib_1.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!supportsSubtleCrypto(subtle)) + return [2 /*return*/, false]; + _b.label = 1; + case 1: + _b.trys.push([1, 4, , 5]); + return [4 /*yield*/, subtle.generateKey({ name: "AES-GCM", length: 128 }, false, ["encrypt"])]; + case 2: + key = _b.sent(); + return [4 /*yield*/, subtle.encrypt({ + name: "AES-GCM", + iv: new Uint8Array(Array(12)), + additionalData: new Uint8Array(Array(16)), + tagLength: 128 + }, key, new Uint8Array(0))]; + case 3: + zeroByteAuthTag = _b.sent(); + return [2 /*return*/, zeroByteAuthTag.byteLength === 16]; + case 4: + _a = _b.sent(); + return [2 /*return*/, false]; + case 5: return [2 /*return*/]; + } + }); + }); +} +exports.supportsZeroByteGCM = supportsZeroByteGCM; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VwcG9ydHNXZWJDcnlwdG8uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvc3VwcG9ydHNXZWJDcnlwdG8udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQVVBLElBQU0sbUJBQW1CLEdBQThCO0lBQ3JELFNBQVM7SUFDVCxRQUFRO0lBQ1IsU0FBUztJQUNULFdBQVc7SUFDWCxhQUFhO0lBQ2IsV0FBVztJQUNYLE1BQU07SUFDTixRQUFRO0NBQ1QsQ0FBQztBQUVGLFNBQWdCLGlCQUFpQixDQUFDLE1BQWM7SUFDOUMsSUFDRSxvQkFBb0IsQ0FBQyxNQUFNLENBQUM7UUFDNUIsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUFDLE1BQU0sS0FBSyxRQUFRLEVBQ3hDO1FBQ1EsSUFBQSxNQUFNLEdBQUssTUFBTSxDQUFDLE1BQU0sT0FBbEIsQ0FBbUI7UUFFakMsT0FBTyxvQkFBb0IsQ0FBQyxNQUFNLENBQUMsQ0FBQztLQUNyQztJQUVELE9BQU8sS0FBSyxDQUFDO0FBQ2YsQ0FBQztBQVhELDhDQVdDO0FBRUQsU0FBZ0Isb0JBQW9CLENBQUMsTUFBYztJQUNqRCxJQUFJLE9BQU8sTUFBTSxLQUFLLFFBQVEsSUFBSSxPQUFPLE1BQU0sQ0FBQyxNQUFNLEtBQUssUUFBUSxFQUFFO1FBQzNELElBQUEsZUFBZSxHQUFLLE1BQU0sQ0FBQyxNQUFNLGdCQUFsQixDQUFtQjtRQUUxQyxPQUFPLE9BQU8sZUFBZSxLQUFLLFVBQVUsQ0FBQztLQUM5QztJQUVELE9BQU8sS0FBSyxDQUFDO0FBQ2YsQ0FBQztBQVJELG9EQVFDO0FBRUQsU0FBZ0Isb0JBQW9CLENBQUMsTUFBb0I7SUFDdkQsT0FBTyxDQUNMLE1BQU07UUFDTixtQkFBbUIsQ0FBQyxLQUFLLENBQ3ZCLFVBQUEsVUFBVSxJQUFJLE9BQUEsT0FBTyxNQUFNLENBQUMsVUFBVSxDQUFDLEtBQUssVUFBVSxFQUF4QyxDQUF3QyxDQUN2RCxDQUNGLENBQUM7QUFDSixDQUFDO0FBUEQsb0RBT0M7QUFFRCxTQUFzQixtQkFBbUIsQ0FBQyxNQUFvQjs7Ozs7O29CQUM1RCxJQUFJLENBQUMsb0JBQW9CLENBQUMsTUFBTSxDQUFDO3dCQUFFLHNCQUFPLEtBQUssRUFBQzs7OztvQkFFbEMscUJBQU0sTUFBTSxDQUFDLFdBQVcsQ0FDbEMsRUFBRSxJQUFJLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxHQUFHLEVBQUUsRUFDaEMsS0FBSyxFQUNMLENBQUMsU0FBUyxDQUFDLENBQ1osRUFBQTs7b0JBSkssR0FBRyxHQUFHLFNBSVg7b0JBQ3VCLHFCQUFNLE1BQU0sQ0FBQyxPQUFPLENBQzFDOzRCQUNFLElBQUksRUFBRSxTQUFTOzRCQUNmLEVBQUUsRUFBRSxJQUFJLFVBQVUsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLENBQUM7NEJBQzdCLGNBQWMsRUFBRSxJQUFJLFVBQVUsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLENBQUM7NEJBQ3pDLFNBQVMsRUFBRSxHQUFHO3lCQUNmLEVBQ0QsR0FBRyxFQUNILElBQUksVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUNsQixFQUFBOztvQkFUSyxlQUFlLEdBQUcsU0FTdkI7b0JBQ0Qsc0JBQU8sZUFBZSxDQUFDLFVBQVUsS0FBSyxFQUFFLEVBQUM7OztvQkFFekMsc0JBQU8sS0FBSyxFQUFDOzs7OztDQUVoQjtBQXRCRCxrREFzQkMiLCJzb3VyY2VzQ29udGVudCI6WyJ0eXBlIFN1YnRsZUNyeXB0b01ldGhvZCA9XG4gIHwgXCJkZWNyeXB0XCJcbiAgfCBcImRpZ2VzdFwiXG4gIHwgXCJlbmNyeXB0XCJcbiAgfCBcImV4cG9ydEtleVwiXG4gIHwgXCJnZW5lcmF0ZUtleVwiXG4gIHwgXCJpbXBvcnRLZXlcIlxuICB8IFwic2lnblwiXG4gIHwgXCJ2ZXJpZnlcIjtcblxuY29uc3Qgc3VidGxlQ3J5cHRvTWV0aG9kczogQXJyYXk8U3VidGxlQ3J5cHRvTWV0aG9kPiA9IFtcbiAgXCJkZWNyeXB0XCIsXG4gIFwiZGlnZXN0XCIsXG4gIFwiZW5jcnlwdFwiLFxuICBcImV4cG9ydEtleVwiLFxuICBcImdlbmVyYXRlS2V5XCIsXG4gIFwiaW1wb3J0S2V5XCIsXG4gIFwic2lnblwiLFxuICBcInZlcmlmeVwiXG5dO1xuXG5leHBvcnQgZnVuY3Rpb24gc3VwcG9ydHNXZWJDcnlwdG8od2luZG93OiBXaW5kb3cpOiBib29sZWFuIHtcbiAgaWYgKFxuICAgIHN1cHBvcnRzU2VjdXJlUmFuZG9tKHdpbmRvdykgJiZcbiAgICB0eXBlb2Ygd2luZG93LmNyeXB0by5zdWJ0bGUgPT09IFwib2JqZWN0XCJcbiAgKSB7XG4gICAgY29uc3QgeyBzdWJ0bGUgfSA9IHdpbmRvdy5jcnlwdG87XG5cbiAgICByZXR1cm4gc3VwcG9ydHNTdWJ0bGVDcnlwdG8oc3VidGxlKTtcbiAgfVxuXG4gIHJldHVybiBmYWxzZTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHN1cHBvcnRzU2VjdXJlUmFuZG9tKHdpbmRvdzogV2luZG93KTogYm9vbGVhbiB7XG4gIGlmICh0eXBlb2Ygd2luZG93ID09PSBcIm9iamVjdFwiICYmIHR5cGVvZiB3aW5kb3cuY3J5cHRvID09PSBcIm9iamVjdFwiKSB7XG4gICAgY29uc3QgeyBnZXRSYW5kb21WYWx1ZXMgfSA9IHdpbmRvdy5jcnlwdG87XG5cbiAgICByZXR1cm4gdHlwZW9mIGdldFJhbmRvbVZhbHVlcyA9PT0gXCJmdW5jdGlvblwiO1xuICB9XG5cbiAgcmV0dXJuIGZhbHNlO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gc3VwcG9ydHNTdWJ0bGVDcnlwdG8oc3VidGxlOiBTdWJ0bGVDcnlwdG8pIHtcbiAgcmV0dXJuIChcbiAgICBzdWJ0bGUgJiZcbiAgICBzdWJ0bGVDcnlwdG9NZXRob2RzLmV2ZXJ5KFxuICAgICAgbWV0aG9kTmFtZSA9PiB0eXBlb2Ygc3VidGxlW21ldGhvZE5hbWVdID09PSBcImZ1bmN0aW9uXCJcbiAgICApXG4gICk7XG59XG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBzdXBwb3J0c1plcm9CeXRlR0NNKHN1YnRsZTogU3VidGxlQ3J5cHRvKSB7XG4gIGlmICghc3VwcG9ydHNTdWJ0bGVDcnlwdG8oc3VidGxlKSkgcmV0dXJuIGZhbHNlO1xuICB0cnkge1xuICAgIGNvbnN0IGtleSA9IGF3YWl0IHN1YnRsZS5nZW5lcmF0ZUtleShcbiAgICAgIHsgbmFtZTogXCJBRVMtR0NNXCIsIGxlbmd0aDogMTI4IH0sXG4gICAgICBmYWxzZSxcbiAgICAgIFtcImVuY3J5cHRcIl1cbiAgICApO1xuICAgIGNvbnN0IHplcm9CeXRlQXV0aFRhZyA9IGF3YWl0IHN1YnRsZS5lbmNyeXB0KFxuICAgICAge1xuICAgICAgICBuYW1lOiBcIkFFUy1HQ01cIixcbiAgICAgICAgaXY6IG5ldyBVaW50OEFycmF5KEFycmF5KDEyKSksXG4gICAgICAgIGFkZGl0aW9uYWxEYXRhOiBuZXcgVWludDhBcnJheShBcnJheSgxNikpLFxuICAgICAgICB0YWdMZW5ndGg6IDEyOFxuICAgICAgfSxcbiAgICAgIGtleSxcbiAgICAgIG5ldyBVaW50OEFycmF5KDApXG4gICAgKTtcbiAgICByZXR1cm4gemVyb0J5dGVBdXRoVGFnLmJ5dGVMZW5ndGggPT09IDE2O1xuICB9IGNhdGNoIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/CopyrightNotice.txt b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 0000000..3d4c823 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/LICENSE.txt b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/LICENSE.txt new file mode 100644 index 0000000..bfe6430 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/README.md b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/README.md new file mode 100644 index 0000000..a5b2692 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/README.md @@ -0,0 +1,142 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 2.3.3 or later +npm install tslib + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 2.3.3 or later +yarn add tslib + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 2.3.3 or later +bower install tslib + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 2.3.3 or later +jspm install tslib + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/modules/index.js b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/modules/index.js new file mode 100644 index 0000000..d241d04 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/modules/package.json b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/modules/package.json new file mode 100644 index 0000000..aafa0e4 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/package.json b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/package.json new file mode 100644 index 0000000..f8c2a53 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/package.json @@ -0,0 +1,37 @@ +{ + "name": "tslib", + "author": "Microsoft Corp.", + "homepage": "https://www.typescriptlang.org/", + "version": "1.14.1", + "license": "0BSD", + "description": "Runtime library for TypeScript helper functions", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/tslib.git" + }, + "main": "tslib.js", + "module": "tslib.es6.js", + "jsnext:main": "tslib.es6.js", + "typings": "tslib.d.ts", + "sideEffects": false, + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + } +} diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js new file mode 100644 index 0000000..0c1b613 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js @@ -0,0 +1,23 @@ +// When on node 14, it validates that all of the commonjs exports +// are correctly re-exported for es modules importers. + +const nodeMajor = Number(process.version.split(".")[0].slice(1)) +if (nodeMajor < 14) { + console.log("Skipping because node does not support module exports.") + process.exit(0) +} + +// ES Modules import via the ./modules folder +import * as esTSLib from "../../modules/index.js" + +// Force a commonjs resolve +import { createRequire } from "module"; +const commonJSTSLib = createRequire(import.meta.url)("../../tslib.js"); + +for (const key in commonJSTSLib) { + if (commonJSTSLib.hasOwnProperty(key)) { + if(!esTSLib[key]) throw new Error(`ESModules is missing ${key} - it needs to be re-exported in ./modules/index.js`) + } +} + +console.log("All exports in commonjs are available for es module consumers.") diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json new file mode 100644 index 0000000..166e509 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "scripts": { + "test": "node index.js" + } +} diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.d.ts b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.d.ts new file mode 100644 index 0000000..0756b28 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, exports: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; \ No newline at end of file diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.es6.html b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.es6.html new file mode 100644 index 0000000..b122e41 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.es6.js b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.es6.js new file mode 100644 index 0000000..0e0d8d0 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.es6.js @@ -0,0 +1,218 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export function __createBinding(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +} + +export function __exportStar(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.html b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.html new file mode 100644 index 0000000..44c9ba5 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.js b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.js new file mode 100644 index 0000000..e5b7c9b --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib/tslib.js @@ -0,0 +1,284 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@aws-crypto/supports-web-crypto/package.json b/node_modules/@aws-crypto/supports-web-crypto/package.json new file mode 100644 index 0000000..e28bf4e --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/package.json @@ -0,0 +1,26 @@ +{ + "name": "@aws-crypto/supports-web-crypto", + "version": "3.0.0", + "description": "Provides functions for detecting if the host environment supports the WebCrypto API", + "scripts": { + "pretest": "tsc -p tsconfig.test.json", + "test": "mocha --require ts-node/register test/**/*test.ts" + }, + "repository": { + "type": "git", + "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" + }, + "author": { + "name": "AWS Crypto Tools Team", + "email": "aws-cryptools@amazon.com", + "url": "https://docs.aws.amazon.com/aws-crypto-tools/index.html?id=docs_gateway#lang/en_us" + }, + "homepage": "https://github.com/aws/aws-sdk-js-crypto-helpers/tree/master/packages/supports-web-crypto", + "license": "Apache-2.0", + "main": "./build/index.js", + "types": "./build/index.d.ts", + "dependencies": { + "tslib": "^1.11.1" + }, + "gitHead": "7f56cee8f62bd65cd397eeec29c3c997215bd80c" +} diff --git a/node_modules/@aws-crypto/supports-web-crypto/src/index.ts b/node_modules/@aws-crypto/supports-web-crypto/src/index.ts new file mode 100644 index 0000000..9725c9c --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/src/index.ts @@ -0,0 +1 @@ +export * from "./supportsWebCrypto"; diff --git a/node_modules/@aws-crypto/supports-web-crypto/src/supportsWebCrypto.ts b/node_modules/@aws-crypto/supports-web-crypto/src/supportsWebCrypto.ts new file mode 100644 index 0000000..7eef629 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/src/supportsWebCrypto.ts @@ -0,0 +1,76 @@ +type SubtleCryptoMethod = + | "decrypt" + | "digest" + | "encrypt" + | "exportKey" + | "generateKey" + | "importKey" + | "sign" + | "verify"; + +const subtleCryptoMethods: Array = [ + "decrypt", + "digest", + "encrypt", + "exportKey", + "generateKey", + "importKey", + "sign", + "verify" +]; + +export function supportsWebCrypto(window: Window): boolean { + if ( + supportsSecureRandom(window) && + typeof window.crypto.subtle === "object" + ) { + const { subtle } = window.crypto; + + return supportsSubtleCrypto(subtle); + } + + return false; +} + +export function supportsSecureRandom(window: Window): boolean { + if (typeof window === "object" && typeof window.crypto === "object") { + const { getRandomValues } = window.crypto; + + return typeof getRandomValues === "function"; + } + + return false; +} + +export function supportsSubtleCrypto(subtle: SubtleCrypto) { + return ( + subtle && + subtleCryptoMethods.every( + methodName => typeof subtle[methodName] === "function" + ) + ); +} + +export async function supportsZeroByteGCM(subtle: SubtleCrypto) { + if (!supportsSubtleCrypto(subtle)) return false; + try { + const key = await subtle.generateKey( + { name: "AES-GCM", length: 128 }, + false, + ["encrypt"] + ); + const zeroByteAuthTag = await subtle.encrypt( + { + name: "AES-GCM", + iv: new Uint8Array(Array(12)), + additionalData: new Uint8Array(Array(16)), + tagLength: 128 + }, + key, + new Uint8Array(0) + ); + return zeroByteAuthTag.byteLength === 16; + } catch { + return false; + } +} diff --git a/node_modules/@aws-crypto/supports-web-crypto/tsconfig.json b/node_modules/@aws-crypto/supports-web-crypto/tsconfig.json new file mode 100644 index 0000000..e4def43 --- /dev/null +++ b/node_modules/@aws-crypto/supports-web-crypto/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["dom", "es5", "es2015.collection"], + "strict": true, + "sourceMap": true, + "declaration": true, + "rootDir": "./src", + "outDir": "./build", + "importHelpers": true, + "noEmitHelpers": true + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules/**"] +} diff --git a/node_modules/@aws-crypto/util/CHANGELOG.md b/node_modules/@aws-crypto/util/CHANGELOG.md new file mode 100644 index 0000000..686f49d --- /dev/null +++ b/node_modules/@aws-crypto/util/CHANGELOG.md @@ -0,0 +1,47 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [3.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.2...v3.0.0) (2023-01-12) + +- feat!: replace Hash implementations with Checksum interface (#492) ([da43dc0](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/da43dc0fdf669d9ebb5bfb1b1f7c79e46c4aaae1)), closes [#492](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/492) + +### BREAKING CHANGES + +- All classes that implemented `Hash` now implement `Checksum`. + +## [2.0.2](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.1...v2.0.2) (2022-09-07) + +### Bug Fixes + +- **#337:** update @aws-sdk/types ([#373](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/373)) ([b26a811](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/b26a811a392f5209c7ec7e57251500d4d78f97ff)), closes [#337](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/337) +- **docs:** update README for packages/util ([#382](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/382)) ([f3e650e](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/f3e650e1b4792ffbea2e8a1a015fd55fb951a3a4)) + +## [2.0.1](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v2.0.0...v2.0.1) (2021-12-09) + +### Bug Fixes + +- **uint32ArrayFrom:** increment index & polyfill for Uint32Array ([#270](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/270)) ([a70d603](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/a70d603f3ba7600d3c1213f297d4160a4b3793bd)) + +# [2.0.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.2...v2.0.0) (2021-10-25) + +**Note:** Version bump only for package @aws-crypto/util + +## [1.2.2](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.1...v1.2.2) (2021-10-12) + +### Bug Fixes + +- **crc32c:** ie11 does not support Array.from ([#221](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/221)) ([5f49547](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/5f495472ab8988cf203e0f2a70a51f7e1fcd7e60)) + +## [1.2.1](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.0...v1.2.1) (2021-09-17) + +### Bug Fixes + +- better pollyfill check for Buffer ([#217](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/217)) ([bc97da2](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/bc97da29aaf473943e4407c9a29cc30f74f15723)) + +# [1.2.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.1.1...v1.2.0) (2021-09-17) + +### Features + +- add @aws-crypto/util ([8f489cb](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/8f489cbe4c0e134f826bac66f1bf5172597048b9)) diff --git a/node_modules/@aws-crypto/util/LICENSE b/node_modules/@aws-crypto/util/LICENSE new file mode 100644 index 0000000..980a15a --- /dev/null +++ b/node_modules/@aws-crypto/util/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-crypto/util/README.md b/node_modules/@aws-crypto/util/README.md new file mode 100644 index 0000000..4c1c8aa --- /dev/null +++ b/node_modules/@aws-crypto/util/README.md @@ -0,0 +1,16 @@ +# @aws-crypto/util + +Helper functions + +## Usage + +``` +import { convertToBuffer } from '@aws-crypto/util'; + +const data = "asdf"; +const utf8EncodedUint8Array = convertToBuffer(data); +``` + +## Test + +`npm test` diff --git a/node_modules/@aws-crypto/util/build/convertToBuffer.d.ts b/node_modules/@aws-crypto/util/build/convertToBuffer.d.ts new file mode 100644 index 0000000..697a5cd --- /dev/null +++ b/node_modules/@aws-crypto/util/build/convertToBuffer.d.ts @@ -0,0 +1,2 @@ +import { SourceData } from "@aws-sdk/types"; +export declare function convertToBuffer(data: SourceData): Uint8Array; diff --git a/node_modules/@aws-crypto/util/build/convertToBuffer.js b/node_modules/@aws-crypto/util/build/convertToBuffer.js new file mode 100644 index 0000000..6cc8bcf --- /dev/null +++ b/node_modules/@aws-crypto/util/build/convertToBuffer.js @@ -0,0 +1,24 @@ +"use strict"; +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertToBuffer = void 0; +var util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser"); +// Quick polyfill +var fromUtf8 = typeof Buffer !== "undefined" && Buffer.from + ? function (input) { return Buffer.from(input, "utf8"); } + : util_utf8_browser_1.fromUtf8; +function convertToBuffer(data) { + // Already a Uint8, do nothing + if (data instanceof Uint8Array) + return data; + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +exports.convertToBuffer = convertToBuffer; +//# sourceMappingURL=convertToBuffer.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/build/convertToBuffer.js.map b/node_modules/@aws-crypto/util/build/convertToBuffer.js.map new file mode 100644 index 0000000..d3c0154 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/convertToBuffer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"convertToBuffer.js","sourceRoot":"","sources":["../src/convertToBuffer.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,sCAAsC;;;AAGtC,gEAAyE;AAEzE,iBAAiB;AACjB,IAAM,QAAQ,GACZ,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,IAAI;IAC1C,CAAC,CAAC,UAAC,KAAa,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,EAA1B,CAA0B;IAC/C,CAAC,CAAC,4BAAe,CAAC;AAEtB,SAAgB,eAAe,CAAC,IAAgB;IAC9C,8BAA8B;IAC9B,IAAI,IAAI,YAAY,UAAU;QAAE,OAAO,IAAI,CAAC;IAE5C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;KACvB;IAED,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QAC5B,OAAO,IAAI,UAAU,CACnB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,iBAAiB,CAC/C,CAAC;KACH;IAED,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AAjBD,0CAiBC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/build/index.d.ts b/node_modules/@aws-crypto/util/build/index.d.ts new file mode 100644 index 0000000..783c73c --- /dev/null +++ b/node_modules/@aws-crypto/util/build/index.d.ts @@ -0,0 +1,4 @@ +export { convertToBuffer } from "./convertToBuffer"; +export { isEmptyData } from "./isEmptyData"; +export { numToUint8 } from "./numToUint8"; +export { uint32ArrayFrom } from './uint32ArrayFrom'; diff --git a/node_modules/@aws-crypto/util/build/index.js b/node_modules/@aws-crypto/util/build/index.js new file mode 100644 index 0000000..94e1ca9 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/index.js @@ -0,0 +1,14 @@ +"use strict"; +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +Object.defineProperty(exports, "__esModule", { value: true }); +exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0; +var convertToBuffer_1 = require("./convertToBuffer"); +Object.defineProperty(exports, "convertToBuffer", { enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } }); +var isEmptyData_1 = require("./isEmptyData"); +Object.defineProperty(exports, "isEmptyData", { enumerable: true, get: function () { return isEmptyData_1.isEmptyData; } }); +var numToUint8_1 = require("./numToUint8"); +Object.defineProperty(exports, "numToUint8", { enumerable: true, get: function () { return numToUint8_1.numToUint8; } }); +var uint32ArrayFrom_1 = require("./uint32ArrayFrom"); +Object.defineProperty(exports, "uint32ArrayFrom", { enumerable: true, get: function () { return uint32ArrayFrom_1.uint32ArrayFrom; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/build/index.js.map b/node_modules/@aws-crypto/util/build/index.js.map new file mode 100644 index 0000000..afb9af6 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,sCAAsC;;;AAEtC,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,qDAAkD;AAA1C,kHAAA,eAAe,OAAA"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/build/isEmptyData.d.ts b/node_modules/@aws-crypto/util/build/isEmptyData.d.ts new file mode 100644 index 0000000..43ae4a7 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/isEmptyData.d.ts @@ -0,0 +1,2 @@ +import { SourceData } from "@aws-sdk/types"; +export declare function isEmptyData(data: SourceData): boolean; diff --git a/node_modules/@aws-crypto/util/build/isEmptyData.js b/node_modules/@aws-crypto/util/build/isEmptyData.js new file mode 100644 index 0000000..6af1e89 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/isEmptyData.js @@ -0,0 +1,13 @@ +"use strict"; +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEmptyData = void 0; +function isEmptyData(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +exports.isEmptyData = isEmptyData; +//# sourceMappingURL=isEmptyData.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/build/isEmptyData.js.map b/node_modules/@aws-crypto/util/build/isEmptyData.js.map new file mode 100644 index 0000000..8766be9 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/isEmptyData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isEmptyData.js","sourceRoot":"","sources":["../src/isEmptyData.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,sCAAsC;;;AAItC,SAAgB,WAAW,CAAC,IAAgB;IAC1C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;KAC1B;IAED,OAAO,IAAI,CAAC,UAAU,KAAK,CAAC,CAAC;AAC/B,CAAC;AAND,kCAMC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/build/numToUint8.d.ts b/node_modules/@aws-crypto/util/build/numToUint8.d.ts new file mode 100644 index 0000000..5b702e8 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/numToUint8.d.ts @@ -0,0 +1 @@ +export declare function numToUint8(num: number): Uint8Array; diff --git a/node_modules/@aws-crypto/util/build/numToUint8.js b/node_modules/@aws-crypto/util/build/numToUint8.js new file mode 100644 index 0000000..2f070e1 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/numToUint8.js @@ -0,0 +1,15 @@ +"use strict"; +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +Object.defineProperty(exports, "__esModule", { value: true }); +exports.numToUint8 = void 0; +function numToUint8(num) { + return new Uint8Array([ + (num & 0xff000000) >> 24, + (num & 0x00ff0000) >> 16, + (num & 0x0000ff00) >> 8, + num & 0x000000ff, + ]); +} +exports.numToUint8 = numToUint8; +//# sourceMappingURL=numToUint8.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/build/numToUint8.js.map b/node_modules/@aws-crypto/util/build/numToUint8.js.map new file mode 100644 index 0000000..951886b --- /dev/null +++ b/node_modules/@aws-crypto/util/build/numToUint8.js.map @@ -0,0 +1 @@ +{"version":3,"file":"numToUint8.js","sourceRoot":"","sources":["../src/numToUint8.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,sCAAsC;;;AAEtC,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,IAAI,UAAU,CAAC;QACpB,CAAC,GAAG,GAAG,UAAU,CAAC,IAAI,EAAE;QACxB,CAAC,GAAG,GAAG,UAAU,CAAC,IAAI,EAAE;QACxB,CAAC,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC;QACvB,GAAG,GAAG,UAAU;KACjB,CAAC,CAAC;AACL,CAAC;AAPD,gCAOC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/build/uint32ArrayFrom.d.ts b/node_modules/@aws-crypto/util/build/uint32ArrayFrom.d.ts new file mode 100644 index 0000000..fea6607 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/uint32ArrayFrom.d.ts @@ -0,0 +1 @@ +export declare function uint32ArrayFrom(a_lookUpTable: Array): Uint32Array; diff --git a/node_modules/@aws-crypto/util/build/uint32ArrayFrom.js b/node_modules/@aws-crypto/util/build/uint32ArrayFrom.js new file mode 100644 index 0000000..226cdc3 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/uint32ArrayFrom.js @@ -0,0 +1,20 @@ +"use strict"; +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +Object.defineProperty(exports, "__esModule", { value: true }); +exports.uint32ArrayFrom = void 0; +// IE 11 does not support Array.from, so we do it manually +function uint32ArrayFrom(a_lookUpTable) { + if (!Uint32Array.from) { + var return_array = new Uint32Array(a_lookUpTable.length); + var a_index = 0; + while (a_index < a_lookUpTable.length) { + return_array[a_index] = a_lookUpTable[a_index]; + a_index += 1; + } + return return_array; + } + return Uint32Array.from(a_lookUpTable); +} +exports.uint32ArrayFrom = uint32ArrayFrom; +//# sourceMappingURL=uint32ArrayFrom.js.map \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/build/uint32ArrayFrom.js.map b/node_modules/@aws-crypto/util/build/uint32ArrayFrom.js.map new file mode 100644 index 0000000..440ef69 --- /dev/null +++ b/node_modules/@aws-crypto/util/build/uint32ArrayFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uint32ArrayFrom.js","sourceRoot":"","sources":["../src/uint32ArrayFrom.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,sCAAsC;;;AAEtC,0DAA0D;AAC1D,SAAgB,eAAe,CAAC,aAA4B;IAC1D,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;QACrB,IAAM,YAAY,GAAG,IAAI,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;QAC1D,IAAI,OAAO,GAAG,CAAC,CAAA;QACf,OAAO,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE;YACrC,YAAY,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,CAAA;YAC9C,OAAO,IAAI,CAAC,CAAA;SACb;QACD,OAAO,YAAY,CAAA;KACpB;IACD,OAAO,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;AACxC,CAAC;AAXD,0CAWC"} \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/CopyrightNotice.txt b/node_modules/@aws-crypto/util/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 0000000..3d4c823 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/LICENSE.txt b/node_modules/@aws-crypto/util/node_modules/tslib/LICENSE.txt new file mode 100644 index 0000000..bfe6430 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/README.md b/node_modules/@aws-crypto/util/node_modules/tslib/README.md new file mode 100644 index 0000000..a5b2692 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/README.md @@ -0,0 +1,142 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 2.3.3 or later +npm install tslib + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 2.3.3 or later +yarn add tslib + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 2.3.3 or later +bower install tslib + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 2.3.3 or later +jspm install tslib + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/modules/index.js b/node_modules/@aws-crypto/util/node_modules/tslib/modules/index.js new file mode 100644 index 0000000..d241d04 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/modules/package.json b/node_modules/@aws-crypto/util/node_modules/tslib/modules/package.json new file mode 100644 index 0000000..aafa0e4 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/package.json b/node_modules/@aws-crypto/util/node_modules/tslib/package.json new file mode 100644 index 0000000..f8c2a53 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/package.json @@ -0,0 +1,37 @@ +{ + "name": "tslib", + "author": "Microsoft Corp.", + "homepage": "https://www.typescriptlang.org/", + "version": "1.14.1", + "license": "0BSD", + "description": "Runtime library for TypeScript helper functions", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/tslib.git" + }, + "main": "tslib.js", + "module": "tslib.es6.js", + "jsnext:main": "tslib.es6.js", + "typings": "tslib.d.ts", + "sideEffects": false, + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + } +} diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js b/node_modules/@aws-crypto/util/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js new file mode 100644 index 0000000..0c1b613 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js @@ -0,0 +1,23 @@ +// When on node 14, it validates that all of the commonjs exports +// are correctly re-exported for es modules importers. + +const nodeMajor = Number(process.version.split(".")[0].slice(1)) +if (nodeMajor < 14) { + console.log("Skipping because node does not support module exports.") + process.exit(0) +} + +// ES Modules import via the ./modules folder +import * as esTSLib from "../../modules/index.js" + +// Force a commonjs resolve +import { createRequire } from "module"; +const commonJSTSLib = createRequire(import.meta.url)("../../tslib.js"); + +for (const key in commonJSTSLib) { + if (commonJSTSLib.hasOwnProperty(key)) { + if(!esTSLib[key]) throw new Error(`ESModules is missing ${key} - it needs to be re-exported in ./modules/index.js`) + } +} + +console.log("All exports in commonjs are available for es module consumers.") diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json b/node_modules/@aws-crypto/util/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json new file mode 100644 index 0000000..166e509 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "scripts": { + "test": "node index.js" + } +} diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/tslib.d.ts b/node_modules/@aws-crypto/util/node_modules/tslib/tslib.d.ts new file mode 100644 index 0000000..0756b28 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, exports: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/tslib.es6.html b/node_modules/@aws-crypto/util/node_modules/tslib/tslib.es6.html new file mode 100644 index 0000000..b122e41 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/tslib.es6.js b/node_modules/@aws-crypto/util/node_modules/tslib/tslib.es6.js new file mode 100644 index 0000000..0e0d8d0 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/tslib.es6.js @@ -0,0 +1,218 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export function __createBinding(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +} + +export function __exportStar(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/tslib.html b/node_modules/@aws-crypto/util/node_modules/tslib/tslib.html new file mode 100644 index 0000000..44c9ba5 --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@aws-crypto/util/node_modules/tslib/tslib.js b/node_modules/@aws-crypto/util/node_modules/tslib/tslib.js new file mode 100644 index 0000000..e5b7c9b --- /dev/null +++ b/node_modules/@aws-crypto/util/node_modules/tslib/tslib.js @@ -0,0 +1,284 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@aws-crypto/util/package.json b/node_modules/@aws-crypto/util/package.json new file mode 100644 index 0000000..24dfd3a --- /dev/null +++ b/node_modules/@aws-crypto/util/package.json @@ -0,0 +1,31 @@ +{ + "name": "@aws-crypto/util", + "version": "3.0.0", + "scripts": { + "prepublishOnly": "tsc", + "pretest": "tsc -p tsconfig.test.json", + "test": "mocha --require ts-node/register test/**/*test.ts" + }, + "main": "./build/index.js", + "types": "./build/index.d.ts", + "repository": { + "type": "git", + "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git" + }, + "author": { + "name": "AWS Crypto Tools Team", + "email": "aws-cryptools@amazon.com", + "url": "https://docs.aws.amazon.com/aws-crypto-tools/index.html?id=docs_gateway#lang/en_us" + }, + "homepage": "https://github.com/aws/aws-sdk-js-crypto-helpers/tree/master/packages/util", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "7f56cee8f62bd65cd397eeec29c3c997215bd80c" +} diff --git a/node_modules/@aws-crypto/util/src/convertToBuffer.ts b/node_modules/@aws-crypto/util/src/convertToBuffer.ts new file mode 100644 index 0000000..3cda0fc --- /dev/null +++ b/node_modules/@aws-crypto/util/src/convertToBuffer.ts @@ -0,0 +1,30 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import { SourceData } from "@aws-sdk/types"; +import { fromUtf8 as fromUtf8Browser } from "@aws-sdk/util-utf8-browser"; + +// Quick polyfill +const fromUtf8 = + typeof Buffer !== "undefined" && Buffer.from + ? (input: string) => Buffer.from(input, "utf8") + : fromUtf8Browser; + +export function convertToBuffer(data: SourceData): Uint8Array { + // Already a Uint8, do nothing + if (data instanceof Uint8Array) return data; + + if (typeof data === "string") { + return fromUtf8(data); + } + + if (ArrayBuffer.isView(data)) { + return new Uint8Array( + data.buffer, + data.byteOffset, + data.byteLength / Uint8Array.BYTES_PER_ELEMENT + ); + } + + return new Uint8Array(data); +} diff --git a/node_modules/@aws-crypto/util/src/index.ts b/node_modules/@aws-crypto/util/src/index.ts new file mode 100644 index 0000000..2f6c62a --- /dev/null +++ b/node_modules/@aws-crypto/util/src/index.ts @@ -0,0 +1,7 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +export { convertToBuffer } from "./convertToBuffer"; +export { isEmptyData } from "./isEmptyData"; +export { numToUint8 } from "./numToUint8"; +export {uint32ArrayFrom} from './uint32ArrayFrom'; diff --git a/node_modules/@aws-crypto/util/src/isEmptyData.ts b/node_modules/@aws-crypto/util/src/isEmptyData.ts new file mode 100644 index 0000000..089764d --- /dev/null +++ b/node_modules/@aws-crypto/util/src/isEmptyData.ts @@ -0,0 +1,12 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import { SourceData } from "@aws-sdk/types"; + +export function isEmptyData(data: SourceData): boolean { + if (typeof data === "string") { + return data.length === 0; + } + + return data.byteLength === 0; +} diff --git a/node_modules/@aws-crypto/util/src/numToUint8.ts b/node_modules/@aws-crypto/util/src/numToUint8.ts new file mode 100644 index 0000000..2f40ace --- /dev/null +++ b/node_modules/@aws-crypto/util/src/numToUint8.ts @@ -0,0 +1,11 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +export function numToUint8(num: number) { + return new Uint8Array([ + (num & 0xff000000) >> 24, + (num & 0x00ff0000) >> 16, + (num & 0x0000ff00) >> 8, + num & 0x000000ff, + ]); +} diff --git a/node_modules/@aws-crypto/util/src/uint32ArrayFrom.ts b/node_modules/@aws-crypto/util/src/uint32ArrayFrom.ts new file mode 100644 index 0000000..b9b6d88 --- /dev/null +++ b/node_modules/@aws-crypto/util/src/uint32ArrayFrom.ts @@ -0,0 +1,16 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// IE 11 does not support Array.from, so we do it manually +export function uint32ArrayFrom(a_lookUpTable: Array): Uint32Array { + if (!Uint32Array.from) { + const return_array = new Uint32Array(a_lookUpTable.length) + let a_index = 0 + while (a_index < a_lookUpTable.length) { + return_array[a_index] = a_lookUpTable[a_index] + a_index += 1 + } + return return_array + } + return Uint32Array.from(a_lookUpTable) +} diff --git a/node_modules/@aws-crypto/util/tsconfig.json b/node_modules/@aws-crypto/util/tsconfig.json new file mode 100644 index 0000000..1691089 --- /dev/null +++ b/node_modules/@aws-crypto/util/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "declaration": true, + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "lib": [ + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "rootDir": "./src", + "outDir": "./build" + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules/**"] +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/LICENSE b/node_modules/@aws-sdk/client-secrets-manager/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-sdk/client-secrets-manager/README.md b/node_modules/@aws-sdk/client-secrets-manager/README.md new file mode 100644 index 0000000..616ed98 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/README.md @@ -0,0 +1,415 @@ + + +# @aws-sdk/client-secrets-manager + +## Description + +AWS SDK for JavaScript SecretsManager Client for Node.js, Browser and React Native. + +Amazon Web Services Secrets Manager + +

Amazon Web Services Secrets Manager provides a service to enable you to store, manage, and retrieve, secrets.

+

This guide provides descriptions of the Secrets Manager API. For more information about using this +service, see the Amazon Web Services Secrets Manager User Guide.

+

+API Version +

+

This version of the Secrets Manager API Reference documents the Secrets Manager API version 2017-10-17.

+

For a list of endpoints, see Amazon Web Services Secrets Manager +endpoints.

+

+Support and Feedback for Amazon Web Services Secrets Manager +

+

We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com, or post your feedback and questions in the Amazon Web Services Secrets Manager Discussion Forum. For more +information about the Amazon Web Services Discussion Forums, see Forums +Help.

+

+Logging API Requests +

+

Amazon Web Services Secrets Manager supports Amazon Web Services CloudTrail, a service that records Amazon Web Services API calls for your Amazon Web Services +account and delivers log files to an Amazon S3 bucket. By using information that's collected +by Amazon Web Services CloudTrail, you can determine the requests successfully made to Secrets Manager, who made the +request, when it was made, and so on. For more about Amazon Web Services Secrets Manager and support for Amazon Web Services +CloudTrail, see Logging +Amazon Web Services Secrets Manager Events with Amazon Web Services CloudTrail in the Amazon Web Services Secrets Manager User Guide. +To learn more about CloudTrail, including enabling it and find your log files, see the Amazon Web Services CloudTrail User Guide.

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-secrets-manager +using your favorite package manager: + +- `npm install @aws-sdk/client-secrets-manager` +- `yarn add @aws-sdk/client-secrets-manager` +- `pnpm add @aws-sdk/client-secrets-manager` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `SecretsManagerClient` and +the commands you need, for example `ListSecretsCommand`: + +```js +// ES5 example +const { SecretsManagerClient, ListSecretsCommand } = require("@aws-sdk/client-secrets-manager"); +``` + +```ts +// ES6+ example +import { SecretsManagerClient, ListSecretsCommand } from "@aws-sdk/client-secrets-manager"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new SecretsManagerClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new ListSecretsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-secrets-manager"; +const client = new AWS.SecretsManager({ region: "REGION" }); + +// async/await. +try { + const data = await client.listSecrets(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .listSecrets(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.listSecrets(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-secrets-manager` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +
+ +BatchGetSecretValue + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/BatchGetSecretValueCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/BatchGetSecretValueCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/BatchGetSecretValueCommandOutput/) + +
+
+ +CancelRotateSecret + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/CancelRotateSecretCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/CancelRotateSecretCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/CancelRotateSecretCommandOutput/) + +
+
+ +CreateSecret + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/CreateSecretCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/CreateSecretCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/CreateSecretCommandOutput/) + +
+
+ +DeleteResourcePolicy + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/DeleteResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/DeleteResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/DeleteResourcePolicyCommandOutput/) + +
+
+ +DeleteSecret + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/DeleteSecretCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/DeleteSecretCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/DeleteSecretCommandOutput/) + +
+
+ +DescribeSecret + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/DescribeSecretCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/DescribeSecretCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/DescribeSecretCommandOutput/) + +
+
+ +GetRandomPassword + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/GetRandomPasswordCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/GetRandomPasswordCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/GetRandomPasswordCommandOutput/) + +
+
+ +GetResourcePolicy + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/GetResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/GetResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/GetResourcePolicyCommandOutput/) + +
+
+ +GetSecretValue + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/GetSecretValueCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/GetSecretValueCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/GetSecretValueCommandOutput/) + +
+
+ +ListSecrets + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/ListSecretsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/ListSecretsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/ListSecretsCommandOutput/) + +
+
+ +ListSecretVersionIds + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/ListSecretVersionIdsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/ListSecretVersionIdsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/ListSecretVersionIdsCommandOutput/) + +
+
+ +PutResourcePolicy + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/PutResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/PutResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/PutResourcePolicyCommandOutput/) + +
+
+ +PutSecretValue + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/PutSecretValueCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/PutSecretValueCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/PutSecretValueCommandOutput/) + +
+
+ +RemoveRegionsFromReplication + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/RemoveRegionsFromReplicationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/RemoveRegionsFromReplicationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/RemoveRegionsFromReplicationCommandOutput/) + +
+
+ +ReplicateSecretToRegions + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/ReplicateSecretToRegionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/ReplicateSecretToRegionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/ReplicateSecretToRegionsCommandOutput/) + +
+
+ +RestoreSecret + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/RestoreSecretCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/RestoreSecretCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/RestoreSecretCommandOutput/) + +
+
+ +RotateSecret + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/RotateSecretCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/RotateSecretCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/RotateSecretCommandOutput/) + +
+
+ +StopReplicationToReplica + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/StopReplicationToReplicaCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/StopReplicationToReplicaCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/StopReplicationToReplicaCommandOutput/) + +
+
+ +TagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/TagResourceCommandOutput/) + +
+
+ +UntagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/UntagResourceCommandOutput/) + +
+
+ +UpdateSecret + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/UpdateSecretCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/UpdateSecretCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/UpdateSecretCommandOutput/) + +
+
+ +UpdateSecretVersionStage + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/UpdateSecretVersionStageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/UpdateSecretVersionStageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/UpdateSecretVersionStageCommandOutput/) + +
+
+ +ValidateResourcePolicy + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/secrets-manager/command/ValidateResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/ValidateResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-secrets-manager/Interface/ValidateResourcePolicyCommandOutput/) + +
diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/auth/httpAuthSchemeProvider.js b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/auth/httpAuthSchemeProvider.js new file mode 100644 index 0000000..96015a4 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/auth/httpAuthSchemeProvider.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveHttpAuthSchemeConfig = exports.defaultSecretsManagerHttpAuthSchemeProvider = exports.defaultSecretsManagerHttpAuthSchemeParametersProvider = void 0; +const core_1 = require("@aws-sdk/core"); +const util_middleware_1 = require("@smithy/util-middleware"); +const defaultSecretsManagerHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSecretsManagerHttpAuthSchemeParametersProvider = defaultSecretsManagerHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "secretsmanager", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +const defaultSecretsManagerHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSecretsManagerHttpAuthSchemeProvider = defaultSecretsManagerHttpAuthSchemeProvider; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0, + }; +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/endpoint/endpointResolver.js b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/endpoint/endpointResolver.js new file mode 100644 index 0000000..3d8d8de --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/endpoint/endpointResolver.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = require("@smithy/util-endpoints"); +const ruleset_1 = require("./ruleset"); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); +}; +exports.defaultEndpointResolver = defaultEndpointResolver; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/endpoint/ruleset.js b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/endpoint/ruleset.js new file mode 100644 index 0000000..752f9c7 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/endpoint/ruleset.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ruleSet = void 0; +const y = "required", z = "fn", A = "argv", B = "ref", C = "properties", D = "headers"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = { [y]: false, "type": "String" }, j = { [y]: true, "default": false, "type": "Boolean" }, k = { [B]: "Endpoint" }, l = { [z]: c, [A]: [{ [B]: "UseFIPS" }, true] }, m = { [z]: c, [A]: [{ [B]: "UseDualStack" }, true] }, n = {}, o = { [z]: "getAttr", [A]: [{ [B]: g }, "supportsFIPS"] }, p = { [z]: c, [A]: [true, { [z]: "getAttr", [A]: [{ [B]: g }, "supportsDualStack"] }] }, q = { [z]: "getAttr", [A]: [{ [B]: g }, "name"] }, r = { "url": "https://secretsmanager-fips.{Region}.amazonaws.com", [C]: {}, [D]: {} }, s = { "url": "https://secretsmanager.{Region}.amazonaws.com", [C]: {}, [D]: {} }, t = [l], u = [m], v = [{ [B]: "Region" }], w = [{ [z]: h, [A]: ["aws", q] }], x = [{ [z]: h, [A]: ["aws-us-gov", q] }]; +const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [z]: b, [A]: [k] }], rules: [{ conditions: t, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: u, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, [C]: n, [D]: n }, type: e }], type: f }, { conditions: [{ [z]: b, [A]: v }], rules: [{ conditions: [{ [z]: "aws.partition", [A]: v, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [z]: c, [A]: [a, o] }, p], rules: [{ conditions: w, endpoint: r, type: e }, { conditions: x, endpoint: r, type: e }, { endpoint: { url: "https://secretsmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", [C]: n, [D]: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: t, rules: [{ conditions: [{ [z]: c, [A]: [o, a] }], rules: [{ endpoint: { url: "https://secretsmanager-fips.{Region}.{PartitionResult#dnsSuffix}", [C]: n, [D]: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: u, rules: [{ conditions: [p], rules: [{ conditions: w, endpoint: s, type: e }, { conditions: [{ [z]: h, [A]: ["aws-cn", q] }], endpoint: { url: "https://secretsmanager.{Region}.amazonaws.com.cn", [C]: n, [D]: n }, type: e }, { conditions: x, endpoint: s, type: e }, { endpoint: { url: "https://secretsmanager.{Region}.{PartitionResult#dualStackDnsSuffix}", [C]: n, [D]: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://secretsmanager.{Region}.{PartitionResult#dnsSuffix}", [C]: n, [D]: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +exports.ruleSet = _data; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/index.js b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/index.js new file mode 100644 index 0000000..43e3f82 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/index.js @@ -0,0 +1,1832 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + BatchGetSecretValueCommand: () => BatchGetSecretValueCommand, + BatchGetSecretValueResponseFilterSensitiveLog: () => BatchGetSecretValueResponseFilterSensitiveLog, + CancelRotateSecretCommand: () => CancelRotateSecretCommand, + CreateSecretCommand: () => CreateSecretCommand, + CreateSecretRequestFilterSensitiveLog: () => CreateSecretRequestFilterSensitiveLog, + DecryptionFailure: () => DecryptionFailure, + DeleteResourcePolicyCommand: () => DeleteResourcePolicyCommand, + DeleteSecretCommand: () => DeleteSecretCommand, + DescribeSecretCommand: () => DescribeSecretCommand, + EncryptionFailure: () => EncryptionFailure, + FilterNameStringType: () => FilterNameStringType, + GetRandomPasswordCommand: () => GetRandomPasswordCommand, + GetRandomPasswordResponseFilterSensitiveLog: () => GetRandomPasswordResponseFilterSensitiveLog, + GetResourcePolicyCommand: () => GetResourcePolicyCommand, + GetSecretValueCommand: () => GetSecretValueCommand, + GetSecretValueResponseFilterSensitiveLog: () => GetSecretValueResponseFilterSensitiveLog, + InternalServiceError: () => InternalServiceError, + InvalidNextTokenException: () => InvalidNextTokenException, + InvalidParameterException: () => InvalidParameterException, + InvalidRequestException: () => InvalidRequestException, + LimitExceededException: () => LimitExceededException, + ListSecretVersionIdsCommand: () => ListSecretVersionIdsCommand, + ListSecretsCommand: () => ListSecretsCommand, + MalformedPolicyDocumentException: () => MalformedPolicyDocumentException, + PreconditionNotMetException: () => PreconditionNotMetException, + PublicPolicyException: () => PublicPolicyException, + PutResourcePolicyCommand: () => PutResourcePolicyCommand, + PutSecretValueCommand: () => PutSecretValueCommand, + PutSecretValueRequestFilterSensitiveLog: () => PutSecretValueRequestFilterSensitiveLog, + RemoveRegionsFromReplicationCommand: () => RemoveRegionsFromReplicationCommand, + ReplicateSecretToRegionsCommand: () => ReplicateSecretToRegionsCommand, + ResourceExistsException: () => ResourceExistsException, + ResourceNotFoundException: () => ResourceNotFoundException, + RestoreSecretCommand: () => RestoreSecretCommand, + RotateSecretCommand: () => RotateSecretCommand, + SecretValueEntryFilterSensitiveLog: () => SecretValueEntryFilterSensitiveLog, + SecretsManager: () => SecretsManager, + SecretsManagerClient: () => SecretsManagerClient, + SecretsManagerServiceException: () => SecretsManagerServiceException, + SortOrderType: () => SortOrderType, + StatusType: () => StatusType, + StopReplicationToReplicaCommand: () => StopReplicationToReplicaCommand, + TagResourceCommand: () => TagResourceCommand, + UntagResourceCommand: () => UntagResourceCommand, + UpdateSecretCommand: () => UpdateSecretCommand, + UpdateSecretRequestFilterSensitiveLog: () => UpdateSecretRequestFilterSensitiveLog, + UpdateSecretVersionStageCommand: () => UpdateSecretVersionStageCommand, + ValidateResourcePolicyCommand: () => ValidateResourcePolicyCommand, + __Client: () => import_smithy_client.Client, + paginateBatchGetSecretValue: () => paginateBatchGetSecretValue, + paginateListSecretVersionIds: () => paginateListSecretVersionIds, + paginateListSecrets: () => paginateListSecrets +}); +module.exports = __toCommonJS(src_exports); + +// src/SecretsManagerClient.ts +var import_middleware_host_header = require("@aws-sdk/middleware-host-header"); +var import_middleware_logger = require("@aws-sdk/middleware-logger"); +var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection"); +var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent"); +var import_config_resolver = require("@smithy/config-resolver"); +var import_core = require("@smithy/core"); +var import_middleware_content_length = require("@smithy/middleware-content-length"); +var import_middleware_endpoint = require("@smithy/middleware-endpoint"); +var import_middleware_retry = require("@smithy/middleware-retry"); + +var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider"); + +// src/endpoint/EndpointParameters.ts +var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "secretsmanager" + }; +}, "resolveClientEndpointParameters"); +var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } +}; + +// src/SecretsManagerClient.ts +var import_runtimeConfig = require("././runtimeConfig"); + +// src/runtimeExtensions.ts +var import_region_config_resolver = require("@aws-sdk/region-config-resolver"); +var import_protocol_http = require("@smithy/protocol-http"); +var import_smithy_client = require("@smithy/smithy-client"); + +// src/auth/httpAuthExtensionConfiguration.ts +var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; +}, "getHttpAuthExtensionConfiguration"); +var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; +}, "resolveHttpAuthRuntimeConfig"); + +// src/runtimeExtensions.ts +var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); +var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) + }; +}, "resolveRuntimeExtensions"); + +// src/SecretsManagerClient.ts +var _SecretsManagerClient = class _SecretsManagerClient extends import_smithy_client.Client { + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1); + const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2); + const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider() + }) + ); + this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); + } + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); + } + getDefaultHttpAuthSchemeParametersProvider() { + return import_httpAuthSchemeProvider.defaultSecretsManagerHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new import_core.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }); + } +}; +__name(_SecretsManagerClient, "SecretsManagerClient"); +var SecretsManagerClient = _SecretsManagerClient; + +// src/SecretsManager.ts + + +// src/commands/BatchGetSecretValueCommand.ts + +var import_middleware_serde = require("@smithy/middleware-serde"); + +var import_types = require("@smithy/types"); + +// src/models/models_0.ts + + +// src/models/SecretsManagerServiceException.ts + +var _SecretsManagerServiceException = class _SecretsManagerServiceException extends import_smithy_client.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SecretsManagerServiceException.prototype); + } +}; +__name(_SecretsManagerServiceException, "SecretsManagerServiceException"); +var SecretsManagerServiceException = _SecretsManagerServiceException; + +// src/models/models_0.ts +var FilterNameStringType = { + all: "all", + description: "description", + name: "name", + owning_service: "owning-service", + primary_region: "primary-region", + tag_key: "tag-key", + tag_value: "tag-value" +}; +var _DecryptionFailure = class _DecryptionFailure extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "DecryptionFailure", + $fault: "client", + ...opts + }); + this.name = "DecryptionFailure"; + this.$fault = "client"; + Object.setPrototypeOf(this, _DecryptionFailure.prototype); + this.Message = opts.Message; + } +}; +__name(_DecryptionFailure, "DecryptionFailure"); +var DecryptionFailure = _DecryptionFailure; +var _InternalServiceError = class _InternalServiceError extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InternalServiceError", + $fault: "server", + ...opts + }); + this.name = "InternalServiceError"; + this.$fault = "server"; + Object.setPrototypeOf(this, _InternalServiceError.prototype); + this.Message = opts.Message; + } +}; +__name(_InternalServiceError, "InternalServiceError"); +var InternalServiceError = _InternalServiceError; +var _InvalidNextTokenException = class _InvalidNextTokenException extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidNextTokenException", + $fault: "client", + ...opts + }); + this.name = "InvalidNextTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidNextTokenException.prototype); + this.Message = opts.Message; + } +}; +__name(_InvalidNextTokenException, "InvalidNextTokenException"); +var InvalidNextTokenException = _InvalidNextTokenException; +var _InvalidParameterException = class _InvalidParameterException extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidParameterException", + $fault: "client", + ...opts + }); + this.name = "InvalidParameterException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidParameterException.prototype); + this.Message = opts.Message; + } +}; +__name(_InvalidParameterException, "InvalidParameterException"); +var InvalidParameterException = _InvalidParameterException; +var _InvalidRequestException = class _InvalidRequestException extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestException.prototype); + this.Message = opts.Message; + } +}; +__name(_InvalidRequestException, "InvalidRequestException"); +var InvalidRequestException = _InvalidRequestException; +var _ResourceNotFoundException = class _ResourceNotFoundException extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts + }); + this.name = "ResourceNotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); + this.Message = opts.Message; + } +}; +__name(_ResourceNotFoundException, "ResourceNotFoundException"); +var ResourceNotFoundException = _ResourceNotFoundException; +var StatusType = { + Failed: "Failed", + InProgress: "InProgress", + InSync: "InSync" +}; +var _EncryptionFailure = class _EncryptionFailure extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "EncryptionFailure", + $fault: "client", + ...opts + }); + this.name = "EncryptionFailure"; + this.$fault = "client"; + Object.setPrototypeOf(this, _EncryptionFailure.prototype); + this.Message = opts.Message; + } +}; +__name(_EncryptionFailure, "EncryptionFailure"); +var EncryptionFailure = _EncryptionFailure; +var _LimitExceededException = class _LimitExceededException extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "LimitExceededException", + $fault: "client", + ...opts + }); + this.name = "LimitExceededException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _LimitExceededException.prototype); + this.Message = opts.Message; + } +}; +__name(_LimitExceededException, "LimitExceededException"); +var LimitExceededException = _LimitExceededException; +var _MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts + }); + this.name = "MalformedPolicyDocumentException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype); + this.Message = opts.Message; + } +}; +__name(_MalformedPolicyDocumentException, "MalformedPolicyDocumentException"); +var MalformedPolicyDocumentException = _MalformedPolicyDocumentException; +var _PreconditionNotMetException = class _PreconditionNotMetException extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "PreconditionNotMetException", + $fault: "client", + ...opts + }); + this.name = "PreconditionNotMetException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _PreconditionNotMetException.prototype); + this.Message = opts.Message; + } +}; +__name(_PreconditionNotMetException, "PreconditionNotMetException"); +var PreconditionNotMetException = _PreconditionNotMetException; +var _ResourceExistsException = class _ResourceExistsException extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ResourceExistsException", + $fault: "client", + ...opts + }); + this.name = "ResourceExistsException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ResourceExistsException.prototype); + this.Message = opts.Message; + } +}; +__name(_ResourceExistsException, "ResourceExistsException"); +var ResourceExistsException = _ResourceExistsException; +var SortOrderType = { + asc: "asc", + desc: "desc" +}; +var _PublicPolicyException = class _PublicPolicyException extends SecretsManagerServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "PublicPolicyException", + $fault: "client", + ...opts + }); + this.name = "PublicPolicyException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _PublicPolicyException.prototype); + this.Message = opts.Message; + } +}; +__name(_PublicPolicyException, "PublicPolicyException"); +var PublicPolicyException = _PublicPolicyException; +var SecretValueEntryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SecretBinary && { SecretBinary: import_smithy_client.SENSITIVE_STRING }, + ...obj.SecretString && { SecretString: import_smithy_client.SENSITIVE_STRING } +}), "SecretValueEntryFilterSensitiveLog"); +var BatchGetSecretValueResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SecretValues && { SecretValues: obj.SecretValues.map((item) => SecretValueEntryFilterSensitiveLog(item)) } +}), "BatchGetSecretValueResponseFilterSensitiveLog"); +var CreateSecretRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SecretBinary && { SecretBinary: import_smithy_client.SENSITIVE_STRING }, + ...obj.SecretString && { SecretString: import_smithy_client.SENSITIVE_STRING } +}), "CreateSecretRequestFilterSensitiveLog"); +var GetRandomPasswordResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.RandomPassword && { RandomPassword: import_smithy_client.SENSITIVE_STRING } +}), "GetRandomPasswordResponseFilterSensitiveLog"); +var GetSecretValueResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SecretBinary && { SecretBinary: import_smithy_client.SENSITIVE_STRING }, + ...obj.SecretString && { SecretString: import_smithy_client.SENSITIVE_STRING } +}), "GetSecretValueResponseFilterSensitiveLog"); +var PutSecretValueRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SecretBinary && { SecretBinary: import_smithy_client.SENSITIVE_STRING }, + ...obj.SecretString && { SecretString: import_smithy_client.SENSITIVE_STRING } +}), "PutSecretValueRequestFilterSensitiveLog"); +var UpdateSecretRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SecretBinary && { SecretBinary: import_smithy_client.SENSITIVE_STRING }, + ...obj.SecretString && { SecretString: import_smithy_client.SENSITIVE_STRING } +}), "UpdateSecretRequestFilterSensitiveLog"); + +// src/protocols/Aws_json1_1.ts +var import_core2 = require("@aws-sdk/core"); + + +var import_uuid = require("uuid"); +var se_BatchGetSecretValueCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("BatchGetSecretValue"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_BatchGetSecretValueCommand"); +var se_CancelRotateSecretCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("CancelRotateSecret"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_CancelRotateSecretCommand"); +var se_CreateSecretCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("CreateSecret"); + let body; + body = JSON.stringify(se_CreateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_CreateSecretCommand"); +var se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DeleteResourcePolicy"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_DeleteResourcePolicyCommand"); +var se_DeleteSecretCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DeleteSecret"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_DeleteSecretCommand"); +var se_DescribeSecretCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DescribeSecret"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_DescribeSecretCommand"); +var se_GetRandomPasswordCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GetRandomPassword"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_GetRandomPasswordCommand"); +var se_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GetResourcePolicy"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_GetResourcePolicyCommand"); +var se_GetSecretValueCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GetSecretValue"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_GetSecretValueCommand"); +var se_ListSecretsCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListSecrets"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_ListSecretsCommand"); +var se_ListSecretVersionIdsCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListSecretVersionIds"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_ListSecretVersionIdsCommand"); +var se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("PutResourcePolicy"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_PutResourcePolicyCommand"); +var se_PutSecretValueCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("PutSecretValue"); + let body; + body = JSON.stringify(se_PutSecretValueRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_PutSecretValueCommand"); +var se_RemoveRegionsFromReplicationCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("RemoveRegionsFromReplication"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_RemoveRegionsFromReplicationCommand"); +var se_ReplicateSecretToRegionsCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ReplicateSecretToRegions"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_ReplicateSecretToRegionsCommand"); +var se_RestoreSecretCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("RestoreSecret"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_RestoreSecretCommand"); +var se_RotateSecretCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("RotateSecret"); + let body; + body = JSON.stringify(se_RotateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_RotateSecretCommand"); +var se_StopReplicationToReplicaCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("StopReplicationToReplica"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_StopReplicationToReplicaCommand"); +var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("TagResource"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_TagResourceCommand"); +var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UntagResource"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_UntagResourceCommand"); +var se_UpdateSecretCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UpdateSecret"); + let body; + body = JSON.stringify(se_UpdateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_UpdateSecretCommand"); +var se_UpdateSecretVersionStageCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UpdateSecretVersionStage"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_UpdateSecretVersionStageCommand"); +var se_ValidateResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ValidateResourcePolicy"); + let body; + body = JSON.stringify((0, import_smithy_client._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_ValidateResourcePolicyCommand"); +var de_BatchGetSecretValueCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_BatchGetSecretValueResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_BatchGetSecretValueCommand"); +var de_CancelRotateSecretCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_CancelRotateSecretCommand"); +var de_CreateSecretCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_CreateSecretResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_CreateSecretCommand"); +var de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_DeleteResourcePolicyCommand"); +var de_DeleteSecretCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DeleteSecretResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_DeleteSecretCommand"); +var de_DescribeSecretCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DescribeSecretResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_DescribeSecretCommand"); +var de_GetRandomPasswordCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_GetRandomPasswordCommand"); +var de_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_GetResourcePolicyCommand"); +var de_GetSecretValueCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GetSecretValueResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_GetSecretValueCommand"); +var de_ListSecretsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListSecretsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_ListSecretsCommand"); +var de_ListSecretVersionIdsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListSecretVersionIdsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_ListSecretVersionIdsCommand"); +var de_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_PutResourcePolicyCommand"); +var de_PutSecretValueCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_PutSecretValueCommand"); +var de_RemoveRegionsFromReplicationCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_RemoveRegionsFromReplicationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_RemoveRegionsFromReplicationCommand"); +var de_ReplicateSecretToRegionsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ReplicateSecretToRegionsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_ReplicateSecretToRegionsCommand"); +var de_RestoreSecretCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_RestoreSecretCommand"); +var de_RotateSecretCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_RotateSecretCommand"); +var de_StopReplicationToReplicaCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_StopReplicationToReplicaCommand"); +var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; +}, "de_TagResourceCommand"); +var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; +}, "de_UntagResourceCommand"); +var de_UpdateSecretCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_UpdateSecretCommand"); +var de_UpdateSecretVersionStageCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_UpdateSecretVersionStageCommand"); +var de_ValidateResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core2.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_ValidateResourcePolicyCommand"); +var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core2.parseJsonErrorBody)(output.body, context) + }; + const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "DecryptionFailure": + case "com.amazonaws.secretsmanager#DecryptionFailure": + throw await de_DecryptionFailureRes(parsedOutput, context); + case "InternalServiceError": + case "com.amazonaws.secretsmanager#InternalServiceError": + throw await de_InternalServiceErrorRes(parsedOutput, context); + case "InvalidNextTokenException": + case "com.amazonaws.secretsmanager#InvalidNextTokenException": + throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.secretsmanager#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.secretsmanager#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.secretsmanager#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "EncryptionFailure": + case "com.amazonaws.secretsmanager#EncryptionFailure": + throw await de_EncryptionFailureRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.secretsmanager#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "MalformedPolicyDocumentException": + case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PreconditionNotMetException": + case "com.amazonaws.secretsmanager#PreconditionNotMetException": + throw await de_PreconditionNotMetExceptionRes(parsedOutput, context); + case "ResourceExistsException": + case "com.amazonaws.secretsmanager#ResourceExistsException": + throw await de_ResourceExistsExceptionRes(parsedOutput, context); + case "PublicPolicyException": + case "com.amazonaws.secretsmanager#PublicPolicyException": + throw await de_PublicPolicyExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode + }); + } +}, "de_CommandError"); +var de_DecryptionFailureRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new DecryptionFailure({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_DecryptionFailureRes"); +var de_EncryptionFailureRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new EncryptionFailure({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_EncryptionFailureRes"); +var de_InternalServiceErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new InternalServiceError({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_InternalServiceErrorRes"); +var de_InvalidNextTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new InvalidNextTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_InvalidNextTokenExceptionRes"); +var de_InvalidParameterExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new InvalidParameterException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_InvalidParameterExceptionRes"); +var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_InvalidRequestExceptionRes"); +var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new LimitExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_LimitExceededExceptionRes"); +var de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_MalformedPolicyDocumentExceptionRes"); +var de_PreconditionNotMetExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new PreconditionNotMetException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_PreconditionNotMetExceptionRes"); +var de_PublicPolicyExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new PublicPolicyException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_PublicPolicyExceptionRes"); +var de_ResourceExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new ResourceExistsException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_ResourceExistsExceptionRes"); +var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client._json)(body); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_ResourceNotFoundExceptionRes"); +var se_CreateSecretRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client.take)(input, { + AddReplicaRegions: import_smithy_client._json, + ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()], + Description: [], + ForceOverwriteReplicaSecret: [], + KmsKeyId: [], + Name: [], + SecretBinary: context.base64Encoder, + SecretString: [], + Tags: import_smithy_client._json + }); +}, "se_CreateSecretRequest"); +var se_PutSecretValueRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client.take)(input, { + ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()], + SecretBinary: context.base64Encoder, + SecretId: [], + SecretString: [], + VersionStages: import_smithy_client._json + }); +}, "se_PutSecretValueRequest"); +var se_RotateSecretRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client.take)(input, { + ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()], + RotateImmediately: [], + RotationLambdaARN: [], + RotationRules: import_smithy_client._json, + SecretId: [] + }); +}, "se_RotateSecretRequest"); +var se_UpdateSecretRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client.take)(input, { + ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()], + Description: [], + KmsKeyId: [], + SecretBinary: context.base64Encoder, + SecretId: [], + SecretString: [] + }); +}, "se_UpdateSecretRequest"); +var de_BatchGetSecretValueResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + Errors: import_smithy_client._json, + NextToken: import_smithy_client.expectString, + SecretValues: (_) => de_SecretValuesType(_, context) + }); +}, "de_BatchGetSecretValueResponse"); +var de_CreateSecretResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + ARN: import_smithy_client.expectString, + Name: import_smithy_client.expectString, + ReplicationStatus: (_) => de_ReplicationStatusListType(_, context), + VersionId: import_smithy_client.expectString + }); +}, "de_CreateSecretResponse"); +var de_DeleteSecretResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + ARN: import_smithy_client.expectString, + DeletionDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + Name: import_smithy_client.expectString + }); +}, "de_DeleteSecretResponse"); +var de_DescribeSecretResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + ARN: import_smithy_client.expectString, + CreatedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + DeletedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + Description: import_smithy_client.expectString, + KmsKeyId: import_smithy_client.expectString, + LastAccessedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + LastChangedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + LastRotatedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + Name: import_smithy_client.expectString, + NextRotationDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + OwningService: import_smithy_client.expectString, + PrimaryRegion: import_smithy_client.expectString, + ReplicationStatus: (_) => de_ReplicationStatusListType(_, context), + RotationEnabled: import_smithy_client.expectBoolean, + RotationLambdaARN: import_smithy_client.expectString, + RotationRules: import_smithy_client._json, + Tags: import_smithy_client._json, + VersionIdsToStages: import_smithy_client._json + }); +}, "de_DescribeSecretResponse"); +var de_GetSecretValueResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + ARN: import_smithy_client.expectString, + CreatedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + Name: import_smithy_client.expectString, + SecretBinary: context.base64Decoder, + SecretString: import_smithy_client.expectString, + VersionId: import_smithy_client.expectString, + VersionStages: import_smithy_client._json + }); +}, "de_GetSecretValueResponse"); +var de_ListSecretsResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + NextToken: import_smithy_client.expectString, + SecretList: (_) => de_SecretListType(_, context) + }); +}, "de_ListSecretsResponse"); +var de_ListSecretVersionIdsResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + ARN: import_smithy_client.expectString, + Name: import_smithy_client.expectString, + NextToken: import_smithy_client.expectString, + Versions: (_) => de_SecretVersionsListType(_, context) + }); +}, "de_ListSecretVersionIdsResponse"); +var de_RemoveRegionsFromReplicationResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + ARN: import_smithy_client.expectString, + ReplicationStatus: (_) => de_ReplicationStatusListType(_, context) + }); +}, "de_RemoveRegionsFromReplicationResponse"); +var de_ReplicateSecretToRegionsResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + ARN: import_smithy_client.expectString, + ReplicationStatus: (_) => de_ReplicationStatusListType(_, context) + }); +}, "de_ReplicateSecretToRegionsResponse"); +var de_ReplicationStatusListType = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_ReplicationStatusType(entry, context); + }); + return retVal; +}, "de_ReplicationStatusListType"); +var de_ReplicationStatusType = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + KmsKeyId: import_smithy_client.expectString, + LastAccessedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + Region: import_smithy_client.expectString, + Status: import_smithy_client.expectString, + StatusMessage: import_smithy_client.expectString + }); +}, "de_ReplicationStatusType"); +var de_SecretListEntry = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + ARN: import_smithy_client.expectString, + CreatedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + DeletedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + Description: import_smithy_client.expectString, + KmsKeyId: import_smithy_client.expectString, + LastAccessedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + LastChangedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + LastRotatedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + Name: import_smithy_client.expectString, + NextRotationDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + OwningService: import_smithy_client.expectString, + PrimaryRegion: import_smithy_client.expectString, + RotationEnabled: import_smithy_client.expectBoolean, + RotationLambdaARN: import_smithy_client.expectString, + RotationRules: import_smithy_client._json, + SecretVersionsToStages: import_smithy_client._json, + Tags: import_smithy_client._json + }); +}, "de_SecretListEntry"); +var de_SecretListType = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_SecretListEntry(entry, context); + }); + return retVal; +}, "de_SecretListType"); +var de_SecretValueEntry = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + ARN: import_smithy_client.expectString, + CreatedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + Name: import_smithy_client.expectString, + SecretBinary: context.base64Decoder, + SecretString: import_smithy_client.expectString, + VersionId: import_smithy_client.expectString, + VersionStages: import_smithy_client._json + }); +}, "de_SecretValueEntry"); +var de_SecretValuesType = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_SecretValueEntry(entry, context); + }); + return retVal; +}, "de_SecretValuesType"); +var de_SecretVersionsListEntry = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client.take)(output, { + CreatedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + KmsKeyIds: import_smithy_client._json, + LastAccessedDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), + VersionId: import_smithy_client.expectString, + VersionStages: import_smithy_client._json + }); +}, "de_SecretVersionsListEntry"); +var de_SecretVersionsListType = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_SecretVersionsListEntry(entry, context); + }); + return retVal; +}, "de_SecretVersionsListType"); +var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] +}), "deserializeMetadata"); +var throwDefaultError = (0, import_smithy_client.withBaseException)(SecretsManagerServiceException); +var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers + }; + if (resolvedHostname !== void 0) { + contents.hostname = resolvedHostname; + } + if (body !== void 0) { + contents.body = body; + } + return new import_protocol_http.HttpRequest(contents); +}, "buildHttpRpcRequest"); +function sharedHeaders(operation) { + return { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": `secretsmanager.${operation}` + }; +} +__name(sharedHeaders, "sharedHeaders"); + +// src/commands/BatchGetSecretValueCommand.ts +var _BatchGetSecretValueCommand = class _BatchGetSecretValueCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "BatchGetSecretValue", {}).n("SecretsManagerClient", "BatchGetSecretValueCommand").f(void 0, BatchGetSecretValueResponseFilterSensitiveLog).ser(se_BatchGetSecretValueCommand).de(de_BatchGetSecretValueCommand).build() { +}; +__name(_BatchGetSecretValueCommand, "BatchGetSecretValueCommand"); +var BatchGetSecretValueCommand = _BatchGetSecretValueCommand; + +// src/commands/CancelRotateSecretCommand.ts + + + + +var _CancelRotateSecretCommand = class _CancelRotateSecretCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "CancelRotateSecret", {}).n("SecretsManagerClient", "CancelRotateSecretCommand").f(void 0, void 0).ser(se_CancelRotateSecretCommand).de(de_CancelRotateSecretCommand).build() { +}; +__name(_CancelRotateSecretCommand, "CancelRotateSecretCommand"); +var CancelRotateSecretCommand = _CancelRotateSecretCommand; + +// src/commands/CreateSecretCommand.ts + + + + +var _CreateSecretCommand = class _CreateSecretCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "CreateSecret", {}).n("SecretsManagerClient", "CreateSecretCommand").f(CreateSecretRequestFilterSensitiveLog, void 0).ser(se_CreateSecretCommand).de(de_CreateSecretCommand).build() { +}; +__name(_CreateSecretCommand, "CreateSecretCommand"); +var CreateSecretCommand = _CreateSecretCommand; + +// src/commands/DeleteResourcePolicyCommand.ts + + + + +var _DeleteResourcePolicyCommand = class _DeleteResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "DeleteResourcePolicy", {}).n("SecretsManagerClient", "DeleteResourcePolicyCommand").f(void 0, void 0).ser(se_DeleteResourcePolicyCommand).de(de_DeleteResourcePolicyCommand).build() { +}; +__name(_DeleteResourcePolicyCommand, "DeleteResourcePolicyCommand"); +var DeleteResourcePolicyCommand = _DeleteResourcePolicyCommand; + +// src/commands/DeleteSecretCommand.ts + + + + +var _DeleteSecretCommand = class _DeleteSecretCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "DeleteSecret", {}).n("SecretsManagerClient", "DeleteSecretCommand").f(void 0, void 0).ser(se_DeleteSecretCommand).de(de_DeleteSecretCommand).build() { +}; +__name(_DeleteSecretCommand, "DeleteSecretCommand"); +var DeleteSecretCommand = _DeleteSecretCommand; + +// src/commands/DescribeSecretCommand.ts + + + + +var _DescribeSecretCommand = class _DescribeSecretCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "DescribeSecret", {}).n("SecretsManagerClient", "DescribeSecretCommand").f(void 0, void 0).ser(se_DescribeSecretCommand).de(de_DescribeSecretCommand).build() { +}; +__name(_DescribeSecretCommand, "DescribeSecretCommand"); +var DescribeSecretCommand = _DescribeSecretCommand; + +// src/commands/GetRandomPasswordCommand.ts + + + + +var _GetRandomPasswordCommand = class _GetRandomPasswordCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "GetRandomPassword", {}).n("SecretsManagerClient", "GetRandomPasswordCommand").f(void 0, GetRandomPasswordResponseFilterSensitiveLog).ser(se_GetRandomPasswordCommand).de(de_GetRandomPasswordCommand).build() { +}; +__name(_GetRandomPasswordCommand, "GetRandomPasswordCommand"); +var GetRandomPasswordCommand = _GetRandomPasswordCommand; + +// src/commands/GetResourcePolicyCommand.ts + + + + +var _GetResourcePolicyCommand = class _GetResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "GetResourcePolicy", {}).n("SecretsManagerClient", "GetResourcePolicyCommand").f(void 0, void 0).ser(se_GetResourcePolicyCommand).de(de_GetResourcePolicyCommand).build() { +}; +__name(_GetResourcePolicyCommand, "GetResourcePolicyCommand"); +var GetResourcePolicyCommand = _GetResourcePolicyCommand; + +// src/commands/GetSecretValueCommand.ts + + + + +var _GetSecretValueCommand = class _GetSecretValueCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "GetSecretValue", {}).n("SecretsManagerClient", "GetSecretValueCommand").f(void 0, GetSecretValueResponseFilterSensitiveLog).ser(se_GetSecretValueCommand).de(de_GetSecretValueCommand).build() { +}; +__name(_GetSecretValueCommand, "GetSecretValueCommand"); +var GetSecretValueCommand = _GetSecretValueCommand; + +// src/commands/ListSecretsCommand.ts + + + + +var _ListSecretsCommand = class _ListSecretsCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "ListSecrets", {}).n("SecretsManagerClient", "ListSecretsCommand").f(void 0, void 0).ser(se_ListSecretsCommand).de(de_ListSecretsCommand).build() { +}; +__name(_ListSecretsCommand, "ListSecretsCommand"); +var ListSecretsCommand = _ListSecretsCommand; + +// src/commands/ListSecretVersionIdsCommand.ts + + + + +var _ListSecretVersionIdsCommand = class _ListSecretVersionIdsCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "ListSecretVersionIds", {}).n("SecretsManagerClient", "ListSecretVersionIdsCommand").f(void 0, void 0).ser(se_ListSecretVersionIdsCommand).de(de_ListSecretVersionIdsCommand).build() { +}; +__name(_ListSecretVersionIdsCommand, "ListSecretVersionIdsCommand"); +var ListSecretVersionIdsCommand = _ListSecretVersionIdsCommand; + +// src/commands/PutResourcePolicyCommand.ts + + + + +var _PutResourcePolicyCommand = class _PutResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "PutResourcePolicy", {}).n("SecretsManagerClient", "PutResourcePolicyCommand").f(void 0, void 0).ser(se_PutResourcePolicyCommand).de(de_PutResourcePolicyCommand).build() { +}; +__name(_PutResourcePolicyCommand, "PutResourcePolicyCommand"); +var PutResourcePolicyCommand = _PutResourcePolicyCommand; + +// src/commands/PutSecretValueCommand.ts + + + + +var _PutSecretValueCommand = class _PutSecretValueCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "PutSecretValue", {}).n("SecretsManagerClient", "PutSecretValueCommand").f(PutSecretValueRequestFilterSensitiveLog, void 0).ser(se_PutSecretValueCommand).de(de_PutSecretValueCommand).build() { +}; +__name(_PutSecretValueCommand, "PutSecretValueCommand"); +var PutSecretValueCommand = _PutSecretValueCommand; + +// src/commands/RemoveRegionsFromReplicationCommand.ts + + + + +var _RemoveRegionsFromReplicationCommand = class _RemoveRegionsFromReplicationCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "RemoveRegionsFromReplication", {}).n("SecretsManagerClient", "RemoveRegionsFromReplicationCommand").f(void 0, void 0).ser(se_RemoveRegionsFromReplicationCommand).de(de_RemoveRegionsFromReplicationCommand).build() { +}; +__name(_RemoveRegionsFromReplicationCommand, "RemoveRegionsFromReplicationCommand"); +var RemoveRegionsFromReplicationCommand = _RemoveRegionsFromReplicationCommand; + +// src/commands/ReplicateSecretToRegionsCommand.ts + + + + +var _ReplicateSecretToRegionsCommand = class _ReplicateSecretToRegionsCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "ReplicateSecretToRegions", {}).n("SecretsManagerClient", "ReplicateSecretToRegionsCommand").f(void 0, void 0).ser(se_ReplicateSecretToRegionsCommand).de(de_ReplicateSecretToRegionsCommand).build() { +}; +__name(_ReplicateSecretToRegionsCommand, "ReplicateSecretToRegionsCommand"); +var ReplicateSecretToRegionsCommand = _ReplicateSecretToRegionsCommand; + +// src/commands/RestoreSecretCommand.ts + + + + +var _RestoreSecretCommand = class _RestoreSecretCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "RestoreSecret", {}).n("SecretsManagerClient", "RestoreSecretCommand").f(void 0, void 0).ser(se_RestoreSecretCommand).de(de_RestoreSecretCommand).build() { +}; +__name(_RestoreSecretCommand, "RestoreSecretCommand"); +var RestoreSecretCommand = _RestoreSecretCommand; + +// src/commands/RotateSecretCommand.ts + + + + +var _RotateSecretCommand = class _RotateSecretCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "RotateSecret", {}).n("SecretsManagerClient", "RotateSecretCommand").f(void 0, void 0).ser(se_RotateSecretCommand).de(de_RotateSecretCommand).build() { +}; +__name(_RotateSecretCommand, "RotateSecretCommand"); +var RotateSecretCommand = _RotateSecretCommand; + +// src/commands/StopReplicationToReplicaCommand.ts + + + + +var _StopReplicationToReplicaCommand = class _StopReplicationToReplicaCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "StopReplicationToReplica", {}).n("SecretsManagerClient", "StopReplicationToReplicaCommand").f(void 0, void 0).ser(se_StopReplicationToReplicaCommand).de(de_StopReplicationToReplicaCommand).build() { +}; +__name(_StopReplicationToReplicaCommand, "StopReplicationToReplicaCommand"); +var StopReplicationToReplicaCommand = _StopReplicationToReplicaCommand; + +// src/commands/TagResourceCommand.ts + + + + +var _TagResourceCommand = class _TagResourceCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "TagResource", {}).n("SecretsManagerClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() { +}; +__name(_TagResourceCommand, "TagResourceCommand"); +var TagResourceCommand = _TagResourceCommand; + +// src/commands/UntagResourceCommand.ts + + + + +var _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "UntagResource", {}).n("SecretsManagerClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() { +}; +__name(_UntagResourceCommand, "UntagResourceCommand"); +var UntagResourceCommand = _UntagResourceCommand; + +// src/commands/UpdateSecretCommand.ts + + + + +var _UpdateSecretCommand = class _UpdateSecretCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "UpdateSecret", {}).n("SecretsManagerClient", "UpdateSecretCommand").f(UpdateSecretRequestFilterSensitiveLog, void 0).ser(se_UpdateSecretCommand).de(de_UpdateSecretCommand).build() { +}; +__name(_UpdateSecretCommand, "UpdateSecretCommand"); +var UpdateSecretCommand = _UpdateSecretCommand; + +// src/commands/UpdateSecretVersionStageCommand.ts + + + + +var _UpdateSecretVersionStageCommand = class _UpdateSecretVersionStageCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "UpdateSecretVersionStage", {}).n("SecretsManagerClient", "UpdateSecretVersionStageCommand").f(void 0, void 0).ser(se_UpdateSecretVersionStageCommand).de(de_UpdateSecretVersionStageCommand).build() { +}; +__name(_UpdateSecretVersionStageCommand, "UpdateSecretVersionStageCommand"); +var UpdateSecretVersionStageCommand = _UpdateSecretVersionStageCommand; + +// src/commands/ValidateResourcePolicyCommand.ts + + + + +var _ValidateResourcePolicyCommand = class _ValidateResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("secretsmanager", "ValidateResourcePolicy", {}).n("SecretsManagerClient", "ValidateResourcePolicyCommand").f(void 0, void 0).ser(se_ValidateResourcePolicyCommand).de(de_ValidateResourcePolicyCommand).build() { +}; +__name(_ValidateResourcePolicyCommand, "ValidateResourcePolicyCommand"); +var ValidateResourcePolicyCommand = _ValidateResourcePolicyCommand; + +// src/SecretsManager.ts +var commands = { + BatchGetSecretValueCommand, + CancelRotateSecretCommand, + CreateSecretCommand, + DeleteResourcePolicyCommand, + DeleteSecretCommand, + DescribeSecretCommand, + GetRandomPasswordCommand, + GetResourcePolicyCommand, + GetSecretValueCommand, + ListSecretsCommand, + ListSecretVersionIdsCommand, + PutResourcePolicyCommand, + PutSecretValueCommand, + RemoveRegionsFromReplicationCommand, + ReplicateSecretToRegionsCommand, + RestoreSecretCommand, + RotateSecretCommand, + StopReplicationToReplicaCommand, + TagResourceCommand, + UntagResourceCommand, + UpdateSecretCommand, + UpdateSecretVersionStageCommand, + ValidateResourcePolicyCommand +}; +var _SecretsManager = class _SecretsManager extends SecretsManagerClient { +}; +__name(_SecretsManager, "SecretsManager"); +var SecretsManager = _SecretsManager; +(0, import_smithy_client.createAggregatedClient)(commands, SecretsManager); + +// src/pagination/BatchGetSecretValuePaginator.ts + +var paginateBatchGetSecretValue = (0, import_core.createPaginator)(SecretsManagerClient, BatchGetSecretValueCommand, "NextToken", "NextToken", "MaxResults"); + +// src/pagination/ListSecretVersionIdsPaginator.ts + +var paginateListSecretVersionIds = (0, import_core.createPaginator)(SecretsManagerClient, ListSecretVersionIdsCommand, "NextToken", "NextToken", "MaxResults"); + +// src/pagination/ListSecretsPaginator.ts + +var paginateListSecrets = (0, import_core.createPaginator)(SecretsManagerClient, ListSecretsCommand, "NextToken", "NextToken", "MaxResults"); + +// src/index.ts +var import_util_endpoints = require("@aws-sdk/util-endpoints"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + SecretsManagerServiceException, + __Client, + SecretsManagerClient, + SecretsManager, + $Command, + BatchGetSecretValueCommand, + CancelRotateSecretCommand, + CreateSecretCommand, + DeleteResourcePolicyCommand, + DeleteSecretCommand, + DescribeSecretCommand, + GetRandomPasswordCommand, + GetResourcePolicyCommand, + GetSecretValueCommand, + ListSecretVersionIdsCommand, + ListSecretsCommand, + PutResourcePolicyCommand, + PutSecretValueCommand, + RemoveRegionsFromReplicationCommand, + ReplicateSecretToRegionsCommand, + RestoreSecretCommand, + RotateSecretCommand, + StopReplicationToReplicaCommand, + TagResourceCommand, + UntagResourceCommand, + UpdateSecretCommand, + UpdateSecretVersionStageCommand, + ValidateResourcePolicyCommand, + paginateBatchGetSecretValue, + paginateListSecretVersionIds, + paginateListSecrets, + FilterNameStringType, + DecryptionFailure, + InternalServiceError, + InvalidNextTokenException, + InvalidParameterException, + InvalidRequestException, + ResourceNotFoundException, + StatusType, + EncryptionFailure, + LimitExceededException, + MalformedPolicyDocumentException, + PreconditionNotMetException, + ResourceExistsException, + SortOrderType, + PublicPolicyException, + SecretValueEntryFilterSensitiveLog, + BatchGetSecretValueResponseFilterSensitiveLog, + CreateSecretRequestFilterSensitiveLog, + GetRandomPasswordResponseFilterSensitiveLog, + GetSecretValueResponseFilterSensitiveLog, + PutSecretValueRequestFilterSensitiveLog, + UpdateSecretRequestFilterSensitiveLog +}); + diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.browser.js b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.browser.js new file mode 100644 index 0000000..39bd218 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.browser.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const tslib_1 = require("tslib"); +const package_json_1 = tslib_1.__importDefault(require("../package.json")); +const sha256_browser_1 = require("@aws-crypto/sha256-browser"); +const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser"); +const config_resolver_1 = require("@smithy/config-resolver"); +const fetch_http_handler_1 = require("@smithy/fetch-http-handler"); +const invalid_dependency_1 = require("@smithy/invalid-dependency"); +const util_body_length_browser_1 = require("@smithy/util-body-length-browser"); +const util_retry_1 = require("@smithy/util-retry"); +const runtimeConfig_shared_1 = require("./runtimeConfig.shared"); +const smithy_client_1 = require("@smithy/smithy-client"); +const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser"); +const getRuntimeConfig = (config) => { + const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"), + requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? sha256_browser_1.Sha256, + streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.js b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.js new file mode 100644 index 0000000..fc6b37e --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const tslib_1 = require("tslib"); +const package_json_1 = tslib_1.__importDefault(require("../package.json")); +const core_1 = require("@aws-sdk/core"); +const credential_provider_node_1 = require("@aws-sdk/credential-provider-node"); +const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node"); +const config_resolver_1 = require("@smithy/config-resolver"); +const hash_node_1 = require("@smithy/hash-node"); +const middleware_retry_1 = require("@smithy/middleware-retry"); +const node_config_provider_1 = require("@smithy/node-config-provider"); +const node_http_handler_1 = require("@smithy/node-http-handler"); +const util_body_length_node_1 = require("@smithy/util-body-length-node"); +const util_retry_1 = require("@smithy/util-retry"); +const runtimeConfig_shared_1 = require("./runtimeConfig.shared"); +const smithy_client_1 = require("@smithy/smithy-client"); +const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node"); +const smithy_client_2 = require("@smithy/smithy-client"); +const getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.native.js b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.native.js new file mode 100644 index 0000000..34c5f8e --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.native.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const sha256_js_1 = require("@aws-crypto/sha256-js"); +const runtimeConfig_browser_1 = require("./runtimeConfig.browser"); +const getRuntimeConfig = (config) => { + const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? sha256_js_1.Sha256, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.shared.js b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.shared.js new file mode 100644 index 0000000..addba35 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/runtimeConfig.shared.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const core_1 = require("@aws-sdk/core"); +const smithy_client_1 = require("@smithy/smithy-client"); +const url_parser_1 = require("@smithy/url-parser"); +const util_base64_1 = require("@smithy/util-base64"); +const util_utf8_1 = require("@smithy/util-utf8"); +const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider"); +const endpointResolver_1 = require("./endpoint/endpointResolver"); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2017-10-17", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSecretsManagerHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "Secrets Manager", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/SecretsManager.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/SecretsManager.js new file mode 100644 index 0000000..e64b47a --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/SecretsManager.js @@ -0,0 +1,53 @@ +import { createAggregatedClient } from "@smithy/smithy-client"; +import { BatchGetSecretValueCommand, } from "./commands/BatchGetSecretValueCommand"; +import { CancelRotateSecretCommand, } from "./commands/CancelRotateSecretCommand"; +import { CreateSecretCommand, } from "./commands/CreateSecretCommand"; +import { DeleteResourcePolicyCommand, } from "./commands/DeleteResourcePolicyCommand"; +import { DeleteSecretCommand, } from "./commands/DeleteSecretCommand"; +import { DescribeSecretCommand, } from "./commands/DescribeSecretCommand"; +import { GetRandomPasswordCommand, } from "./commands/GetRandomPasswordCommand"; +import { GetResourcePolicyCommand, } from "./commands/GetResourcePolicyCommand"; +import { GetSecretValueCommand, } from "./commands/GetSecretValueCommand"; +import { ListSecretsCommand } from "./commands/ListSecretsCommand"; +import { ListSecretVersionIdsCommand, } from "./commands/ListSecretVersionIdsCommand"; +import { PutResourcePolicyCommand, } from "./commands/PutResourcePolicyCommand"; +import { PutSecretValueCommand, } from "./commands/PutSecretValueCommand"; +import { RemoveRegionsFromReplicationCommand, } from "./commands/RemoveRegionsFromReplicationCommand"; +import { ReplicateSecretToRegionsCommand, } from "./commands/ReplicateSecretToRegionsCommand"; +import { RestoreSecretCommand, } from "./commands/RestoreSecretCommand"; +import { RotateSecretCommand, } from "./commands/RotateSecretCommand"; +import { StopReplicationToReplicaCommand, } from "./commands/StopReplicationToReplicaCommand"; +import { TagResourceCommand } from "./commands/TagResourceCommand"; +import { UntagResourceCommand, } from "./commands/UntagResourceCommand"; +import { UpdateSecretCommand, } from "./commands/UpdateSecretCommand"; +import { UpdateSecretVersionStageCommand, } from "./commands/UpdateSecretVersionStageCommand"; +import { ValidateResourcePolicyCommand, } from "./commands/ValidateResourcePolicyCommand"; +import { SecretsManagerClient } from "./SecretsManagerClient"; +const commands = { + BatchGetSecretValueCommand, + CancelRotateSecretCommand, + CreateSecretCommand, + DeleteResourcePolicyCommand, + DeleteSecretCommand, + DescribeSecretCommand, + GetRandomPasswordCommand, + GetResourcePolicyCommand, + GetSecretValueCommand, + ListSecretsCommand, + ListSecretVersionIdsCommand, + PutResourcePolicyCommand, + PutSecretValueCommand, + RemoveRegionsFromReplicationCommand, + ReplicateSecretToRegionsCommand, + RestoreSecretCommand, + RotateSecretCommand, + StopReplicationToReplicaCommand, + TagResourceCommand, + UntagResourceCommand, + UpdateSecretCommand, + UpdateSecretVersionStageCommand, + ValidateResourcePolicyCommand, +}; +export class SecretsManager extends SecretsManagerClient { +} +createAggregatedClient(commands, SecretsManager); diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/SecretsManagerClient.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/SecretsManagerClient.js new file mode 100644 index 0000000..dbeefa2 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/SecretsManagerClient.js @@ -0,0 +1,52 @@ +import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent"; +import { resolveRegionConfig } from "@smithy/config-resolver"; +import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry"; +import { Client as __Client, } from "@smithy/smithy-client"; +import { defaultSecretsManagerHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider"; +import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions } from "./runtimeExtensions"; +export { __Client }; +export class SecretsManagerClient extends __Client { + constructor(...[configuration]) { + const _config_0 = __getRuntimeConfig(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveRegionConfig(_config_1); + const _config_3 = resolveEndpointConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider(), + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + getDefaultHttpAuthSchemeParametersProvider() { + return defaultSecretsManagerHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }); + } +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/auth/httpAuthExtensionConfiguration.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/auth/httpAuthExtensionConfiguration.js new file mode 100644 index 0000000..2ba1d48 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/auth/httpAuthExtensionConfiguration.js @@ -0,0 +1,38 @@ +export const getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } + else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + }, + }; +}; +export const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/auth/httpAuthSchemeProvider.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/auth/httpAuthSchemeProvider.js new file mode 100644 index 0000000..8b40c3a --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/auth/httpAuthSchemeProvider.js @@ -0,0 +1,41 @@ +import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core"; +import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware"; +export const defaultSecretsManagerHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: getSmithyContext(context).operation, + region: (await normalizeProvider(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "secretsmanager", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +export const defaultSecretsManagerHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +export const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveAwsSdkSigV4Config(config); + return { + ...config_0, + }; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/BatchGetSecretValueCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/BatchGetSecretValueCommand.js new file mode 100644 index 0000000..b70bdd5 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/BatchGetSecretValueCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { BatchGetSecretValueResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_BatchGetSecretValueCommand, se_BatchGetSecretValueCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class BatchGetSecretValueCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "BatchGetSecretValue", {}) + .n("SecretsManagerClient", "BatchGetSecretValueCommand") + .f(void 0, BatchGetSecretValueResponseFilterSensitiveLog) + .ser(se_BatchGetSecretValueCommand) + .de(de_BatchGetSecretValueCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/CancelRotateSecretCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/CancelRotateSecretCommand.js new file mode 100644 index 0000000..0c02d46 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/CancelRotateSecretCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_CancelRotateSecretCommand, se_CancelRotateSecretCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class CancelRotateSecretCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "CancelRotateSecret", {}) + .n("SecretsManagerClient", "CancelRotateSecretCommand") + .f(void 0, void 0) + .ser(se_CancelRotateSecretCommand) + .de(de_CancelRotateSecretCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/CreateSecretCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/CreateSecretCommand.js new file mode 100644 index 0000000..45f8d20 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/CreateSecretCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { CreateSecretRequestFilterSensitiveLog } from "../models/models_0"; +import { de_CreateSecretCommand, se_CreateSecretCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class CreateSecretCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "CreateSecret", {}) + .n("SecretsManagerClient", "CreateSecretCommand") + .f(CreateSecretRequestFilterSensitiveLog, void 0) + .ser(se_CreateSecretCommand) + .de(de_CreateSecretCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/DeleteResourcePolicyCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/DeleteResourcePolicyCommand.js new file mode 100644 index 0000000..37af655 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/DeleteResourcePolicyCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class DeleteResourcePolicyCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "DeleteResourcePolicy", {}) + .n("SecretsManagerClient", "DeleteResourcePolicyCommand") + .f(void 0, void 0) + .ser(se_DeleteResourcePolicyCommand) + .de(de_DeleteResourcePolicyCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/DeleteSecretCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/DeleteSecretCommand.js new file mode 100644 index 0000000..64985dc --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/DeleteSecretCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_DeleteSecretCommand, se_DeleteSecretCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class DeleteSecretCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "DeleteSecret", {}) + .n("SecretsManagerClient", "DeleteSecretCommand") + .f(void 0, void 0) + .ser(se_DeleteSecretCommand) + .de(de_DeleteSecretCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/DescribeSecretCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/DescribeSecretCommand.js new file mode 100644 index 0000000..c2766dc --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/DescribeSecretCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_DescribeSecretCommand, se_DescribeSecretCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class DescribeSecretCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "DescribeSecret", {}) + .n("SecretsManagerClient", "DescribeSecretCommand") + .f(void 0, void 0) + .ser(se_DescribeSecretCommand) + .de(de_DescribeSecretCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/GetRandomPasswordCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/GetRandomPasswordCommand.js new file mode 100644 index 0000000..b471563 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/GetRandomPasswordCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetRandomPasswordResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_GetRandomPasswordCommand, se_GetRandomPasswordCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class GetRandomPasswordCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "GetRandomPassword", {}) + .n("SecretsManagerClient", "GetRandomPasswordCommand") + .f(void 0, GetRandomPasswordResponseFilterSensitiveLog) + .ser(se_GetRandomPasswordCommand) + .de(de_GetRandomPasswordCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/GetResourcePolicyCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/GetResourcePolicyCommand.js new file mode 100644 index 0000000..865cd29 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/GetResourcePolicyCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class GetResourcePolicyCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "GetResourcePolicy", {}) + .n("SecretsManagerClient", "GetResourcePolicyCommand") + .f(void 0, void 0) + .ser(se_GetResourcePolicyCommand) + .de(de_GetResourcePolicyCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/GetSecretValueCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/GetSecretValueCommand.js new file mode 100644 index 0000000..f012a32 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/GetSecretValueCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetSecretValueResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_GetSecretValueCommand, se_GetSecretValueCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class GetSecretValueCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "GetSecretValue", {}) + .n("SecretsManagerClient", "GetSecretValueCommand") + .f(void 0, GetSecretValueResponseFilterSensitiveLog) + .ser(se_GetSecretValueCommand) + .de(de_GetSecretValueCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ListSecretVersionIdsCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ListSecretVersionIdsCommand.js new file mode 100644 index 0000000..d51367f --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ListSecretVersionIdsCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_ListSecretVersionIdsCommand, se_ListSecretVersionIdsCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class ListSecretVersionIdsCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "ListSecretVersionIds", {}) + .n("SecretsManagerClient", "ListSecretVersionIdsCommand") + .f(void 0, void 0) + .ser(se_ListSecretVersionIdsCommand) + .de(de_ListSecretVersionIdsCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ListSecretsCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ListSecretsCommand.js new file mode 100644 index 0000000..4ba93fa --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ListSecretsCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_ListSecretsCommand, se_ListSecretsCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class ListSecretsCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "ListSecrets", {}) + .n("SecretsManagerClient", "ListSecretsCommand") + .f(void 0, void 0) + .ser(se_ListSecretsCommand) + .de(de_ListSecretsCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/PutResourcePolicyCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/PutResourcePolicyCommand.js new file mode 100644 index 0000000..899118f --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/PutResourcePolicyCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_PutResourcePolicyCommand, se_PutResourcePolicyCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class PutResourcePolicyCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "PutResourcePolicy", {}) + .n("SecretsManagerClient", "PutResourcePolicyCommand") + .f(void 0, void 0) + .ser(se_PutResourcePolicyCommand) + .de(de_PutResourcePolicyCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/PutSecretValueCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/PutSecretValueCommand.js new file mode 100644 index 0000000..f9b7b4d --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/PutSecretValueCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { PutSecretValueRequestFilterSensitiveLog, } from "../models/models_0"; +import { de_PutSecretValueCommand, se_PutSecretValueCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class PutSecretValueCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "PutSecretValue", {}) + .n("SecretsManagerClient", "PutSecretValueCommand") + .f(PutSecretValueRequestFilterSensitiveLog, void 0) + .ser(se_PutSecretValueCommand) + .de(de_PutSecretValueCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/RemoveRegionsFromReplicationCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/RemoveRegionsFromReplicationCommand.js new file mode 100644 index 0000000..54ee20d --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/RemoveRegionsFromReplicationCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_RemoveRegionsFromReplicationCommand, se_RemoveRegionsFromReplicationCommand, } from "../protocols/Aws_json1_1"; +export { $Command }; +export class RemoveRegionsFromReplicationCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "RemoveRegionsFromReplication", {}) + .n("SecretsManagerClient", "RemoveRegionsFromReplicationCommand") + .f(void 0, void 0) + .ser(se_RemoveRegionsFromReplicationCommand) + .de(de_RemoveRegionsFromReplicationCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ReplicateSecretToRegionsCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ReplicateSecretToRegionsCommand.js new file mode 100644 index 0000000..23eee83 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ReplicateSecretToRegionsCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_ReplicateSecretToRegionsCommand, se_ReplicateSecretToRegionsCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class ReplicateSecretToRegionsCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "ReplicateSecretToRegions", {}) + .n("SecretsManagerClient", "ReplicateSecretToRegionsCommand") + .f(void 0, void 0) + .ser(se_ReplicateSecretToRegionsCommand) + .de(de_ReplicateSecretToRegionsCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/RestoreSecretCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/RestoreSecretCommand.js new file mode 100644 index 0000000..08d7b07 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/RestoreSecretCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_RestoreSecretCommand, se_RestoreSecretCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class RestoreSecretCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "RestoreSecret", {}) + .n("SecretsManagerClient", "RestoreSecretCommand") + .f(void 0, void 0) + .ser(se_RestoreSecretCommand) + .de(de_RestoreSecretCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/RotateSecretCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/RotateSecretCommand.js new file mode 100644 index 0000000..70c4229 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/RotateSecretCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_RotateSecretCommand, se_RotateSecretCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class RotateSecretCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "RotateSecret", {}) + .n("SecretsManagerClient", "RotateSecretCommand") + .f(void 0, void 0) + .ser(se_RotateSecretCommand) + .de(de_RotateSecretCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/StopReplicationToReplicaCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/StopReplicationToReplicaCommand.js new file mode 100644 index 0000000..1fb336f --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/StopReplicationToReplicaCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_StopReplicationToReplicaCommand, se_StopReplicationToReplicaCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class StopReplicationToReplicaCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "StopReplicationToReplica", {}) + .n("SecretsManagerClient", "StopReplicationToReplicaCommand") + .f(void 0, void 0) + .ser(se_StopReplicationToReplicaCommand) + .de(de_StopReplicationToReplicaCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/TagResourceCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/TagResourceCommand.js new file mode 100644 index 0000000..94bc94f --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/TagResourceCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class TagResourceCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "TagResource", {}) + .n("SecretsManagerClient", "TagResourceCommand") + .f(void 0, void 0) + .ser(se_TagResourceCommand) + .de(de_TagResourceCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/UntagResourceCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/UntagResourceCommand.js new file mode 100644 index 0000000..a4ca942 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/UntagResourceCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class UntagResourceCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "UntagResource", {}) + .n("SecretsManagerClient", "UntagResourceCommand") + .f(void 0, void 0) + .ser(se_UntagResourceCommand) + .de(de_UntagResourceCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/UpdateSecretCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/UpdateSecretCommand.js new file mode 100644 index 0000000..2736cb5 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/UpdateSecretCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateSecretRequestFilterSensitiveLog } from "../models/models_0"; +import { de_UpdateSecretCommand, se_UpdateSecretCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class UpdateSecretCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "UpdateSecret", {}) + .n("SecretsManagerClient", "UpdateSecretCommand") + .f(UpdateSecretRequestFilterSensitiveLog, void 0) + .ser(se_UpdateSecretCommand) + .de(de_UpdateSecretCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/UpdateSecretVersionStageCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/UpdateSecretVersionStageCommand.js new file mode 100644 index 0000000..adf276e --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/UpdateSecretVersionStageCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_UpdateSecretVersionStageCommand, se_UpdateSecretVersionStageCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class UpdateSecretVersionStageCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "UpdateSecretVersionStage", {}) + .n("SecretsManagerClient", "UpdateSecretVersionStageCommand") + .f(void 0, void 0) + .ser(se_UpdateSecretVersionStageCommand) + .de(de_UpdateSecretVersionStageCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ValidateResourcePolicyCommand.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ValidateResourcePolicyCommand.js new file mode 100644 index 0000000..af8143e --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/ValidateResourcePolicyCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_ValidateResourcePolicyCommand, se_ValidateResourcePolicyCommand } from "../protocols/Aws_json1_1"; +export { $Command }; +export class ValidateResourcePolicyCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("secretsmanager", "ValidateResourcePolicy", {}) + .n("SecretsManagerClient", "ValidateResourcePolicyCommand") + .f(void 0, void 0) + .ser(se_ValidateResourcePolicyCommand) + .de(de_ValidateResourcePolicyCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/index.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/index.js new file mode 100644 index 0000000..04a302c --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/commands/index.js @@ -0,0 +1,23 @@ +export * from "./BatchGetSecretValueCommand"; +export * from "./CancelRotateSecretCommand"; +export * from "./CreateSecretCommand"; +export * from "./DeleteResourcePolicyCommand"; +export * from "./DeleteSecretCommand"; +export * from "./DescribeSecretCommand"; +export * from "./GetRandomPasswordCommand"; +export * from "./GetResourcePolicyCommand"; +export * from "./GetSecretValueCommand"; +export * from "./ListSecretVersionIdsCommand"; +export * from "./ListSecretsCommand"; +export * from "./PutResourcePolicyCommand"; +export * from "./PutSecretValueCommand"; +export * from "./RemoveRegionsFromReplicationCommand"; +export * from "./ReplicateSecretToRegionsCommand"; +export * from "./RestoreSecretCommand"; +export * from "./RotateSecretCommand"; +export * from "./StopReplicationToReplicaCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateSecretCommand"; +export * from "./UpdateSecretVersionStageCommand"; +export * from "./ValidateResourcePolicyCommand"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/endpoint/EndpointParameters.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/endpoint/EndpointParameters.js new file mode 100644 index 0000000..b0851a7 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/endpoint/EndpointParameters.js @@ -0,0 +1,14 @@ +export const resolveClientEndpointParameters = (options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "secretsmanager", + }; +}; +export const commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/endpoint/endpointResolver.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/endpoint/endpointResolver.js new file mode 100644 index 0000000..5c35926 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/endpoint/endpointResolver.js @@ -0,0 +1,8 @@ +import { resolveEndpoint } from "@smithy/util-endpoints"; +import { ruleSet } from "./ruleset"; +export const defaultEndpointResolver = (endpointParams, context = {}) => { + return resolveEndpoint(ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/endpoint/ruleset.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/endpoint/ruleset.js new file mode 100644 index 0000000..454b934 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/endpoint/ruleset.js @@ -0,0 +1,4 @@ +const y = "required", z = "fn", A = "argv", B = "ref", C = "properties", D = "headers"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = { [y]: false, "type": "String" }, j = { [y]: true, "default": false, "type": "Boolean" }, k = { [B]: "Endpoint" }, l = { [z]: c, [A]: [{ [B]: "UseFIPS" }, true] }, m = { [z]: c, [A]: [{ [B]: "UseDualStack" }, true] }, n = {}, o = { [z]: "getAttr", [A]: [{ [B]: g }, "supportsFIPS"] }, p = { [z]: c, [A]: [true, { [z]: "getAttr", [A]: [{ [B]: g }, "supportsDualStack"] }] }, q = { [z]: "getAttr", [A]: [{ [B]: g }, "name"] }, r = { "url": "https://secretsmanager-fips.{Region}.amazonaws.com", [C]: {}, [D]: {} }, s = { "url": "https://secretsmanager.{Region}.amazonaws.com", [C]: {}, [D]: {} }, t = [l], u = [m], v = [{ [B]: "Region" }], w = [{ [z]: h, [A]: ["aws", q] }], x = [{ [z]: h, [A]: ["aws-us-gov", q] }]; +const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [z]: b, [A]: [k] }], rules: [{ conditions: t, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: u, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, [C]: n, [D]: n }, type: e }], type: f }, { conditions: [{ [z]: b, [A]: v }], rules: [{ conditions: [{ [z]: "aws.partition", [A]: v, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [z]: c, [A]: [a, o] }, p], rules: [{ conditions: w, endpoint: r, type: e }, { conditions: x, endpoint: r, type: e }, { endpoint: { url: "https://secretsmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", [C]: n, [D]: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: t, rules: [{ conditions: [{ [z]: c, [A]: [o, a] }], rules: [{ endpoint: { url: "https://secretsmanager-fips.{Region}.{PartitionResult#dnsSuffix}", [C]: n, [D]: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: u, rules: [{ conditions: [p], rules: [{ conditions: w, endpoint: s, type: e }, { conditions: [{ [z]: h, [A]: ["aws-cn", q] }], endpoint: { url: "https://secretsmanager.{Region}.amazonaws.com.cn", [C]: n, [D]: n }, type: e }, { conditions: x, endpoint: s, type: e }, { endpoint: { url: "https://secretsmanager.{Region}.{PartitionResult#dualStackDnsSuffix}", [C]: n, [D]: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://secretsmanager.{Region}.{PartitionResult#dnsSuffix}", [C]: n, [D]: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +export const ruleSet = _data; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/extensionConfiguration.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/extensionConfiguration.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/extensionConfiguration.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/index.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/index.js new file mode 100644 index 0000000..50f3e13 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/index.js @@ -0,0 +1,7 @@ +export * from "./SecretsManagerClient"; +export * from "./SecretsManager"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export { SecretsManagerServiceException } from "./models/SecretsManagerServiceException"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/models/SecretsManagerServiceException.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/models/SecretsManagerServiceException.js new file mode 100644 index 0000000..bdcbbf6 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/models/SecretsManagerServiceException.js @@ -0,0 +1,8 @@ +import { ServiceException as __ServiceException, } from "@smithy/smithy-client"; +export { __ServiceException }; +export class SecretsManagerServiceException extends __ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, SecretsManagerServiceException.prototype); + } +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/models/index.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/models/index.js new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/models/index.js @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/models/models_0.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/models/models_0.js new file mode 100644 index 0000000..a752086 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/models/models_0.js @@ -0,0 +1,209 @@ +import { SENSITIVE_STRING } from "@smithy/smithy-client"; +import { SecretsManagerServiceException as __BaseException } from "./SecretsManagerServiceException"; +export const FilterNameStringType = { + all: "all", + description: "description", + name: "name", + owning_service: "owning-service", + primary_region: "primary-region", + tag_key: "tag-key", + tag_value: "tag-value", +}; +export class DecryptionFailure extends __BaseException { + constructor(opts) { + super({ + name: "DecryptionFailure", + $fault: "client", + ...opts, + }); + this.name = "DecryptionFailure"; + this.$fault = "client"; + Object.setPrototypeOf(this, DecryptionFailure.prototype); + this.Message = opts.Message; + } +} +export class InternalServiceError extends __BaseException { + constructor(opts) { + super({ + name: "InternalServiceError", + $fault: "server", + ...opts, + }); + this.name = "InternalServiceError"; + this.$fault = "server"; + Object.setPrototypeOf(this, InternalServiceError.prototype); + this.Message = opts.Message; + } +} +export class InvalidNextTokenException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidNextTokenException", + $fault: "client", + ...opts, + }); + this.name = "InvalidNextTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidNextTokenException.prototype); + this.Message = opts.Message; + } +} +export class InvalidParameterException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidParameterException", + $fault: "client", + ...opts, + }); + this.name = "InvalidParameterException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidParameterException.prototype); + this.Message = opts.Message; + } +} +export class InvalidRequestException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts, + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidRequestException.prototype); + this.Message = opts.Message; + } +} +export class ResourceNotFoundException extends __BaseException { + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + this.name = "ResourceNotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.Message = opts.Message; + } +} +export const StatusType = { + Failed: "Failed", + InProgress: "InProgress", + InSync: "InSync", +}; +export class EncryptionFailure extends __BaseException { + constructor(opts) { + super({ + name: "EncryptionFailure", + $fault: "client", + ...opts, + }); + this.name = "EncryptionFailure"; + this.$fault = "client"; + Object.setPrototypeOf(this, EncryptionFailure.prototype); + this.Message = opts.Message; + } +} +export class LimitExceededException extends __BaseException { + constructor(opts) { + super({ + name: "LimitExceededException", + $fault: "client", + ...opts, + }); + this.name = "LimitExceededException"; + this.$fault = "client"; + Object.setPrototypeOf(this, LimitExceededException.prototype); + this.Message = opts.Message; + } +} +export class MalformedPolicyDocumentException extends __BaseException { + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts, + }); + this.name = "MalformedPolicyDocumentException"; + this.$fault = "client"; + Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype); + this.Message = opts.Message; + } +} +export class PreconditionNotMetException extends __BaseException { + constructor(opts) { + super({ + name: "PreconditionNotMetException", + $fault: "client", + ...opts, + }); + this.name = "PreconditionNotMetException"; + this.$fault = "client"; + Object.setPrototypeOf(this, PreconditionNotMetException.prototype); + this.Message = opts.Message; + } +} +export class ResourceExistsException extends __BaseException { + constructor(opts) { + super({ + name: "ResourceExistsException", + $fault: "client", + ...opts, + }); + this.name = "ResourceExistsException"; + this.$fault = "client"; + Object.setPrototypeOf(this, ResourceExistsException.prototype); + this.Message = opts.Message; + } +} +export const SortOrderType = { + asc: "asc", + desc: "desc", +}; +export class PublicPolicyException extends __BaseException { + constructor(opts) { + super({ + name: "PublicPolicyException", + $fault: "client", + ...opts, + }); + this.name = "PublicPolicyException"; + this.$fault = "client"; + Object.setPrototypeOf(this, PublicPolicyException.prototype); + this.Message = opts.Message; + } +} +export const SecretValueEntryFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.SecretBinary && { SecretBinary: SENSITIVE_STRING }), + ...(obj.SecretString && { SecretString: SENSITIVE_STRING }), +}); +export const BatchGetSecretValueResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.SecretValues && { SecretValues: obj.SecretValues.map((item) => SecretValueEntryFilterSensitiveLog(item)) }), +}); +export const CreateSecretRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.SecretBinary && { SecretBinary: SENSITIVE_STRING }), + ...(obj.SecretString && { SecretString: SENSITIVE_STRING }), +}); +export const GetRandomPasswordResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.RandomPassword && { RandomPassword: SENSITIVE_STRING }), +}); +export const GetSecretValueResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.SecretBinary && { SecretBinary: SENSITIVE_STRING }), + ...(obj.SecretString && { SecretString: SENSITIVE_STRING }), +}); +export const PutSecretValueRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.SecretBinary && { SecretBinary: SENSITIVE_STRING }), + ...(obj.SecretString && { SecretString: SENSITIVE_STRING }), +}); +export const UpdateSecretRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.SecretBinary && { SecretBinary: SENSITIVE_STRING }), + ...(obj.SecretString && { SecretString: SENSITIVE_STRING }), +}); diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/BatchGetSecretValuePaginator.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/BatchGetSecretValuePaginator.js new file mode 100644 index 0000000..1b4e1f2 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/BatchGetSecretValuePaginator.js @@ -0,0 +1,4 @@ +import { createPaginator } from "@smithy/core"; +import { BatchGetSecretValueCommand, } from "../commands/BatchGetSecretValueCommand"; +import { SecretsManagerClient } from "../SecretsManagerClient"; +export const paginateBatchGetSecretValue = createPaginator(SecretsManagerClient, BatchGetSecretValueCommand, "NextToken", "NextToken", "MaxResults"); diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/Interfaces.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/Interfaces.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/Interfaces.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/ListSecretVersionIdsPaginator.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/ListSecretVersionIdsPaginator.js new file mode 100644 index 0000000..ed0db69 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/ListSecretVersionIdsPaginator.js @@ -0,0 +1,4 @@ +import { createPaginator } from "@smithy/core"; +import { ListSecretVersionIdsCommand, } from "../commands/ListSecretVersionIdsCommand"; +import { SecretsManagerClient } from "../SecretsManagerClient"; +export const paginateListSecretVersionIds = createPaginator(SecretsManagerClient, ListSecretVersionIdsCommand, "NextToken", "NextToken", "MaxResults"); diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/ListSecretsPaginator.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/ListSecretsPaginator.js new file mode 100644 index 0000000..3af6bd3 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/ListSecretsPaginator.js @@ -0,0 +1,4 @@ +import { createPaginator } from "@smithy/core"; +import { ListSecretsCommand } from "../commands/ListSecretsCommand"; +import { SecretsManagerClient } from "../SecretsManagerClient"; +export const paginateListSecrets = createPaginator(SecretsManagerClient, ListSecretsCommand, "NextToken", "NextToken", "MaxResults"); diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/index.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/index.js new file mode 100644 index 0000000..96d7926 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/pagination/index.js @@ -0,0 +1,4 @@ +export * from "./BatchGetSecretValuePaginator"; +export * from "./Interfaces"; +export * from "./ListSecretVersionIdsPaginator"; +export * from "./ListSecretsPaginator"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/protocols/Aws_json1_1.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/protocols/Aws_json1_1.js new file mode 100644 index 0000000..67f381d --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/protocols/Aws_json1_1.js @@ -0,0 +1,833 @@ +import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core"; +import { HttpRequest as __HttpRequest } from "@smithy/protocol-http"; +import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client"; +import { v4 as generateIdempotencyToken } from "uuid"; +import { DecryptionFailure, EncryptionFailure, InternalServiceError, InvalidNextTokenException, InvalidParameterException, InvalidRequestException, LimitExceededException, MalformedPolicyDocumentException, PreconditionNotMetException, PublicPolicyException, ResourceExistsException, ResourceNotFoundException, } from "../models/models_0"; +import { SecretsManagerServiceException as __BaseException } from "../models/SecretsManagerServiceException"; +export const se_BatchGetSecretValueCommand = async (input, context) => { + const headers = sharedHeaders("BatchGetSecretValue"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_CancelRotateSecretCommand = async (input, context) => { + const headers = sharedHeaders("CancelRotateSecret"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_CreateSecretCommand = async (input, context) => { + const headers = sharedHeaders("CreateSecret"); + let body; + body = JSON.stringify(se_CreateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_DeleteResourcePolicyCommand = async (input, context) => { + const headers = sharedHeaders("DeleteResourcePolicy"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_DeleteSecretCommand = async (input, context) => { + const headers = sharedHeaders("DeleteSecret"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_DescribeSecretCommand = async (input, context) => { + const headers = sharedHeaders("DescribeSecret"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_GetRandomPasswordCommand = async (input, context) => { + const headers = sharedHeaders("GetRandomPassword"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_GetResourcePolicyCommand = async (input, context) => { + const headers = sharedHeaders("GetResourcePolicy"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_GetSecretValueCommand = async (input, context) => { + const headers = sharedHeaders("GetSecretValue"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_ListSecretsCommand = async (input, context) => { + const headers = sharedHeaders("ListSecrets"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_ListSecretVersionIdsCommand = async (input, context) => { + const headers = sharedHeaders("ListSecretVersionIds"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_PutResourcePolicyCommand = async (input, context) => { + const headers = sharedHeaders("PutResourcePolicy"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_PutSecretValueCommand = async (input, context) => { + const headers = sharedHeaders("PutSecretValue"); + let body; + body = JSON.stringify(se_PutSecretValueRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_RemoveRegionsFromReplicationCommand = async (input, context) => { + const headers = sharedHeaders("RemoveRegionsFromReplication"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_ReplicateSecretToRegionsCommand = async (input, context) => { + const headers = sharedHeaders("ReplicateSecretToRegions"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_RestoreSecretCommand = async (input, context) => { + const headers = sharedHeaders("RestoreSecret"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_RotateSecretCommand = async (input, context) => { + const headers = sharedHeaders("RotateSecret"); + let body; + body = JSON.stringify(se_RotateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_StopReplicationToReplicaCommand = async (input, context) => { + const headers = sharedHeaders("StopReplicationToReplica"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_TagResourceCommand = async (input, context) => { + const headers = sharedHeaders("TagResource"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_UntagResourceCommand = async (input, context) => { + const headers = sharedHeaders("UntagResource"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_UpdateSecretCommand = async (input, context) => { + const headers = sharedHeaders("UpdateSecret"); + let body; + body = JSON.stringify(se_UpdateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_UpdateSecretVersionStageCommand = async (input, context) => { + const headers = sharedHeaders("UpdateSecretVersionStage"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_ValidateResourcePolicyCommand = async (input, context) => { + const headers = sharedHeaders("ValidateResourcePolicy"); + let body; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const de_BatchGetSecretValueCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_BatchGetSecretValueResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_CancelRotateSecretCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_CreateSecretCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_CreateSecretResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_DeleteResourcePolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_DeleteSecretCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_DeleteSecretResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_DescribeSecretCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_DescribeSecretResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_GetRandomPasswordCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_GetResourcePolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_GetSecretValueCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_GetSecretValueResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_ListSecretsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_ListSecretsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_ListSecretVersionIdsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_ListSecretVersionIdsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_PutResourcePolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_PutSecretValueCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_RemoveRegionsFromReplicationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_RemoveRegionsFromReplicationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_ReplicateSecretToRegionsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_ReplicateSecretToRegionsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_RestoreSecretCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_RotateSecretCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_StopReplicationToReplicaCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_TagResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return response; +}; +export const de_UntagResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response = { + $metadata: deserializeMetadata(output), + }; + return response; +}; +export const de_UpdateSecretCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_UpdateSecretVersionStageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_ValidateResourcePolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = _json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_CommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "DecryptionFailure": + case "com.amazonaws.secretsmanager#DecryptionFailure": + throw await de_DecryptionFailureRes(parsedOutput, context); + case "InternalServiceError": + case "com.amazonaws.secretsmanager#InternalServiceError": + throw await de_InternalServiceErrorRes(parsedOutput, context); + case "InvalidNextTokenException": + case "com.amazonaws.secretsmanager#InvalidNextTokenException": + throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.secretsmanager#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.secretsmanager#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.secretsmanager#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "EncryptionFailure": + case "com.amazonaws.secretsmanager#EncryptionFailure": + throw await de_EncryptionFailureRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.secretsmanager#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "MalformedPolicyDocumentException": + case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PreconditionNotMetException": + case "com.amazonaws.secretsmanager#PreconditionNotMetException": + throw await de_PreconditionNotMetExceptionRes(parsedOutput, context); + case "ResourceExistsException": + case "com.amazonaws.secretsmanager#ResourceExistsException": + throw await de_ResourceExistsExceptionRes(parsedOutput, context); + case "PublicPolicyException": + case "com.amazonaws.secretsmanager#PublicPolicyException": + throw await de_PublicPolicyExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; +const de_DecryptionFailureRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new DecryptionFailure({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_EncryptionFailureRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new EncryptionFailure({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_InternalServiceErrorRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new InternalServiceError({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new InvalidNextTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_InvalidParameterExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new InvalidParameterException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_InvalidRequestExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_LimitExceededExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new LimitExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_PreconditionNotMetExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new PreconditionNotMetException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_PublicPolicyExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new PublicPolicyException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_ResourceExistsExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new ResourceExistsException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = _json(body); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const se_CreateSecretRequest = (input, context) => { + return take(input, { + AddReplicaRegions: _json, + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + Description: [], + ForceOverwriteReplicaSecret: [], + KmsKeyId: [], + Name: [], + SecretBinary: context.base64Encoder, + SecretString: [], + Tags: _json, + }); +}; +const se_PutSecretValueRequest = (input, context) => { + return take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + SecretBinary: context.base64Encoder, + SecretId: [], + SecretString: [], + VersionStages: _json, + }); +}; +const se_RotateSecretRequest = (input, context) => { + return take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + RotateImmediately: [], + RotationLambdaARN: [], + RotationRules: _json, + SecretId: [], + }); +}; +const se_UpdateSecretRequest = (input, context) => { + return take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + Description: [], + KmsKeyId: [], + SecretBinary: context.base64Encoder, + SecretId: [], + SecretString: [], + }); +}; +const de_BatchGetSecretValueResponse = (output, context) => { + return take(output, { + Errors: _json, + NextToken: __expectString, + SecretValues: (_) => de_SecretValuesType(_, context), + }); +}; +const de_CreateSecretResponse = (output, context) => { + return take(output, { + ARN: __expectString, + Name: __expectString, + ReplicationStatus: (_) => de_ReplicationStatusListType(_, context), + VersionId: __expectString, + }); +}; +const de_DeleteSecretResponse = (output, context) => { + return take(output, { + ARN: __expectString, + DeletionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }); +}; +const de_DescribeSecretResponse = (output, context) => { + return take(output, { + ARN: __expectString, + CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + KmsKeyId: __expectString, + LastAccessedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastChangedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastRotatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NextRotationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OwningService: __expectString, + PrimaryRegion: __expectString, + ReplicationStatus: (_) => de_ReplicationStatusListType(_, context), + RotationEnabled: __expectBoolean, + RotationLambdaARN: __expectString, + RotationRules: _json, + Tags: _json, + VersionIdsToStages: _json, + }); +}; +const de_GetSecretValueResponse = (output, context) => { + return take(output, { + ARN: __expectString, + CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + SecretBinary: context.base64Decoder, + SecretString: __expectString, + VersionId: __expectString, + VersionStages: _json, + }); +}; +const de_ListSecretsResponse = (output, context) => { + return take(output, { + NextToken: __expectString, + SecretList: (_) => de_SecretListType(_, context), + }); +}; +const de_ListSecretVersionIdsResponse = (output, context) => { + return take(output, { + ARN: __expectString, + Name: __expectString, + NextToken: __expectString, + Versions: (_) => de_SecretVersionsListType(_, context), + }); +}; +const de_RemoveRegionsFromReplicationResponse = (output, context) => { + return take(output, { + ARN: __expectString, + ReplicationStatus: (_) => de_ReplicationStatusListType(_, context), + }); +}; +const de_ReplicateSecretToRegionsResponse = (output, context) => { + return take(output, { + ARN: __expectString, + ReplicationStatus: (_) => de_ReplicationStatusListType(_, context), + }); +}; +const de_ReplicationStatusListType = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_ReplicationStatusType(entry, context); + }); + return retVal; +}; +const de_ReplicationStatusType = (output, context) => { + return take(output, { + KmsKeyId: __expectString, + LastAccessedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Region: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }); +}; +const de_SecretListEntry = (output, context) => { + return take(output, { + ARN: __expectString, + CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + KmsKeyId: __expectString, + LastAccessedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastChangedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastRotatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NextRotationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OwningService: __expectString, + PrimaryRegion: __expectString, + RotationEnabled: __expectBoolean, + RotationLambdaARN: __expectString, + RotationRules: _json, + SecretVersionsToStages: _json, + Tags: _json, + }); +}; +const de_SecretListType = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_SecretListEntry(entry, context); + }); + return retVal; +}; +const de_SecretValueEntry = (output, context) => { + return take(output, { + ARN: __expectString, + CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + SecretBinary: context.base64Decoder, + SecretString: __expectString, + VersionId: __expectString, + VersionStages: _json, + }); +}; +const de_SecretValuesType = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_SecretValueEntry(entry, context); + }); + return retVal; +}; +const de_SecretVersionsListEntry = (output, context) => { + return take(output, { + CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KmsKeyIds: _json, + LastAccessedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionId: __expectString, + VersionStages: _json, + }); +}; +const de_SecretVersionsListType = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_SecretVersionsListEntry(entry, context); + }); + return retVal; +}; +const deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); +const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); +const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new __HttpRequest(contents); +}; +function sharedHeaders(operation) { + return { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": `secretsmanager.${operation}`, + }; +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.browser.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.browser.js new file mode 100644 index 0000000..bad1f85 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.browser.js @@ -0,0 +1,34 @@ +import packageInfo from "../package.json"; +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; +import { invalidProvider } from "@smithy/invalid-dependency"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser"; +export const getRuntimeConfig = (config) => { + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.js new file mode 100644 index 0000000..5c330d9 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.js @@ -0,0 +1,44 @@ +import packageInfo from "../package.json"; +import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver"; +import { Hash } from "@smithy/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; +import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler"; +import { calculateBodyLength } from "@smithy/util-body-length-node"; +import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node"; +import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client"; +export const getRuntimeConfig = (config) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + awsCheckVersion(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + loadNodeConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.native.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.native.js new file mode 100644 index 0000000..0b54695 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.native.js @@ -0,0 +1,11 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; +export const getRuntimeConfig = (config) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.shared.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.shared.js new file mode 100644 index 0000000..0b2b929 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeConfig.shared.js @@ -0,0 +1,30 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoOpLogger } from "@smithy/smithy-client"; +import { parseUrl } from "@smithy/url-parser"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; +import { defaultSecretsManagerHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider"; +import { defaultEndpointResolver } from "./endpoint/endpointResolver"; +export const getRuntimeConfig = (config) => { + return { + apiVersion: "2017-10-17", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSecretsManagerHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer(), + }, + ], + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "Secrets Manager", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeExtensions.js b/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeExtensions.js new file mode 100644 index 0000000..1502ff7 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-es/runtimeExtensions.js @@ -0,0 +1,21 @@ +import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver"; +import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http"; +import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client"; +import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration"; +const asPartial = (t) => t; +export const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), + ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)), + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), + ...resolveDefaultRuntimeConfig(extensionConfiguration), + ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration), + }; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/SecretsManager.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/SecretsManager.d.ts new file mode 100644 index 0000000..da4b229 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/SecretsManager.d.ts @@ -0,0 +1,199 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; +import { BatchGetSecretValueCommandInput, BatchGetSecretValueCommandOutput } from "./commands/BatchGetSecretValueCommand"; +import { CancelRotateSecretCommandInput, CancelRotateSecretCommandOutput } from "./commands/CancelRotateSecretCommand"; +import { CreateSecretCommandInput, CreateSecretCommandOutput } from "./commands/CreateSecretCommand"; +import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "./commands/DeleteResourcePolicyCommand"; +import { DeleteSecretCommandInput, DeleteSecretCommandOutput } from "./commands/DeleteSecretCommand"; +import { DescribeSecretCommandInput, DescribeSecretCommandOutput } from "./commands/DescribeSecretCommand"; +import { GetRandomPasswordCommandInput, GetRandomPasswordCommandOutput } from "./commands/GetRandomPasswordCommand"; +import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "./commands/GetResourcePolicyCommand"; +import { GetSecretValueCommandInput, GetSecretValueCommandOutput } from "./commands/GetSecretValueCommand"; +import { ListSecretsCommandInput, ListSecretsCommandOutput } from "./commands/ListSecretsCommand"; +import { ListSecretVersionIdsCommandInput, ListSecretVersionIdsCommandOutput } from "./commands/ListSecretVersionIdsCommand"; +import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand"; +import { PutSecretValueCommandInput, PutSecretValueCommandOutput } from "./commands/PutSecretValueCommand"; +import { RemoveRegionsFromReplicationCommandInput, RemoveRegionsFromReplicationCommandOutput } from "./commands/RemoveRegionsFromReplicationCommand"; +import { ReplicateSecretToRegionsCommandInput, ReplicateSecretToRegionsCommandOutput } from "./commands/ReplicateSecretToRegionsCommand"; +import { RestoreSecretCommandInput, RestoreSecretCommandOutput } from "./commands/RestoreSecretCommand"; +import { RotateSecretCommandInput, RotateSecretCommandOutput } from "./commands/RotateSecretCommand"; +import { StopReplicationToReplicaCommandInput, StopReplicationToReplicaCommandOutput } from "./commands/StopReplicationToReplicaCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { UpdateSecretCommandInput, UpdateSecretCommandOutput } from "./commands/UpdateSecretCommand"; +import { UpdateSecretVersionStageCommandInput, UpdateSecretVersionStageCommandOutput } from "./commands/UpdateSecretVersionStageCommand"; +import { ValidateResourcePolicyCommandInput, ValidateResourcePolicyCommandOutput } from "./commands/ValidateResourcePolicyCommand"; +import { SecretsManagerClient } from "./SecretsManagerClient"; +export interface SecretsManager { + /** + * @see {@link BatchGetSecretValueCommand} + */ + batchGetSecretValue(): Promise; + batchGetSecretValue(args: BatchGetSecretValueCommandInput, options?: __HttpHandlerOptions): Promise; + batchGetSecretValue(args: BatchGetSecretValueCommandInput, cb: (err: any, data?: BatchGetSecretValueCommandOutput) => void): void; + batchGetSecretValue(args: BatchGetSecretValueCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetSecretValueCommandOutput) => void): void; + /** + * @see {@link CancelRotateSecretCommand} + */ + cancelRotateSecret(args: CancelRotateSecretCommandInput, options?: __HttpHandlerOptions): Promise; + cancelRotateSecret(args: CancelRotateSecretCommandInput, cb: (err: any, data?: CancelRotateSecretCommandOutput) => void): void; + cancelRotateSecret(args: CancelRotateSecretCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelRotateSecretCommandOutput) => void): void; + /** + * @see {@link CreateSecretCommand} + */ + createSecret(args: CreateSecretCommandInput, options?: __HttpHandlerOptions): Promise; + createSecret(args: CreateSecretCommandInput, cb: (err: any, data?: CreateSecretCommandOutput) => void): void; + createSecret(args: CreateSecretCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateSecretCommandOutput) => void): void; + /** + * @see {@link DeleteResourcePolicyCommand} + */ + deleteResourcePolicy(args: DeleteResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise; + deleteResourcePolicy(args: DeleteResourcePolicyCommandInput, cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void): void; + deleteResourcePolicy(args: DeleteResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void): void; + /** + * @see {@link DeleteSecretCommand} + */ + deleteSecret(args: DeleteSecretCommandInput, options?: __HttpHandlerOptions): Promise; + deleteSecret(args: DeleteSecretCommandInput, cb: (err: any, data?: DeleteSecretCommandOutput) => void): void; + deleteSecret(args: DeleteSecretCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteSecretCommandOutput) => void): void; + /** + * @see {@link DescribeSecretCommand} + */ + describeSecret(args: DescribeSecretCommandInput, options?: __HttpHandlerOptions): Promise; + describeSecret(args: DescribeSecretCommandInput, cb: (err: any, data?: DescribeSecretCommandOutput) => void): void; + describeSecret(args: DescribeSecretCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeSecretCommandOutput) => void): void; + /** + * @see {@link GetRandomPasswordCommand} + */ + getRandomPassword(): Promise; + getRandomPassword(args: GetRandomPasswordCommandInput, options?: __HttpHandlerOptions): Promise; + getRandomPassword(args: GetRandomPasswordCommandInput, cb: (err: any, data?: GetRandomPasswordCommandOutput) => void): void; + getRandomPassword(args: GetRandomPasswordCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRandomPasswordCommandOutput) => void): void; + /** + * @see {@link GetResourcePolicyCommand} + */ + getResourcePolicy(args: GetResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise; + getResourcePolicy(args: GetResourcePolicyCommandInput, cb: (err: any, data?: GetResourcePolicyCommandOutput) => void): void; + getResourcePolicy(args: GetResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetResourcePolicyCommandOutput) => void): void; + /** + * @see {@link GetSecretValueCommand} + */ + getSecretValue(args: GetSecretValueCommandInput, options?: __HttpHandlerOptions): Promise; + getSecretValue(args: GetSecretValueCommandInput, cb: (err: any, data?: GetSecretValueCommandOutput) => void): void; + getSecretValue(args: GetSecretValueCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSecretValueCommandOutput) => void): void; + /** + * @see {@link ListSecretsCommand} + */ + listSecrets(): Promise; + listSecrets(args: ListSecretsCommandInput, options?: __HttpHandlerOptions): Promise; + listSecrets(args: ListSecretsCommandInput, cb: (err: any, data?: ListSecretsCommandOutput) => void): void; + listSecrets(args: ListSecretsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListSecretsCommandOutput) => void): void; + /** + * @see {@link ListSecretVersionIdsCommand} + */ + listSecretVersionIds(args: ListSecretVersionIdsCommandInput, options?: __HttpHandlerOptions): Promise; + listSecretVersionIds(args: ListSecretVersionIdsCommandInput, cb: (err: any, data?: ListSecretVersionIdsCommandOutput) => void): void; + listSecretVersionIds(args: ListSecretVersionIdsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListSecretVersionIdsCommandOutput) => void): void; + /** + * @see {@link PutResourcePolicyCommand} + */ + putResourcePolicy(args: PutResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise; + putResourcePolicy(args: PutResourcePolicyCommandInput, cb: (err: any, data?: PutResourcePolicyCommandOutput) => void): void; + putResourcePolicy(args: PutResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutResourcePolicyCommandOutput) => void): void; + /** + * @see {@link PutSecretValueCommand} + */ + putSecretValue(args: PutSecretValueCommandInput, options?: __HttpHandlerOptions): Promise; + putSecretValue(args: PutSecretValueCommandInput, cb: (err: any, data?: PutSecretValueCommandOutput) => void): void; + putSecretValue(args: PutSecretValueCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutSecretValueCommandOutput) => void): void; + /** + * @see {@link RemoveRegionsFromReplicationCommand} + */ + removeRegionsFromReplication(args: RemoveRegionsFromReplicationCommandInput, options?: __HttpHandlerOptions): Promise; + removeRegionsFromReplication(args: RemoveRegionsFromReplicationCommandInput, cb: (err: any, data?: RemoveRegionsFromReplicationCommandOutput) => void): void; + removeRegionsFromReplication(args: RemoveRegionsFromReplicationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RemoveRegionsFromReplicationCommandOutput) => void): void; + /** + * @see {@link ReplicateSecretToRegionsCommand} + */ + replicateSecretToRegions(args: ReplicateSecretToRegionsCommandInput, options?: __HttpHandlerOptions): Promise; + replicateSecretToRegions(args: ReplicateSecretToRegionsCommandInput, cb: (err: any, data?: ReplicateSecretToRegionsCommandOutput) => void): void; + replicateSecretToRegions(args: ReplicateSecretToRegionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ReplicateSecretToRegionsCommandOutput) => void): void; + /** + * @see {@link RestoreSecretCommand} + */ + restoreSecret(args: RestoreSecretCommandInput, options?: __HttpHandlerOptions): Promise; + restoreSecret(args: RestoreSecretCommandInput, cb: (err: any, data?: RestoreSecretCommandOutput) => void): void; + restoreSecret(args: RestoreSecretCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RestoreSecretCommandOutput) => void): void; + /** + * @see {@link RotateSecretCommand} + */ + rotateSecret(args: RotateSecretCommandInput, options?: __HttpHandlerOptions): Promise; + rotateSecret(args: RotateSecretCommandInput, cb: (err: any, data?: RotateSecretCommandOutput) => void): void; + rotateSecret(args: RotateSecretCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RotateSecretCommandOutput) => void): void; + /** + * @see {@link StopReplicationToReplicaCommand} + */ + stopReplicationToReplica(args: StopReplicationToReplicaCommandInput, options?: __HttpHandlerOptions): Promise; + stopReplicationToReplica(args: StopReplicationToReplicaCommandInput, cb: (err: any, data?: StopReplicationToReplicaCommandOutput) => void): void; + stopReplicationToReplica(args: StopReplicationToReplicaCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StopReplicationToReplicaCommandOutput) => void): void; + /** + * @see {@link TagResourceCommand} + */ + tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + /** + * @see {@link UntagResourceCommand} + */ + untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void; + untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void; + /** + * @see {@link UpdateSecretCommand} + */ + updateSecret(args: UpdateSecretCommandInput, options?: __HttpHandlerOptions): Promise; + updateSecret(args: UpdateSecretCommandInput, cb: (err: any, data?: UpdateSecretCommandOutput) => void): void; + updateSecret(args: UpdateSecretCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateSecretCommandOutput) => void): void; + /** + * @see {@link UpdateSecretVersionStageCommand} + */ + updateSecretVersionStage(args: UpdateSecretVersionStageCommandInput, options?: __HttpHandlerOptions): Promise; + updateSecretVersionStage(args: UpdateSecretVersionStageCommandInput, cb: (err: any, data?: UpdateSecretVersionStageCommandOutput) => void): void; + updateSecretVersionStage(args: UpdateSecretVersionStageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateSecretVersionStageCommandOutput) => void): void; + /** + * @see {@link ValidateResourcePolicyCommand} + */ + validateResourcePolicy(args: ValidateResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise; + validateResourcePolicy(args: ValidateResourcePolicyCommandInput, cb: (err: any, data?: ValidateResourcePolicyCommandOutput) => void): void; + validateResourcePolicy(args: ValidateResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ValidateResourcePolicyCommandOutput) => void): void; +} +/** + * Amazon Web Services Secrets Manager + *

Amazon Web Services Secrets Manager provides a service to enable you to store, manage, and retrieve, secrets.

+ *

This guide provides descriptions of the Secrets Manager API. For more information about using this + * service, see the Amazon Web Services Secrets Manager User Guide.

+ *

+ * API Version + *

+ *

This version of the Secrets Manager API Reference documents the Secrets Manager API version 2017-10-17.

+ *

For a list of endpoints, see Amazon Web Services Secrets Manager + * endpoints.

+ *

+ * Support and Feedback for Amazon Web Services Secrets Manager + *

+ *

We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com, or post your feedback and questions in the Amazon Web Services Secrets Manager Discussion Forum. For more + * information about the Amazon Web Services Discussion Forums, see Forums + * Help.

+ *

+ * Logging API Requests + *

+ *

Amazon Web Services Secrets Manager supports Amazon Web Services CloudTrail, a service that records Amazon Web Services API calls for your Amazon Web Services + * account and delivers log files to an Amazon S3 bucket. By using information that's collected + * by Amazon Web Services CloudTrail, you can determine the requests successfully made to Secrets Manager, who made the + * request, when it was made, and so on. For more about Amazon Web Services Secrets Manager and support for Amazon Web Services + * CloudTrail, see Logging + * Amazon Web Services Secrets Manager Events with Amazon Web Services CloudTrail in the Amazon Web Services Secrets Manager User Guide. + * To learn more about CloudTrail, including enabling it and find your log files, see the Amazon Web Services CloudTrail User Guide.

+ * @public + */ +export declare class SecretsManager extends SecretsManagerClient implements SecretsManager { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/SecretsManagerClient.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/SecretsManagerClient.d.ts new file mode 100644 index 0000000..815082f --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/SecretsManagerClient.d.ts @@ -0,0 +1,219 @@ +import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header"; +import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent"; +import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver"; +import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint"; +import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client"; +import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types"; +import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider"; +import { BatchGetSecretValueCommandInput, BatchGetSecretValueCommandOutput } from "./commands/BatchGetSecretValueCommand"; +import { CancelRotateSecretCommandInput, CancelRotateSecretCommandOutput } from "./commands/CancelRotateSecretCommand"; +import { CreateSecretCommandInput, CreateSecretCommandOutput } from "./commands/CreateSecretCommand"; +import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "./commands/DeleteResourcePolicyCommand"; +import { DeleteSecretCommandInput, DeleteSecretCommandOutput } from "./commands/DeleteSecretCommand"; +import { DescribeSecretCommandInput, DescribeSecretCommandOutput } from "./commands/DescribeSecretCommand"; +import { GetRandomPasswordCommandInput, GetRandomPasswordCommandOutput } from "./commands/GetRandomPasswordCommand"; +import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "./commands/GetResourcePolicyCommand"; +import { GetSecretValueCommandInput, GetSecretValueCommandOutput } from "./commands/GetSecretValueCommand"; +import { ListSecretsCommandInput, ListSecretsCommandOutput } from "./commands/ListSecretsCommand"; +import { ListSecretVersionIdsCommandInput, ListSecretVersionIdsCommandOutput } from "./commands/ListSecretVersionIdsCommand"; +import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand"; +import { PutSecretValueCommandInput, PutSecretValueCommandOutput } from "./commands/PutSecretValueCommand"; +import { RemoveRegionsFromReplicationCommandInput, RemoveRegionsFromReplicationCommandOutput } from "./commands/RemoveRegionsFromReplicationCommand"; +import { ReplicateSecretToRegionsCommandInput, ReplicateSecretToRegionsCommandOutput } from "./commands/ReplicateSecretToRegionsCommand"; +import { RestoreSecretCommandInput, RestoreSecretCommandOutput } from "./commands/RestoreSecretCommand"; +import { RotateSecretCommandInput, RotateSecretCommandOutput } from "./commands/RotateSecretCommand"; +import { StopReplicationToReplicaCommandInput, StopReplicationToReplicaCommandOutput } from "./commands/StopReplicationToReplicaCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { UpdateSecretCommandInput, UpdateSecretCommandOutput } from "./commands/UpdateSecretCommand"; +import { UpdateSecretVersionStageCommandInput, UpdateSecretVersionStageCommandOutput } from "./commands/UpdateSecretVersionStageCommand"; +import { ValidateResourcePolicyCommandInput, ValidateResourcePolicyCommandOutput } from "./commands/ValidateResourcePolicyCommand"; +import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters"; +import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; +export { __Client }; +/** + * @public + */ +export type ServiceInputTypes = BatchGetSecretValueCommandInput | CancelRotateSecretCommandInput | CreateSecretCommandInput | DeleteResourcePolicyCommandInput | DeleteSecretCommandInput | DescribeSecretCommandInput | GetRandomPasswordCommandInput | GetResourcePolicyCommandInput | GetSecretValueCommandInput | ListSecretVersionIdsCommandInput | ListSecretsCommandInput | PutResourcePolicyCommandInput | PutSecretValueCommandInput | RemoveRegionsFromReplicationCommandInput | ReplicateSecretToRegionsCommandInput | RestoreSecretCommandInput | RotateSecretCommandInput | StopReplicationToReplicaCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateSecretCommandInput | UpdateSecretVersionStageCommandInput | ValidateResourcePolicyCommandInput; +/** + * @public + */ +export type ServiceOutputTypes = BatchGetSecretValueCommandOutput | CancelRotateSecretCommandOutput | CreateSecretCommandOutput | DeleteResourcePolicyCommandOutput | DeleteSecretCommandOutput | DescribeSecretCommandOutput | GetRandomPasswordCommandOutput | GetResourcePolicyCommandOutput | GetSecretValueCommandOutput | ListSecretVersionIdsCommandOutput | ListSecretsCommandOutput | PutResourcePolicyCommandOutput | PutSecretValueCommandOutput | RemoveRegionsFromReplicationCommandOutput | ReplicateSecretToRegionsCommandOutput | RestoreSecretCommandOutput | RotateSecretCommandOutput | StopReplicationToReplicaCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateSecretCommandOutput | UpdateSecretVersionStageCommandOutput | ValidateResourcePolicyCommandOutput; +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandlerUserInput; + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + /** + * The runtime environment. + * @internal + */ + runtime?: string; + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + /** + * Default credentials provider; Not available in browser runtime. + * @deprecated + * @internal + */ + credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider; + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + /** + * Specifies which retry algorithm to use. + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ + * + */ + retryMode?: string | __Provider; + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + /** + * Optional extensions + */ + extensions?: RuntimeExtension[]; + /** + * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. + */ + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} +/** + * @public + */ +export type SecretsManagerClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig & RetryInputConfig & HostHeaderInputConfig & UserAgentInputConfig & HttpAuthSchemeInputConfig & ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of SecretsManagerClient class constructor that set the region, credentials and other options. + */ +export interface SecretsManagerClientConfig extends SecretsManagerClientConfigType { +} +/** + * @public + */ +export type SecretsManagerClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & UserAgentResolvedConfig & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of SecretsManagerClient class. This is resolved and normalized from the {@link SecretsManagerClientConfig | constructor configuration interface}. + */ +export interface SecretsManagerClientResolvedConfig extends SecretsManagerClientResolvedConfigType { +} +/** + * Amazon Web Services Secrets Manager + *

Amazon Web Services Secrets Manager provides a service to enable you to store, manage, and retrieve, secrets.

+ *

This guide provides descriptions of the Secrets Manager API. For more information about using this + * service, see the Amazon Web Services Secrets Manager User Guide.

+ *

+ * API Version + *

+ *

This version of the Secrets Manager API Reference documents the Secrets Manager API version 2017-10-17.

+ *

For a list of endpoints, see Amazon Web Services Secrets Manager + * endpoints.

+ *

+ * Support and Feedback for Amazon Web Services Secrets Manager + *

+ *

We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com, or post your feedback and questions in the Amazon Web Services Secrets Manager Discussion Forum. For more + * information about the Amazon Web Services Discussion Forums, see Forums + * Help.

+ *

+ * Logging API Requests + *

+ *

Amazon Web Services Secrets Manager supports Amazon Web Services CloudTrail, a service that records Amazon Web Services API calls for your Amazon Web Services + * account and delivers log files to an Amazon S3 bucket. By using information that's collected + * by Amazon Web Services CloudTrail, you can determine the requests successfully made to Secrets Manager, who made the + * request, when it was made, and so on. For more about Amazon Web Services Secrets Manager and support for Amazon Web Services + * CloudTrail, see Logging + * Amazon Web Services Secrets Manager Events with Amazon Web Services CloudTrail in the Amazon Web Services Secrets Manager User Guide. + * To learn more about CloudTrail, including enabling it and find your log files, see the Amazon Web Services CloudTrail User Guide.

+ * @public + */ +export declare class SecretsManagerClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SecretsManagerClientResolvedConfig> { + /** + * The resolved configuration of SecretsManagerClient class. This is resolved and normalized from the {@link SecretsManagerClientConfig | constructor configuration interface}. + */ + readonly config: SecretsManagerClientResolvedConfig; + constructor(...[configuration]: __CheckOptionalClientConfig); + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void; + private getDefaultHttpAuthSchemeParametersProvider; + private getIdentityProviderConfigProvider; +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/auth/httpAuthExtensionConfiguration.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/auth/httpAuthExtensionConfiguration.d.ts new file mode 100644 index 0000000..6aea14e --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/auth/httpAuthExtensionConfiguration.d.ts @@ -0,0 +1,29 @@ +import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types"; +import { SecretsManagerHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; +/** + * @internal + */ +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider(httpAuthSchemeProvider: SecretsManagerHttpAuthSchemeProvider): void; + httpAuthSchemeProvider(): SecretsManagerHttpAuthSchemeProvider; + setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void; + credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined; +} +/** + * @internal + */ +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: SecretsManagerHttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; +/** + * @internal + */ +export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration; +/** + * @internal + */ +export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/auth/httpAuthSchemeProvider.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/auth/httpAuthSchemeProvider.d.ts new file mode 100644 index 0000000..84a6097 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/auth/httpAuthSchemeProvider.d.ts @@ -0,0 +1,61 @@ +import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core"; +import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types"; +import { SecretsManagerClientResolvedConfig } from "../SecretsManagerClient"; +/** + * @internal + */ +export interface SecretsManagerHttpAuthSchemeParameters extends HttpAuthSchemeParameters { + region?: string; +} +/** + * @internal + */ +export interface SecretsManagerHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider { +} +/** + * @internal + */ +export declare const defaultSecretsManagerHttpAuthSchemeParametersProvider: (config: SecretsManagerClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise; +/** + * @internal + */ +export interface SecretsManagerHttpAuthSchemeProvider extends HttpAuthSchemeProvider { +} +/** + * @internal + */ +export declare const defaultSecretsManagerHttpAuthSchemeProvider: SecretsManagerHttpAuthSchemeProvider; +/** + * @internal + */ +export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig { + /** + * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + httpAuthSchemes?: HttpAuthScheme[]; + /** + * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + httpAuthSchemeProvider?: SecretsManagerHttpAuthSchemeProvider; +} +/** + * @internal + */ +export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig { + /** + * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + readonly httpAuthSchemes: HttpAuthScheme[]; + /** + * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + readonly httpAuthSchemeProvider: SecretsManagerHttpAuthSchemeProvider; +} +/** + * @internal + */ +export declare const resolveHttpAuthSchemeConfig: (config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/BatchGetSecretValueCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/BatchGetSecretValueCommand.d.ts new file mode 100644 index 0000000..e1e73d8 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/BatchGetSecretValueCommand.d.ts @@ -0,0 +1,185 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { BatchGetSecretValueRequest, BatchGetSecretValueResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link BatchGetSecretValueCommand}. + */ +export interface BatchGetSecretValueCommandInput extends BatchGetSecretValueRequest { +} +/** + * @public + * + * The output of {@link BatchGetSecretValueCommand}. + */ +export interface BatchGetSecretValueCommandOutput extends BatchGetSecretValueResponse, __MetadataBearer { +} +declare const BatchGetSecretValueCommand_base: { + new (input: BatchGetSecretValueCommandInput): import("@smithy/smithy-client").CommandImpl; + new (...[input]: [] | [BatchGetSecretValueCommandInput]): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Retrieves the contents of the encrypted fields SecretString or SecretBinary for up to 20 secrets. To retrieve a single secret, call GetSecretValue.

+ *

To choose which secrets to retrieve, you can specify a list of secrets by name or ARN, or you can use filters. If Secrets Manager encounters errors such as AccessDeniedException while attempting to retrieve any of the secrets, you can see the errors in Errors in the response.

+ *

Secrets Manager generates CloudTrail GetSecretValue log entries for each secret you request when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:BatchGetSecretValue, and you must have secretsmanager:GetSecretValue for each secret. If you use filters, you must also have secretsmanager:ListSecrets. If the secrets are encrypted using customer-managed keys instead of the Amazon Web Services managed key + * aws/secretsmanager, then you also need kms:Decrypt permissions for the keys. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, BatchGetSecretValueCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, BatchGetSecretValueCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // BatchGetSecretValueRequest + * SecretIdList: [ // SecretIdListType + * "STRING_VALUE", + * ], + * Filters: [ // FiltersListType + * { // Filter + * Key: "description" || "name" || "tag-key" || "tag-value" || "primary-region" || "owning-service" || "all", + * Values: [ // FilterValuesStringList + * "STRING_VALUE", + * ], + * }, + * ], + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new BatchGetSecretValueCommand(input); + * const response = await client.send(command); + * // { // BatchGetSecretValueResponse + * // SecretValues: [ // SecretValuesType + * // { // SecretValueEntry + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // VersionId: "STRING_VALUE", + * // SecretBinary: new Uint8Array(), + * // SecretString: "STRING_VALUE", + * // VersionStages: [ // SecretVersionStagesType + * // "STRING_VALUE", + * // ], + * // CreatedDate: new Date("TIMESTAMP"), + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // Errors: [ // APIErrorListType + * // { // APIErrorType + * // SecretId: "STRING_VALUE", + * // ErrorCode: "STRING_VALUE", + * // Message: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param BatchGetSecretValueCommandInput - {@link BatchGetSecretValueCommandInput} + * @returns {@link BatchGetSecretValueCommandOutput} + * @see {@link BatchGetSecretValueCommandInput} for command's `input` shape. + * @see {@link BatchGetSecretValueCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link DecryptionFailure} (client fault) + *

Secrets Manager can't decrypt the protected secret text using the provided KMS key.

+ * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidNextTokenException} (client fault) + *

The NextToken value is invalid.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To retrieve the secret values for a group of secrets listed by name + * ```javascript + * // The following example gets the values for three secrets. + * const input = { + * "SecretIdList": [ + * "MySecret1", + * "MySecret2", + * "MySecret3" + * ] + * }; + * const command = new BatchGetSecretValueCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "Errors": [], + * "SecretValues": [ + * { + * "ARN": "®ion-arn;&asm-service-name;:us-west-2:&ExampleAccountId;:secret:MySecret1-a1b2c3", + * "CreatedDate": 1700591229.801, + * "Name": "MySecret1", + * "SecretString": "{\"username\":\"diego_ramirez\",\"password\":\"EXAMPLE-PASSWORD\",\"engine\":\"mysql\",\"host\":\"secretsmanagertutorial.cluster.us-west-2.rds.amazonaws.com\",\"port\":3306,\"dbClusterIdentifier\":\"secretsmanagertutorial\"}", + * "VersionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLEaaaaa", + * "VersionStages": [ + * "AWSCURRENT" + * ] + * }, + * { + * "ARN": "®ion-arn;&asm-service-name;:us-west-2:&ExampleAccountId;:secret:MySecret2-a1b2c3", + * "CreatedDate": 1699911394.105, + * "Name": "MySecret2", + * "SecretString": "{\"username\":\"akua_mansa\",\"password\":\"EXAMPLE-PASSWORD\"", + * "VersionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", + * "VersionStages": [ + * "AWSCURRENT" + * ] + * }, + * { + * "ARN": "®ion-arn;&asm-service-name;:us-west-2:&ExampleAccountId;:secret:MySecret3-a1b2c3", + * "CreatedDate": 1699911394.105, + * "Name": "MySecret3", + * "SecretString": "{\"username\":\"jie_liu\",\"password\":\"EXAMPLE-PASSWORD\"", + * "VersionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLEccccc", + * "VersionStages": [ + * "AWSCURRENT" + * ] + * } + * ] + * } + * *\/ + * // example id: to-retrieve-the-secret-values-for-a-group-of-secrets-listed-by-name-1704846593341 + * ``` + * + */ +export declare class BatchGetSecretValueCommand extends BatchGetSecretValueCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/CancelRotateSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/CancelRotateSecretCommand.d.ts new file mode 100644 index 0000000..4b02fa8 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/CancelRotateSecretCommand.d.ts @@ -0,0 +1,123 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { CancelRotateSecretRequest, CancelRotateSecretResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CancelRotateSecretCommand}. + */ +export interface CancelRotateSecretCommandInput extends CancelRotateSecretRequest { +} +/** + * @public + * + * The output of {@link CancelRotateSecretCommand}. + */ +export interface CancelRotateSecretCommandOutput extends CancelRotateSecretResponse, __MetadataBearer { +} +declare const CancelRotateSecretCommand_base: { + new (input: CancelRotateSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: CancelRotateSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Turns off automatic rotation, and if a rotation is currently in + * progress, cancels the rotation.

+ *

If you cancel a rotation in progress, it can leave the VersionStage + * labels in an unexpected state. You might + * need to remove the staging label AWSPENDING from the partially created version. + * You also need to determine whether to roll back to the previous version of the secret + * by moving the staging label AWSCURRENT to the version that has AWSPENDING. + * To determine + * which version has a specific staging label, call ListSecretVersionIds. Then use + * UpdateSecretVersionStage to change staging labels. + * For more information, see How rotation works.

+ *

To turn on automatic rotation again, call RotateSecret.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:CancelRotateSecret. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, CancelRotateSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, CancelRotateSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // CancelRotateSecretRequest + * SecretId: "STRING_VALUE", // required + * }; + * const command = new CancelRotateSecretCommand(input); + * const response = await client.send(command); + * // { // CancelRotateSecretResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // VersionId: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CancelRotateSecretCommandInput - {@link CancelRotateSecretCommandInput} + * @returns {@link CancelRotateSecretCommandOutput} + * @see {@link CancelRotateSecretCommandInput} for command's `input` shape. + * @see {@link CancelRotateSecretCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To cancel scheduled rotation for a secret + * ```javascript + * // The following example shows how to cancel rotation for a secret. The operation sets the RotationEnabled field to false and cancels all scheduled rotations. To resume scheduled rotations, you must re-enable rotation by calling the rotate-secret operation. + * const input = { + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new CancelRotateSecretCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "Name" + * } + * *\/ + * // example id: to-cancel-scheduled-rotation-for-a-secret-1523996016032 + * ``` + * + */ +export declare class CancelRotateSecretCommand extends CancelRotateSecretCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/CreateSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/CreateSecretCommand.d.ts new file mode 100644 index 0000000..3ba8c12 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/CreateSecretCommand.d.ts @@ -0,0 +1,191 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { CreateSecretRequest, CreateSecretResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateSecretCommand}. + */ +export interface CreateSecretCommandInput extends CreateSecretRequest { +} +/** + * @public + * + * The output of {@link CreateSecretCommand}. + */ +export interface CreateSecretCommandOutput extends CreateSecretResponse, __MetadataBearer { +} +declare const CreateSecretCommand_base: { + new (input: CreateSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: CreateSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Creates a new secret. A secret can be a password, a set of + * credentials such as a user name and password, an OAuth token, or other secret information + * that you store in an encrypted form in Secrets Manager. The secret also + * includes the connection information to access a database or other service, which Secrets Manager + * doesn't encrypt. A secret in Secrets Manager consists of both the protected secret data and the + * important information needed to manage the secret.

+ *

For secrets that use managed rotation, you need to create the secret through the managing service. For more information, see Secrets Manager secrets managed by other Amazon Web Services services. + * + *

+ *

For information about creating a secret in the console, see Create a secret.

+ *

To create a secret, you can provide the secret value to be encrypted in either the + * SecretString parameter or the SecretBinary parameter, but not both. + * If you include SecretString or SecretBinary + * then Secrets Manager creates an initial secret version and automatically attaches the staging + * label AWSCURRENT to it.

+ *

For database credentials you want to rotate, for Secrets Manager to be able to rotate the secret, + * you must make sure the JSON you store in the SecretString matches the JSON structure of + * a database secret.

+ *

If you don't specify an KMS encryption key, Secrets Manager uses the Amazon Web Services managed key + * aws/secretsmanager. If this key + * doesn't already exist in your account, then Secrets Manager creates it for you automatically. All + * users and roles in the Amazon Web Services account automatically have access to use aws/secretsmanager. + * Creating aws/secretsmanager can result in a one-time significant delay in returning the + * result.

+ *

If the secret is in a different Amazon Web Services account from the credentials calling the API, then + * you can't use aws/secretsmanager to encrypt the secret, and you must create + * and use a customer managed KMS key.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters except SecretBinary or SecretString because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:CreateSecret. If you + * include tags in the secret, you also need secretsmanager:TagResource. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ *

To encrypt the secret with a KMS key other than aws/secretsmanager, you need kms:GenerateDataKey and kms:Decrypt permission to the key.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, CreateSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, CreateSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // CreateSecretRequest + * Name: "STRING_VALUE", // required + * ClientRequestToken: "STRING_VALUE", + * Description: "STRING_VALUE", + * KmsKeyId: "STRING_VALUE", + * SecretBinary: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") + * SecretString: "STRING_VALUE", + * Tags: [ // TagListType + * { // Tag + * Key: "STRING_VALUE", + * Value: "STRING_VALUE", + * }, + * ], + * AddReplicaRegions: [ // AddReplicaRegionListType + * { // ReplicaRegionType + * Region: "STRING_VALUE", + * KmsKeyId: "STRING_VALUE", + * }, + * ], + * ForceOverwriteReplicaSecret: true || false, + * }; + * const command = new CreateSecretCommand(input); + * const response = await client.send(command); + * // { // CreateSecretResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // VersionId: "STRING_VALUE", + * // ReplicationStatus: [ // ReplicationStatusListType + * // { // ReplicationStatusType + * // Region: "STRING_VALUE", + * // KmsKeyId: "STRING_VALUE", + * // Status: "InSync" || "Failed" || "InProgress", + * // StatusMessage: "STRING_VALUE", + * // LastAccessedDate: new Date("TIMESTAMP"), + * // }, + * // ], + * // }; + * + * ``` + * + * @param CreateSecretCommandInput - {@link CreateSecretCommandInput} + * @returns {@link CreateSecretCommandOutput} + * @see {@link CreateSecretCommandInput} for command's `input` shape. + * @see {@link CreateSecretCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link DecryptionFailure} (client fault) + *

Secrets Manager can't decrypt the protected secret text using the provided KMS key.

+ * + * @throws {@link EncryptionFailure} (client fault) + *

Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the + * KMS key is available, enabled, and not in an invalid state. For more + * information, see Key state: Effect on your KMS key.

+ * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link LimitExceededException} (client fault) + *

The request failed because it would exceed one of the Secrets Manager quotas.

+ * + * @throws {@link MalformedPolicyDocumentException} (client fault) + *

The resource policy has syntax errors.

+ * + * @throws {@link PreconditionNotMetException} (client fault) + *

The request failed because you did not complete all the prerequisite steps.

+ * + * @throws {@link ResourceExistsException} (client fault) + *

A resource with the ID you requested already exists.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To create a basic secret + * ```javascript + * // The following example shows how to create a secret. The credentials stored in the encrypted secret value are retrieved from a file on disk named mycreds.json. + * const input = { + * "ClientRequestToken": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1", + * "Description": "My test database secret created with the CLI", + * "Name": "MyTestDatabaseSecret", + * "SecretString": "{\"username\":\"david\",\"password\":\"EXAMPLE-PASSWORD\"}" + * }; + * const command = new CreateSecretCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret", + * "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1" + * } + * *\/ + * // example id: to-create-a-basic-secret-1523996473658 + * ``` + * + */ +export declare class CreateSecretCommand extends CreateSecretCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/DeleteResourcePolicyCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/DeleteResourcePolicyCommand.d.ts new file mode 100644 index 0000000..e5926f2 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/DeleteResourcePolicyCommand.d.ts @@ -0,0 +1,112 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { DeleteResourcePolicyRequest, DeleteResourcePolicyResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteResourcePolicyCommand}. + */ +export interface DeleteResourcePolicyCommandInput extends DeleteResourcePolicyRequest { +} +/** + * @public + * + * The output of {@link DeleteResourcePolicyCommand}. + */ +export interface DeleteResourcePolicyCommandOutput extends DeleteResourcePolicyResponse, __MetadataBearer { +} +declare const DeleteResourcePolicyCommand_base: { + new (input: DeleteResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: DeleteResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Deletes the resource-based permission policy attached to the secret. To attach a policy to + * a secret, use PutResourcePolicy.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:DeleteResourcePolicy. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, DeleteResourcePolicyCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, DeleteResourcePolicyCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // DeleteResourcePolicyRequest + * SecretId: "STRING_VALUE", // required + * }; + * const command = new DeleteResourcePolicyCommand(input); + * const response = await client.send(command); + * // { // DeleteResourcePolicyResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // }; + * + * ``` + * + * @param DeleteResourcePolicyCommandInput - {@link DeleteResourcePolicyCommandInput} + * @returns {@link DeleteResourcePolicyCommandOutput} + * @see {@link DeleteResourcePolicyCommandInput} for command's `input` shape. + * @see {@link DeleteResourcePolicyCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To delete the resource-based policy attached to a secret + * ```javascript + * // The following example shows how to delete the resource-based policy that is attached to a secret. + * const input = { + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new DeleteResourcePolicyCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret" + * } + * *\/ + * // example id: to-delete-the-resource-based-policy-attached-to-a-secret-1530209419204 + * ``` + * + */ +export declare class DeleteResourcePolicyCommand extends DeleteResourcePolicyCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/DeleteSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/DeleteSecretCommand.d.ts new file mode 100644 index 0000000..3202b13 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/DeleteSecretCommand.d.ts @@ -0,0 +1,137 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { DeleteSecretRequest, DeleteSecretResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteSecretCommand}. + */ +export interface DeleteSecretCommandInput extends DeleteSecretRequest { +} +/** + * @public + * + * The output of {@link DeleteSecretCommand}. + */ +export interface DeleteSecretCommandOutput extends DeleteSecretResponse, __MetadataBearer { +} +declare const DeleteSecretCommand_base: { + new (input: DeleteSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: DeleteSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Deletes a secret and all of its versions. You can specify a recovery + * window during which you can restore the secret. The minimum recovery window is 7 days. + * The default recovery window is 30 days. Secrets Manager attaches a DeletionDate stamp to + * the secret that specifies the end of the recovery window. At the end of the recovery window, + * Secrets Manager deletes the secret permanently.

+ *

You can't delete a primary secret that is replicated to other Regions. You must first delete the + * replicas using RemoveRegionsFromReplication, and then delete the primary secret. + * When you delete a replica, it is deleted immediately.

+ *

You can't directly delete a version of a secret. Instead, you remove all staging labels + * from the version using UpdateSecretVersionStage. This marks the version as deprecated, + * and then Secrets Manager can automatically delete the version in the background.

+ *

To determine whether an application still uses a secret, you can create an Amazon CloudWatch alarm + * to alert you to any attempts to access a secret during the recovery window. For more information, + * see + * Monitor secrets scheduled for deletion.

+ *

Secrets Manager performs the permanent secret deletion at the end of the waiting period as a + * background task with low priority. There is no guarantee of a specific time after the + * recovery window for the permanent delete to occur.

+ *

At any time before recovery window ends, you can use RestoreSecret to + * remove the DeletionDate and cancel the deletion of the secret.

+ *

When a secret is scheduled for deletion, you cannot retrieve the secret value. + * You must first cancel the deletion with RestoreSecret and then you can retrieve the secret.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:DeleteSecret. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, DeleteSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, DeleteSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // DeleteSecretRequest + * SecretId: "STRING_VALUE", // required + * RecoveryWindowInDays: Number("long"), + * ForceDeleteWithoutRecovery: true || false, + * }; + * const command = new DeleteSecretCommand(input); + * const response = await client.send(command); + * // { // DeleteSecretResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // DeletionDate: new Date("TIMESTAMP"), + * // }; + * + * ``` + * + * @param DeleteSecretCommandInput - {@link DeleteSecretCommandInput} + * @returns {@link DeleteSecretCommandOutput} + * @see {@link DeleteSecretCommandInput} for command's `input` shape. + * @see {@link DeleteSecretCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To delete a secret + * ```javascript + * // The following example shows how to delete a secret. The secret stays in your account in a deprecated and inaccessible state until the recovery window ends. After the date and time in the DeletionDate response field has passed, you can no longer recover this secret with restore-secret. + * const input = { + * "RecoveryWindowInDays": 7, + * "SecretId": "MyTestDatabaseSecret1" + * }; + * const command = new DeleteSecretCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "DeletionDate": "1524085349.095", + * "Name": "MyTestDatabaseSecret" + * } + * *\/ + * // example id: to-delete-a-secret-1523996905092 + * ``` + * + */ +export declare class DeleteSecretCommand extends DeleteSecretCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/DescribeSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/DescribeSecretCommand.d.ts new file mode 100644 index 0000000..020a760 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/DescribeSecretCommand.d.ts @@ -0,0 +1,162 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { DescribeSecretRequest, DescribeSecretResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DescribeSecretCommand}. + */ +export interface DescribeSecretCommandInput extends DescribeSecretRequest { +} +/** + * @public + * + * The output of {@link DescribeSecretCommand}. + */ +export interface DescribeSecretCommandOutput extends DescribeSecretResponse, __MetadataBearer { +} +declare const DescribeSecretCommand_base: { + new (input: DescribeSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: DescribeSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Retrieves the details of a secret. It does not include the encrypted secret value. Secrets Manager + * only returns fields that have a value in the response.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:DescribeSecret. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, DescribeSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, DescribeSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // DescribeSecretRequest + * SecretId: "STRING_VALUE", // required + * }; + * const command = new DescribeSecretCommand(input); + * const response = await client.send(command); + * // { // DescribeSecretResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // Description: "STRING_VALUE", + * // KmsKeyId: "STRING_VALUE", + * // RotationEnabled: true || false, + * // RotationLambdaARN: "STRING_VALUE", + * // RotationRules: { // RotationRulesType + * // AutomaticallyAfterDays: Number("long"), + * // Duration: "STRING_VALUE", + * // ScheduleExpression: "STRING_VALUE", + * // }, + * // LastRotatedDate: new Date("TIMESTAMP"), + * // LastChangedDate: new Date("TIMESTAMP"), + * // LastAccessedDate: new Date("TIMESTAMP"), + * // DeletedDate: new Date("TIMESTAMP"), + * // NextRotationDate: new Date("TIMESTAMP"), + * // Tags: [ // TagListType + * // { // Tag + * // Key: "STRING_VALUE", + * // Value: "STRING_VALUE", + * // }, + * // ], + * // VersionIdsToStages: { // SecretVersionsToStagesMapType + * // "": [ // SecretVersionStagesType + * // "STRING_VALUE", + * // ], + * // }, + * // OwningService: "STRING_VALUE", + * // CreatedDate: new Date("TIMESTAMP"), + * // PrimaryRegion: "STRING_VALUE", + * // ReplicationStatus: [ // ReplicationStatusListType + * // { // ReplicationStatusType + * // Region: "STRING_VALUE", + * // KmsKeyId: "STRING_VALUE", + * // Status: "InSync" || "Failed" || "InProgress", + * // StatusMessage: "STRING_VALUE", + * // LastAccessedDate: new Date("TIMESTAMP"), + * // }, + * // ], + * // }; + * + * ``` + * + * @param DescribeSecretCommandInput - {@link DescribeSecretCommandInput} + * @returns {@link DescribeSecretCommandOutput} + * @see {@link DescribeSecretCommandInput} for command's `input` shape. + * @see {@link DescribeSecretCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To retrieve the details of a secret + * ```javascript + * // The following example shows how to get the details about a secret. + * const input = { + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new DescribeSecretCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Description": "My test database secret", + * "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/EXAMPLE1-90ab-cdef-fedc-ba987KMSKEY1", + * "LastAccessedDate": "1523923200", + * "LastChangedDate": 1523477145.729, + * "LastRotatedDate": 1525747253.72, + * "Name": "MyTestDatabaseSecret", + * "NextRotationDate": "1665165599", + * "RotationEnabled": true, + * "RotationLambdaARN": "arn:aws:lambda:us-west-2:123456789012:function:MyTestRotationLambda", + * "RotationRules": { + * "AutomaticallyAfterDays": 14, + * "Duration": "2h", + * "ScheduleExpression": "cron(0 16 1,15 * ? *)" + * }, + * "Tags": [ + * { + * "Key": "SecondTag", + * "Value": "AnotherValue" + * }, + * { + * "Key": "FirstTag", + * "Value": "SomeValue" + * } + * ], + * "VersionIdsToStages": { + * "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE": [ + * "AWSPREVIOUS" + * ], + * "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE": [ + * "AWSCURRENT" + * ] + * } + * } + * *\/ + * // example id: to-retrieve-the-details-of-a-secret-1524000138629 + * ``` + * + */ +export declare class DescribeSecretCommand extends DescribeSecretCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/GetRandomPasswordCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/GetRandomPasswordCommand.d.ts new file mode 100644 index 0000000..6a64f5b --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/GetRandomPasswordCommand.d.ts @@ -0,0 +1,118 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { GetRandomPasswordRequest, GetRandomPasswordResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetRandomPasswordCommand}. + */ +export interface GetRandomPasswordCommandInput extends GetRandomPasswordRequest { +} +/** + * @public + * + * The output of {@link GetRandomPasswordCommand}. + */ +export interface GetRandomPasswordCommandOutput extends GetRandomPasswordResponse, __MetadataBearer { +} +declare const GetRandomPasswordCommand_base: { + new (input: GetRandomPasswordCommandInput): import("@smithy/smithy-client").CommandImpl; + new (...[input]: [] | [GetRandomPasswordCommandInput]): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Generates a random password. We recommend that you specify the + * maximum length and include every character type that the system you are generating a password + * for can support. By default, Secrets Manager uses uppercase and lowercase letters, numbers, and the following characters in passwords: !\"#$%&'()*+,-./:;<=>?@[\\]^_`\{|\}~ + *

+ *

Secrets Manager generates a CloudTrail log entry when you call this action.

+ *

+ * Required permissions: + * secretsmanager:GetRandomPassword. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, GetRandomPasswordCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, GetRandomPasswordCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // GetRandomPasswordRequest + * PasswordLength: Number("long"), + * ExcludeCharacters: "STRING_VALUE", + * ExcludeNumbers: true || false, + * ExcludePunctuation: true || false, + * ExcludeUppercase: true || false, + * ExcludeLowercase: true || false, + * IncludeSpace: true || false, + * RequireEachIncludedType: true || false, + * }; + * const command = new GetRandomPasswordCommand(input); + * const response = await client.send(command); + * // { // GetRandomPasswordResponse + * // RandomPassword: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetRandomPasswordCommandInput - {@link GetRandomPasswordCommandInput} + * @returns {@link GetRandomPasswordCommandOutput} + * @see {@link GetRandomPasswordCommandInput} for command's `input` shape. + * @see {@link GetRandomPasswordCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To generate a random password + * ```javascript + * // The following example shows how to request a randomly generated password. This example includes the optional flags to require spaces and at least one character of each included type. It specifies a length of 20 characters. + * const input = { + * "IncludeSpace": true, + * "PasswordLength": 20, + * "RequireEachIncludedType": true + * }; + * const command = new GetRandomPasswordCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "RandomPassword": "EXAMPLE-PASSWORD" + * } + * *\/ + * // example id: to-generate-a-random-password-1524000546092 + * ``` + * + */ +export declare class GetRandomPasswordCommand extends GetRandomPasswordCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/GetResourcePolicyCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/GetResourcePolicyCommand.d.ts new file mode 100644 index 0000000..5a81a34 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/GetResourcePolicyCommand.d.ts @@ -0,0 +1,116 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { GetResourcePolicyRequest, GetResourcePolicyResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetResourcePolicyCommand}. + */ +export interface GetResourcePolicyCommandInput extends GetResourcePolicyRequest { +} +/** + * @public + * + * The output of {@link GetResourcePolicyCommand}. + */ +export interface GetResourcePolicyCommandOutput extends GetResourcePolicyResponse, __MetadataBearer { +} +declare const GetResourcePolicyCommand_base: { + new (input: GetResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: GetResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Retrieves the JSON text of the resource-based policy document attached to the + * secret. For more information about permissions policies attached to a secret, see + * Permissions + * policies attached to a secret.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:GetResourcePolicy. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, GetResourcePolicyCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, GetResourcePolicyCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // GetResourcePolicyRequest + * SecretId: "STRING_VALUE", // required + * }; + * const command = new GetResourcePolicyCommand(input); + * const response = await client.send(command); + * // { // GetResourcePolicyResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // ResourcePolicy: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetResourcePolicyCommandInput - {@link GetResourcePolicyCommandInput} + * @returns {@link GetResourcePolicyCommandOutput} + * @see {@link GetResourcePolicyCommandInput} for command's `input` shape. + * @see {@link GetResourcePolicyCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To retrieve the resource-based policy attached to a secret + * ```javascript + * // The following example shows how to retrieve the resource-based policy that is attached to a secret. + * const input = { + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new GetResourcePolicyCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret", + * "ResourcePolicy": "{\n\"Version\":\"2012-10-17\",\n\"Statement\":[{\n\"Effect\":\"Allow\",\n\"Principal\":{\n\"AWS\":\"arn:aws:iam::123456789012:root\"\n},\n\"Action\":\"secretsmanager:GetSecretValue\",\n\"Resource\":\"*\"\n}]\n}" + * } + * *\/ + * // example id: to-retrieve-the-resource-based-policy-attached-to-a-secret-1530209677536 + * ``` + * + */ +export declare class GetResourcePolicyCommand extends GetResourcePolicyCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/GetSecretValueCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/GetSecretValueCommand.d.ts new file mode 100644 index 0000000..4bf4c66 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/GetSecretValueCommand.d.ts @@ -0,0 +1,139 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { GetSecretValueRequest, GetSecretValueResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetSecretValueCommand}. + */ +export interface GetSecretValueCommandInput extends GetSecretValueRequest { +} +/** + * @public + * + * The output of {@link GetSecretValueCommand}. + */ +export interface GetSecretValueCommandOutput extends GetSecretValueResponse, __MetadataBearer { +} +declare const GetSecretValueCommand_base: { + new (input: GetSecretValueCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: GetSecretValueCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Retrieves the contents of the encrypted fields SecretString or + * SecretBinary from the specified version of a secret, whichever contains + * content.

+ *

To retrieve the values for a group of secrets, call BatchGetSecretValue.

+ *

We recommend that you cache your secret values by using client-side caching. + * Caching secrets improves speed and reduces your costs. For more information, see Cache secrets for + * your applications.

+ *

To retrieve the previous version of a secret, use VersionStage and specify + * AWSPREVIOUS. To revert to the previous version of a secret, call UpdateSecretVersionStage.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:GetSecretValue. + * If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key + * aws/secretsmanager, then you also need kms:Decrypt permissions for that key. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, GetSecretValueCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, GetSecretValueCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // GetSecretValueRequest + * SecretId: "STRING_VALUE", // required + * VersionId: "STRING_VALUE", + * VersionStage: "STRING_VALUE", + * }; + * const command = new GetSecretValueCommand(input); + * const response = await client.send(command); + * // { // GetSecretValueResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // VersionId: "STRING_VALUE", + * // SecretBinary: new Uint8Array(), + * // SecretString: "STRING_VALUE", + * // VersionStages: [ // SecretVersionStagesType + * // "STRING_VALUE", + * // ], + * // CreatedDate: new Date("TIMESTAMP"), + * // }; + * + * ``` + * + * @param GetSecretValueCommandInput - {@link GetSecretValueCommandInput} + * @returns {@link GetSecretValueCommandOutput} + * @see {@link GetSecretValueCommandInput} for command's `input` shape. + * @see {@link GetSecretValueCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link DecryptionFailure} (client fault) + *

Secrets Manager can't decrypt the protected secret text using the provided KMS key.

+ * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To retrieve the encrypted secret value of a secret + * ```javascript + * // The following example shows how to retrieve a secret string value. + * const input = { + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new GetSecretValueCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "CreatedDate": 1523477145.713, + * "Name": "MyTestDatabaseSecret", + * "SecretString": "{\n \"username\":\"david\",\n \"password\":\"EXAMPLE-PASSWORD\"\n}\n", + * "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1", + * "VersionStages": [ + * "AWSPREVIOUS" + * ] + * } + * *\/ + * // example id: to-retrieve-the-encrypted-secret-value-of-a-secret-1524000702484 + * ``` + * + */ +export declare class GetSecretValueCommand extends GetSecretValueCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ListSecretVersionIdsCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ListSecretVersionIdsCommand.d.ts new file mode 100644 index 0000000..4eb2bce --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ListSecretVersionIdsCommand.d.ts @@ -0,0 +1,137 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { ListSecretVersionIdsRequest, ListSecretVersionIdsResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListSecretVersionIdsCommand}. + */ +export interface ListSecretVersionIdsCommandInput extends ListSecretVersionIdsRequest { +} +/** + * @public + * + * The output of {@link ListSecretVersionIdsCommand}. + */ +export interface ListSecretVersionIdsCommandOutput extends ListSecretVersionIdsResponse, __MetadataBearer { +} +declare const ListSecretVersionIdsCommand_base: { + new (input: ListSecretVersionIdsCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: ListSecretVersionIdsCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Lists the versions of a secret. Secrets Manager uses staging labels to indicate the different versions + * of a secret. For more information, see + * Secrets Manager concepts: Versions.

+ *

To list the secrets in the account, use ListSecrets.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:ListSecretVersionIds. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, ListSecretVersionIdsCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, ListSecretVersionIdsCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // ListSecretVersionIdsRequest + * SecretId: "STRING_VALUE", // required + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * IncludeDeprecated: true || false, + * }; + * const command = new ListSecretVersionIdsCommand(input); + * const response = await client.send(command); + * // { // ListSecretVersionIdsResponse + * // Versions: [ // SecretVersionsListType + * // { // SecretVersionsListEntry + * // VersionId: "STRING_VALUE", + * // VersionStages: [ // SecretVersionStagesType + * // "STRING_VALUE", + * // ], + * // LastAccessedDate: new Date("TIMESTAMP"), + * // CreatedDate: new Date("TIMESTAMP"), + * // KmsKeyIds: [ // KmsKeyIdListType + * // "STRING_VALUE", + * // ], + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListSecretVersionIdsCommandInput - {@link ListSecretVersionIdsCommandInput} + * @returns {@link ListSecretVersionIdsCommandOutput} + * @see {@link ListSecretVersionIdsCommandInput} for command's `input` shape. + * @see {@link ListSecretVersionIdsCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidNextTokenException} (client fault) + *

The NextToken value is invalid.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To list all of the secret versions associated with a secret + * ```javascript + * // The following example shows how to retrieve a list of all of the versions of a secret, including those without any staging labels. + * const input = { + * "IncludeDeprecated": true, + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new ListSecretVersionIdsCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret", + * "Versions": [ + * { + * "CreatedDate": 1523477145.713, + * "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE", + * "VersionStages": [ + * "AWSPREVIOUS" + * ] + * }, + * { + * "CreatedDate": 1523486221.391, + * "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE", + * "VersionStages": [ + * "AWSCURRENT" + * ] + * }, + * { + * "CreatedDate": 1511974462.36, + * "VersionId": "EXAMPLE3-90ab-cdef-fedc-ba987EXAMPLE;" + * } + * ] + * } + * *\/ + * // example id: to-list-all-of-the-secret-versions-associated-with-a-secret-1524000999164 + * ``` + * + */ +export declare class ListSecretVersionIdsCommand extends ListSecretVersionIdsCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ListSecretsCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ListSecretsCommand.d.ts new file mode 100644 index 0000000..11f4326 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ListSecretsCommand.d.ts @@ -0,0 +1,180 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { ListSecretsRequest, ListSecretsResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListSecretsCommand}. + */ +export interface ListSecretsCommandInput extends ListSecretsRequest { +} +/** + * @public + * + * The output of {@link ListSecretsCommand}. + */ +export interface ListSecretsCommandOutput extends ListSecretsResponse, __MetadataBearer { +} +declare const ListSecretsCommand_base: { + new (input: ListSecretsCommandInput): import("@smithy/smithy-client").CommandImpl; + new (...[input]: [] | [ListSecretsCommandInput]): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Lists the secrets that are stored by Secrets Manager in the Amazon Web Services account, not including secrets + * that are marked for deletion. To see secrets marked for deletion, use the Secrets Manager console.

+ *

All Secrets Manager operations are eventually consistent. ListSecrets might not reflect changes from the last five minutes. You can get more recent information for a specific secret by calling DescribeSecret.

+ *

To list the versions of a secret, use ListSecretVersionIds.

+ *

To retrieve the values for the secrets, call BatchGetSecretValue or GetSecretValue.

+ *

For information about finding secrets in the console, see Find secrets in Secrets Manager.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:ListSecrets. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, ListSecretsCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, ListSecretsCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // ListSecretsRequest + * IncludePlannedDeletion: true || false, + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * Filters: [ // FiltersListType + * { // Filter + * Key: "description" || "name" || "tag-key" || "tag-value" || "primary-region" || "owning-service" || "all", + * Values: [ // FilterValuesStringList + * "STRING_VALUE", + * ], + * }, + * ], + * SortOrder: "asc" || "desc", + * }; + * const command = new ListSecretsCommand(input); + * const response = await client.send(command); + * // { // ListSecretsResponse + * // SecretList: [ // SecretListType + * // { // SecretListEntry + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // Description: "STRING_VALUE", + * // KmsKeyId: "STRING_VALUE", + * // RotationEnabled: true || false, + * // RotationLambdaARN: "STRING_VALUE", + * // RotationRules: { // RotationRulesType + * // AutomaticallyAfterDays: Number("long"), + * // Duration: "STRING_VALUE", + * // ScheduleExpression: "STRING_VALUE", + * // }, + * // LastRotatedDate: new Date("TIMESTAMP"), + * // LastChangedDate: new Date("TIMESTAMP"), + * // LastAccessedDate: new Date("TIMESTAMP"), + * // DeletedDate: new Date("TIMESTAMP"), + * // NextRotationDate: new Date("TIMESTAMP"), + * // Tags: [ // TagListType + * // { // Tag + * // Key: "STRING_VALUE", + * // Value: "STRING_VALUE", + * // }, + * // ], + * // SecretVersionsToStages: { // SecretVersionsToStagesMapType + * // "": [ // SecretVersionStagesType + * // "STRING_VALUE", + * // ], + * // }, + * // OwningService: "STRING_VALUE", + * // CreatedDate: new Date("TIMESTAMP"), + * // PrimaryRegion: "STRING_VALUE", + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListSecretsCommandInput - {@link ListSecretsCommandInput} + * @returns {@link ListSecretsCommandOutput} + * @see {@link ListSecretsCommandInput} for command's `input` shape. + * @see {@link ListSecretsCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidNextTokenException} (client fault) + *

The NextToken value is invalid.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To list the secrets in your account + * ```javascript + * // The following example shows how to list all of the secrets in your account. + * const input = {}; + * const command = new ListSecretsCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "SecretList": [ + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Description": "My test database secret", + * "LastChangedDate": 1523477145.729, + * "Name": "MyTestDatabaseSecret", + * "SecretVersionsToStages": { + * "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE": [ + * "AWSCURRENT" + * ] + * } + * }, + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret1-d4e5f6", + * "Description": "Another secret created for a different database", + * "LastChangedDate": 1523482025.685, + * "Name": "MyTestDatabaseSecret1", + * "SecretVersionsToStages": { + * "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE": [ + * "AWSCURRENT" + * ] + * } + * } + * ] + * } + * *\/ + * // example id: to-list-the-secrets-in-your-account-1524001246087 + * ``` + * + */ +export declare class ListSecretsCommand extends ListSecretsCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/PutResourcePolicyCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/PutResourcePolicyCommand.d.ts new file mode 100644 index 0000000..2857a8b --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/PutResourcePolicyCommand.d.ts @@ -0,0 +1,124 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { PutResourcePolicyRequest, PutResourcePolicyResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link PutResourcePolicyCommand}. + */ +export interface PutResourcePolicyCommandInput extends PutResourcePolicyRequest { +} +/** + * @public + * + * The output of {@link PutResourcePolicyCommand}. + */ +export interface PutResourcePolicyCommandOutput extends PutResourcePolicyResponse, __MetadataBearer { +} +declare const PutResourcePolicyCommand_base: { + new (input: PutResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: PutResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Attaches a resource-based permission policy to a secret. A resource-based policy is + * optional. For more information, see Authentication and access control for Secrets Manager + *

+ *

For information about attaching a policy in the console, see Attach a + * permissions policy to a secret.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:PutResourcePolicy. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, PutResourcePolicyCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, PutResourcePolicyCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // PutResourcePolicyRequest + * SecretId: "STRING_VALUE", // required + * ResourcePolicy: "STRING_VALUE", // required + * BlockPublicPolicy: true || false, + * }; + * const command = new PutResourcePolicyCommand(input); + * const response = await client.send(command); + * // { // PutResourcePolicyResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // }; + * + * ``` + * + * @param PutResourcePolicyCommandInput - {@link PutResourcePolicyCommandInput} + * @returns {@link PutResourcePolicyCommandOutput} + * @see {@link PutResourcePolicyCommandInput} for command's `input` shape. + * @see {@link PutResourcePolicyCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link MalformedPolicyDocumentException} (client fault) + *

The resource policy has syntax errors.

+ * + * @throws {@link PublicPolicyException} (client fault) + *

The BlockPublicPolicy parameter is set to true, and the resource policy did not prevent broad access to the secret.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To add a resource-based policy to a secret + * ```javascript + * // The following example shows how to add a resource-based policy to a secret. + * const input = { + * "ResourcePolicy": "{\n\"Version\":\"2012-10-17\",\n\"Statement\":[{\n\"Effect\":\"Allow\",\n\"Principal\":{\n\"AWS\":\"arn:aws:iam::123456789012:root\"\n},\n\"Action\":\"secretsmanager:GetSecretValue\",\n\"Resource\":\"*\"\n}]\n}", + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new PutResourcePolicyCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret" + * } + * *\/ + * // example id: to-add-a-resource-based-policy-to-a-secret-1530209881839 + * ``` + * + */ +export declare class PutResourcePolicyCommand extends PutResourcePolicyCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/PutSecretValueCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/PutSecretValueCommand.d.ts new file mode 100644 index 0000000..ec0676b --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/PutSecretValueCommand.d.ts @@ -0,0 +1,161 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { PutSecretValueRequest, PutSecretValueResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link PutSecretValueCommand}. + */ +export interface PutSecretValueCommandInput extends PutSecretValueRequest { +} +/** + * @public + * + * The output of {@link PutSecretValueCommand}. + */ +export interface PutSecretValueCommandOutput extends PutSecretValueResponse, __MetadataBearer { +} +declare const PutSecretValueCommand_base: { + new (input: PutSecretValueCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: PutSecretValueCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Creates a new version with a new encrypted secret value and attaches it to the secret. The + * version can contain a new SecretString value or a new SecretBinary value.

+ *

We recommend you avoid calling PutSecretValue at a sustained rate of more than + * once every 10 minutes. When you update the secret value, Secrets Manager creates a new version + * of the secret. Secrets Manager removes outdated versions when there are more than 100, but it does not + * remove versions created less than 24 hours ago. If you call PutSecretValue more + * than once every 10 minutes, you create more versions than Secrets Manager removes, and you will reach + * the quota for secret versions.

+ *

You can specify the staging labels to attach to the new version in VersionStages. + * If you don't include VersionStages, then Secrets Manager automatically + * moves the staging label AWSCURRENT to this version. If this operation creates + * the first version for the secret, then Secrets Manager + * automatically attaches the staging label AWSCURRENT to it. + * If this operation moves the staging label AWSCURRENT from another version to this + * version, then Secrets Manager also automatically moves the staging label AWSPREVIOUS to + * the version that AWSCURRENT was removed from.

+ *

This operation is idempotent. If you call this operation with a ClientRequestToken + * that matches an existing version's VersionId, and you specify the + * same secret data, the operation succeeds but does nothing. However, if the secret data is + * different, then the operation fails because you can't modify an existing version; you can + * only create new ones.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters except SecretBinary or SecretString because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:PutSecretValue. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, PutSecretValueCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, PutSecretValueCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // PutSecretValueRequest + * SecretId: "STRING_VALUE", // required + * ClientRequestToken: "STRING_VALUE", + * SecretBinary: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") + * SecretString: "STRING_VALUE", + * VersionStages: [ // SecretVersionStagesType + * "STRING_VALUE", + * ], + * }; + * const command = new PutSecretValueCommand(input); + * const response = await client.send(command); + * // { // PutSecretValueResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // VersionId: "STRING_VALUE", + * // VersionStages: [ // SecretVersionStagesType + * // "STRING_VALUE", + * // ], + * // }; + * + * ``` + * + * @param PutSecretValueCommandInput - {@link PutSecretValueCommandInput} + * @returns {@link PutSecretValueCommandOutput} + * @see {@link PutSecretValueCommandInput} for command's `input` shape. + * @see {@link PutSecretValueCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link DecryptionFailure} (client fault) + *

Secrets Manager can't decrypt the protected secret text using the provided KMS key.

+ * + * @throws {@link EncryptionFailure} (client fault) + *

Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the + * KMS key is available, enabled, and not in an invalid state. For more + * information, see Key state: Effect on your KMS key.

+ * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link LimitExceededException} (client fault) + *

The request failed because it would exceed one of the Secrets Manager quotas.

+ * + * @throws {@link ResourceExistsException} (client fault) + *

A resource with the ID you requested already exists.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To store a secret value in a new version of a secret + * ```javascript + * // The following example shows how to create a new version of the secret. Alternatively, you can use the update-secret command. + * const input = { + * "ClientRequestToken": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE", + * "SecretId": "MyTestDatabaseSecret", + * "SecretString": "{\"username\":\"david\",\"password\":\"EXAMPLE-PASSWORD\"}" + * }; + * const command = new PutSecretValueCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret", + * "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE", + * "VersionStages": [ + * "AWSCURRENT" + * ] + * } + * *\/ + * // example id: to-store-a-secret-value-in-a-new-version-of-a-secret-1524001393971 + * ``` + * + */ +export declare class PutSecretValueCommand extends PutSecretValueCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts new file mode 100644 index 0000000..3e1ed3d --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts @@ -0,0 +1,105 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { RemoveRegionsFromReplicationRequest, RemoveRegionsFromReplicationResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link RemoveRegionsFromReplicationCommand}. + */ +export interface RemoveRegionsFromReplicationCommandInput extends RemoveRegionsFromReplicationRequest { +} +/** + * @public + * + * The output of {@link RemoveRegionsFromReplicationCommand}. + */ +export interface RemoveRegionsFromReplicationCommandOutput extends RemoveRegionsFromReplicationResponse, __MetadataBearer { +} +declare const RemoveRegionsFromReplicationCommand_base: { + new (input: RemoveRegionsFromReplicationCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: RemoveRegionsFromReplicationCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

For a secret that is replicated to other Regions, deletes the secret replicas from the Regions you specify.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:RemoveRegionsFromReplication. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, RemoveRegionsFromReplicationCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, RemoveRegionsFromReplicationCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // RemoveRegionsFromReplicationRequest + * SecretId: "STRING_VALUE", // required + * RemoveReplicaRegions: [ // RemoveReplicaRegionListType // required + * "STRING_VALUE", + * ], + * }; + * const command = new RemoveRegionsFromReplicationCommand(input); + * const response = await client.send(command); + * // { // RemoveRegionsFromReplicationResponse + * // ARN: "STRING_VALUE", + * // ReplicationStatus: [ // ReplicationStatusListType + * // { // ReplicationStatusType + * // Region: "STRING_VALUE", + * // KmsKeyId: "STRING_VALUE", + * // Status: "InSync" || "Failed" || "InProgress", + * // StatusMessage: "STRING_VALUE", + * // LastAccessedDate: new Date("TIMESTAMP"), + * // }, + * // ], + * // }; + * + * ``` + * + * @param RemoveRegionsFromReplicationCommandInput - {@link RemoveRegionsFromReplicationCommandInput} + * @returns {@link RemoveRegionsFromReplicationCommandOutput} + * @see {@link RemoveRegionsFromReplicationCommandInput} for command's `input` shape. + * @see {@link RemoveRegionsFromReplicationCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + */ +export declare class RemoveRegionsFromReplicationCommand extends RemoveRegionsFromReplicationCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts new file mode 100644 index 0000000..3392838 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts @@ -0,0 +1,138 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { ReplicateSecretToRegionsRequest, ReplicateSecretToRegionsResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ReplicateSecretToRegionsCommand}. + */ +export interface ReplicateSecretToRegionsCommandInput extends ReplicateSecretToRegionsRequest { +} +/** + * @public + * + * The output of {@link ReplicateSecretToRegionsCommand}. + */ +export interface ReplicateSecretToRegionsCommandOutput extends ReplicateSecretToRegionsResponse, __MetadataBearer { +} +declare const ReplicateSecretToRegionsCommand_base: { + new (input: ReplicateSecretToRegionsCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: ReplicateSecretToRegionsCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Replicates the secret to a new Regions. See Multi-Region secrets.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:ReplicateSecretToRegions. + * If the primary secret is encrypted with a KMS key other than aws/secretsmanager, you also need kms:Decrypt permission to the key. To encrypt the replicated secret with a KMS key other than aws/secretsmanager, you need kms:GenerateDataKey and kms:Encrypt to the key. For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, ReplicateSecretToRegionsCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, ReplicateSecretToRegionsCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // ReplicateSecretToRegionsRequest + * SecretId: "STRING_VALUE", // required + * AddReplicaRegions: [ // AddReplicaRegionListType // required + * { // ReplicaRegionType + * Region: "STRING_VALUE", + * KmsKeyId: "STRING_VALUE", + * }, + * ], + * ForceOverwriteReplicaSecret: true || false, + * }; + * const command = new ReplicateSecretToRegionsCommand(input); + * const response = await client.send(command); + * // { // ReplicateSecretToRegionsResponse + * // ARN: "STRING_VALUE", + * // ReplicationStatus: [ // ReplicationStatusListType + * // { // ReplicationStatusType + * // Region: "STRING_VALUE", + * // KmsKeyId: "STRING_VALUE", + * // Status: "InSync" || "Failed" || "InProgress", + * // StatusMessage: "STRING_VALUE", + * // LastAccessedDate: new Date("TIMESTAMP"), + * // }, + * // ], + * // }; + * + * ``` + * + * @param ReplicateSecretToRegionsCommandInput - {@link ReplicateSecretToRegionsCommandInput} + * @returns {@link ReplicateSecretToRegionsCommandOutput} + * @see {@link ReplicateSecretToRegionsCommandInput} for command's `input` shape. + * @see {@link ReplicateSecretToRegionsCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example Example + * ```javascript + * // The following example replicates a secret to eu-west-3. The replica is encrypted with the AWS managed key aws/secretsmanager. + * const input = { + * "AddReplicaRegions": [ + * { + * "Region": "eu-west-3" + * } + * ], + * "ForceOverwriteReplicaSecret": true, + * "SecretId": "MyTestSecret" + * }; + * const command = new ReplicateSecretToRegionsCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestSecret-1a2b3c", + * "ReplicationStatus": [ + * { + * "KmsKeyId": "alias/aws/secretsmanager", + * "Region": "eu-west-3", + * "Status": "InProgress" + * } + * ] + * } + * *\/ + * // example id: example-1679591984774 + * ``` + * + */ +export declare class ReplicateSecretToRegionsCommand extends ReplicateSecretToRegionsCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/RestoreSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/RestoreSecretCommand.d.ts new file mode 100644 index 0000000..7a25450 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/RestoreSecretCommand.d.ts @@ -0,0 +1,112 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { RestoreSecretRequest, RestoreSecretResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link RestoreSecretCommand}. + */ +export interface RestoreSecretCommandInput extends RestoreSecretRequest { +} +/** + * @public + * + * The output of {@link RestoreSecretCommand}. + */ +export interface RestoreSecretCommandOutput extends RestoreSecretResponse, __MetadataBearer { +} +declare const RestoreSecretCommand_base: { + new (input: RestoreSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: RestoreSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Cancels the scheduled deletion of a secret by removing the DeletedDate time + * stamp. You can access a secret again after it has been restored.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:RestoreSecret. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, RestoreSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, RestoreSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // RestoreSecretRequest + * SecretId: "STRING_VALUE", // required + * }; + * const command = new RestoreSecretCommand(input); + * const response = await client.send(command); + * // { // RestoreSecretResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // }; + * + * ``` + * + * @param RestoreSecretCommandInput - {@link RestoreSecretCommandInput} + * @returns {@link RestoreSecretCommandOutput} + * @see {@link RestoreSecretCommandInput} for command's `input` shape. + * @see {@link RestoreSecretCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To restore a previously deleted secret + * ```javascript + * // The following example shows how to restore a secret that you previously scheduled for deletion. + * const input = { + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new RestoreSecretCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret" + * } + * *\/ + * // example id: to-restore-a-previously-deleted-secret-1524001513930 + * ``` + * + */ +export declare class RestoreSecretCommand extends RestoreSecretCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/RotateSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/RotateSecretCommand.d.ts new file mode 100644 index 0000000..be62583 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/RotateSecretCommand.d.ts @@ -0,0 +1,152 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { RotateSecretRequest, RotateSecretResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link RotateSecretCommand}. + */ +export interface RotateSecretCommandInput extends RotateSecretRequest { +} +/** + * @public + * + * The output of {@link RotateSecretCommand}. + */ +export interface RotateSecretCommandOutput extends RotateSecretResponse, __MetadataBearer { +} +declare const RotateSecretCommand_base: { + new (input: RotateSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: RotateSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Configures and starts the asynchronous process of rotating the secret. For information about rotation, + * see Rotate secrets in the Secrets Manager User Guide. If you include the configuration parameters, the operation sets the values for the secret and then immediately starts a rotation. If you don't include the configuration parameters, the operation starts a rotation with the values already stored in the secret.

+ *

When rotation is successful, the AWSPENDING staging label might be attached + * to the same version as the AWSCURRENT version, or it might not be attached to any + * version. If the AWSPENDING staging label is present but not attached to the same + * version as AWSCURRENT, then any later invocation of RotateSecret + * assumes that a previous rotation request is still in progress and returns an error. When rotation is unsuccessful, the AWSPENDING staging label might be attached to an empty secret version. For more information, see Troubleshoot rotation in the Secrets Manager User Guide.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:RotateSecret. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager. You also need lambda:InvokeFunction permissions on the rotation function. + * For more information, see + * Permissions for rotation.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, RotateSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, RotateSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // RotateSecretRequest + * SecretId: "STRING_VALUE", // required + * ClientRequestToken: "STRING_VALUE", + * RotationLambdaARN: "STRING_VALUE", + * RotationRules: { // RotationRulesType + * AutomaticallyAfterDays: Number("long"), + * Duration: "STRING_VALUE", + * ScheduleExpression: "STRING_VALUE", + * }, + * RotateImmediately: true || false, + * }; + * const command = new RotateSecretCommand(input); + * const response = await client.send(command); + * // { // RotateSecretResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // VersionId: "STRING_VALUE", + * // }; + * + * ``` + * + * @param RotateSecretCommandInput - {@link RotateSecretCommandInput} + * @returns {@link RotateSecretCommandOutput} + * @see {@link RotateSecretCommandInput} for command's `input` shape. + * @see {@link RotateSecretCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To configure rotation for a secret + * ```javascript + * // The following example configures rotation for a secret using a cron expression. The first rotation happens immediately after the changes are stored in the secret. The rotation schedule is the first and 15th day of every month. The rotation window begins at 4:00 PM UTC and ends at 6:00 PM. + * const input = { + * "RotationLambdaARN": "arn:aws:lambda:us-west-2:123456789012:function:MyTestDatabaseRotationLambda", + * "RotationRules": { + * "Duration": "2h", + * "ScheduleExpression": "cron(0 16 1,15 * ? *)" + * }, + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new RotateSecretCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret", + * "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2" + * } + * *\/ + * // example id: to-configure-rotation-for-a-secret-1524001629475 + * ``` + * + * @example To request an immediate rotation for a secret + * ```javascript + * // The following example requests an immediate invocation of the secret's Lambda rotation function. It assumes that the specified secret already has rotation configured. The rotation function runs asynchronously in the background. + * const input = { + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new RotateSecretCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret", + * "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2" + * } + * *\/ + * // example id: to-request-an-immediate-rotation-for-a-secret-1524001949004 + * ``` + * + */ +export declare class RotateSecretCommand extends RotateSecretCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/StopReplicationToReplicaCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/StopReplicationToReplicaCommand.d.ts new file mode 100644 index 0000000..54e7b39 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/StopReplicationToReplicaCommand.d.ts @@ -0,0 +1,94 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { StopReplicationToReplicaRequest, StopReplicationToReplicaResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StopReplicationToReplicaCommand}. + */ +export interface StopReplicationToReplicaCommandInput extends StopReplicationToReplicaRequest { +} +/** + * @public + * + * The output of {@link StopReplicationToReplicaCommand}. + */ +export interface StopReplicationToReplicaCommandOutput extends StopReplicationToReplicaResponse, __MetadataBearer { +} +declare const StopReplicationToReplicaCommand_base: { + new (input: StopReplicationToReplicaCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: StopReplicationToReplicaCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Removes the link between the replica secret and the primary secret and promotes the replica to a primary secret in the replica Region.

+ *

You must call this operation from the Region in which you want to promote the replica to a primary secret.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:StopReplicationToReplica. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, StopReplicationToReplicaCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, StopReplicationToReplicaCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // StopReplicationToReplicaRequest + * SecretId: "STRING_VALUE", // required + * }; + * const command = new StopReplicationToReplicaCommand(input); + * const response = await client.send(command); + * // { // StopReplicationToReplicaResponse + * // ARN: "STRING_VALUE", + * // }; + * + * ``` + * + * @param StopReplicationToReplicaCommandInput - {@link StopReplicationToReplicaCommandInput} + * @returns {@link StopReplicationToReplicaCommandOutput} + * @see {@link StopReplicationToReplicaCommandInput} for command's `input` shape. + * @see {@link StopReplicationToReplicaCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + */ +export declare class StopReplicationToReplicaCommand extends StopReplicationToReplicaCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/TagResourceCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/TagResourceCommand.d.ts new file mode 100644 index 0000000..9f9b87b --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/TagResourceCommand.d.ts @@ -0,0 +1,127 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { TagResourceRequest } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest { +} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends __MetadataBearer { +} +declare const TagResourceCommand_base: { + new (input: TagResourceCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: TagResourceCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Attaches tags to a secret. Tags consist of a key name and a value. Tags are part of the + * secret's metadata. They are not associated with specific versions of the secret. This operation appends tags to the existing list of tags.

+ *

For tag quotas and naming restrictions, see Service quotas for Tagging in the Amazon Web Services General + * Reference guide.

+ * + *

If you use tags as part of your security strategy, then adding or removing a tag can + * change permissions. If successfully completing this operation would result in you losing + * your permissions for this secret, then the operation is blocked and returns an Access Denied + * error.

+ *
+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:TagResource. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, TagResourceCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, TagResourceCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // TagResourceRequest + * SecretId: "STRING_VALUE", // required + * Tags: [ // TagListType // required + * { // Tag + * Key: "STRING_VALUE", + * Value: "STRING_VALUE", + * }, + * ], + * }; + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param TagResourceCommandInput - {@link TagResourceCommandInput} + * @returns {@link TagResourceCommandOutput} + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To add tags to a secret + * ```javascript + * // The following example shows how to attach two tags each with a Key and Value to a secret. There is no output from this API. To see the result, use the DescribeSecret operation. + * const input = { + * "SecretId": "MyExampleSecret", + * "Tags": [ + * { + * "Key": "FirstTag", + * "Value": "SomeValue" + * }, + * { + * "Key": "SecondTag", + * "Value": "AnotherValue" + * } + * ] + * }; + * const command = new TagResourceCommand(input); + * await client.send(command); + * // example id: to-add-tags-to-a-secret-1524002106718 + * ``` + * + */ +export declare class TagResourceCommand extends TagResourceCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/UntagResourceCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/UntagResourceCommand.d.ts new file mode 100644 index 0000000..3bffe18 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/UntagResourceCommand.d.ts @@ -0,0 +1,117 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { UntagResourceRequest } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest { +} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends __MetadataBearer { +} +declare const UntagResourceCommand_base: { + new (input: UntagResourceCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: UntagResourceCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Removes specific tags from a secret.

+ *

This operation is idempotent. If a requested tag is not attached to the secret, no error + * is returned and the secret metadata is unchanged.

+ * + *

If you use tags as part of your security strategy, then removing a tag can change + * permissions. If successfully completing this operation would result in you losing your + * permissions for this secret, then the operation is blocked and returns an Access Denied + * error.

+ *
+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:UntagResource. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, UntagResourceCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, UntagResourceCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // UntagResourceRequest + * SecretId: "STRING_VALUE", // required + * TagKeys: [ // TagKeyListType // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To remove tags from a secret + * ```javascript + * // The following example shows how to remove two tags from a secret's metadata. For each, both the tag and the associated value are removed. There is no output from this API. To see the result, use the DescribeSecret operation. + * const input = { + * "SecretId": "MyTestDatabaseSecret", + * "TagKeys": [ + * "FirstTag", + * "SecondTag" + * ] + * }; + * const command = new UntagResourceCommand(input); + * await client.send(command); + * // example id: to-remove-tags-from-a-secret-1524002239065 + * ``` + * + */ +export declare class UntagResourceCommand extends UntagResourceCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/UpdateSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/UpdateSecretCommand.d.ts new file mode 100644 index 0000000..d9a7604 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/UpdateSecretCommand.d.ts @@ -0,0 +1,195 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { UpdateSecretRequest, UpdateSecretResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateSecretCommand}. + */ +export interface UpdateSecretCommandInput extends UpdateSecretRequest { +} +/** + * @public + * + * The output of {@link UpdateSecretCommand}. + */ +export interface UpdateSecretCommandOutput extends UpdateSecretResponse, __MetadataBearer { +} +declare const UpdateSecretCommand_base: { + new (input: UpdateSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: UpdateSecretCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Modifies the details of a secret, including metadata and the secret value. To change the secret value, you can also use PutSecretValue.

+ *

To change the rotation configuration of a secret, use RotateSecret instead.

+ *

To change a secret so that it is managed by another service, you need to recreate the secret in that service. See Secrets Manager secrets managed by other Amazon Web Services services.

+ *

We recommend you avoid calling UpdateSecret at a sustained rate of more than + * once every 10 minutes. When you call UpdateSecret to update the secret value, Secrets Manager creates a new version + * of the secret. Secrets Manager removes outdated versions when there are more than 100, but it does not + * remove versions created less than 24 hours ago. If you update the secret value more + * than once every 10 minutes, you create more versions than Secrets Manager removes, and you will reach + * the quota for secret versions.

+ *

If you include SecretString or SecretBinary to create a new + * secret version, Secrets Manager automatically moves the staging label AWSCURRENT to the new + * version. Then it attaches the label AWSPREVIOUS + * to the version that AWSCURRENT was removed from.

+ *

If you call this operation with a ClientRequestToken that matches an existing version's + * VersionId, the operation results in an error. You can't modify an existing + * version, you can only create a new version. To remove a version, remove all staging labels from it. See + * UpdateSecretVersionStage.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters except SecretBinary or SecretString because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:UpdateSecret. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager. + * If you use a customer managed key, you must also have kms:GenerateDataKey, kms:Encrypt, and + * kms:Decrypt permissions on the key. If you change the KMS key and you don't have kms:Encrypt permission to the new key, Secrets Manager does not re-ecrypt existing secret versions with the new key. For more information, see + * Secret encryption and decryption.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, UpdateSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, UpdateSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // UpdateSecretRequest + * SecretId: "STRING_VALUE", // required + * ClientRequestToken: "STRING_VALUE", + * Description: "STRING_VALUE", + * KmsKeyId: "STRING_VALUE", + * SecretBinary: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") + * SecretString: "STRING_VALUE", + * }; + * const command = new UpdateSecretCommand(input); + * const response = await client.send(command); + * // { // UpdateSecretResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // VersionId: "STRING_VALUE", + * // }; + * + * ``` + * + * @param UpdateSecretCommandInput - {@link UpdateSecretCommandInput} + * @returns {@link UpdateSecretCommandOutput} + * @see {@link UpdateSecretCommandInput} for command's `input` shape. + * @see {@link UpdateSecretCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link DecryptionFailure} (client fault) + *

Secrets Manager can't decrypt the protected secret text using the provided KMS key.

+ * + * @throws {@link EncryptionFailure} (client fault) + *

Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the + * KMS key is available, enabled, and not in an invalid state. For more + * information, see Key state: Effect on your KMS key.

+ * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link LimitExceededException} (client fault) + *

The request failed because it would exceed one of the Secrets Manager quotas.

+ * + * @throws {@link MalformedPolicyDocumentException} (client fault) + *

The resource policy has syntax errors.

+ * + * @throws {@link PreconditionNotMetException} (client fault) + *

The request failed because you did not complete all the prerequisite steps.

+ * + * @throws {@link ResourceExistsException} (client fault) + *

A resource with the ID you requested already exists.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To update the description of a secret + * ```javascript + * // The following example shows how to modify the description of a secret. + * const input = { + * "ClientRequestToken": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE", + * "Description": "This is a new description for the secret.", + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new UpdateSecretCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret" + * } + * *\/ + * // example id: to-update-the-description-of-a-secret-1524002349094 + * ``` + * + * @example To update the KMS key associated with a secret + * ```javascript + * // This example shows how to update the KMS customer managed key (CMK) used to encrypt the secret value. The KMS CMK must be in the same region as the secret. + * const input = { + * "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE", + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new UpdateSecretCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret" + * } + * *\/ + * // example id: to-update-the-kms-key-associated-with-a-secret-1524002421563 + * ``` + * + * @example To create a new version of the encrypted secret value + * ```javascript + * // The following example shows how to create a new version of the secret by updating the SecretString field. Alternatively, you can use the put-secret-value operation. + * const input = { + * "SecretId": "MyTestDatabaseSecret", + * "SecretString": "{JSON STRING WITH CREDENTIALS}" + * }; + * const command = new UpdateSecretCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "aws:arn:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret", + * "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE" + * } + * *\/ + * // example id: to-create-a-new-version-of-the-encrypted-secret-value-1524004651836 + * ``` + * + */ +export declare class UpdateSecretCommand extends UpdateSecretCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/UpdateSecretVersionStageCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/UpdateSecretVersionStageCommand.d.ts new file mode 100644 index 0000000..8d72f1e --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/UpdateSecretVersionStageCommand.d.ts @@ -0,0 +1,172 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { UpdateSecretVersionStageRequest, UpdateSecretVersionStageResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateSecretVersionStageCommand}. + */ +export interface UpdateSecretVersionStageCommandInput extends UpdateSecretVersionStageRequest { +} +/** + * @public + * + * The output of {@link UpdateSecretVersionStageCommand}. + */ +export interface UpdateSecretVersionStageCommandOutput extends UpdateSecretVersionStageResponse, __MetadataBearer { +} +declare const UpdateSecretVersionStageCommand_base: { + new (input: UpdateSecretVersionStageCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: UpdateSecretVersionStageCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Modifies the staging labels attached to a version of a secret. Secrets Manager uses staging labels to + * track a version as it progresses through the secret rotation process. Each staging label can be + * attached to only one version at a time. To add a staging label to a version when it is already + * attached to another version, Secrets Manager first removes it from the other version first and + * then attaches it to this one. For more information about versions and staging labels, see Concepts: Version.

+ *

The staging labels that you specify in the VersionStage parameter are added + * to the existing list of staging labels for the version.

+ *

You can move the AWSCURRENT staging label to this version by including it in this + * call.

+ * + *

Whenever you move AWSCURRENT, Secrets Manager automatically moves the label AWSPREVIOUS + * to the version that AWSCURRENT was removed from.

+ *
+ *

If this action results in the last label being removed from a version, then the version is + * considered to be 'deprecated' and can be deleted by Secrets Manager.

+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:UpdateSecretVersionStage. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, UpdateSecretVersionStageCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, UpdateSecretVersionStageCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // UpdateSecretVersionStageRequest + * SecretId: "STRING_VALUE", // required + * VersionStage: "STRING_VALUE", // required + * RemoveFromVersionId: "STRING_VALUE", + * MoveToVersionId: "STRING_VALUE", + * }; + * const command = new UpdateSecretVersionStageCommand(input); + * const response = await client.send(command); + * // { // UpdateSecretVersionStageResponse + * // ARN: "STRING_VALUE", + * // Name: "STRING_VALUE", + * // }; + * + * ``` + * + * @param UpdateSecretVersionStageCommandInput - {@link UpdateSecretVersionStageCommandInput} + * @returns {@link UpdateSecretVersionStageCommandOutput} + * @see {@link UpdateSecretVersionStageCommandInput} for command's `input` shape. + * @see {@link UpdateSecretVersionStageCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link LimitExceededException} (client fault) + *

The request failed because it would exceed one of the Secrets Manager quotas.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To add a staging label attached to a version of a secret + * ```javascript + * // The following example shows you how to add a staging label to a version of a secret. You can review the results by running the operation ListSecretVersionIds and viewing the VersionStages response field for the affected version. + * const input = { + * "MoveToVersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1", + * "SecretId": "MyTestDatabaseSecret", + * "VersionStage": "STAGINGLABEL1" + * }; + * const command = new UpdateSecretVersionStageCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret" + * } + * *\/ + * // example id: to-add-a-staging-label-attached-to-a-version-of-a-secret-1524004783841 + * ``` + * + * @example To delete a staging label attached to a version of a secret + * ```javascript + * // The following example shows you how to delete a staging label that is attached to a version of a secret. You can review the results by running the operation ListSecretVersionIds and viewing the VersionStages response field for the affected version. + * const input = { + * "RemoveFromVersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1", + * "SecretId": "MyTestDatabaseSecret", + * "VersionStage": "STAGINGLABEL1" + * }; + * const command = new UpdateSecretVersionStageCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret" + * } + * *\/ + * // example id: to-delete-a-staging-label-attached-to-a-version-of-a-secret-1524004862181 + * ``` + * + * @example To move a staging label from one version of a secret to another + * ```javascript + * // The following example shows you how to move a staging label that is attached to one version of a secret to a different version. You can review the results by running the operation ListSecretVersionIds and viewing the VersionStages response field for the affected version. + * const input = { + * "MoveToVersionId": "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2", + * "RemoveFromVersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1", + * "SecretId": "MyTestDatabaseSecret", + * "VersionStage": "AWSCURRENT" + * }; + * const command = new UpdateSecretVersionStageCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + * "Name": "MyTestDatabaseSecret" + * } + * *\/ + * // example id: to-move-a-staging-label-from-one-version-of-a-secret-to-another-1524004963841 + * ``` + * + */ +export declare class UpdateSecretVersionStageCommand extends UpdateSecretVersionStageCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ValidateResourcePolicyCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ValidateResourcePolicyCommand.d.ts new file mode 100644 index 0000000..95a9571 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/ValidateResourcePolicyCommand.d.ts @@ -0,0 +1,135 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { ValidateResourcePolicyRequest, ValidateResourcePolicyResponse } from "../models/models_0"; +import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ValidateResourcePolicyCommand}. + */ +export interface ValidateResourcePolicyCommandInput extends ValidateResourcePolicyRequest { +} +/** + * @public + * + * The output of {@link ValidateResourcePolicyCommand}. + */ +export interface ValidateResourcePolicyCommandOutput extends ValidateResourcePolicyResponse, __MetadataBearer { +} +declare const ValidateResourcePolicyCommand_base: { + new (input: ValidateResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: ValidateResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Validates that a resource policy does not grant a wide range of principals access to + * your secret. A resource-based policy is optional for secrets.

+ *

The API performs three checks when validating the policy:

+ *
    + *
  • + *

    Sends a call to Zelkova, an automated reasoning engine, to ensure your resource policy does not + * allow broad access to your secret, for example policies that use a wildcard for the principal.

    + *
  • + *
  • + *

    Checks for correct syntax in a policy.

    + *
  • + *
  • + *

    Verifies the policy does not lock out a caller.

    + *
  • + *
+ *

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

+ *

+ * Required permissions: + * secretsmanager:ValidateResourcePolicy and secretsmanager:PutResourcePolicy. + * For more information, see + * IAM policy actions for Secrets Manager and Authentication + * and access control in Secrets Manager.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SecretsManagerClient, ValidateResourcePolicyCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import + * // const { SecretsManagerClient, ValidateResourcePolicyCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import + * const client = new SecretsManagerClient(config); + * const input = { // ValidateResourcePolicyRequest + * SecretId: "STRING_VALUE", + * ResourcePolicy: "STRING_VALUE", // required + * }; + * const command = new ValidateResourcePolicyCommand(input); + * const response = await client.send(command); + * // { // ValidateResourcePolicyResponse + * // PolicyValidationPassed: true || false, + * // ValidationErrors: [ // ValidationErrorsType + * // { // ValidationErrorsEntry + * // CheckName: "STRING_VALUE", + * // ErrorMessage: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ValidateResourcePolicyCommandInput - {@link ValidateResourcePolicyCommandInput} + * @returns {@link ValidateResourcePolicyCommandOutput} + * @see {@link ValidateResourcePolicyCommandInput} for command's `input` shape. + * @see {@link ValidateResourcePolicyCommandOutput} for command's `response` shape. + * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

An error occurred on the server side.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

The parameter name or value is invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * + * @throws {@link MalformedPolicyDocumentException} (client fault) + *

The resource policy has syntax errors.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

Secrets Manager can't find the resource that you asked for.

+ * + * @throws {@link SecretsManagerServiceException} + *

Base exception class for all service exceptions from SecretsManager service.

+ * + * @public + * @example To validate a resource-based policy to a secret + * ```javascript + * // The following example shows how to validate a resource-based policy to a secret. + * const input = { + * "ResourcePolicy": "{\n\"Version\":\"2012-10-17\",\n\"Statement\":[{\n\"Effect\":\"Allow\",\n\"Principal\":{\n\"AWS\":\"arn:aws:iam::123456789012:root\"\n},\n\"Action\":\"secretsmanager:GetSecretValue\",\n\"Resource\":\"*\"\n}]\n}", + * "SecretId": "MyTestDatabaseSecret" + * }; + * const command = new ValidateResourcePolicyCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "PolicyValidationPassed": true, + * "ValidationErrors": [] + * } + * *\/ + * // example id: to-validate-the-resource-policy-of-a-secret-1524000138629 + * ``` + * + */ +export declare class ValidateResourcePolicyCommand extends ValidateResourcePolicyCommand_base { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/index.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/index.d.ts new file mode 100644 index 0000000..04a302c --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/commands/index.d.ts @@ -0,0 +1,23 @@ +export * from "./BatchGetSecretValueCommand"; +export * from "./CancelRotateSecretCommand"; +export * from "./CreateSecretCommand"; +export * from "./DeleteResourcePolicyCommand"; +export * from "./DeleteSecretCommand"; +export * from "./DescribeSecretCommand"; +export * from "./GetRandomPasswordCommand"; +export * from "./GetResourcePolicyCommand"; +export * from "./GetSecretValueCommand"; +export * from "./ListSecretVersionIdsCommand"; +export * from "./ListSecretsCommand"; +export * from "./PutResourcePolicyCommand"; +export * from "./PutSecretValueCommand"; +export * from "./RemoveRegionsFromReplicationCommand"; +export * from "./ReplicateSecretToRegionsCommand"; +export * from "./RestoreSecretCommand"; +export * from "./RotateSecretCommand"; +export * from "./StopReplicationToReplicaCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateSecretCommand"; +export * from "./UpdateSecretVersionStageCommand"; +export * from "./ValidateResourcePolicyCommand"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/endpoint/EndpointParameters.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/endpoint/EndpointParameters.d.ts new file mode 100644 index 0000000..23f42e3 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/endpoint/EndpointParameters.d.ts @@ -0,0 +1,40 @@ +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; +/** + * @public + */ +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; +} +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const resolveClientEndpointParameters: (options: T & ClientInputEndpointParameters) => T & ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const commonParams: { + readonly UseFIPS: { + readonly type: "builtInParams"; + readonly name: "useFipsEndpoint"; + }; + readonly Endpoint: { + readonly type: "builtInParams"; + readonly name: "endpoint"; + }; + readonly Region: { + readonly type: "builtInParams"; + readonly name: "region"; + }; + readonly UseDualStack: { + readonly type: "builtInParams"; + readonly name: "useDualstackEndpoint"; + }; +}; +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/endpoint/endpointResolver.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/endpoint/endpointResolver.d.ts new file mode 100644 index 0000000..70a8eae --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/endpoint/endpointResolver.d.ts @@ -0,0 +1,5 @@ +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParameters } from "./EndpointParameters"; +export declare const defaultEndpointResolver: (endpointParams: EndpointParameters, context?: { + logger?: Logger; +}) => EndpointV2; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/endpoint/ruleset.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/endpoint/ruleset.d.ts new file mode 100644 index 0000000..4b23899 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/endpoint/ruleset.d.ts @@ -0,0 +1,2 @@ +import { RuleSetObject } from "@smithy/types"; +export declare const ruleSet: RuleSetObject; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/extensionConfiguration.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/extensionConfiguration.d.ts new file mode 100644 index 0000000..35134ee --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/extensionConfiguration.d.ts @@ -0,0 +1,9 @@ +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; +/** + * @internal + */ +export interface SecretsManagerExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration { +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/index.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/index.d.ts new file mode 100644 index 0000000..4bfdd6e --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/index.d.ts @@ -0,0 +1,40 @@ +/** + * Amazon Web Services Secrets Manager + *

Amazon Web Services Secrets Manager provides a service to enable you to store, manage, and retrieve, secrets.

+ *

This guide provides descriptions of the Secrets Manager API. For more information about using this + * service, see the Amazon Web Services Secrets Manager User Guide.

+ *

+ * API Version + *

+ *

This version of the Secrets Manager API Reference documents the Secrets Manager API version 2017-10-17.

+ *

For a list of endpoints, see Amazon Web Services Secrets Manager + * endpoints.

+ *

+ * Support and Feedback for Amazon Web Services Secrets Manager + *

+ *

We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com, or post your feedback and questions in the Amazon Web Services Secrets Manager Discussion Forum. For more + * information about the Amazon Web Services Discussion Forums, see Forums + * Help.

+ *

+ * Logging API Requests + *

+ *

Amazon Web Services Secrets Manager supports Amazon Web Services CloudTrail, a service that records Amazon Web Services API calls for your Amazon Web Services + * account and delivers log files to an Amazon S3 bucket. By using information that's collected + * by Amazon Web Services CloudTrail, you can determine the requests successfully made to Secrets Manager, who made the + * request, when it was made, and so on. For more about Amazon Web Services Secrets Manager and support for Amazon Web Services + * CloudTrail, see Logging + * Amazon Web Services Secrets Manager Events with Amazon Web Services CloudTrail in the Amazon Web Services Secrets Manager User Guide. + * To learn more about CloudTrail, including enabling it and find your log files, see the Amazon Web Services CloudTrail User Guide.

+ * + * @packageDocumentation + */ +export * from "./SecretsManagerClient"; +export * from "./SecretsManager"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { SecretsManagerExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export { SecretsManagerServiceException } from "./models/SecretsManagerServiceException"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/models/SecretsManagerServiceException.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/models/SecretsManagerServiceException.d.ts new file mode 100644 index 0000000..59adcbb --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/models/SecretsManagerServiceException.d.ts @@ -0,0 +1,13 @@ +import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client"; +export { __ServiceException, __ServiceExceptionOptions }; +/** + * @public + * + * Base exception class for all service exceptions from SecretsManager service. + */ +export declare class SecretsManagerServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions); +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/models/index.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/models/index.d.ts new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/models/index.d.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/models/models_0.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/models/models_0.d.ts new file mode 100644 index 0000000..f8cfba7 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/models/models_0.d.ts @@ -0,0 +1,1960 @@ +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { SecretsManagerServiceException as __BaseException } from "./SecretsManagerServiceException"; +/** + *

A custom type that specifies a Region and the KmsKeyId for a replica secret.

+ * @public + */ +export interface ReplicaRegionType { + /** + *

A Region code. For a list of Region codes, see Name and code of Regions.

+ * @public + */ + Region?: string; + /** + *

The ARN, key ID, or alias of the KMS key to encrypt the secret. If you don't include this field, Secrets Manager uses aws/secretsmanager.

+ * @public + */ + KmsKeyId?: string; +} +/** + *

The error Secrets Manager encountered while retrieving an individual secret as part of BatchGetSecretValue.

+ * @public + */ +export interface APIErrorType { + /** + *

The ARN or name of the secret.

+ * @public + */ + SecretId?: string; + /** + *

The error Secrets Manager encountered while retrieving an individual secret as part of BatchGetSecretValue, for example ResourceNotFoundException,InvalidParameterException, InvalidRequestException, DecryptionFailure, or AccessDeniedException.

+ * @public + */ + ErrorCode?: string; + /** + *

A message describing the error.

+ * @public + */ + Message?: string; +} +/** + * @public + * @enum + */ +export declare const FilterNameStringType: { + readonly all: "all"; + readonly description: "description"; + readonly name: "name"; + readonly owning_service: "owning-service"; + readonly primary_region: "primary-region"; + readonly tag_key: "tag-key"; + readonly tag_value: "tag-value"; +}; +/** + * @public + */ +export type FilterNameStringType = (typeof FilterNameStringType)[keyof typeof FilterNameStringType]; +/** + *

Allows you to add filters when you use the search function in Secrets Manager. For more information, see Find secrets in Secrets Manager.

+ * @public + */ +export interface Filter { + /** + *

The following are keys you can use:

+ *
    + *
  • + *

    + * description: Prefix match, not case-sensitive.

    + *
  • + *
  • + *

    + * name: Prefix match, case-sensitive.

    + *
  • + *
  • + *

    + * tag-key: Prefix match, case-sensitive.

    + *
  • + *
  • + *

    + * tag-value: Prefix match, case-sensitive.

    + *
  • + *
  • + *

    + * primary-region: Prefix match, case-sensitive.

    + *
  • + *
  • + *

    + * owning-service: Prefix match, case-sensitive.

    + *
  • + *
  • + *

    + * all: Breaks the filter value string into words and then searches all attributes for matches. Not case-sensitive.

    + *
  • + *
+ * @public + */ + Key?: FilterNameStringType; + /** + *

The keyword to filter for.

+ *

You can prefix your search value with an exclamation mark (!) in order to perform negation filters.

+ * @public + */ + Values?: string[]; +} +/** + * @public + */ +export interface BatchGetSecretValueRequest { + /** + *

The ARN or names of the secrets to retrieve. You must include Filters or SecretIdList, but not both.

+ * @public + */ + SecretIdList?: string[]; + /** + *

The filters to choose which secrets to retrieve. You must include Filters or SecretIdList, but not both.

+ * @public + */ + Filters?: Filter[]; + /** + *

The number of results to include in the response.

+ *

If there are more results available, in the response, Secrets Manager includes NextToken. + * To get the next results, call BatchGetSecretValue again with the value from + * NextToken. To use this parameter, you must also use the Filters parameter.

+ * @public + */ + MaxResults?: number; + /** + *

A token that indicates where the output should continue from, if a + * previous call did not show all results. To get the next results, call BatchGetSecretValue again + * with this value.

+ * @public + */ + NextToken?: string; +} +/** + *

A structure that contains the secret value and other details for a secret.

+ * @public + */ +export interface SecretValueEntry { + /** + *

The Amazon Resource Name (ARN) of the secret.

+ * @public + */ + ARN?: string; + /** + *

The friendly name of the secret.

+ * @public + */ + Name?: string; + /** + *

The unique version identifier of this version of the secret.

+ * @public + */ + VersionId?: string; + /** + *

The decrypted secret value, if the secret value was originally provided as + * binary data in the form of a byte array. The parameter represents the binary data as + * a base64-encoded + * string.

+ * @public + */ + SecretBinary?: Uint8Array; + /** + *

The decrypted secret value, if the secret value was originally provided as a string or + * through the Secrets Manager console.

+ * @public + */ + SecretString?: string; + /** + *

A list of all of the staging labels currently attached to this version of the + * secret.

+ * @public + */ + VersionStages?: string[]; + /** + *

The date the secret was created.

+ * @public + */ + CreatedDate?: Date; +} +/** + * @public + */ +export interface BatchGetSecretValueResponse { + /** + *

A list of secret values.

+ * @public + */ + SecretValues?: SecretValueEntry[]; + /** + *

Secrets Manager includes this value if + * there's more output available than what is included in the current response. This can + * occur even when the response includes no values at all, such as when you ask for a filtered view + * of a long list. To get the next results, call BatchGetSecretValue again + * with this value.

+ * @public + */ + NextToken?: string; + /** + *

A list of errors Secrets Manager encountered while attempting to retrieve individual secrets.

+ * @public + */ + Errors?: APIErrorType[]; +} +/** + *

Secrets Manager can't decrypt the protected secret text using the provided KMS key.

+ * @public + */ +export declare class DecryptionFailure extends __BaseException { + readonly name: "DecryptionFailure"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

An error occurred on the server side.

+ * @public + */ +export declare class InternalServiceError extends __BaseException { + readonly name: "InternalServiceError"; + readonly $fault: "server"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

The NextToken value is invalid.

+ * @public + */ +export declare class InvalidNextTokenException extends __BaseException { + readonly name: "InvalidNextTokenException"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

The parameter name or value is invalid.

+ * @public + */ +export declare class InvalidParameterException extends __BaseException { + readonly name: "InvalidParameterException"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

A parameter value is not valid for the current state of the + * resource.

+ *

Possible causes:

+ *
    + *
  • + *

    The secret is scheduled for deletion.

    + *
  • + *
  • + *

    You tried to enable rotation on a secret that doesn't already have a Lambda function + * ARN configured and you didn't include such an ARN as a parameter in this call.

    + *
  • + *
  • + *

    The secret is managed by another service, and you must use that service to update it. + * For more information, see Secrets managed by other Amazon Web Services services.

    + *
  • + *
+ * @public + */ +export declare class InvalidRequestException extends __BaseException { + readonly name: "InvalidRequestException"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Secrets Manager can't find the resource that you asked for.

+ * @public + */ +export declare class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface CancelRotateSecretRequest { + /** + *

The ARN or name of the secret.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; +} +/** + * @public + */ +export interface CancelRotateSecretResponse { + /** + *

The ARN of the secret.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret.

+ * @public + */ + Name?: string; + /** + *

The unique identifier of the version of the secret created during the rotation. This + * version might not be complete, and should be evaluated for possible deletion. We recommend + * that you remove the VersionStage value AWSPENDING from this version so that + * Secrets Manager can delete it. Failing to clean up a cancelled rotation can block you from + * starting future rotations.

+ * @public + */ + VersionId?: string; +} +/** + *

A structure that contains information about a tag.

+ * @public + */ +export interface Tag { + /** + *

The key identifier, or name, of the tag.

+ * @public + */ + Key?: string; + /** + *

The string value associated with the key of the tag.

+ * @public + */ + Value?: string; +} +/** + * @public + */ +export interface CreateSecretRequest { + /** + *

The name of the new secret.

+ *

The secret name can contain ASCII letters, numbers, and the following characters: + * /_+=.@-

+ *

Do not end your secret name with a hyphen followed by six characters. If you do so, you + * risk confusion and unexpected results when searching for a secret by partial ARN. Secrets Manager + * automatically adds a hyphen and six random characters after the secret name at the end of the ARN.

+ * @public + */ + Name: string | undefined; + /** + *

If you include SecretString or SecretBinary, then + * Secrets Manager creates an initial version for the secret, and this parameter specifies the unique + * identifier for the new version.

+ * + *

If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.

+ *
+ *

If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a ClientRequestToken and include it in the request.

+ *

This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a UUID-type value to ensure uniqueness of your versions within the specified secret.

+ *
    + *
  • + *

    If the ClientRequestToken value isn't already associated with a version + * of the secret then a new version of the secret is created.

    + *
  • + *
  • + *

    If a version with this value already exists and the version SecretString + * and SecretBinary values are the same as those in the request, then the + * request is ignored.

    + *
  • + *
  • + *

    If a version with this value already exists and that version's + * SecretString and SecretBinary values are different from those + * in the request, then the request fails because you cannot modify an existing version. + * Instead, use PutSecretValue to create a new version.

    + *
  • + *
+ *

This value becomes the VersionId of the new version.

+ * @public + */ + ClientRequestToken?: string; + /** + *

The description of the secret.

+ * @public + */ + Description?: string; + /** + *

The ARN, key ID, or alias of the KMS key that Secrets Manager uses to + * encrypt the secret value in the secret. An alias is always prefixed by alias/, + * for example alias/aws/secretsmanager. For more information, see About aliases.

+ *

To use a KMS key in a different account, use the key ARN or the alias ARN.

+ *

If you don't specify this value, then Secrets Manager uses the key aws/secretsmanager. + * If that key doesn't yet exist, then Secrets Manager creates it for you automatically the first time it + * encrypts the secret value.

+ *

If the secret is in a different Amazon Web Services account from the credentials calling the API, then + * you can't use aws/secretsmanager to encrypt the secret, and you must create + * and use a customer managed KMS key.

+ * @public + */ + KmsKeyId?: string; + /** + *

The binary data to encrypt and store in the new version of + * the secret. We recommend that you store your binary data in a file and then pass the + * contents of the file as a parameter.

+ *

Either SecretString or SecretBinary must have a value, but not + * both.

+ *

This parameter is not available in the Secrets Manager console.

+ * @public + */ + SecretBinary?: Uint8Array; + /** + *

The text data to encrypt and store in this new version of + * the secret. We recommend you use a JSON structure of key/value pairs for your secret value.

+ *

Either SecretString or SecretBinary must have a value, but not + * both.

+ *

If you create a secret by using the Secrets Manager console then Secrets Manager puts the protected + * secret text in only the SecretString parameter. The Secrets Manager console stores the + * information as a JSON structure of key/value pairs that a Lambda rotation function can parse.

+ * @public + */ + SecretString?: string; + /** + *

A list of tags to attach to the secret. Each tag + * is a key and value pair of strings in a JSON text string, for example:

+ *

+ * [\{"Key":"CostCenter","Value":"12345"\},\{"Key":"environment","Value":"production"\}] + *

+ *

Secrets Manager tag key names are case sensitive. A tag with the key "ABC" is a different tag + * from one with key "abc".

+ *

If you check tags in permissions policies as part of your + * security strategy, then adding or removing a tag can change permissions. If the + * completion of this operation would result in you losing your permissions for + * this secret, then Secrets Manager blocks the operation and returns an Access Denied + * error. For more information, see Control + * access to secrets using tags and Limit access to identities with tags that match secrets' tags.

+ *

For information about how to format a + * JSON parameter for the various command line tool environments, see Using JSON for + * Parameters. If your command-line tool or SDK requires quotation marks around the parameter, you should + * use single quotes to avoid confusion with the double quotes required in the JSON text.

+ *

For tag quotas and naming restrictions, see Service quotas for Tagging in the Amazon Web Services General + * Reference guide.

+ * @public + */ + Tags?: Tag[]; + /** + *

A list of Regions and KMS keys to replicate secrets.

+ * @public + */ + AddReplicaRegions?: ReplicaRegionType[]; + /** + *

Specifies whether to overwrite a secret with the same name in the + * destination Region. By default, secrets aren't overwritten.

+ * @public + */ + ForceOverwriteReplicaSecret?: boolean; +} +/** + * @public + * @enum + */ +export declare const StatusType: { + readonly Failed: "Failed"; + readonly InProgress: "InProgress"; + readonly InSync: "InSync"; +}; +/** + * @public + */ +export type StatusType = (typeof StatusType)[keyof typeof StatusType]; +/** + *

A replication object consisting of a RegionReplicationStatus object and includes a Region, KMSKeyId, status, and status message.

+ * @public + */ +export interface ReplicationStatusType { + /** + *

The Region where replication occurs.

+ * @public + */ + Region?: string; + /** + *

Can be an ARN, Key ID, or Alias.

+ * @public + */ + KmsKeyId?: string; + /** + *

The status can be InProgress, Failed, or InSync.

+ * @public + */ + Status?: StatusType; + /** + *

Status message such as "Secret with this name already exists in this + * region".

+ * @public + */ + StatusMessage?: string; + /** + *

The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.

+ * @public + */ + LastAccessedDate?: Date; +} +/** + * @public + */ +export interface CreateSecretResponse { + /** + *

The ARN of the new secret. The ARN includes the name of the secret followed by six random + * characters. This ensures that if you create a new secret with the same name as a deleted secret, + * then users with access to the old secret don't get access to the new secret because the ARNs + * are different.

+ * @public + */ + ARN?: string; + /** + *

The name of the new secret.

+ * @public + */ + Name?: string; + /** + *

The unique identifier associated with the version of the new secret.

+ * @public + */ + VersionId?: string; + /** + *

A list of the replicas of this secret and their status:

+ *
    + *
  • + *

    + * Failed, which indicates that the replica was not created.

    + *
  • + *
  • + *

    + * InProgress, which indicates that Secrets Manager is in the process of creating the replica.

    + *
  • + *
  • + *

    + * InSync, which indicates that the replica was created.

    + *
  • + *
+ * @public + */ + ReplicationStatus?: ReplicationStatusType[]; +} +/** + *

Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the + * KMS key is available, enabled, and not in an invalid state. For more + * information, see Key state: Effect on your KMS key.

+ * @public + */ +export declare class EncryptionFailure extends __BaseException { + readonly name: "EncryptionFailure"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

The request failed because it would exceed one of the Secrets Manager quotas.

+ * @public + */ +export declare class LimitExceededException extends __BaseException { + readonly name: "LimitExceededException"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

The resource policy has syntax errors.

+ * @public + */ +export declare class MalformedPolicyDocumentException extends __BaseException { + readonly name: "MalformedPolicyDocumentException"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

The request failed because you did not complete all the prerequisite steps.

+ * @public + */ +export declare class PreconditionNotMetException extends __BaseException { + readonly name: "PreconditionNotMetException"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

A resource with the ID you requested already exists.

+ * @public + */ +export declare class ResourceExistsException extends __BaseException { + readonly name: "ResourceExistsException"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface DeleteResourcePolicyRequest { + /** + *

The ARN or name of the secret to delete the attached resource-based policy for.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; +} +/** + * @public + */ +export interface DeleteResourcePolicyResponse { + /** + *

The ARN of the secret that the resource-based policy was deleted for.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret that the resource-based policy was deleted for.

+ * @public + */ + Name?: string; +} +/** + * @public + */ +export interface DeleteSecretRequest { + /** + *

The ARN or name of the secret to delete.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; + /** + *

The number of days from 7 to 30 that Secrets Manager waits before permanently deleting the + * secret. You can't use both this parameter and ForceDeleteWithoutRecovery + * in the same call. If you don't use either, then by default Secrets Manager uses a 30 day recovery window.

+ * @public + */ + RecoveryWindowInDays?: number; + /** + *

Specifies whether to delete the secret without any recovery window. You + * can't use both this parameter and RecoveryWindowInDays in the same + * call. If you don't use either, then by default Secrets Manager uses a 30 day recovery window.

+ *

Secrets Manager performs the actual deletion with an asynchronous background process, so there might + * be a short delay before the secret is permanently deleted. If you delete a secret and then + * immediately create a secret with the same name, use appropriate back off and retry logic.

+ *

If you forcibly delete an already deleted or nonexistent secret, the operation does not return ResourceNotFoundException.

+ * + *

Use this parameter with caution. This parameter causes the operation to skip the normal + * recovery window before the permanent deletion that Secrets Manager would normally impose with the + * RecoveryWindowInDays parameter. If you delete a secret with the + * ForceDeleteWithoutRecovery parameter, then you have no opportunity to recover + * the secret. You lose the secret permanently.

+ *
+ * @public + */ + ForceDeleteWithoutRecovery?: boolean; +} +/** + * @public + */ +export interface DeleteSecretResponse { + /** + *

The ARN of the secret.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret.

+ * @public + */ + Name?: string; + /** + *

The date and time after which this secret Secrets Manager can permanently delete this secret, + * and it can no longer be restored. This value is the date and time of the delete request + * plus the number of days in RecoveryWindowInDays.

+ * @public + */ + DeletionDate?: Date; +} +/** + * @public + */ +export interface DescribeSecretRequest { + /** + *

The ARN or name of the secret.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; +} +/** + *

A structure that defines the rotation configuration for the secret.

+ * @public + */ +export interface RotationRulesType { + /** + *

The number of days between rotations of the secret. You can use this + * value to check that your secret meets your compliance guidelines for how often secrets must + * be rotated. If you use this field to set the rotation schedule, Secrets Manager calculates the next rotation + * date based on the previous rotation. Manually updating the secret value by calling + * PutSecretValue or UpdateSecret is considered a valid rotation.

+ *

In DescribeSecret and ListSecrets, this value is calculated from + * the rotation schedule after every successful rotation. In RotateSecret, you can + * set the rotation schedule in RotationRules with AutomaticallyAfterDays + * or ScheduleExpression, but not both. To set a rotation schedule in hours, use + * ScheduleExpression.

+ * @public + */ + AutomaticallyAfterDays?: number; + /** + *

The length of the rotation window in hours, for example 3h for a three + * hour window. Secrets Manager rotates your secret at any time during this window. The window must not + * extend into the next rotation window or the next UTC day. The window starts according to the ScheduleExpression. If you don't specify a Duration, + * for a ScheduleExpression in hours, the window automatically closes after one + * hour. For a ScheduleExpression in days, the window automatically closes at the + * end of the UTC day. For + * more information, including examples, see Schedule expressions + * in Secrets Manager rotation in the Secrets Manager Users Guide.

+ * @public + */ + Duration?: string; + /** + *

A cron() or rate() expression that defines the schedule for + * rotating your secret. Secrets Manager rotation schedules use UTC time zone. Secrets Manager rotates your secret any time during a rotation window.

+ *

Secrets Manager rate() expressions represent the interval in hours or days that you + * want to rotate your secret, for example rate(12 hours) or + * rate(10 days). You can rotate a secret as often as every four hours. If you + * use a rate() expression, the rotation + * window starts at midnight. For a rate in hours, the default rotation window closes after one + * hour. For a rate in days, the default rotation window closes at the end of the day. You can + * set the Duration to change the rotation window. The rotation window must not + * extend into the next UTC day or into the next rotation window.

+ *

You can use a cron() expression to create a rotation schedule that is + * more detailed than a rotation interval. For more information, including examples, see + * Schedule expressions in + * Secrets Manager rotation in the Secrets Manager Users Guide. For a cron expression + * that represents a schedule in hours, the default rotation window closes after one hour. For + * a cron expression that represents a schedule in days, the default rotation window closes at + * the end of the day. You can set the Duration to change the rotation window. The + * rotation window must not extend into the next UTC day or into the next rotation window.

+ * @public + */ + ScheduleExpression?: string; +} +/** + * @public + */ +export interface DescribeSecretResponse { + /** + *

The ARN of the secret.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret.

+ * @public + */ + Name?: string; + /** + *

The description of the secret.

+ * @public + */ + Description?: string; + /** + *

The key ID or alias ARN of the KMS key that Secrets Manager uses to encrypt the secret value. + * If the secret is encrypted with the Amazon Web Services managed key aws/secretsmanager, + * this field is omitted. Secrets created using the console use an KMS key ID.

+ * @public + */ + KmsKeyId?: string; + /** + *

Specifies whether automatic rotation is turned on for this secret.

+ *

To turn on rotation, use RotateSecret. To turn off + * rotation, use CancelRotateSecret.

+ * @public + */ + RotationEnabled?: boolean; + /** + *

The ARN of the Lambda function that Secrets Manager invokes to rotate the + * secret.

+ * @public + */ + RotationLambdaARN?: string; + /** + *

The rotation schedule and Lambda function for this secret. If the secret previously had rotation turned on, but + * it is now turned off, this field shows the previous rotation schedule and rotation function. If the secret never had + * rotation turned on, this field is omitted.

+ * @public + */ + RotationRules?: RotationRulesType; + /** + *

The last date and time that Secrets Manager rotated the secret. + * If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.

+ * @public + */ + LastRotatedDate?: Date; + /** + *

The last date and time that this secret was modified in any way.

+ * @public + */ + LastChangedDate?: Date; + /** + *

The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.

+ * @public + */ + LastAccessedDate?: Date; + /** + *

The date the secret is scheduled for deletion. If it is not scheduled for deletion, this + * field is omitted. When you delete a secret, Secrets Manager requires a + * recovery window of at least 7 days before deleting the secret. Some time after the deleted date, + * Secrets Manager deletes the secret, including all of its versions.

+ *

If a secret is scheduled for deletion, then its details, including the encrypted secret + * value, is not accessible. To cancel a scheduled deletion and restore access to the secret, use RestoreSecret.

+ * @public + */ + DeletedDate?: Date; + /** + *

The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null. If rotation fails, Secrets Manager retries the entire rotation process multiple times. If rotation is unsuccessful, this date may be in the past.

+ *

This date represents the latest date that rotation will occur, but it is not an approximate rotation date. In some cases, for example if you turn off automatic rotation and then turn it back on, the next rotation may occur much sooner than this date.

+ * @public + */ + NextRotationDate?: Date; + /** + *

The list of tags attached to the secret. To add tags to a + * secret, use TagResource. To remove tags, use UntagResource.

+ * @public + */ + Tags?: Tag[]; + /** + *

A list of the versions of the secret that have staging labels attached. + * Versions that don't have staging labels are considered deprecated and Secrets Manager + * can delete them.

+ *

Secrets Manager uses staging labels to indicate the status of a secret version during rotation. The three + * staging labels for rotation are:

+ *
    + *
  • + *

    + * AWSCURRENT, which indicates the current version of the secret.

    + *
  • + *
  • + *

    + * AWSPENDING, which indicates the version of the secret that contains new + * secret information that will become the next current version when rotation finishes.

    + *

    During + * rotation, Secrets Manager creates an AWSPENDING version ID before creating the new secret version. + * To check if a secret version exists, call GetSecretValue.

    + *
  • + *
  • + *

    + * AWSPREVIOUS, which indicates the previous current version of the secret. + * You can use this as the last known good version.

    + *
  • + *
+ *

For more information about rotation and staging labels, see How rotation works.

+ * @public + */ + VersionIdsToStages?: Record; + /** + *

The ID of the service that created this secret. For more information, see Secrets managed by other Amazon Web Services services.

+ * @public + */ + OwningService?: string; + /** + *

The date the secret was created.

+ * @public + */ + CreatedDate?: Date; + /** + *

The Region the secret is in. If a secret is replicated to other Regions, the replicas are listed in ReplicationStatus.

+ * @public + */ + PrimaryRegion?: string; + /** + *

A list of the replicas of this secret and their status:

+ *
    + *
  • + *

    + * Failed, which indicates that the replica was not created.

    + *
  • + *
  • + *

    + * InProgress, which indicates that Secrets Manager is in the process of creating the replica.

    + *
  • + *
  • + *

    + * InSync, which indicates that the replica was created.

    + *
  • + *
+ * @public + */ + ReplicationStatus?: ReplicationStatusType[]; +} +/** + * @public + */ +export interface GetRandomPasswordRequest { + /** + *

The length of the password. If you don't include this parameter, the + * default length is 32 characters.

+ * @public + */ + PasswordLength?: number; + /** + *

A string of the characters that you don't want in the password.

+ * @public + */ + ExcludeCharacters?: string; + /** + *

Specifies whether to exclude numbers from the password. If you don't + * include this switch, the password can contain numbers.

+ * @public + */ + ExcludeNumbers?: boolean; + /** + *

Specifies whether to exclude the following punctuation characters from the password: + * ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` \{ | \} ~. + * If you don't include this switch, the password can contain punctuation.

+ * @public + */ + ExcludePunctuation?: boolean; + /** + *

Specifies whether to exclude uppercase letters from the password. If you + * don't include this switch, the password can contain uppercase letters.

+ * @public + */ + ExcludeUppercase?: boolean; + /** + *

Specifies whether to exclude lowercase letters from the password. If + * you don't include this switch, the password can contain lowercase letters.

+ * @public + */ + ExcludeLowercase?: boolean; + /** + *

Specifies whether to include the space character. If you + * include this switch, the password can contain space characters.

+ * @public + */ + IncludeSpace?: boolean; + /** + *

Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. + * If you don't include this switch, the password contains at least one of every character type.

+ * @public + */ + RequireEachIncludedType?: boolean; +} +/** + * @public + */ +export interface GetRandomPasswordResponse { + /** + *

A string with the password.

+ * @public + */ + RandomPassword?: string; +} +/** + * @public + */ +export interface GetResourcePolicyRequest { + /** + *

The ARN or name of the secret to retrieve the attached resource-based policy for.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; +} +/** + * @public + */ +export interface GetResourcePolicyResponse { + /** + *

The ARN of the secret that the resource-based policy was retrieved for.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret that the resource-based policy was retrieved for.

+ * @public + */ + Name?: string; + /** + *

A JSON-formatted string that contains the permissions policy + * attached to the secret. For more information about permissions policies, see Authentication and access control for + * Secrets Manager.

+ * @public + */ + ResourcePolicy?: string; +} +/** + * @public + */ +export interface GetSecretValueRequest { + /** + *

The ARN or name of the secret to retrieve.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; + /** + *

The unique identifier of the version of the secret to retrieve. If + * you include both this parameter and VersionStage, the two parameters must refer + * to the same secret version. If you don't specify either a VersionStage or + * VersionId, then Secrets Manager returns the AWSCURRENT version.

+ *

This value is typically a UUID-type value with + * 32 hexadecimal digits.

+ * @public + */ + VersionId?: string; + /** + *

The staging label of the version of the secret to retrieve.

+ *

Secrets Manager uses staging labels to keep track of different versions during the rotation process. + * If you include both this parameter and VersionId, the two parameters must refer + * to the same secret version. If you don't specify either a VersionStage or + * VersionId, Secrets Manager returns the AWSCURRENT version.

+ * @public + */ + VersionStage?: string; +} +/** + * @public + */ +export interface GetSecretValueResponse { + /** + *

The ARN of the secret.

+ * @public + */ + ARN?: string; + /** + *

The friendly name of the secret.

+ * @public + */ + Name?: string; + /** + *

The unique identifier of this version of the secret.

+ * @public + */ + VersionId?: string; + /** + *

The decrypted secret value, if the secret value was originally provided as + * binary data in the form of a byte array. When you retrieve a SecretBinary using the HTTP API, the Python SDK, or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not encoded.

+ *

If the secret was created by using the Secrets Manager console, or if the secret value was + * originally provided as a string, then this field is omitted. The secret value appears in + * SecretString instead.

+ * @public + */ + SecretBinary?: Uint8Array; + /** + *

The decrypted secret value, if the secret value was originally provided as a string or + * through the Secrets Manager console.

+ *

If this secret was created by using the console, then Secrets Manager stores the information as a + * JSON structure of key/value pairs.

+ * @public + */ + SecretString?: string; + /** + *

A list of all of the staging labels currently attached to this version of the + * secret.

+ * @public + */ + VersionStages?: string[]; + /** + *

The date and time that this version of the secret was created. If you don't specify + * which version in VersionId or VersionStage, then Secrets Manager uses the + * AWSCURRENT version.

+ * @public + */ + CreatedDate?: Date; +} +/** + * @public + * @enum + */ +export declare const SortOrderType: { + readonly asc: "asc"; + readonly desc: "desc"; +}; +/** + * @public + */ +export type SortOrderType = (typeof SortOrderType)[keyof typeof SortOrderType]; +/** + * @public + */ +export interface ListSecretsRequest { + /** + *

Specifies whether to include secrets scheduled for deletion. By default, secrets scheduled for deletion aren't included.

+ * @public + */ + IncludePlannedDeletion?: boolean; + /** + *

The number of results to include in the response.

+ *

If there are more results available, in the response, Secrets Manager includes NextToken. + * To get the next results, call ListSecrets again with the value from + * NextToken.

+ * @public + */ + MaxResults?: number; + /** + *

A token that indicates where the output should continue from, if a + * previous call did not show all results. To get the next results, call ListSecrets again + * with this value.

+ * @public + */ + NextToken?: string; + /** + *

The filters to apply to the list of secrets.

+ * @public + */ + Filters?: Filter[]; + /** + *

Secrets are listed by CreatedDate.

+ * @public + */ + SortOrder?: SortOrderType; +} +/** + *

A structure that contains the details about a secret. It does not include the encrypted + * SecretString and SecretBinary values. To get those values, use + * GetSecretValue + * .

+ * @public + */ +export interface SecretListEntry { + /** + *

The Amazon Resource Name (ARN) of the secret.

+ * @public + */ + ARN?: string; + /** + *

The friendly name of the secret.

+ * @public + */ + Name?: string; + /** + *

The user-provided description of the secret.

+ * @public + */ + Description?: string; + /** + *

The ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with + * the Amazon Web Services managed key aws/secretsmanager, this field is omitted.

+ * @public + */ + KmsKeyId?: string; + /** + *

Indicates whether automatic, scheduled rotation is enabled for this secret.

+ * @public + */ + RotationEnabled?: boolean; + /** + *

The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to rotate and expire the + * secret either automatically per the schedule or manually by a call to + * RotateSecret + * .

+ * @public + */ + RotationLambdaARN?: string; + /** + *

A structure that defines the rotation configuration for the secret.

+ * @public + */ + RotationRules?: RotationRulesType; + /** + *

The most recent date and time that the Secrets Manager rotation process was successfully completed. This value is null if the secret hasn't ever rotated.

+ * @public + */ + LastRotatedDate?: Date; + /** + *

The last date and time that this secret was modified in any way.

+ * @public + */ + LastChangedDate?: Date; + /** + *

The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.

+ * @public + */ + LastAccessedDate?: Date; + /** + *

The date and time the deletion of the secret occurred. Not present on active secrets. The + * secret can be recovered until the number of days in the recovery window has passed, as + * specified in the RecoveryWindowInDays parameter of the + * DeleteSecret + * operation.

+ * @public + */ + DeletedDate?: Date; + /** + *

The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.

+ * @public + */ + NextRotationDate?: Date; + /** + *

The list of user-defined tags associated with the secret. To add tags to a + * secret, use + * TagResource + * . + * To remove tags, use + * UntagResource + * .

+ * @public + */ + Tags?: Tag[]; + /** + *

A list of all of the currently assigned SecretVersionStage staging labels and + * the SecretVersionId attached to each one. Staging labels are used to keep + * track of the different versions during the rotation process.

+ * + *

A version that does not have any SecretVersionStage is considered + * deprecated and subject to deletion. Such versions are not included in this list.

+ *
+ * @public + */ + SecretVersionsToStages?: Record; + /** + *

Returns the name of the service that created the secret.

+ * @public + */ + OwningService?: string; + /** + *

The date and time when a secret was created.

+ * @public + */ + CreatedDate?: Date; + /** + *

The Region where Secrets Manager originated the secret.

+ * @public + */ + PrimaryRegion?: string; +} +/** + * @public + */ +export interface ListSecretsResponse { + /** + *

A list of the secrets in the account.

+ * @public + */ + SecretList?: SecretListEntry[]; + /** + *

Secrets Manager includes this value if + * there's more output available than what is included in the current response. This can + * occur even when the response includes no values at all, such as when you ask for a filtered view + * of a long list. To get the next results, call ListSecrets again + * with this value.

+ * @public + */ + NextToken?: string; +} +/** + * @public + */ +export interface ListSecretVersionIdsRequest { + /** + *

The ARN or name of the secret whose versions you want to list.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; + /** + *

The number of results to include in the response.

+ *

If there are more results available, in the response, Secrets Manager includes NextToken. + * To get the next results, call ListSecretVersionIds again with the value from NextToken.

+ * @public + */ + MaxResults?: number; + /** + *

A token that indicates where the output should continue from, if a previous call + * did not show all results. To get the next results, call ListSecretVersionIds again with + * this value.

+ * @public + */ + NextToken?: string; + /** + *

Specifies whether to include versions of secrets that don't have any + * staging labels attached to them. Versions without staging labels are considered deprecated and are subject to + * deletion by Secrets Manager. By default, versions without staging labels aren't included.

+ * @public + */ + IncludeDeprecated?: boolean; +} +/** + *

A structure that contains information about one version of a secret.

+ * @public + */ +export interface SecretVersionsListEntry { + /** + *

The unique version identifier of this version of the secret.

+ * @public + */ + VersionId?: string; + /** + *

An array of staging labels that are currently associated with this version of the + * secret.

+ * @public + */ + VersionStages?: string[]; + /** + *

The date that this version of the secret was last accessed. Note that the resolution of + * this field is at the date level and does not include the time.

+ * @public + */ + LastAccessedDate?: Date; + /** + *

The date and time this version of the secret was created.

+ * @public + */ + CreatedDate?: Date; + /** + *

The KMS keys used to encrypt the secret version.

+ * @public + */ + KmsKeyIds?: string[]; +} +/** + * @public + */ +export interface ListSecretVersionIdsResponse { + /** + *

A list of the versions of the secret.

+ * @public + */ + Versions?: SecretVersionsListEntry[]; + /** + *

Secrets Manager includes this value if there's more output available than what is included + * in the current response. This can occur even when the response includes no values at all, + * such as when you ask for a filtered view of a long list. To get the next results, + * call ListSecretVersionIds again with this value.

+ * @public + */ + NextToken?: string; + /** + *

The ARN of the secret.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret.

+ * @public + */ + Name?: string; +} +/** + *

The BlockPublicPolicy parameter is set to true, and the resource policy did not prevent broad access to the secret.

+ * @public + */ +export declare class PublicPolicyException extends __BaseException { + readonly name: "PublicPolicyException"; + readonly $fault: "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface PutResourcePolicyRequest { + /** + *

The ARN or name of the secret to attach the resource-based policy.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; + /** + *

A JSON-formatted string for an Amazon Web Services + * resource-based policy. For example policies, see Permissions + * policy examples.

+ * @public + */ + ResourcePolicy: string | undefined; + /** + *

Specifies whether to block resource-based policies that allow broad access to the secret, for example those that use a wildcard for the principal. By default, public policies aren't blocked.

+ * @public + */ + BlockPublicPolicy?: boolean; +} +/** + * @public + */ +export interface PutResourcePolicyResponse { + /** + *

The ARN of the secret.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret.

+ * @public + */ + Name?: string; +} +/** + * @public + */ +export interface PutSecretValueRequest { + /** + *

The ARN or name of the secret to add a new version to.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ *

If the secret doesn't already exist, use CreateSecret instead.

+ * @public + */ + SecretId: string | undefined; + /** + *

A unique identifier for the new version of the secret.

+ * + *

If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.

+ *
+ *

If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a ClientRequestToken and include it in the request.

+ *

This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a UUID-type value to ensure uniqueness of your versions within the specified secret.

+ *
    + *
  • + *

    If the ClientRequestToken value isn't already associated with a version + * of the secret then a new version of the secret is created.

    + *
  • + *
  • + *

    If a version with this value already exists and that version's + * SecretString or SecretBinary values are the same as those in + * the request then the request is ignored. The operation is idempotent.

    + *
  • + *
  • + *

    If a version with this value already exists and the version of the + * SecretString and SecretBinary values are different from those + * in the request, then the request fails because you can't modify a secret + * version. You can only create new versions to store new secret values.

    + *
  • + *
+ *

This value becomes the VersionId of the new version.

+ * @public + */ + ClientRequestToken?: string; + /** + *

The binary data to encrypt and store in the new version of + * the secret. To use this parameter in the command-line tools, we recommend that you store your + * binary data in a file and then pass the + * contents of the file as a parameter.

+ *

You must include SecretBinary or SecretString, but not both.

+ *

You can't access this value from the Secrets Manager console.

+ * @public + */ + SecretBinary?: Uint8Array; + /** + *

The text to encrypt and store in the new version of the secret.

+ *

You must include SecretBinary or SecretString, but not both.

+ *

We recommend you create the secret string as JSON key/value pairs, as shown in the example.

+ * @public + */ + SecretString?: string; + /** + *

A list of staging labels to attach to this version of the + * secret. Secrets Manager uses staging labels to track versions of a secret through the rotation process.

+ *

If you specify a staging + * label that's already associated with a different version of the same secret, then Secrets Manager + * removes the label from the other version and attaches it to this version. + * If you specify + * AWSCURRENT, and it is already attached to another version, then Secrets Manager also + * moves the staging label AWSPREVIOUS to the version that AWSCURRENT was removed from.

+ *

If you don't include VersionStages, then Secrets Manager automatically + * moves the staging label AWSCURRENT to this version.

+ * @public + */ + VersionStages?: string[]; +} +/** + * @public + */ +export interface PutSecretValueResponse { + /** + *

The ARN of the secret.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret.

+ * @public + */ + Name?: string; + /** + *

The unique identifier of the version of the secret.

+ * @public + */ + VersionId?: string; + /** + *

The list of staging labels that are currently attached to this version of the secret. + * Secrets Manager uses staging labels to track a version as it progresses through the secret rotation + * process.

+ * @public + */ + VersionStages?: string[]; +} +/** + * @public + */ +export interface RemoveRegionsFromReplicationRequest { + /** + *

The ARN or name of the secret.

+ * @public + */ + SecretId: string | undefined; + /** + *

The Regions of the replicas to remove.

+ * @public + */ + RemoveReplicaRegions: string[] | undefined; +} +/** + * @public + */ +export interface RemoveRegionsFromReplicationResponse { + /** + *

The ARN of the primary secret.

+ * @public + */ + ARN?: string; + /** + *

The status of replicas for this secret after you remove Regions.

+ * @public + */ + ReplicationStatus?: ReplicationStatusType[]; +} +/** + * @public + */ +export interface ReplicateSecretToRegionsRequest { + /** + *

The ARN or name of the secret to replicate.

+ * @public + */ + SecretId: string | undefined; + /** + *

A list of Regions in which to replicate the secret.

+ * @public + */ + AddReplicaRegions: ReplicaRegionType[] | undefined; + /** + *

Specifies whether to overwrite a secret with the same name in the destination Region. By default, secrets aren't overwritten.

+ * @public + */ + ForceOverwriteReplicaSecret?: boolean; +} +/** + * @public + */ +export interface ReplicateSecretToRegionsResponse { + /** + *

The ARN of the primary secret.

+ * @public + */ + ARN?: string; + /** + *

The status of replication.

+ * @public + */ + ReplicationStatus?: ReplicationStatusType[]; +} +/** + * @public + */ +export interface RestoreSecretRequest { + /** + *

The ARN or name of the secret to restore.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; +} +/** + * @public + */ +export interface RestoreSecretResponse { + /** + *

The ARN of the secret that was restored.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret that was restored.

+ * @public + */ + Name?: string; +} +/** + * @public + */ +export interface RotateSecretRequest { + /** + *

The ARN or name of the secret to rotate.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; + /** + *

A unique identifier for the new version of the secret. You only need to specify this value if you implement your own retry logic and you want to + * ensure that Secrets Manager doesn't attempt to create a secret version twice.

+ * + *

If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.

+ *
+ *

If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a ClientRequestToken and include it in the request.

+ *

This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a UUID-type value to ensure uniqueness of your versions within the specified secret.

+ * @public + */ + ClientRequestToken?: string; + /** + *

For secrets that use a Lambda rotation function to rotate, the ARN of the Lambda rotation function.

+ *

For secrets that use managed rotation, omit this field. For more information, see Managed rotation in the Secrets Manager User Guide.

+ * @public + */ + RotationLambdaARN?: string; + /** + *

A structure that defines the rotation configuration for this secret.

+ * @public + */ + RotationRules?: RotationRulesType; + /** + *

Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. + * The rotation schedule is defined in RotateSecretRequest$RotationRules.

+ *

For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the + * + * testSecret + * step of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it.

+ *

By default, Secrets Manager rotates the secret immediately.

+ * @public + */ + RotateImmediately?: boolean; +} +/** + * @public + */ +export interface RotateSecretResponse { + /** + *

The ARN of the secret.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret.

+ * @public + */ + Name?: string; + /** + *

The ID of the new version of the secret.

+ * @public + */ + VersionId?: string; +} +/** + * @public + */ +export interface StopReplicationToReplicaRequest { + /** + *

The ARN of the primary secret.

+ * @public + */ + SecretId: string | undefined; +} +/** + * @public + */ +export interface StopReplicationToReplicaResponse { + /** + *

The ARN of the promoted secret. The ARN is the same as the original primary secret except the Region is changed.

+ * @public + */ + ARN?: string; +} +/** + * @public + */ +export interface TagResourceRequest { + /** + *

The identifier for the secret to attach tags to. You can specify either the + * Amazon Resource Name (ARN) or the friendly name of the secret.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; + /** + *

The tags to attach to the secret as a JSON text string argument. Each element in the list consists of a Key + * and a Value.

+ *

For storing multiple values, we recommend that you use a JSON text + * string argument and specify key/value pairs. For more information, see Specifying parameter values for the Amazon Web Services CLI + * in the Amazon Web Services CLI User Guide.

+ * @public + */ + Tags: Tag[] | undefined; +} +/** + * @public + */ +export interface UntagResourceRequest { + /** + *

The ARN or name of the secret.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; + /** + *

A list of tag key names to remove from the secret. You don't specify the value. Both the + * key and its associated value are removed.

+ *

This parameter requires a JSON text string argument.

+ *

For storing multiple values, we recommend that you use a JSON text + * string argument and specify key/value pairs. For more information, see Specifying parameter values for the Amazon Web Services CLI + * in the Amazon Web Services CLI User Guide.

+ * @public + */ + TagKeys: string[] | undefined; +} +/** + * @public + */ +export interface UpdateSecretRequest { + /** + *

The ARN or name of the secret.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; + /** + *

If you include SecretString or SecretBinary, then Secrets Manager creates + * a new version for the secret, and this parameter specifies the unique identifier for the new + * version.

+ * + *

If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.

+ *
+ *

If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a ClientRequestToken and include it in the request.

+ *

This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a UUID-type value to ensure uniqueness of your versions within the specified secret.

+ * @public + */ + ClientRequestToken?: string; + /** + *

The description of the secret.

+ * @public + */ + Description?: string; + /** + *

The ARN, key ID, or alias of the KMS key that Secrets Manager + * uses to encrypt new secret versions as well as any existing versions with the staging labels + * AWSCURRENT, AWSPENDING, or AWSPREVIOUS. If you don't have kms:Encrypt permission to the new key, Secrets Manager does not re-ecrypt existing secret versions with the new key. For more information about versions and staging labels, see Concepts: Version.

+ *

A key alias is always prefixed by alias/, for example alias/aws/secretsmanager. + * For more information, see About aliases.

+ *

If you set this to an empty string, Secrets Manager uses the Amazon Web Services managed key + * aws/secretsmanager. If this key doesn't already exist in your account, then Secrets Manager + * creates it for you automatically. All users and roles in the Amazon Web Services account automatically have access + * to use aws/secretsmanager. Creating aws/secretsmanager can result in a one-time + * significant delay in returning the result.

+ * + *

You can only use the Amazon Web Services managed key aws/secretsmanager if you call this + * operation using credentials from the same Amazon Web Services account that owns the secret. If the secret is in + * a different account, then you must use a customer managed key and provide the ARN of that KMS key in + * this field. The user making the call must have permissions to both the secret and the KMS key in + * their respective accounts.

+ *
+ * @public + */ + KmsKeyId?: string; + /** + *

The binary data to encrypt and store in the new + * version of the secret. We recommend that you + * store your binary data in a file and then pass + * the contents of the file as a parameter.

+ *

Either SecretBinary or + * SecretString must have a value, but not both.

+ *

You can't access this parameter in the Secrets Manager console.

+ * @public + */ + SecretBinary?: Uint8Array; + /** + *

The text data to encrypt and store in the new + * version of the secret. We recommend you use a JSON structure of key/value pairs for your secret value.

+ *

Either SecretBinary or SecretString must have + * a value, but not both.

+ * @public + */ + SecretString?: string; +} +/** + * @public + */ +export interface UpdateSecretResponse { + /** + *

The ARN of the secret that was updated.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret that was updated.

+ * @public + */ + Name?: string; + /** + *

If Secrets Manager created a new version of the secret during this operation, then VersionId + * contains the unique identifier of the new version.

+ * @public + */ + VersionId?: string; +} +/** + * @public + */ +export interface UpdateSecretVersionStageRequest { + /** + *

The ARN or the name of the secret with the version and staging labelsto modify.

+ *

For an ARN, we recommend that you specify a complete ARN rather + * than a partial ARN. See Finding a secret from a partial ARN.

+ * @public + */ + SecretId: string | undefined; + /** + *

The staging label to add to this version.

+ * @public + */ + VersionStage: string | undefined; + /** + *

The ID of the version that the staging label is to be removed + * from. If the staging label you are trying to attach to one version is already attached to a + * different version, then you must include this parameter and specify the version that the label + * is to be removed from. If the label is attached and you either do not specify this parameter, + * or the version ID does not match, then the operation fails.

+ * @public + */ + RemoveFromVersionId?: string; + /** + *

The ID of the version to add the staging label to. To + * remove a label from a version, then do not specify this parameter.

+ *

If the staging label is already attached to a different version of the secret, then you + * must also specify the RemoveFromVersionId parameter.

+ * @public + */ + MoveToVersionId?: string; +} +/** + * @public + */ +export interface UpdateSecretVersionStageResponse { + /** + *

The ARN of the secret that was updated.

+ * @public + */ + ARN?: string; + /** + *

The name of the secret that was updated.

+ * @public + */ + Name?: string; +} +/** + * @public + */ +export interface ValidateResourcePolicyRequest { + /** + *

This field is reserved for internal use.

+ * @public + */ + SecretId?: string; + /** + *

A JSON-formatted string that contains an Amazon Web Services + * resource-based policy. The policy in the string identifies who can access or manage this + * secret and its versions. For example policies, see Permissions policy examples.

+ * @public + */ + ResourcePolicy: string | undefined; +} +/** + *

Displays errors that occurred during validation of the resource policy.

+ * @public + */ +export interface ValidationErrorsEntry { + /** + *

Checks the name of the policy.

+ * @public + */ + CheckName?: string; + /** + *

Displays error messages if validation encounters problems during validation of the resource policy.

+ * @public + */ + ErrorMessage?: string; +} +/** + * @public + */ +export interface ValidateResourcePolicyResponse { + /** + *

True if your policy passes validation, otherwise false.

+ * @public + */ + PolicyValidationPassed?: boolean; + /** + *

Validation errors if your policy didn't pass validation.

+ * @public + */ + ValidationErrors?: ValidationErrorsEntry[]; +} +/** + * @internal + */ +export declare const SecretValueEntryFilterSensitiveLog: (obj: SecretValueEntry) => any; +/** + * @internal + */ +export declare const BatchGetSecretValueResponseFilterSensitiveLog: (obj: BatchGetSecretValueResponse) => any; +/** + * @internal + */ +export declare const CreateSecretRequestFilterSensitiveLog: (obj: CreateSecretRequest) => any; +/** + * @internal + */ +export declare const GetRandomPasswordResponseFilterSensitiveLog: (obj: GetRandomPasswordResponse) => any; +/** + * @internal + */ +export declare const GetSecretValueResponseFilterSensitiveLog: (obj: GetSecretValueResponse) => any; +/** + * @internal + */ +export declare const PutSecretValueRequestFilterSensitiveLog: (obj: PutSecretValueRequest) => any; +/** + * @internal + */ +export declare const UpdateSecretRequestFilterSensitiveLog: (obj: UpdateSecretRequest) => any; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/BatchGetSecretValuePaginator.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/BatchGetSecretValuePaginator.d.ts new file mode 100644 index 0000000..c13fab1 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/BatchGetSecretValuePaginator.d.ts @@ -0,0 +1,7 @@ +import { Paginator } from "@smithy/types"; +import { BatchGetSecretValueCommandInput, BatchGetSecretValueCommandOutput } from "../commands/BatchGetSecretValueCommand"; +import { SecretsManagerPaginationConfiguration } from "./Interfaces"; +/** + * @public + */ +export declare const paginateBatchGetSecretValue: (config: SecretsManagerPaginationConfiguration, input: BatchGetSecretValueCommandInput, ...rest: any[]) => Paginator; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/Interfaces.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/Interfaces.d.ts new file mode 100644 index 0000000..9defcfb --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/Interfaces.d.ts @@ -0,0 +1,8 @@ +import { PaginationConfiguration } from "@smithy/types"; +import { SecretsManagerClient } from "../SecretsManagerClient"; +/** + * @public + */ +export interface SecretsManagerPaginationConfiguration extends PaginationConfiguration { + client: SecretsManagerClient; +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/ListSecretVersionIdsPaginator.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/ListSecretVersionIdsPaginator.d.ts new file mode 100644 index 0000000..6db2a98 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/ListSecretVersionIdsPaginator.d.ts @@ -0,0 +1,7 @@ +import { Paginator } from "@smithy/types"; +import { ListSecretVersionIdsCommandInput, ListSecretVersionIdsCommandOutput } from "../commands/ListSecretVersionIdsCommand"; +import { SecretsManagerPaginationConfiguration } from "./Interfaces"; +/** + * @public + */ +export declare const paginateListSecretVersionIds: (config: SecretsManagerPaginationConfiguration, input: ListSecretVersionIdsCommandInput, ...rest: any[]) => Paginator; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/ListSecretsPaginator.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/ListSecretsPaginator.d.ts new file mode 100644 index 0000000..22d86d1 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/ListSecretsPaginator.d.ts @@ -0,0 +1,7 @@ +import { Paginator } from "@smithy/types"; +import { ListSecretsCommandInput, ListSecretsCommandOutput } from "../commands/ListSecretsCommand"; +import { SecretsManagerPaginationConfiguration } from "./Interfaces"; +/** + * @public + */ +export declare const paginateListSecrets: (config: SecretsManagerPaginationConfiguration, input: ListSecretsCommandInput, ...rest: any[]) => Paginator; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/index.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/index.d.ts new file mode 100644 index 0000000..96d7926 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/pagination/index.d.ts @@ -0,0 +1,4 @@ +export * from "./BatchGetSecretValuePaginator"; +export * from "./Interfaces"; +export * from "./ListSecretVersionIdsPaginator"; +export * from "./ListSecretsPaginator"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/protocols/Aws_json1_1.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/protocols/Aws_json1_1.d.ts new file mode 100644 index 0000000..6ef1888 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/protocols/Aws_json1_1.d.ts @@ -0,0 +1,209 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; +import { BatchGetSecretValueCommandInput, BatchGetSecretValueCommandOutput } from "../commands/BatchGetSecretValueCommand"; +import { CancelRotateSecretCommandInput, CancelRotateSecretCommandOutput } from "../commands/CancelRotateSecretCommand"; +import { CreateSecretCommandInput, CreateSecretCommandOutput } from "../commands/CreateSecretCommand"; +import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "../commands/DeleteResourcePolicyCommand"; +import { DeleteSecretCommandInput, DeleteSecretCommandOutput } from "../commands/DeleteSecretCommand"; +import { DescribeSecretCommandInput, DescribeSecretCommandOutput } from "../commands/DescribeSecretCommand"; +import { GetRandomPasswordCommandInput, GetRandomPasswordCommandOutput } from "../commands/GetRandomPasswordCommand"; +import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "../commands/GetResourcePolicyCommand"; +import { GetSecretValueCommandInput, GetSecretValueCommandOutput } from "../commands/GetSecretValueCommand"; +import { ListSecretsCommandInput, ListSecretsCommandOutput } from "../commands/ListSecretsCommand"; +import { ListSecretVersionIdsCommandInput, ListSecretVersionIdsCommandOutput } from "../commands/ListSecretVersionIdsCommand"; +import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "../commands/PutResourcePolicyCommand"; +import { PutSecretValueCommandInput, PutSecretValueCommandOutput } from "../commands/PutSecretValueCommand"; +import { RemoveRegionsFromReplicationCommandInput, RemoveRegionsFromReplicationCommandOutput } from "../commands/RemoveRegionsFromReplicationCommand"; +import { ReplicateSecretToRegionsCommandInput, ReplicateSecretToRegionsCommandOutput } from "../commands/ReplicateSecretToRegionsCommand"; +import { RestoreSecretCommandInput, RestoreSecretCommandOutput } from "../commands/RestoreSecretCommand"; +import { RotateSecretCommandInput, RotateSecretCommandOutput } from "../commands/RotateSecretCommand"; +import { StopReplicationToReplicaCommandInput, StopReplicationToReplicaCommandOutput } from "../commands/StopReplicationToReplicaCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { UpdateSecretCommandInput, UpdateSecretCommandOutput } from "../commands/UpdateSecretCommand"; +import { UpdateSecretVersionStageCommandInput, UpdateSecretVersionStageCommandOutput } from "../commands/UpdateSecretVersionStageCommand"; +import { ValidateResourcePolicyCommandInput, ValidateResourcePolicyCommandOutput } from "../commands/ValidateResourcePolicyCommand"; +/** + * serializeAws_json1_1BatchGetSecretValueCommand + */ +export declare const se_BatchGetSecretValueCommand: (input: BatchGetSecretValueCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1CancelRotateSecretCommand + */ +export declare const se_CancelRotateSecretCommand: (input: CancelRotateSecretCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1CreateSecretCommand + */ +export declare const se_CreateSecretCommand: (input: CreateSecretCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1DeleteResourcePolicyCommand + */ +export declare const se_DeleteResourcePolicyCommand: (input: DeleteResourcePolicyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1DeleteSecretCommand + */ +export declare const se_DeleteSecretCommand: (input: DeleteSecretCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1DescribeSecretCommand + */ +export declare const se_DescribeSecretCommand: (input: DescribeSecretCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1GetRandomPasswordCommand + */ +export declare const se_GetRandomPasswordCommand: (input: GetRandomPasswordCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1GetResourcePolicyCommand + */ +export declare const se_GetResourcePolicyCommand: (input: GetResourcePolicyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1GetSecretValueCommand + */ +export declare const se_GetSecretValueCommand: (input: GetSecretValueCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1ListSecretsCommand + */ +export declare const se_ListSecretsCommand: (input: ListSecretsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1ListSecretVersionIdsCommand + */ +export declare const se_ListSecretVersionIdsCommand: (input: ListSecretVersionIdsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1PutResourcePolicyCommand + */ +export declare const se_PutResourcePolicyCommand: (input: PutResourcePolicyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1PutSecretValueCommand + */ +export declare const se_PutSecretValueCommand: (input: PutSecretValueCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1RemoveRegionsFromReplicationCommand + */ +export declare const se_RemoveRegionsFromReplicationCommand: (input: RemoveRegionsFromReplicationCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1ReplicateSecretToRegionsCommand + */ +export declare const se_ReplicateSecretToRegionsCommand: (input: ReplicateSecretToRegionsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1RestoreSecretCommand + */ +export declare const se_RestoreSecretCommand: (input: RestoreSecretCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1RotateSecretCommand + */ +export declare const se_RotateSecretCommand: (input: RotateSecretCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1StopReplicationToReplicaCommand + */ +export declare const se_StopReplicationToReplicaCommand: (input: StopReplicationToReplicaCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1TagResourceCommand + */ +export declare const se_TagResourceCommand: (input: TagResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1UntagResourceCommand + */ +export declare const se_UntagResourceCommand: (input: UntagResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1UpdateSecretCommand + */ +export declare const se_UpdateSecretCommand: (input: UpdateSecretCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1UpdateSecretVersionStageCommand + */ +export declare const se_UpdateSecretVersionStageCommand: (input: UpdateSecretVersionStageCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_json1_1ValidateResourcePolicyCommand + */ +export declare const se_ValidateResourcePolicyCommand: (input: ValidateResourcePolicyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * deserializeAws_json1_1BatchGetSecretValueCommand + */ +export declare const de_BatchGetSecretValueCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1CancelRotateSecretCommand + */ +export declare const de_CancelRotateSecretCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1CreateSecretCommand + */ +export declare const de_CreateSecretCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1DeleteResourcePolicyCommand + */ +export declare const de_DeleteResourcePolicyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1DeleteSecretCommand + */ +export declare const de_DeleteSecretCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1DescribeSecretCommand + */ +export declare const de_DescribeSecretCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1GetRandomPasswordCommand + */ +export declare const de_GetRandomPasswordCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1GetResourcePolicyCommand + */ +export declare const de_GetResourcePolicyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1GetSecretValueCommand + */ +export declare const de_GetSecretValueCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1ListSecretsCommand + */ +export declare const de_ListSecretsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1ListSecretVersionIdsCommand + */ +export declare const de_ListSecretVersionIdsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1PutResourcePolicyCommand + */ +export declare const de_PutResourcePolicyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1PutSecretValueCommand + */ +export declare const de_PutSecretValueCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1RemoveRegionsFromReplicationCommand + */ +export declare const de_RemoveRegionsFromReplicationCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1ReplicateSecretToRegionsCommand + */ +export declare const de_ReplicateSecretToRegionsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1RestoreSecretCommand + */ +export declare const de_RestoreSecretCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1RotateSecretCommand + */ +export declare const de_RotateSecretCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1StopReplicationToReplicaCommand + */ +export declare const de_StopReplicationToReplicaCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1TagResourceCommand + */ +export declare const de_TagResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1UntagResourceCommand + */ +export declare const de_UntagResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1UpdateSecretCommand + */ +export declare const de_UpdateSecretCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1UpdateSecretVersionStageCommand + */ +export declare const de_UpdateSecretVersionStageCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_json1_1ValidateResourcePolicyCommand + */ +export declare const de_ValidateResourcePolicyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.browser.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.browser.d.ts new file mode 100644 index 0000000..aa6b01b --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.browser.d.ts @@ -0,0 +1,45 @@ +import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler"; +import { SecretsManagerClientConfig } from "./SecretsManagerClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SecretsManagerClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider; + defaultUserAgentProvider: import("@smithy/types").Provider; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: import("@smithy/protocol-http").HttpHandler | RequestHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider) & (string | import("@smithy/types").Provider | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider)) | undefined; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SecretsManagerHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.d.ts new file mode 100644 index 0000000..9de50c8 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.d.ts @@ -0,0 +1,45 @@ +import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler"; +import { SecretsManagerClientConfig } from "./SecretsManagerClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SecretsManagerClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: (init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit | undefined) => import("@smithy/types").MemoizedProvider; + defaultUserAgentProvider: import("@smithy/types").Provider; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: RequestHandler | import("@smithy/protocol-http").HttpHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider) & (string | import("@smithy/types").Provider | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider)) | undefined; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SecretsManagerHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.native.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.native.d.ts new file mode 100644 index 0000000..b3c9ac7 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.native.d.ts @@ -0,0 +1,44 @@ +import { SecretsManagerClientConfig } from "./SecretsManagerClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SecretsManagerClientConfig) => { + runtime: string; + sha256: import("@smithy/types").HashConstructor; + requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record | import("@smithy/protocol-http").HttpHandler | import("@smithy/fetch-http-handler").FetchHttpHandler; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + streamCollector: import("@smithy/types").StreamCollector; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + defaultUserAgentProvider: import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider; + maxAttempts: number | import("@smithy/types").Provider; + retryMode: string | import("@smithy/types").Provider; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider; + endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider | undefined; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SecretsManagerHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.shared.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.shared.d.ts new file mode 100644 index 0000000..06a3fb6 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeConfig.shared.d.ts @@ -0,0 +1,21 @@ +import { SecretsManagerClientConfig } from "./SecretsManagerClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SecretsManagerClientConfig) => { + apiVersion: string; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + disableHostPrefix: boolean; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SecretsManagerHttpAuthSchemeProvider; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[]; + logger: import("@smithy/types").Logger; + serviceId: string; + urlParser: import("@smithy/types").UrlParser; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeExtensions.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeExtensions.d.ts new file mode 100644 index 0000000..54f20af --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/runtimeExtensions.d.ts @@ -0,0 +1,17 @@ +import { SecretsManagerExtensionConfiguration } from "./extensionConfiguration"; +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: SecretsManagerExtensionConfiguration): void; +} +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} +/** + * @internal + */ +export declare const resolveRuntimeExtensions: (runtimeConfig: any, extensions: RuntimeExtension[]) => any; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/SecretsManager.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/SecretsManager.d.ts new file mode 100644 index 0000000..983f829 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/SecretsManager.d.ts @@ -0,0 +1,401 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; +import { + BatchGetSecretValueCommandInput, + BatchGetSecretValueCommandOutput, +} from "./commands/BatchGetSecretValueCommand"; +import { + CancelRotateSecretCommandInput, + CancelRotateSecretCommandOutput, +} from "./commands/CancelRotateSecretCommand"; +import { + CreateSecretCommandInput, + CreateSecretCommandOutput, +} from "./commands/CreateSecretCommand"; +import { + DeleteResourcePolicyCommandInput, + DeleteResourcePolicyCommandOutput, +} from "./commands/DeleteResourcePolicyCommand"; +import { + DeleteSecretCommandInput, + DeleteSecretCommandOutput, +} from "./commands/DeleteSecretCommand"; +import { + DescribeSecretCommandInput, + DescribeSecretCommandOutput, +} from "./commands/DescribeSecretCommand"; +import { + GetRandomPasswordCommandInput, + GetRandomPasswordCommandOutput, +} from "./commands/GetRandomPasswordCommand"; +import { + GetResourcePolicyCommandInput, + GetResourcePolicyCommandOutput, +} from "./commands/GetResourcePolicyCommand"; +import { + GetSecretValueCommandInput, + GetSecretValueCommandOutput, +} from "./commands/GetSecretValueCommand"; +import { + ListSecretsCommandInput, + ListSecretsCommandOutput, +} from "./commands/ListSecretsCommand"; +import { + ListSecretVersionIdsCommandInput, + ListSecretVersionIdsCommandOutput, +} from "./commands/ListSecretVersionIdsCommand"; +import { + PutResourcePolicyCommandInput, + PutResourcePolicyCommandOutput, +} from "./commands/PutResourcePolicyCommand"; +import { + PutSecretValueCommandInput, + PutSecretValueCommandOutput, +} from "./commands/PutSecretValueCommand"; +import { + RemoveRegionsFromReplicationCommandInput, + RemoveRegionsFromReplicationCommandOutput, +} from "./commands/RemoveRegionsFromReplicationCommand"; +import { + ReplicateSecretToRegionsCommandInput, + ReplicateSecretToRegionsCommandOutput, +} from "./commands/ReplicateSecretToRegionsCommand"; +import { + RestoreSecretCommandInput, + RestoreSecretCommandOutput, +} from "./commands/RestoreSecretCommand"; +import { + RotateSecretCommandInput, + RotateSecretCommandOutput, +} from "./commands/RotateSecretCommand"; +import { + StopReplicationToReplicaCommandInput, + StopReplicationToReplicaCommandOutput, +} from "./commands/StopReplicationToReplicaCommand"; +import { + TagResourceCommandInput, + TagResourceCommandOutput, +} from "./commands/TagResourceCommand"; +import { + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateSecretCommandInput, + UpdateSecretCommandOutput, +} from "./commands/UpdateSecretCommand"; +import { + UpdateSecretVersionStageCommandInput, + UpdateSecretVersionStageCommandOutput, +} from "./commands/UpdateSecretVersionStageCommand"; +import { + ValidateResourcePolicyCommandInput, + ValidateResourcePolicyCommandOutput, +} from "./commands/ValidateResourcePolicyCommand"; +import { SecretsManagerClient } from "./SecretsManagerClient"; +export interface SecretsManager { + batchGetSecretValue(): Promise; + batchGetSecretValue( + args: BatchGetSecretValueCommandInput, + options?: __HttpHandlerOptions + ): Promise; + batchGetSecretValue( + args: BatchGetSecretValueCommandInput, + cb: (err: any, data?: BatchGetSecretValueCommandOutput) => void + ): void; + batchGetSecretValue( + args: BatchGetSecretValueCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: BatchGetSecretValueCommandOutput) => void + ): void; + cancelRotateSecret( + args: CancelRotateSecretCommandInput, + options?: __HttpHandlerOptions + ): Promise; + cancelRotateSecret( + args: CancelRotateSecretCommandInput, + cb: (err: any, data?: CancelRotateSecretCommandOutput) => void + ): void; + cancelRotateSecret( + args: CancelRotateSecretCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CancelRotateSecretCommandOutput) => void + ): void; + createSecret( + args: CreateSecretCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createSecret( + args: CreateSecretCommandInput, + cb: (err: any, data?: CreateSecretCommandOutput) => void + ): void; + createSecret( + args: CreateSecretCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateSecretCommandOutput) => void + ): void; + deleteResourcePolicy( + args: DeleteResourcePolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteResourcePolicy( + args: DeleteResourcePolicyCommandInput, + cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void + ): void; + deleteResourcePolicy( + args: DeleteResourcePolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void + ): void; + deleteSecret( + args: DeleteSecretCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteSecret( + args: DeleteSecretCommandInput, + cb: (err: any, data?: DeleteSecretCommandOutput) => void + ): void; + deleteSecret( + args: DeleteSecretCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteSecretCommandOutput) => void + ): void; + describeSecret( + args: DescribeSecretCommandInput, + options?: __HttpHandlerOptions + ): Promise; + describeSecret( + args: DescribeSecretCommandInput, + cb: (err: any, data?: DescribeSecretCommandOutput) => void + ): void; + describeSecret( + args: DescribeSecretCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeSecretCommandOutput) => void + ): void; + getRandomPassword(): Promise; + getRandomPassword( + args: GetRandomPasswordCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getRandomPassword( + args: GetRandomPasswordCommandInput, + cb: (err: any, data?: GetRandomPasswordCommandOutput) => void + ): void; + getRandomPassword( + args: GetRandomPasswordCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRandomPasswordCommandOutput) => void + ): void; + getResourcePolicy( + args: GetResourcePolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getResourcePolicy( + args: GetResourcePolicyCommandInput, + cb: (err: any, data?: GetResourcePolicyCommandOutput) => void + ): void; + getResourcePolicy( + args: GetResourcePolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetResourcePolicyCommandOutput) => void + ): void; + getSecretValue( + args: GetSecretValueCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getSecretValue( + args: GetSecretValueCommandInput, + cb: (err: any, data?: GetSecretValueCommandOutput) => void + ): void; + getSecretValue( + args: GetSecretValueCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSecretValueCommandOutput) => void + ): void; + listSecrets(): Promise; + listSecrets( + args: ListSecretsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listSecrets( + args: ListSecretsCommandInput, + cb: (err: any, data?: ListSecretsCommandOutput) => void + ): void; + listSecrets( + args: ListSecretsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSecretsCommandOutput) => void + ): void; + listSecretVersionIds( + args: ListSecretVersionIdsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listSecretVersionIds( + args: ListSecretVersionIdsCommandInput, + cb: (err: any, data?: ListSecretVersionIdsCommandOutput) => void + ): void; + listSecretVersionIds( + args: ListSecretVersionIdsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSecretVersionIdsCommandOutput) => void + ): void; + putResourcePolicy( + args: PutResourcePolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + putResourcePolicy( + args: PutResourcePolicyCommandInput, + cb: (err: any, data?: PutResourcePolicyCommandOutput) => void + ): void; + putResourcePolicy( + args: PutResourcePolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutResourcePolicyCommandOutput) => void + ): void; + putSecretValue( + args: PutSecretValueCommandInput, + options?: __HttpHandlerOptions + ): Promise; + putSecretValue( + args: PutSecretValueCommandInput, + cb: (err: any, data?: PutSecretValueCommandOutput) => void + ): void; + putSecretValue( + args: PutSecretValueCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutSecretValueCommandOutput) => void + ): void; + removeRegionsFromReplication( + args: RemoveRegionsFromReplicationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + removeRegionsFromReplication( + args: RemoveRegionsFromReplicationCommandInput, + cb: (err: any, data?: RemoveRegionsFromReplicationCommandOutput) => void + ): void; + removeRegionsFromReplication( + args: RemoveRegionsFromReplicationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: RemoveRegionsFromReplicationCommandOutput) => void + ): void; + replicateSecretToRegions( + args: ReplicateSecretToRegionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + replicateSecretToRegions( + args: ReplicateSecretToRegionsCommandInput, + cb: (err: any, data?: ReplicateSecretToRegionsCommandOutput) => void + ): void; + replicateSecretToRegions( + args: ReplicateSecretToRegionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ReplicateSecretToRegionsCommandOutput) => void + ): void; + restoreSecret( + args: RestoreSecretCommandInput, + options?: __HttpHandlerOptions + ): Promise; + restoreSecret( + args: RestoreSecretCommandInput, + cb: (err: any, data?: RestoreSecretCommandOutput) => void + ): void; + restoreSecret( + args: RestoreSecretCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: RestoreSecretCommandOutput) => void + ): void; + rotateSecret( + args: RotateSecretCommandInput, + options?: __HttpHandlerOptions + ): Promise; + rotateSecret( + args: RotateSecretCommandInput, + cb: (err: any, data?: RotateSecretCommandOutput) => void + ): void; + rotateSecret( + args: RotateSecretCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: RotateSecretCommandOutput) => void + ): void; + stopReplicationToReplica( + args: StopReplicationToReplicaCommandInput, + options?: __HttpHandlerOptions + ): Promise; + stopReplicationToReplica( + args: StopReplicationToReplicaCommandInput, + cb: (err: any, data?: StopReplicationToReplicaCommandOutput) => void + ): void; + stopReplicationToReplica( + args: StopReplicationToReplicaCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StopReplicationToReplicaCommandOutput) => void + ): void; + tagResource( + args: TagResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + tagResource( + args: TagResourceCommandInput, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + untagResource( + args: UntagResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + untagResource( + args: UntagResourceCommandInput, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + updateSecret( + args: UpdateSecretCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateSecret( + args: UpdateSecretCommandInput, + cb: (err: any, data?: UpdateSecretCommandOutput) => void + ): void; + updateSecret( + args: UpdateSecretCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateSecretCommandOutput) => void + ): void; + updateSecretVersionStage( + args: UpdateSecretVersionStageCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateSecretVersionStage( + args: UpdateSecretVersionStageCommandInput, + cb: (err: any, data?: UpdateSecretVersionStageCommandOutput) => void + ): void; + updateSecretVersionStage( + args: UpdateSecretVersionStageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateSecretVersionStageCommandOutput) => void + ): void; + validateResourcePolicy( + args: ValidateResourcePolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + validateResourcePolicy( + args: ValidateResourcePolicyCommandInput, + cb: (err: any, data?: ValidateResourcePolicyCommandOutput) => void + ): void; + validateResourcePolicy( + args: ValidateResourcePolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ValidateResourcePolicyCommandOutput) => void + ): void; +} +export declare class SecretsManager + extends SecretsManagerClient + implements SecretsManager {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/SecretsManagerClient.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/SecretsManagerClient.d.ts new file mode 100644 index 0000000..497cc34 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/SecretsManagerClient.d.ts @@ -0,0 +1,259 @@ +import { + HostHeaderInputConfig, + HostHeaderResolvedConfig, +} from "@aws-sdk/middleware-host-header"; +import { + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { + RegionInputConfig, + RegionResolvedConfig, +} from "@smithy/config-resolver"; +import { + EndpointInputConfig, + EndpointResolvedConfig, +} from "@smithy/middleware-endpoint"; +import { + RetryInputConfig, + RetryResolvedConfig, +} from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + AwsCredentialIdentityProvider, + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; +import { + HttpAuthSchemeInputConfig, + HttpAuthSchemeResolvedConfig, +} from "./auth/httpAuthSchemeProvider"; +import { + BatchGetSecretValueCommandInput, + BatchGetSecretValueCommandOutput, +} from "./commands/BatchGetSecretValueCommand"; +import { + CancelRotateSecretCommandInput, + CancelRotateSecretCommandOutput, +} from "./commands/CancelRotateSecretCommand"; +import { + CreateSecretCommandInput, + CreateSecretCommandOutput, +} from "./commands/CreateSecretCommand"; +import { + DeleteResourcePolicyCommandInput, + DeleteResourcePolicyCommandOutput, +} from "./commands/DeleteResourcePolicyCommand"; +import { + DeleteSecretCommandInput, + DeleteSecretCommandOutput, +} from "./commands/DeleteSecretCommand"; +import { + DescribeSecretCommandInput, + DescribeSecretCommandOutput, +} from "./commands/DescribeSecretCommand"; +import { + GetRandomPasswordCommandInput, + GetRandomPasswordCommandOutput, +} from "./commands/GetRandomPasswordCommand"; +import { + GetResourcePolicyCommandInput, + GetResourcePolicyCommandOutput, +} from "./commands/GetResourcePolicyCommand"; +import { + GetSecretValueCommandInput, + GetSecretValueCommandOutput, +} from "./commands/GetSecretValueCommand"; +import { + ListSecretsCommandInput, + ListSecretsCommandOutput, +} from "./commands/ListSecretsCommand"; +import { + ListSecretVersionIdsCommandInput, + ListSecretVersionIdsCommandOutput, +} from "./commands/ListSecretVersionIdsCommand"; +import { + PutResourcePolicyCommandInput, + PutResourcePolicyCommandOutput, +} from "./commands/PutResourcePolicyCommand"; +import { + PutSecretValueCommandInput, + PutSecretValueCommandOutput, +} from "./commands/PutSecretValueCommand"; +import { + RemoveRegionsFromReplicationCommandInput, + RemoveRegionsFromReplicationCommandOutput, +} from "./commands/RemoveRegionsFromReplicationCommand"; +import { + ReplicateSecretToRegionsCommandInput, + ReplicateSecretToRegionsCommandOutput, +} from "./commands/ReplicateSecretToRegionsCommand"; +import { + RestoreSecretCommandInput, + RestoreSecretCommandOutput, +} from "./commands/RestoreSecretCommand"; +import { + RotateSecretCommandInput, + RotateSecretCommandOutput, +} from "./commands/RotateSecretCommand"; +import { + StopReplicationToReplicaCommandInput, + StopReplicationToReplicaCommandOutput, +} from "./commands/StopReplicationToReplicaCommand"; +import { + TagResourceCommandInput, + TagResourceCommandOutput, +} from "./commands/TagResourceCommand"; +import { + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateSecretCommandInput, + UpdateSecretCommandOutput, +} from "./commands/UpdateSecretCommand"; +import { + UpdateSecretVersionStageCommandInput, + UpdateSecretVersionStageCommandOutput, +} from "./commands/UpdateSecretVersionStageCommand"; +import { + ValidateResourcePolicyCommandInput, + ValidateResourcePolicyCommandOutput, +} from "./commands/ValidateResourcePolicyCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, +} from "./endpoint/EndpointParameters"; +import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; +export { __Client }; +export type ServiceInputTypes = + | BatchGetSecretValueCommandInput + | CancelRotateSecretCommandInput + | CreateSecretCommandInput + | DeleteResourcePolicyCommandInput + | DeleteSecretCommandInput + | DescribeSecretCommandInput + | GetRandomPasswordCommandInput + | GetResourcePolicyCommandInput + | GetSecretValueCommandInput + | ListSecretVersionIdsCommandInput + | ListSecretsCommandInput + | PutResourcePolicyCommandInput + | PutSecretValueCommandInput + | RemoveRegionsFromReplicationCommandInput + | ReplicateSecretToRegionsCommandInput + | RestoreSecretCommandInput + | RotateSecretCommandInput + | StopReplicationToReplicaCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput + | UpdateSecretCommandInput + | UpdateSecretVersionStageCommandInput + | ValidateResourcePolicyCommandInput; +export type ServiceOutputTypes = + | BatchGetSecretValueCommandOutput + | CancelRotateSecretCommandOutput + | CreateSecretCommandOutput + | DeleteResourcePolicyCommandOutput + | DeleteSecretCommandOutput + | DescribeSecretCommandOutput + | GetRandomPasswordCommandOutput + | GetResourcePolicyCommandOutput + | GetSecretValueCommandOutput + | ListSecretVersionIdsCommandOutput + | ListSecretsCommandOutput + | PutResourcePolicyCommandOutput + | PutSecretValueCommandOutput + | RemoveRegionsFromReplicationCommandOutput + | ReplicateSecretToRegionsCommandOutput + | RestoreSecretCommandOutput + | RotateSecretCommandOutput + | StopReplicationToReplicaCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput + | UpdateSecretCommandOutput + | UpdateSecretVersionStageCommandOutput + | ValidateResourcePolicyCommandOutput; +export interface ClientDefaults + extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + requestHandler?: __HttpHandlerUserInput; + sha256?: __ChecksumConstructor | __HashConstructor; + urlParser?: __UrlParser; + bodyLengthChecker?: __BodyLengthCalculator; + streamCollector?: __StreamCollector; + base64Decoder?: __Decoder; + base64Encoder?: __Encoder; + utf8Decoder?: __Decoder; + utf8Encoder?: __Encoder; + runtime?: string; + disableHostPrefix?: boolean; + serviceId?: string; + useDualstackEndpoint?: boolean | __Provider; + useFipsEndpoint?: boolean | __Provider; + defaultUserAgentProvider?: Provider<__UserAgent>; + region?: string | __Provider; + credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider; + maxAttempts?: number | __Provider; + retryMode?: string | __Provider; + logger?: __Logger; + extensions?: RuntimeExtension[]; + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} +export type SecretsManagerClientConfigType = Partial< + __SmithyConfiguration<__HttpHandlerOptions> +> & + ClientDefaults & + RegionInputConfig & + EndpointInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + UserAgentInputConfig & + HttpAuthSchemeInputConfig & + ClientInputEndpointParameters; +export interface SecretsManagerClientConfig + extends SecretsManagerClientConfigType {} +export type SecretsManagerClientResolvedConfigType = + __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + RegionResolvedConfig & + EndpointResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + UserAgentResolvedConfig & + HttpAuthSchemeResolvedConfig & + ClientResolvedEndpointParameters; +export interface SecretsManagerClientResolvedConfig + extends SecretsManagerClientResolvedConfigType {} +export declare class SecretsManagerClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + SecretsManagerClientResolvedConfig +> { + readonly config: SecretsManagerClientResolvedConfig; + constructor( + ...[configuration]: __CheckOptionalClientConfig + ); + destroy(): void; + private getDefaultHttpAuthSchemeParametersProvider; + private getIdentityProviderConfigProvider; +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts new file mode 100644 index 0000000..35c3203 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts @@ -0,0 +1,32 @@ +import { + AwsCredentialIdentity, + AwsCredentialIdentityProvider, + HttpAuthScheme, +} from "@smithy/types"; +import { SecretsManagerHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider( + httpAuthSchemeProvider: SecretsManagerHttpAuthSchemeProvider + ): void; + httpAuthSchemeProvider(): SecretsManagerHttpAuthSchemeProvider; + setCredentials( + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider + ): void; + credentials(): + | AwsCredentialIdentity + | AwsCredentialIdentityProvider + | undefined; +} +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: SecretsManagerHttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; +export declare const getHttpAuthExtensionConfiguration: ( + runtimeConfig: HttpAuthRuntimeConfig +) => HttpAuthExtensionConfiguration; +export declare const resolveHttpAuthRuntimeConfig: ( + config: HttpAuthExtensionConfiguration +) => HttpAuthRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts new file mode 100644 index 0000000..dc7eb20 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts @@ -0,0 +1,44 @@ +import { + AwsSdkSigV4AuthInputConfig, + AwsSdkSigV4AuthResolvedConfig, + AwsSdkSigV4PreviouslyResolved, +} from "@aws-sdk/core"; +import { + HandlerExecutionContext, + HttpAuthScheme, + HttpAuthSchemeParameters, + HttpAuthSchemeParametersProvider, + HttpAuthSchemeProvider, +} from "@smithy/types"; +import { SecretsManagerClientResolvedConfig } from "../SecretsManagerClient"; +export interface SecretsManagerHttpAuthSchemeParameters + extends HttpAuthSchemeParameters { + region?: string; +} +export interface SecretsManagerHttpAuthSchemeParametersProvider + extends HttpAuthSchemeParametersProvider< + SecretsManagerClientResolvedConfig, + HandlerExecutionContext, + SecretsManagerHttpAuthSchemeParameters, + object + > {} +export declare const defaultSecretsManagerHttpAuthSchemeParametersProvider: ( + config: SecretsManagerClientResolvedConfig, + context: HandlerExecutionContext, + input: object +) => Promise; +export interface SecretsManagerHttpAuthSchemeProvider + extends HttpAuthSchemeProvider {} +export declare const defaultSecretsManagerHttpAuthSchemeProvider: SecretsManagerHttpAuthSchemeProvider; +export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig { + httpAuthSchemes?: HttpAuthScheme[]; + httpAuthSchemeProvider?: SecretsManagerHttpAuthSchemeProvider; +} +export interface HttpAuthSchemeResolvedConfig + extends AwsSdkSigV4AuthResolvedConfig { + readonly httpAuthSchemes: HttpAuthScheme[]; + readonly httpAuthSchemeProvider: SecretsManagerHttpAuthSchemeProvider; +} +export declare const resolveHttpAuthSchemeConfig: ( + config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved +) => T & HttpAuthSchemeResolvedConfig; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/BatchGetSecretValueCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/BatchGetSecretValueCommand.d.ts new file mode 100644 index 0000000..d3283ef --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/BatchGetSecretValueCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + BatchGetSecretValueRequest, + BatchGetSecretValueResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface BatchGetSecretValueCommandInput + extends BatchGetSecretValueRequest {} +export interface BatchGetSecretValueCommandOutput + extends BatchGetSecretValueResponse, + __MetadataBearer {} +declare const BatchGetSecretValueCommand_base: { + new ( + input: BatchGetSecretValueCommandInput + ): import("@smithy/smithy-client").CommandImpl< + BatchGetSecretValueCommandInput, + BatchGetSecretValueCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + ...[input]: [] | [BatchGetSecretValueCommandInput] + ): import("@smithy/smithy-client").CommandImpl< + BatchGetSecretValueCommandInput, + BatchGetSecretValueCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class BatchGetSecretValueCommand extends BatchGetSecretValueCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/CancelRotateSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/CancelRotateSecretCommand.d.ts new file mode 100644 index 0000000..5085547 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/CancelRotateSecretCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + CancelRotateSecretRequest, + CancelRotateSecretResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface CancelRotateSecretCommandInput + extends CancelRotateSecretRequest {} +export interface CancelRotateSecretCommandOutput + extends CancelRotateSecretResponse, + __MetadataBearer {} +declare const CancelRotateSecretCommand_base: { + new ( + input: CancelRotateSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + CancelRotateSecretCommandInput, + CancelRotateSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: CancelRotateSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + CancelRotateSecretCommandInput, + CancelRotateSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class CancelRotateSecretCommand extends CancelRotateSecretCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/CreateSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/CreateSecretCommand.d.ts new file mode 100644 index 0000000..bb4a285 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/CreateSecretCommand.d.ts @@ -0,0 +1,35 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { CreateSecretRequest, CreateSecretResponse } from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface CreateSecretCommandInput extends CreateSecretRequest {} +export interface CreateSecretCommandOutput + extends CreateSecretResponse, + __MetadataBearer {} +declare const CreateSecretCommand_base: { + new ( + input: CreateSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + CreateSecretCommandInput, + CreateSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: CreateSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + CreateSecretCommandInput, + CreateSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class CreateSecretCommand extends CreateSecretCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts new file mode 100644 index 0000000..fff0727 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + DeleteResourcePolicyRequest, + DeleteResourcePolicyResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface DeleteResourcePolicyCommandInput + extends DeleteResourcePolicyRequest {} +export interface DeleteResourcePolicyCommandOutput + extends DeleteResourcePolicyResponse, + __MetadataBearer {} +declare const DeleteResourcePolicyCommand_base: { + new ( + input: DeleteResourcePolicyCommandInput + ): import("@smithy/smithy-client").CommandImpl< + DeleteResourcePolicyCommandInput, + DeleteResourcePolicyCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: DeleteResourcePolicyCommandInput + ): import("@smithy/smithy-client").CommandImpl< + DeleteResourcePolicyCommandInput, + DeleteResourcePolicyCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class DeleteResourcePolicyCommand extends DeleteResourcePolicyCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/DeleteSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/DeleteSecretCommand.d.ts new file mode 100644 index 0000000..cb41576 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/DeleteSecretCommand.d.ts @@ -0,0 +1,35 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { DeleteSecretRequest, DeleteSecretResponse } from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface DeleteSecretCommandInput extends DeleteSecretRequest {} +export interface DeleteSecretCommandOutput + extends DeleteSecretResponse, + __MetadataBearer {} +declare const DeleteSecretCommand_base: { + new ( + input: DeleteSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + DeleteSecretCommandInput, + DeleteSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: DeleteSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + DeleteSecretCommandInput, + DeleteSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class DeleteSecretCommand extends DeleteSecretCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/DescribeSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/DescribeSecretCommand.d.ts new file mode 100644 index 0000000..dc07e2f --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/DescribeSecretCommand.d.ts @@ -0,0 +1,38 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + DescribeSecretRequest, + DescribeSecretResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface DescribeSecretCommandInput extends DescribeSecretRequest {} +export interface DescribeSecretCommandOutput + extends DescribeSecretResponse, + __MetadataBearer {} +declare const DescribeSecretCommand_base: { + new ( + input: DescribeSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + DescribeSecretCommandInput, + DescribeSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: DescribeSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + DescribeSecretCommandInput, + DescribeSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class DescribeSecretCommand extends DescribeSecretCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/GetRandomPasswordCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/GetRandomPasswordCommand.d.ts new file mode 100644 index 0000000..807cc91 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/GetRandomPasswordCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + GetRandomPasswordRequest, + GetRandomPasswordResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface GetRandomPasswordCommandInput + extends GetRandomPasswordRequest {} +export interface GetRandomPasswordCommandOutput + extends GetRandomPasswordResponse, + __MetadataBearer {} +declare const GetRandomPasswordCommand_base: { + new ( + input: GetRandomPasswordCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetRandomPasswordCommandInput, + GetRandomPasswordCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + ...[input]: [] | [GetRandomPasswordCommandInput] + ): import("@smithy/smithy-client").CommandImpl< + GetRandomPasswordCommandInput, + GetRandomPasswordCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class GetRandomPasswordCommand extends GetRandomPasswordCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts new file mode 100644 index 0000000..95b420c --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + GetResourcePolicyRequest, + GetResourcePolicyResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface GetResourcePolicyCommandInput + extends GetResourcePolicyRequest {} +export interface GetResourcePolicyCommandOutput + extends GetResourcePolicyResponse, + __MetadataBearer {} +declare const GetResourcePolicyCommand_base: { + new ( + input: GetResourcePolicyCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetResourcePolicyCommandInput, + GetResourcePolicyCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: GetResourcePolicyCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetResourcePolicyCommandInput, + GetResourcePolicyCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class GetResourcePolicyCommand extends GetResourcePolicyCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/GetSecretValueCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/GetSecretValueCommand.d.ts new file mode 100644 index 0000000..6acc8d6 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/GetSecretValueCommand.d.ts @@ -0,0 +1,38 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + GetSecretValueRequest, + GetSecretValueResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface GetSecretValueCommandInput extends GetSecretValueRequest {} +export interface GetSecretValueCommandOutput + extends GetSecretValueResponse, + __MetadataBearer {} +declare const GetSecretValueCommand_base: { + new ( + input: GetSecretValueCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetSecretValueCommandInput, + GetSecretValueCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: GetSecretValueCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetSecretValueCommandInput, + GetSecretValueCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class GetSecretValueCommand extends GetSecretValueCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts new file mode 100644 index 0000000..bae005d --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + ListSecretVersionIdsRequest, + ListSecretVersionIdsResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface ListSecretVersionIdsCommandInput + extends ListSecretVersionIdsRequest {} +export interface ListSecretVersionIdsCommandOutput + extends ListSecretVersionIdsResponse, + __MetadataBearer {} +declare const ListSecretVersionIdsCommand_base: { + new ( + input: ListSecretVersionIdsCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ListSecretVersionIdsCommandInput, + ListSecretVersionIdsCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: ListSecretVersionIdsCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ListSecretVersionIdsCommandInput, + ListSecretVersionIdsCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class ListSecretVersionIdsCommand extends ListSecretVersionIdsCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ListSecretsCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ListSecretsCommand.d.ts new file mode 100644 index 0000000..f4d2913 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ListSecretsCommand.d.ts @@ -0,0 +1,35 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { ListSecretsRequest, ListSecretsResponse } from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface ListSecretsCommandInput extends ListSecretsRequest {} +export interface ListSecretsCommandOutput + extends ListSecretsResponse, + __MetadataBearer {} +declare const ListSecretsCommand_base: { + new ( + input: ListSecretsCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ListSecretsCommandInput, + ListSecretsCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + ...[input]: [] | [ListSecretsCommandInput] + ): import("@smithy/smithy-client").CommandImpl< + ListSecretsCommandInput, + ListSecretsCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class ListSecretsCommand extends ListSecretsCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts new file mode 100644 index 0000000..3670585 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + PutResourcePolicyRequest, + PutResourcePolicyResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface PutResourcePolicyCommandInput + extends PutResourcePolicyRequest {} +export interface PutResourcePolicyCommandOutput + extends PutResourcePolicyResponse, + __MetadataBearer {} +declare const PutResourcePolicyCommand_base: { + new ( + input: PutResourcePolicyCommandInput + ): import("@smithy/smithy-client").CommandImpl< + PutResourcePolicyCommandInput, + PutResourcePolicyCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: PutResourcePolicyCommandInput + ): import("@smithy/smithy-client").CommandImpl< + PutResourcePolicyCommandInput, + PutResourcePolicyCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class PutResourcePolicyCommand extends PutResourcePolicyCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/PutSecretValueCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/PutSecretValueCommand.d.ts new file mode 100644 index 0000000..e1a2d2f --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/PutSecretValueCommand.d.ts @@ -0,0 +1,38 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + PutSecretValueRequest, + PutSecretValueResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface PutSecretValueCommandInput extends PutSecretValueRequest {} +export interface PutSecretValueCommandOutput + extends PutSecretValueResponse, + __MetadataBearer {} +declare const PutSecretValueCommand_base: { + new ( + input: PutSecretValueCommandInput + ): import("@smithy/smithy-client").CommandImpl< + PutSecretValueCommandInput, + PutSecretValueCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: PutSecretValueCommandInput + ): import("@smithy/smithy-client").CommandImpl< + PutSecretValueCommandInput, + PutSecretValueCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class PutSecretValueCommand extends PutSecretValueCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/RemoveRegionsFromReplicationCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/RemoveRegionsFromReplicationCommand.d.ts new file mode 100644 index 0000000..225ac15 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/RemoveRegionsFromReplicationCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + RemoveRegionsFromReplicationRequest, + RemoveRegionsFromReplicationResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface RemoveRegionsFromReplicationCommandInput + extends RemoveRegionsFromReplicationRequest {} +export interface RemoveRegionsFromReplicationCommandOutput + extends RemoveRegionsFromReplicationResponse, + __MetadataBearer {} +declare const RemoveRegionsFromReplicationCommand_base: { + new ( + input: RemoveRegionsFromReplicationCommandInput + ): import("@smithy/smithy-client").CommandImpl< + RemoveRegionsFromReplicationCommandInput, + RemoveRegionsFromReplicationCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: RemoveRegionsFromReplicationCommandInput + ): import("@smithy/smithy-client").CommandImpl< + RemoveRegionsFromReplicationCommandInput, + RemoveRegionsFromReplicationCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class RemoveRegionsFromReplicationCommand extends RemoveRegionsFromReplicationCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts new file mode 100644 index 0000000..a9558b1 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + ReplicateSecretToRegionsRequest, + ReplicateSecretToRegionsResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface ReplicateSecretToRegionsCommandInput + extends ReplicateSecretToRegionsRequest {} +export interface ReplicateSecretToRegionsCommandOutput + extends ReplicateSecretToRegionsResponse, + __MetadataBearer {} +declare const ReplicateSecretToRegionsCommand_base: { + new ( + input: ReplicateSecretToRegionsCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ReplicateSecretToRegionsCommandInput, + ReplicateSecretToRegionsCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: ReplicateSecretToRegionsCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ReplicateSecretToRegionsCommandInput, + ReplicateSecretToRegionsCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class ReplicateSecretToRegionsCommand extends ReplicateSecretToRegionsCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/RestoreSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/RestoreSecretCommand.d.ts new file mode 100644 index 0000000..86ec341 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/RestoreSecretCommand.d.ts @@ -0,0 +1,38 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + RestoreSecretRequest, + RestoreSecretResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface RestoreSecretCommandInput extends RestoreSecretRequest {} +export interface RestoreSecretCommandOutput + extends RestoreSecretResponse, + __MetadataBearer {} +declare const RestoreSecretCommand_base: { + new ( + input: RestoreSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + RestoreSecretCommandInput, + RestoreSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: RestoreSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + RestoreSecretCommandInput, + RestoreSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class RestoreSecretCommand extends RestoreSecretCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/RotateSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/RotateSecretCommand.d.ts new file mode 100644 index 0000000..69d758c --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/RotateSecretCommand.d.ts @@ -0,0 +1,35 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { RotateSecretRequest, RotateSecretResponse } from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface RotateSecretCommandInput extends RotateSecretRequest {} +export interface RotateSecretCommandOutput + extends RotateSecretResponse, + __MetadataBearer {} +declare const RotateSecretCommand_base: { + new ( + input: RotateSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + RotateSecretCommandInput, + RotateSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: RotateSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + RotateSecretCommandInput, + RotateSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class RotateSecretCommand extends RotateSecretCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/StopReplicationToReplicaCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/StopReplicationToReplicaCommand.d.ts new file mode 100644 index 0000000..0b94551 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/StopReplicationToReplicaCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + StopReplicationToReplicaRequest, + StopReplicationToReplicaResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface StopReplicationToReplicaCommandInput + extends StopReplicationToReplicaRequest {} +export interface StopReplicationToReplicaCommandOutput + extends StopReplicationToReplicaResponse, + __MetadataBearer {} +declare const StopReplicationToReplicaCommand_base: { + new ( + input: StopReplicationToReplicaCommandInput + ): import("@smithy/smithy-client").CommandImpl< + StopReplicationToReplicaCommandInput, + StopReplicationToReplicaCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: StopReplicationToReplicaCommandInput + ): import("@smithy/smithy-client").CommandImpl< + StopReplicationToReplicaCommandInput, + StopReplicationToReplicaCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class StopReplicationToReplicaCommand extends StopReplicationToReplicaCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/TagResourceCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/TagResourceCommand.d.ts new file mode 100644 index 0000000..22e8c66 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/TagResourceCommand.d.ts @@ -0,0 +1,33 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { TagResourceRequest } from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface TagResourceCommandInput extends TagResourceRequest {} +export interface TagResourceCommandOutput extends __MetadataBearer {} +declare const TagResourceCommand_base: { + new ( + input: TagResourceCommandInput + ): import("@smithy/smithy-client").CommandImpl< + TagResourceCommandInput, + TagResourceCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: TagResourceCommandInput + ): import("@smithy/smithy-client").CommandImpl< + TagResourceCommandInput, + TagResourceCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class TagResourceCommand extends TagResourceCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/UntagResourceCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/UntagResourceCommand.d.ts new file mode 100644 index 0000000..139b377 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/UntagResourceCommand.d.ts @@ -0,0 +1,33 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { UntagResourceRequest } from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface UntagResourceCommandInput extends UntagResourceRequest {} +export interface UntagResourceCommandOutput extends __MetadataBearer {} +declare const UntagResourceCommand_base: { + new ( + input: UntagResourceCommandInput + ): import("@smithy/smithy-client").CommandImpl< + UntagResourceCommandInput, + UntagResourceCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: UntagResourceCommandInput + ): import("@smithy/smithy-client").CommandImpl< + UntagResourceCommandInput, + UntagResourceCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class UntagResourceCommand extends UntagResourceCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/UpdateSecretCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/UpdateSecretCommand.d.ts new file mode 100644 index 0000000..79508d9 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/UpdateSecretCommand.d.ts @@ -0,0 +1,35 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { UpdateSecretRequest, UpdateSecretResponse } from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface UpdateSecretCommandInput extends UpdateSecretRequest {} +export interface UpdateSecretCommandOutput + extends UpdateSecretResponse, + __MetadataBearer {} +declare const UpdateSecretCommand_base: { + new ( + input: UpdateSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + UpdateSecretCommandInput, + UpdateSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: UpdateSecretCommandInput + ): import("@smithy/smithy-client").CommandImpl< + UpdateSecretCommandInput, + UpdateSecretCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class UpdateSecretCommand extends UpdateSecretCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts new file mode 100644 index 0000000..15aef2a --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + UpdateSecretVersionStageRequest, + UpdateSecretVersionStageResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface UpdateSecretVersionStageCommandInput + extends UpdateSecretVersionStageRequest {} +export interface UpdateSecretVersionStageCommandOutput + extends UpdateSecretVersionStageResponse, + __MetadataBearer {} +declare const UpdateSecretVersionStageCommand_base: { + new ( + input: UpdateSecretVersionStageCommandInput + ): import("@smithy/smithy-client").CommandImpl< + UpdateSecretVersionStageCommandInput, + UpdateSecretVersionStageCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: UpdateSecretVersionStageCommandInput + ): import("@smithy/smithy-client").CommandImpl< + UpdateSecretVersionStageCommandInput, + UpdateSecretVersionStageCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class UpdateSecretVersionStageCommand extends UpdateSecretVersionStageCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts new file mode 100644 index 0000000..37c9aba --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + ValidateResourcePolicyRequest, + ValidateResourcePolicyResponse, +} from "../models/models_0"; +import { + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../SecretsManagerClient"; +export { __MetadataBearer, $Command }; +export interface ValidateResourcePolicyCommandInput + extends ValidateResourcePolicyRequest {} +export interface ValidateResourcePolicyCommandOutput + extends ValidateResourcePolicyResponse, + __MetadataBearer {} +declare const ValidateResourcePolicyCommand_base: { + new ( + input: ValidateResourcePolicyCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ValidateResourcePolicyCommandInput, + ValidateResourcePolicyCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: ValidateResourcePolicyCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ValidateResourcePolicyCommandInput, + ValidateResourcePolicyCommandOutput, + SecretsManagerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class ValidateResourcePolicyCommand extends ValidateResourcePolicyCommand_base {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/index.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/index.d.ts new file mode 100644 index 0000000..04a302c --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/commands/index.d.ts @@ -0,0 +1,23 @@ +export * from "./BatchGetSecretValueCommand"; +export * from "./CancelRotateSecretCommand"; +export * from "./CreateSecretCommand"; +export * from "./DeleteResourcePolicyCommand"; +export * from "./DeleteSecretCommand"; +export * from "./DescribeSecretCommand"; +export * from "./GetRandomPasswordCommand"; +export * from "./GetResourcePolicyCommand"; +export * from "./GetSecretValueCommand"; +export * from "./ListSecretVersionIdsCommand"; +export * from "./ListSecretsCommand"; +export * from "./PutResourcePolicyCommand"; +export * from "./PutSecretValueCommand"; +export * from "./RemoveRegionsFromReplicationCommand"; +export * from "./ReplicateSecretToRegionsCommand"; +export * from "./RestoreSecretCommand"; +export * from "./RotateSecretCommand"; +export * from "./StopReplicationToReplicaCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateSecretCommand"; +export * from "./UpdateSecretVersionStageCommand"; +export * from "./ValidateResourcePolicyCommand"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/endpoint/EndpointParameters.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/endpoint/EndpointParameters.d.ts new file mode 100644 index 0000000..7f24540 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/endpoint/EndpointParameters.d.ts @@ -0,0 +1,51 @@ +import { + Endpoint, + EndpointParameters as __EndpointParameters, + EndpointV2, + Provider, +} from "@smithy/types"; +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: + | string + | Provider + | Endpoint + | Provider + | EndpointV2 + | Provider; +} +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const resolveClientEndpointParameters: ( + options: T & ClientInputEndpointParameters +) => T & + ClientInputEndpointParameters & { + defaultSigningName: string; + }; +export declare const commonParams: { + readonly UseFIPS: { + readonly type: "builtInParams"; + readonly name: "useFipsEndpoint"; + }; + readonly Endpoint: { + readonly type: "builtInParams"; + readonly name: "endpoint"; + }; + readonly Region: { + readonly type: "builtInParams"; + readonly name: "region"; + }; + readonly UseDualStack: { + readonly type: "builtInParams"; + readonly name: "useDualstackEndpoint"; + }; +}; +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/endpoint/endpointResolver.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/endpoint/endpointResolver.d.ts new file mode 100644 index 0000000..5909925 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/endpoint/endpointResolver.d.ts @@ -0,0 +1,8 @@ +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParameters } from "./EndpointParameters"; +export declare const defaultEndpointResolver: ( + endpointParams: EndpointParameters, + context?: { + logger?: Logger; + } +) => EndpointV2; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/endpoint/ruleset.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/endpoint/ruleset.d.ts new file mode 100644 index 0000000..4b23899 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/endpoint/ruleset.d.ts @@ -0,0 +1,2 @@ +import { RuleSetObject } from "@smithy/types"; +export declare const ruleSet: RuleSetObject; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/extensionConfiguration.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/extensionConfiguration.d.ts new file mode 100644 index 0000000..0d52bfe --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/extensionConfiguration.d.ts @@ -0,0 +1,9 @@ +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; +export interface SecretsManagerExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration, + HttpAuthExtensionConfiguration {} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..74ab57a --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/index.d.ts @@ -0,0 +1,10 @@ +export * from "./SecretsManagerClient"; +export * from "./SecretsManager"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { SecretsManagerExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export { SecretsManagerServiceException } from "./models/SecretsManagerServiceException"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/models/SecretsManagerServiceException.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/models/SecretsManagerServiceException.d.ts new file mode 100644 index 0000000..2ebeae2 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/models/SecretsManagerServiceException.d.ts @@ -0,0 +1,8 @@ +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; +export { __ServiceException, __ServiceExceptionOptions }; +export declare class SecretsManagerServiceException extends __ServiceException { + constructor(options: __ServiceExceptionOptions); +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/models/index.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/models/index.d.ts new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/models/index.d.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/models/models_0.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/models/models_0.d.ts new file mode 100644 index 0000000..284f741 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/models/models_0.d.ts @@ -0,0 +1,445 @@ +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { SecretsManagerServiceException as __BaseException } from "./SecretsManagerServiceException"; +export interface ReplicaRegionType { + Region?: string; + KmsKeyId?: string; +} +export interface APIErrorType { + SecretId?: string; + ErrorCode?: string; + Message?: string; +} +export declare const FilterNameStringType: { + readonly all: "all"; + readonly description: "description"; + readonly name: "name"; + readonly owning_service: "owning-service"; + readonly primary_region: "primary-region"; + readonly tag_key: "tag-key"; + readonly tag_value: "tag-value"; +}; +export type FilterNameStringType = + (typeof FilterNameStringType)[keyof typeof FilterNameStringType]; +export interface Filter { + Key?: FilterNameStringType; + Values?: string[]; +} +export interface BatchGetSecretValueRequest { + SecretIdList?: string[]; + Filters?: Filter[]; + MaxResults?: number; + NextToken?: string; +} +export interface SecretValueEntry { + ARN?: string; + Name?: string; + VersionId?: string; + SecretBinary?: Uint8Array; + SecretString?: string; + VersionStages?: string[]; + CreatedDate?: Date; +} +export interface BatchGetSecretValueResponse { + SecretValues?: SecretValueEntry[]; + NextToken?: string; + Errors?: APIErrorType[]; +} +export declare class DecryptionFailure extends __BaseException { + readonly name: "DecryptionFailure"; + readonly $fault: "client"; + Message?: string; + constructor(opts: __ExceptionOptionType); +} +export declare class InternalServiceError extends __BaseException { + readonly name: "InternalServiceError"; + readonly $fault: "server"; + Message?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class InvalidNextTokenException extends __BaseException { + readonly name: "InvalidNextTokenException"; + readonly $fault: "client"; + Message?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class InvalidParameterException extends __BaseException { + readonly name: "InvalidParameterException"; + readonly $fault: "client"; + Message?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class InvalidRequestException extends __BaseException { + readonly name: "InvalidRequestException"; + readonly $fault: "client"; + Message?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException"; + readonly $fault: "client"; + Message?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export interface CancelRotateSecretRequest { + SecretId: string | undefined; +} +export interface CancelRotateSecretResponse { + ARN?: string; + Name?: string; + VersionId?: string; +} +export interface Tag { + Key?: string; + Value?: string; +} +export interface CreateSecretRequest { + Name: string | undefined; + ClientRequestToken?: string; + Description?: string; + KmsKeyId?: string; + SecretBinary?: Uint8Array; + SecretString?: string; + Tags?: Tag[]; + AddReplicaRegions?: ReplicaRegionType[]; + ForceOverwriteReplicaSecret?: boolean; +} +export declare const StatusType: { + readonly Failed: "Failed"; + readonly InProgress: "InProgress"; + readonly InSync: "InSync"; +}; +export type StatusType = (typeof StatusType)[keyof typeof StatusType]; +export interface ReplicationStatusType { + Region?: string; + KmsKeyId?: string; + Status?: StatusType; + StatusMessage?: string; + LastAccessedDate?: Date; +} +export interface CreateSecretResponse { + ARN?: string; + Name?: string; + VersionId?: string; + ReplicationStatus?: ReplicationStatusType[]; +} +export declare class EncryptionFailure extends __BaseException { + readonly name: "EncryptionFailure"; + readonly $fault: "client"; + Message?: string; + constructor(opts: __ExceptionOptionType); +} +export declare class LimitExceededException extends __BaseException { + readonly name: "LimitExceededException"; + readonly $fault: "client"; + Message?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class MalformedPolicyDocumentException extends __BaseException { + readonly name: "MalformedPolicyDocumentException"; + readonly $fault: "client"; + Message?: string; + constructor( + opts: __ExceptionOptionType< + MalformedPolicyDocumentException, + __BaseException + > + ); +} +export declare class PreconditionNotMetException extends __BaseException { + readonly name: "PreconditionNotMetException"; + readonly $fault: "client"; + Message?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class ResourceExistsException extends __BaseException { + readonly name: "ResourceExistsException"; + readonly $fault: "client"; + Message?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export interface DeleteResourcePolicyRequest { + SecretId: string | undefined; +} +export interface DeleteResourcePolicyResponse { + ARN?: string; + Name?: string; +} +export interface DeleteSecretRequest { + SecretId: string | undefined; + RecoveryWindowInDays?: number; + ForceDeleteWithoutRecovery?: boolean; +} +export interface DeleteSecretResponse { + ARN?: string; + Name?: string; + DeletionDate?: Date; +} +export interface DescribeSecretRequest { + SecretId: string | undefined; +} +export interface RotationRulesType { + AutomaticallyAfterDays?: number; + Duration?: string; + ScheduleExpression?: string; +} +export interface DescribeSecretResponse { + ARN?: string; + Name?: string; + Description?: string; + KmsKeyId?: string; + RotationEnabled?: boolean; + RotationLambdaARN?: string; + RotationRules?: RotationRulesType; + LastRotatedDate?: Date; + LastChangedDate?: Date; + LastAccessedDate?: Date; + DeletedDate?: Date; + NextRotationDate?: Date; + Tags?: Tag[]; + VersionIdsToStages?: Record; + OwningService?: string; + CreatedDate?: Date; + PrimaryRegion?: string; + ReplicationStatus?: ReplicationStatusType[]; +} +export interface GetRandomPasswordRequest { + PasswordLength?: number; + ExcludeCharacters?: string; + ExcludeNumbers?: boolean; + ExcludePunctuation?: boolean; + ExcludeUppercase?: boolean; + ExcludeLowercase?: boolean; + IncludeSpace?: boolean; + RequireEachIncludedType?: boolean; +} +export interface GetRandomPasswordResponse { + RandomPassword?: string; +} +export interface GetResourcePolicyRequest { + SecretId: string | undefined; +} +export interface GetResourcePolicyResponse { + ARN?: string; + Name?: string; + ResourcePolicy?: string; +} +export interface GetSecretValueRequest { + SecretId: string | undefined; + VersionId?: string; + VersionStage?: string; +} +export interface GetSecretValueResponse { + ARN?: string; + Name?: string; + VersionId?: string; + SecretBinary?: Uint8Array; + SecretString?: string; + VersionStages?: string[]; + CreatedDate?: Date; +} +export declare const SortOrderType: { + readonly asc: "asc"; + readonly desc: "desc"; +}; +export type SortOrderType = (typeof SortOrderType)[keyof typeof SortOrderType]; +export interface ListSecretsRequest { + IncludePlannedDeletion?: boolean; + MaxResults?: number; + NextToken?: string; + Filters?: Filter[]; + SortOrder?: SortOrderType; +} +export interface SecretListEntry { + ARN?: string; + Name?: string; + Description?: string; + KmsKeyId?: string; + RotationEnabled?: boolean; + RotationLambdaARN?: string; + RotationRules?: RotationRulesType; + LastRotatedDate?: Date; + LastChangedDate?: Date; + LastAccessedDate?: Date; + DeletedDate?: Date; + NextRotationDate?: Date; + Tags?: Tag[]; + SecretVersionsToStages?: Record; + OwningService?: string; + CreatedDate?: Date; + PrimaryRegion?: string; +} +export interface ListSecretsResponse { + SecretList?: SecretListEntry[]; + NextToken?: string; +} +export interface ListSecretVersionIdsRequest { + SecretId: string | undefined; + MaxResults?: number; + NextToken?: string; + IncludeDeprecated?: boolean; +} +export interface SecretVersionsListEntry { + VersionId?: string; + VersionStages?: string[]; + LastAccessedDate?: Date; + CreatedDate?: Date; + KmsKeyIds?: string[]; +} +export interface ListSecretVersionIdsResponse { + Versions?: SecretVersionsListEntry[]; + NextToken?: string; + ARN?: string; + Name?: string; +} +export declare class PublicPolicyException extends __BaseException { + readonly name: "PublicPolicyException"; + readonly $fault: "client"; + Message?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export interface PutResourcePolicyRequest { + SecretId: string | undefined; + ResourcePolicy: string | undefined; + BlockPublicPolicy?: boolean; +} +export interface PutResourcePolicyResponse { + ARN?: string; + Name?: string; +} +export interface PutSecretValueRequest { + SecretId: string | undefined; + ClientRequestToken?: string; + SecretBinary?: Uint8Array; + SecretString?: string; + VersionStages?: string[]; +} +export interface PutSecretValueResponse { + ARN?: string; + Name?: string; + VersionId?: string; + VersionStages?: string[]; +} +export interface RemoveRegionsFromReplicationRequest { + SecretId: string | undefined; + RemoveReplicaRegions: string[] | undefined; +} +export interface RemoveRegionsFromReplicationResponse { + ARN?: string; + ReplicationStatus?: ReplicationStatusType[]; +} +export interface ReplicateSecretToRegionsRequest { + SecretId: string | undefined; + AddReplicaRegions: ReplicaRegionType[] | undefined; + ForceOverwriteReplicaSecret?: boolean; +} +export interface ReplicateSecretToRegionsResponse { + ARN?: string; + ReplicationStatus?: ReplicationStatusType[]; +} +export interface RestoreSecretRequest { + SecretId: string | undefined; +} +export interface RestoreSecretResponse { + ARN?: string; + Name?: string; +} +export interface RotateSecretRequest { + SecretId: string | undefined; + ClientRequestToken?: string; + RotationLambdaARN?: string; + RotationRules?: RotationRulesType; + RotateImmediately?: boolean; +} +export interface RotateSecretResponse { + ARN?: string; + Name?: string; + VersionId?: string; +} +export interface StopReplicationToReplicaRequest { + SecretId: string | undefined; +} +export interface StopReplicationToReplicaResponse { + ARN?: string; +} +export interface TagResourceRequest { + SecretId: string | undefined; + Tags: Tag[] | undefined; +} +export interface UntagResourceRequest { + SecretId: string | undefined; + TagKeys: string[] | undefined; +} +export interface UpdateSecretRequest { + SecretId: string | undefined; + ClientRequestToken?: string; + Description?: string; + KmsKeyId?: string; + SecretBinary?: Uint8Array; + SecretString?: string; +} +export interface UpdateSecretResponse { + ARN?: string; + Name?: string; + VersionId?: string; +} +export interface UpdateSecretVersionStageRequest { + SecretId: string | undefined; + VersionStage: string | undefined; + RemoveFromVersionId?: string; + MoveToVersionId?: string; +} +export interface UpdateSecretVersionStageResponse { + ARN?: string; + Name?: string; +} +export interface ValidateResourcePolicyRequest { + SecretId?: string; + ResourcePolicy: string | undefined; +} +export interface ValidationErrorsEntry { + CheckName?: string; + ErrorMessage?: string; +} +export interface ValidateResourcePolicyResponse { + PolicyValidationPassed?: boolean; + ValidationErrors?: ValidationErrorsEntry[]; +} +export declare const SecretValueEntryFilterSensitiveLog: ( + obj: SecretValueEntry +) => any; +export declare const BatchGetSecretValueResponseFilterSensitiveLog: ( + obj: BatchGetSecretValueResponse +) => any; +export declare const CreateSecretRequestFilterSensitiveLog: ( + obj: CreateSecretRequest +) => any; +export declare const GetRandomPasswordResponseFilterSensitiveLog: ( + obj: GetRandomPasswordResponse +) => any; +export declare const GetSecretValueResponseFilterSensitiveLog: ( + obj: GetSecretValueResponse +) => any; +export declare const PutSecretValueRequestFilterSensitiveLog: ( + obj: PutSecretValueRequest +) => any; +export declare const UpdateSecretRequestFilterSensitiveLog: ( + obj: UpdateSecretRequest +) => any; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/BatchGetSecretValuePaginator.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/BatchGetSecretValuePaginator.d.ts new file mode 100644 index 0000000..dccc111 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/BatchGetSecretValuePaginator.d.ts @@ -0,0 +1,11 @@ +import { Paginator } from "@smithy/types"; +import { + BatchGetSecretValueCommandInput, + BatchGetSecretValueCommandOutput, +} from "../commands/BatchGetSecretValueCommand"; +import { SecretsManagerPaginationConfiguration } from "./Interfaces"; +export declare const paginateBatchGetSecretValue: ( + config: SecretsManagerPaginationConfiguration, + input: BatchGetSecretValueCommandInput, + ...rest: any[] +) => Paginator; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/Interfaces.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/Interfaces.d.ts new file mode 100644 index 0000000..f76c023 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/Interfaces.d.ts @@ -0,0 +1,6 @@ +import { PaginationConfiguration } from "@smithy/types"; +import { SecretsManagerClient } from "../SecretsManagerClient"; +export interface SecretsManagerPaginationConfiguration + extends PaginationConfiguration { + client: SecretsManagerClient; +} diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/ListSecretVersionIdsPaginator.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/ListSecretVersionIdsPaginator.d.ts new file mode 100644 index 0000000..dd8426d --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/ListSecretVersionIdsPaginator.d.ts @@ -0,0 +1,11 @@ +import { Paginator } from "@smithy/types"; +import { + ListSecretVersionIdsCommandInput, + ListSecretVersionIdsCommandOutput, +} from "../commands/ListSecretVersionIdsCommand"; +import { SecretsManagerPaginationConfiguration } from "./Interfaces"; +export declare const paginateListSecretVersionIds: ( + config: SecretsManagerPaginationConfiguration, + input: ListSecretVersionIdsCommandInput, + ...rest: any[] +) => Paginator; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/ListSecretsPaginator.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/ListSecretsPaginator.d.ts new file mode 100644 index 0000000..d151877 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/ListSecretsPaginator.d.ts @@ -0,0 +1,11 @@ +import { Paginator } from "@smithy/types"; +import { + ListSecretsCommandInput, + ListSecretsCommandOutput, +} from "../commands/ListSecretsCommand"; +import { SecretsManagerPaginationConfiguration } from "./Interfaces"; +export declare const paginateListSecrets: ( + config: SecretsManagerPaginationConfiguration, + input: ListSecretsCommandInput, + ...rest: any[] +) => Paginator; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/index.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/index.d.ts new file mode 100644 index 0000000..96d7926 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/pagination/index.d.ts @@ -0,0 +1,4 @@ +export * from "./BatchGetSecretValuePaginator"; +export * from "./Interfaces"; +export * from "./ListSecretVersionIdsPaginator"; +export * from "./ListSecretsPaginator"; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/protocols/Aws_json1_1.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/protocols/Aws_json1_1.d.ts new file mode 100644 index 0000000..f708720 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/protocols/Aws_json1_1.d.ts @@ -0,0 +1,281 @@ +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; +import { + BatchGetSecretValueCommandInput, + BatchGetSecretValueCommandOutput, +} from "../commands/BatchGetSecretValueCommand"; +import { + CancelRotateSecretCommandInput, + CancelRotateSecretCommandOutput, +} from "../commands/CancelRotateSecretCommand"; +import { + CreateSecretCommandInput, + CreateSecretCommandOutput, +} from "../commands/CreateSecretCommand"; +import { + DeleteResourcePolicyCommandInput, + DeleteResourcePolicyCommandOutput, +} from "../commands/DeleteResourcePolicyCommand"; +import { + DeleteSecretCommandInput, + DeleteSecretCommandOutput, +} from "../commands/DeleteSecretCommand"; +import { + DescribeSecretCommandInput, + DescribeSecretCommandOutput, +} from "../commands/DescribeSecretCommand"; +import { + GetRandomPasswordCommandInput, + GetRandomPasswordCommandOutput, +} from "../commands/GetRandomPasswordCommand"; +import { + GetResourcePolicyCommandInput, + GetResourcePolicyCommandOutput, +} from "../commands/GetResourcePolicyCommand"; +import { + GetSecretValueCommandInput, + GetSecretValueCommandOutput, +} from "../commands/GetSecretValueCommand"; +import { + ListSecretsCommandInput, + ListSecretsCommandOutput, +} from "../commands/ListSecretsCommand"; +import { + ListSecretVersionIdsCommandInput, + ListSecretVersionIdsCommandOutput, +} from "../commands/ListSecretVersionIdsCommand"; +import { + PutResourcePolicyCommandInput, + PutResourcePolicyCommandOutput, +} from "../commands/PutResourcePolicyCommand"; +import { + PutSecretValueCommandInput, + PutSecretValueCommandOutput, +} from "../commands/PutSecretValueCommand"; +import { + RemoveRegionsFromReplicationCommandInput, + RemoveRegionsFromReplicationCommandOutput, +} from "../commands/RemoveRegionsFromReplicationCommand"; +import { + ReplicateSecretToRegionsCommandInput, + ReplicateSecretToRegionsCommandOutput, +} from "../commands/ReplicateSecretToRegionsCommand"; +import { + RestoreSecretCommandInput, + RestoreSecretCommandOutput, +} from "../commands/RestoreSecretCommand"; +import { + RotateSecretCommandInput, + RotateSecretCommandOutput, +} from "../commands/RotateSecretCommand"; +import { + StopReplicationToReplicaCommandInput, + StopReplicationToReplicaCommandOutput, +} from "../commands/StopReplicationToReplicaCommand"; +import { + TagResourceCommandInput, + TagResourceCommandOutput, +} from "../commands/TagResourceCommand"; +import { + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "../commands/UntagResourceCommand"; +import { + UpdateSecretCommandInput, + UpdateSecretCommandOutput, +} from "../commands/UpdateSecretCommand"; +import { + UpdateSecretVersionStageCommandInput, + UpdateSecretVersionStageCommandOutput, +} from "../commands/UpdateSecretVersionStageCommand"; +import { + ValidateResourcePolicyCommandInput, + ValidateResourcePolicyCommandOutput, +} from "../commands/ValidateResourcePolicyCommand"; +export declare const se_BatchGetSecretValueCommand: ( + input: BatchGetSecretValueCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_CancelRotateSecretCommand: ( + input: CancelRotateSecretCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_CreateSecretCommand: ( + input: CreateSecretCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_DeleteResourcePolicyCommand: ( + input: DeleteResourcePolicyCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_DeleteSecretCommand: ( + input: DeleteSecretCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_DescribeSecretCommand: ( + input: DescribeSecretCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_GetRandomPasswordCommand: ( + input: GetRandomPasswordCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_GetResourcePolicyCommand: ( + input: GetResourcePolicyCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_GetSecretValueCommand: ( + input: GetSecretValueCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_ListSecretsCommand: ( + input: ListSecretsCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_ListSecretVersionIdsCommand: ( + input: ListSecretVersionIdsCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_PutResourcePolicyCommand: ( + input: PutResourcePolicyCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_PutSecretValueCommand: ( + input: PutSecretValueCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_RemoveRegionsFromReplicationCommand: ( + input: RemoveRegionsFromReplicationCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_ReplicateSecretToRegionsCommand: ( + input: ReplicateSecretToRegionsCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_RestoreSecretCommand: ( + input: RestoreSecretCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_RotateSecretCommand: ( + input: RotateSecretCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_StopReplicationToReplicaCommand: ( + input: StopReplicationToReplicaCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_TagResourceCommand: ( + input: TagResourceCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_UntagResourceCommand: ( + input: UntagResourceCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_UpdateSecretCommand: ( + input: UpdateSecretCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_UpdateSecretVersionStageCommand: ( + input: UpdateSecretVersionStageCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_ValidateResourcePolicyCommand: ( + input: ValidateResourcePolicyCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const de_BatchGetSecretValueCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_CancelRotateSecretCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_CreateSecretCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_DeleteResourcePolicyCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_DeleteSecretCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_DescribeSecretCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_GetRandomPasswordCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_GetResourcePolicyCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_GetSecretValueCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_ListSecretsCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_ListSecretVersionIdsCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_PutResourcePolicyCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_PutSecretValueCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_RemoveRegionsFromReplicationCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_ReplicateSecretToRegionsCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_RestoreSecretCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_RotateSecretCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_StopReplicationToReplicaCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_TagResourceCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_UntagResourceCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_UpdateSecretCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_UpdateSecretVersionStageCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_ValidateResourcePolicyCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.browser.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.browser.d.ts new file mode 100644 index 0000000..e29f39f --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.browser.d.ts @@ -0,0 +1,85 @@ +import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler"; +import { SecretsManagerClientConfig } from "./SecretsManagerClient"; +export declare const getRuntimeConfig: (config: SecretsManagerClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider< + import("@smithy/smithy-client").ResolvedDefaultsMode + >; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: ( + input: any + ) => import("@smithy/types").AwsCredentialIdentityProvider; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: + | import("@smithy/protocol-http").HttpHandler + | RequestHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: + | (( + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + ) & + ( + | string + | import("@smithy/types").Provider + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + )) + | undefined; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SecretsManagerHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.d.ts new file mode 100644 index 0000000..eff56ed --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.d.ts @@ -0,0 +1,89 @@ +import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler"; +import { SecretsManagerClientConfig } from "./SecretsManagerClient"; +export declare const getRuntimeConfig: (config: SecretsManagerClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider< + import("@smithy/smithy-client").ResolvedDefaultsMode + >; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: ( + init?: + | import("@aws-sdk/credential-provider-node").DefaultProviderInit + | undefined + ) => import("@smithy/types").MemoizedProvider< + import("@smithy/types").AwsCredentialIdentity + >; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: + | RequestHandler + | import("@smithy/protocol-http").HttpHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: + | (( + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + ) & + ( + | string + | import("@smithy/types").Provider + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + )) + | undefined; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SecretsManagerHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.native.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.native.d.ts new file mode 100644 index 0000000..f12f275 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.native.d.ts @@ -0,0 +1,79 @@ +import { SecretsManagerClientConfig } from "./SecretsManagerClient"; +export declare const getRuntimeConfig: (config: SecretsManagerClientConfig) => { + runtime: string; + sha256: import("@smithy/types").HashConstructor; + requestHandler: + | import("@smithy/types").NodeHttpHandlerOptions + | import("@smithy/types").FetchHttpHandlerOptions + | Record + | import("@smithy/protocol-http").HttpHandler + | import("@smithy/fetch-http-handler").FetchHttpHandler; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + streamCollector: import("@smithy/types").StreamCollector; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + region: string | import("@smithy/types").Provider; + credentialDefaultProvider: ( + input: any + ) => import("@smithy/types").AwsCredentialIdentityProvider; + maxAttempts: number | import("@smithy/types").Provider; + retryMode: string | import("@smithy/types").Provider; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + defaultsMode: + | import("@smithy/smithy-client").DefaultsMode + | import("@smithy/types").Provider< + import("@smithy/smithy-client").DefaultsMode + >; + endpoint?: + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + | undefined; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SecretsManagerHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.shared.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.shared.d.ts new file mode 100644 index 0000000..91772b9 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeConfig.shared.d.ts @@ -0,0 +1,21 @@ +import { SecretsManagerClientConfig } from "./SecretsManagerClient"; +export declare const getRuntimeConfig: (config: SecretsManagerClientConfig) => { + apiVersion: string; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + disableHostPrefix: boolean; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SecretsManagerHttpAuthSchemeProvider; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[]; + logger: import("@smithy/types").Logger; + serviceId: string; + urlParser: import("@smithy/types").UrlParser; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; +}; diff --git a/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeExtensions.d.ts b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeExtensions.d.ts new file mode 100644 index 0000000..68ecf23 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/dist-types/ts3.4/runtimeExtensions.d.ts @@ -0,0 +1,11 @@ +import { SecretsManagerExtensionConfiguration } from "./extensionConfiguration"; +export interface RuntimeExtension { + configure(extensionConfiguration: SecretsManagerExtensionConfiguration): void; +} +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} +export declare const resolveRuntimeExtensions: ( + runtimeConfig: any, + extensions: RuntimeExtension[] +) => any; diff --git a/node_modules/@aws-sdk/client-secrets-manager/node_modules/.bin/uuid b/node_modules/@aws-sdk/client-secrets-manager/node_modules/.bin/uuid new file mode 120000 index 0000000..72316a4 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/node_modules/.bin/uuid @@ -0,0 +1 @@ +../../../../uuid/dist/bin/uuid \ No newline at end of file diff --git a/node_modules/@aws-sdk/client-secrets-manager/package.json b/node_modules/@aws-sdk/client-secrets-manager/package.json new file mode 100644 index 0000000..67c8d94 --- /dev/null +++ b/node_modules/@aws-sdk/client-secrets-manager/package.json @@ -0,0 +1,103 @@ +{ + "name": "@aws-sdk/client-secrets-manager", + "description": "AWS SDK for JavaScript Secrets Manager Client for Node.js, Browser and React Native", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-secrets-manager", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "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 secrets-manager" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.535.0", + "@aws-sdk/core": "3.535.0", + "@aws-sdk/credential-provider-node": "3.535.0", + "@aws-sdk/middleware-host-header": "3.535.0", + "@aws-sdk/middleware-logger": "3.535.0", + "@aws-sdk/middleware-recursion-detection": "3.535.0", + "@aws-sdk/middleware-user-agent": "3.535.0", + "@aws-sdk/region-config-resolver": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@aws-sdk/util-endpoints": "3.535.0", + "@aws-sdk/util-user-agent-browser": "3.535.0", + "@aws-sdk/util-user-agent-node": "3.535.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-retry": "^2.2.0", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.0", + "@smithy/util-defaults-mode-node": "^2.3.0", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "devDependencies": { + "@smithy/service-client-documentation-generator": "^2.2.0", + "@tsconfig/node14": "1.0.3", + "@types/node": "^14.14.31", + "@types/uuid": "^9.0.4", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.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-secrets-manager", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-secrets-manager" + } +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/LICENSE b/node_modules/@aws-sdk/client-sso-oidc/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-sdk/client-sso-oidc/README.md b/node_modules/@aws-sdk/client-sso-oidc/README.md new file mode 100644 index 0000000..d533e2a --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/README.md @@ -0,0 +1,274 @@ + + +# @aws-sdk/client-sso-oidc + +## Description + +AWS SDK for JavaScript SSOOIDC Client for Node.js, Browser and React Native. + +

IAM Identity Center OpenID Connect (OIDC) is a web service that enables a client (such as CLI +or a native application) to register with IAM Identity Center. The service also enables the client to +fetch the user’s access token upon successful authentication and authorization with +IAM Identity Center.

+ +

IAM Identity Center uses the sso and identitystore API namespaces.

+
+

+Considerations for Using This Guide +

+

Before you begin using this guide, we recommend that you first review the following +important information about how the IAM Identity Center OIDC service works.

+
    +
  • +

    The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device +Authorization Grant standard (https://tools.ietf.org/html/rfc8628) that are necessary to enable single +sign-on authentication with the CLI.

    +
  • +
  • +

    With older versions of the CLI, the service only emits OIDC access tokens, so to +obtain a new token, users must explicitly re-authenticate. To access the OIDC flow that +supports token refresh and doesn’t require re-authentication, update to the latest CLI +version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with support for OIDC token refresh and +configurable IAM Identity Center session durations. For more information, see Configure Amazon Web Services access portal session duration .

    +
  • +
  • +

    The access tokens provided by this service grant access to all Amazon Web Services account +entitlements assigned to an IAM Identity Center user, not just a particular application.

    +
  • +
  • +

    The documentation in this guide does not describe the mechanism to convert the access +token into Amazon Web Services Auth (“sigv4”) credentials for use with IAM-protected Amazon Web Services service +endpoints. For more information, see GetRoleCredentials in the IAM Identity Center Portal API Reference +Guide.

    +
  • +
+

For general information about IAM Identity Center, see What is +IAM Identity Center? in the IAM Identity Center User Guide.

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-sso-oidc +using your favorite package manager: + +- `npm install @aws-sdk/client-sso-oidc` +- `yarn add @aws-sdk/client-sso-oidc` +- `pnpm add @aws-sdk/client-sso-oidc` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `SSOOIDCClient` and +the commands you need, for example `CreateTokenCommand`: + +```js +// ES5 example +const { SSOOIDCClient, CreateTokenCommand } = require("@aws-sdk/client-sso-oidc"); +``` + +```ts +// ES6+ example +import { SSOOIDCClient, CreateTokenCommand } from "@aws-sdk/client-sso-oidc"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new SSOOIDCClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new CreateTokenCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-sso-oidc"; +const client = new AWS.SSOOIDC({ region: "REGION" }); + +// async/await. +try { + const data = await client.createToken(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .createToken(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.createToken(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-sso-oidc` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +
+ +CreateToken + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso-oidc/command/CreateTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/CreateTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/CreateTokenCommandOutput/) + +
+
+ +CreateTokenWithIAM + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso-oidc/command/CreateTokenWithIAMCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/CreateTokenWithIAMCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/CreateTokenWithIAMCommandOutput/) + +
+
+ +RegisterClient + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso-oidc/command/RegisterClientCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/RegisterClientCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/RegisterClientCommandOutput/) + +
+
+ +StartDeviceAuthorization + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso-oidc/command/StartDeviceAuthorizationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/StartDeviceAuthorizationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/StartDeviceAuthorizationCommandOutput/) + +
diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js new file mode 100644 index 0000000..b79617e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js @@ -0,0 +1,64 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0; +const core_1 = require("@aws-sdk/core"); +const util_middleware_1 = require("@smithy/util-middleware"); +const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sso-oauth", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateToken": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "RegisterClient": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "StartDeviceAuthorization": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0, + }; +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/credentialDefaultProvider.js b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/credentialDefaultProvider.js new file mode 100644 index 0000000..18de72c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/credentialDefaultProvider.js @@ -0,0 +1,29 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultProvider = void 0; +exports.defaultProvider = ((input) => { + return () => Promise.resolve().then(() => __importStar(require("@aws-sdk/credential-provider-node"))).then(({ defaultProvider }) => defaultProvider(input)()); +}); diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js new file mode 100644 index 0000000..3d8d8de --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = require("@smithy/util-endpoints"); +const ruleset_1 = require("./ruleset"); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); +}; +exports.defaultEndpointResolver = defaultEndpointResolver; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js new file mode 100644 index 0000000..72e0adc --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ruleSet = void 0; +const u = "required", v = "fn", w = "argv", x = "ref"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; +const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +exports.ruleSet = _data; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js new file mode 100644 index 0000000..d6b8666 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js @@ -0,0 +1,1027 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AccessDeniedException: () => AccessDeniedException, + AuthorizationPendingException: () => AuthorizationPendingException, + CreateTokenCommand: () => CreateTokenCommand, + CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog, + CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog, + CreateTokenWithIAMCommand: () => CreateTokenWithIAMCommand, + CreateTokenWithIAMRequestFilterSensitiveLog: () => CreateTokenWithIAMRequestFilterSensitiveLog, + CreateTokenWithIAMResponseFilterSensitiveLog: () => CreateTokenWithIAMResponseFilterSensitiveLog, + ExpiredTokenException: () => ExpiredTokenException, + InternalServerException: () => InternalServerException, + InvalidClientException: () => InvalidClientException, + InvalidClientMetadataException: () => InvalidClientMetadataException, + InvalidGrantException: () => InvalidGrantException, + InvalidRequestException: () => InvalidRequestException, + InvalidRequestRegionException: () => InvalidRequestRegionException, + InvalidScopeException: () => InvalidScopeException, + RegisterClientCommand: () => RegisterClientCommand, + RegisterClientResponseFilterSensitiveLog: () => RegisterClientResponseFilterSensitiveLog, + SSOOIDC: () => SSOOIDC, + SSOOIDCClient: () => SSOOIDCClient, + SSOOIDCServiceException: () => SSOOIDCServiceException, + SlowDownException: () => SlowDownException, + StartDeviceAuthorizationCommand: () => StartDeviceAuthorizationCommand, + StartDeviceAuthorizationRequestFilterSensitiveLog: () => StartDeviceAuthorizationRequestFilterSensitiveLog, + UnauthorizedClientException: () => UnauthorizedClientException, + UnsupportedGrantTypeException: () => UnsupportedGrantTypeException, + __Client: () => import_smithy_client.Client +}); +module.exports = __toCommonJS(src_exports); + +// src/SSOOIDCClient.ts +var import_middleware_host_header = require("@aws-sdk/middleware-host-header"); +var import_middleware_logger = require("@aws-sdk/middleware-logger"); +var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection"); +var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent"); +var import_config_resolver = require("@smithy/config-resolver"); +var import_core = require("@smithy/core"); +var import_middleware_content_length = require("@smithy/middleware-content-length"); +var import_middleware_endpoint = require("@smithy/middleware-endpoint"); +var import_middleware_retry = require("@smithy/middleware-retry"); + +var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider"); + +// src/endpoint/EndpointParameters.ts +var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "sso-oauth" + }; +}, "resolveClientEndpointParameters"); +var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } +}; + +// src/SSOOIDCClient.ts +var import_runtimeConfig = require("././runtimeConfig"); + +// src/runtimeExtensions.ts +var import_region_config_resolver = require("@aws-sdk/region-config-resolver"); +var import_protocol_http = require("@smithy/protocol-http"); +var import_smithy_client = require("@smithy/smithy-client"); + +// src/auth/httpAuthExtensionConfiguration.ts +var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; +}, "getHttpAuthExtensionConfiguration"); +var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; +}, "resolveHttpAuthRuntimeConfig"); + +// src/runtimeExtensions.ts +var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); +var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) + }; +}, "resolveRuntimeExtensions"); + +// src/SSOOIDCClient.ts +var _SSOOIDCClient = class _SSOOIDCClient extends import_smithy_client.Client { + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1); + const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2); + const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider() + }) + ); + this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); + } + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); + } + getDefaultHttpAuthSchemeParametersProvider() { + return import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new import_core.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }); + } +}; +__name(_SSOOIDCClient, "SSOOIDCClient"); +var SSOOIDCClient = _SSOOIDCClient; + +// src/SSOOIDC.ts + + +// src/commands/CreateTokenCommand.ts + +var import_middleware_serde = require("@smithy/middleware-serde"); + +var import_types = require("@smithy/types"); + +// src/models/models_0.ts + + +// src/models/SSOOIDCServiceException.ts + +var _SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); + } +}; +__name(_SSOOIDCServiceException, "SSOOIDCServiceException"); +var SSOOIDCServiceException = _SSOOIDCServiceException; + +// src/models/models_0.ts +var _AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts + }); + this.name = "AccessDeniedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _AccessDeniedException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_AccessDeniedException, "AccessDeniedException"); +var AccessDeniedException = _AccessDeniedException; +var _AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "AuthorizationPendingException", + $fault: "client", + ...opts + }); + this.name = "AuthorizationPendingException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _AuthorizationPendingException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_AuthorizationPendingException, "AuthorizationPendingException"); +var AuthorizationPendingException = _AuthorizationPendingException; +var _ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + this.name = "ExpiredTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExpiredTokenException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_ExpiredTokenException, "ExpiredTokenException"); +var ExpiredTokenException = _ExpiredTokenException; +var _InternalServerException = class _InternalServerException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts + }); + this.name = "InternalServerException"; + this.$fault = "server"; + Object.setPrototypeOf(this, _InternalServerException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_InternalServerException, "InternalServerException"); +var InternalServerException = _InternalServerException; +var _InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidClientException", + $fault: "client", + ...opts + }); + this.name = "InvalidClientException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_InvalidClientException, "InvalidClientException"); +var InvalidClientException = _InvalidClientException; +var _InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidGrantException", + $fault: "client", + ...opts + }); + this.name = "InvalidGrantException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidGrantException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_InvalidGrantException, "InvalidGrantException"); +var InvalidGrantException = _InvalidGrantException; +var _InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_InvalidRequestException, "InvalidRequestException"); +var InvalidRequestException = _InvalidRequestException; +var _InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidScopeException", + $fault: "client", + ...opts + }); + this.name = "InvalidScopeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidScopeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_InvalidScopeException, "InvalidScopeException"); +var InvalidScopeException = _InvalidScopeException; +var _SlowDownException = class _SlowDownException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "SlowDownException", + $fault: "client", + ...opts + }); + this.name = "SlowDownException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _SlowDownException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_SlowDownException, "SlowDownException"); +var SlowDownException = _SlowDownException; +var _UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnauthorizedClientException", + $fault: "client", + ...opts + }); + this.name = "UnauthorizedClientException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnauthorizedClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_UnauthorizedClientException, "UnauthorizedClientException"); +var UnauthorizedClientException = _UnauthorizedClientException; +var _UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnsupportedGrantTypeException", + $fault: "client", + ...opts + }); + this.name = "UnsupportedGrantTypeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_UnsupportedGrantTypeException, "UnsupportedGrantTypeException"); +var UnsupportedGrantTypeException = _UnsupportedGrantTypeException; +var _InvalidRequestRegionException = class _InvalidRequestRegionException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestRegionException", + $fault: "client", + ...opts + }); + this.name = "InvalidRequestRegionException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestRegionException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + this.endpoint = opts.endpoint; + this.region = opts.region; + } +}; +__name(_InvalidRequestRegionException, "InvalidRequestRegionException"); +var InvalidRequestRegionException = _InvalidRequestRegionException; +var _InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidClientMetadataException", + $fault: "client", + ...opts + }); + this.name = "InvalidClientMetadataException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidClientMetadataException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +__name(_InvalidClientMetadataException, "InvalidClientMetadataException"); +var InvalidClientMetadataException = _InvalidClientMetadataException; +var CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING } +}), "CreateTokenRequestFilterSensitiveLog"); +var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING }, + ...obj.idToken && { idToken: import_smithy_client.SENSITIVE_STRING } +}), "CreateTokenResponseFilterSensitiveLog"); +var CreateTokenWithIAMRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING }, + ...obj.assertion && { assertion: import_smithy_client.SENSITIVE_STRING }, + ...obj.subjectToken && { subjectToken: import_smithy_client.SENSITIVE_STRING } +}), "CreateTokenWithIAMRequestFilterSensitiveLog"); +var CreateTokenWithIAMResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING }, + ...obj.idToken && { idToken: import_smithy_client.SENSITIVE_STRING } +}), "CreateTokenWithIAMResponseFilterSensitiveLog"); +var RegisterClientResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING } +}), "RegisterClientResponseFilterSensitiveLog"); +var StartDeviceAuthorizationRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING } +}), "StartDeviceAuthorizationRequestFilterSensitiveLog"); + +// src/protocols/Aws_restJson1.ts +var import_core2 = require("@aws-sdk/core"); + + +var se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/token"); + let body; + body = JSON.stringify( + (0, import_smithy_client.take)(input, { + clientId: [], + clientSecret: [], + code: [], + deviceCode: [], + grantType: [], + redirectUri: [], + refreshToken: [], + scope: (_) => (0, import_smithy_client._json)(_) + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}, "se_CreateTokenCommand"); +var se_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/token"); + const query = (0, import_smithy_client.map)({ + [_ai]: [, "t"] + }); + let body; + body = JSON.stringify( + (0, import_smithy_client.take)(input, { + assertion: [], + clientId: [], + code: [], + grantType: [], + redirectUri: [], + refreshToken: [], + requestedTokenType: [], + scope: (_) => (0, import_smithy_client._json)(_), + subjectToken: [], + subjectTokenType: [] + }) + ); + b.m("POST").h(headers).q(query).b(body); + return b.build(); +}, "se_CreateTokenWithIAMCommand"); +var se_RegisterClientCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/client/register"); + let body; + body = JSON.stringify( + (0, import_smithy_client.take)(input, { + clientName: [], + clientType: [], + scopes: (_) => (0, import_smithy_client._json)(_) + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}, "se_RegisterClientCommand"); +var se_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/device_authorization"); + let body; + body = JSON.stringify( + (0, import_smithy_client.take)(input, { + clientId: [], + clientSecret: [], + startUrl: [] + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}, "se_StartDeviceAuthorizationCommand"); +var de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client.take)(data, { + accessToken: import_smithy_client.expectString, + expiresIn: import_smithy_client.expectInt32, + idToken: import_smithy_client.expectString, + refreshToken: import_smithy_client.expectString, + tokenType: import_smithy_client.expectString + }); + Object.assign(contents, doc); + return contents; +}, "de_CreateTokenCommand"); +var de_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client.take)(data, { + accessToken: import_smithy_client.expectString, + expiresIn: import_smithy_client.expectInt32, + idToken: import_smithy_client.expectString, + issuedTokenType: import_smithy_client.expectString, + refreshToken: import_smithy_client.expectString, + scope: import_smithy_client._json, + tokenType: import_smithy_client.expectString + }); + Object.assign(contents, doc); + return contents; +}, "de_CreateTokenWithIAMCommand"); +var de_RegisterClientCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client.take)(data, { + authorizationEndpoint: import_smithy_client.expectString, + clientId: import_smithy_client.expectString, + clientIdIssuedAt: import_smithy_client.expectLong, + clientSecret: import_smithy_client.expectString, + clientSecretExpiresAt: import_smithy_client.expectLong, + tokenEndpoint: import_smithy_client.expectString + }); + Object.assign(contents, doc); + return contents; +}, "de_RegisterClientCommand"); +var de_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client.take)(data, { + deviceCode: import_smithy_client.expectString, + expiresIn: import_smithy_client.expectInt32, + interval: import_smithy_client.expectInt32, + userCode: import_smithy_client.expectString, + verificationUri: import_smithy_client.expectString, + verificationUriComplete: import_smithy_client.expectString + }); + Object.assign(contents, doc); + return contents; +}, "de_StartDeviceAuthorizationCommand"); +var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core2.parseJsonErrorBody)(output.body, context) + }; + const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.ssooidc#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "AuthorizationPendingException": + case "com.amazonaws.ssooidc#AuthorizationPendingException": + throw await de_AuthorizationPendingExceptionRes(parsedOutput, context); + case "ExpiredTokenException": + case "com.amazonaws.ssooidc#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.ssooidc#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "InvalidClientException": + case "com.amazonaws.ssooidc#InvalidClientException": + throw await de_InvalidClientExceptionRes(parsedOutput, context); + case "InvalidGrantException": + case "com.amazonaws.ssooidc#InvalidGrantException": + throw await de_InvalidGrantExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.ssooidc#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "InvalidScopeException": + case "com.amazonaws.ssooidc#InvalidScopeException": + throw await de_InvalidScopeExceptionRes(parsedOutput, context); + case "SlowDownException": + case "com.amazonaws.ssooidc#SlowDownException": + throw await de_SlowDownExceptionRes(parsedOutput, context); + case "UnauthorizedClientException": + case "com.amazonaws.ssooidc#UnauthorizedClientException": + throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); + case "UnsupportedGrantTypeException": + case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": + throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context); + case "InvalidRequestRegionException": + case "com.amazonaws.ssooidc#InvalidRequestRegionException": + throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context); + case "InvalidClientMetadataException": + case "com.amazonaws.ssooidc#InvalidClientMetadataException": + throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode + }); + } +}, "de_CommandError"); +var throwDefaultError = (0, import_smithy_client.withBaseException)(SSOOIDCServiceException); +var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_AccessDeniedExceptionRes"); +var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new AuthorizationPendingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_AuthorizationPendingExceptionRes"); +var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_ExpiredTokenExceptionRes"); +var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_InternalServerExceptionRes"); +var de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_InvalidClientExceptionRes"); +var de_InvalidClientMetadataExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidClientMetadataException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_InvalidClientMetadataExceptionRes"); +var de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidGrantException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_InvalidGrantExceptionRes"); +var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_InvalidRequestExceptionRes"); +var de_InvalidRequestRegionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + endpoint: import_smithy_client.expectString, + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString, + region: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestRegionException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_InvalidRequestRegionExceptionRes"); +var de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidScopeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_InvalidScopeExceptionRes"); +var de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new SlowDownException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_SlowDownExceptionRes"); +var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new UnauthorizedClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_UnauthorizedClientExceptionRes"); +var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + error: import_smithy_client.expectString, + error_description: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new UnsupportedGrantTypeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_UnsupportedGrantTypeExceptionRes"); +var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] +}), "deserializeMetadata"); +var _ai = "aws_iam"; + +// src/commands/CreateTokenCommand.ts +var _CreateTokenCommand = class _CreateTokenCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() { +}; +__name(_CreateTokenCommand, "CreateTokenCommand"); +var CreateTokenCommand = _CreateTokenCommand; + +// src/commands/CreateTokenWithIAMCommand.ts + + + + +var _CreateTokenWithIAMCommand = class _CreateTokenWithIAMCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSSOOIDCService", "CreateTokenWithIAM", {}).n("SSOOIDCClient", "CreateTokenWithIAMCommand").f(CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog).ser(se_CreateTokenWithIAMCommand).de(de_CreateTokenWithIAMCommand).build() { +}; +__name(_CreateTokenWithIAMCommand, "CreateTokenWithIAMCommand"); +var CreateTokenWithIAMCommand = _CreateTokenWithIAMCommand; + +// src/commands/RegisterClientCommand.ts + + + + +var _RegisterClientCommand = class _RegisterClientCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSSOOIDCService", "RegisterClient", {}).n("SSOOIDCClient", "RegisterClientCommand").f(void 0, RegisterClientResponseFilterSensitiveLog).ser(se_RegisterClientCommand).de(de_RegisterClientCommand).build() { +}; +__name(_RegisterClientCommand, "RegisterClientCommand"); +var RegisterClientCommand = _RegisterClientCommand; + +// src/commands/StartDeviceAuthorizationCommand.ts + + + + +var _StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSSOOIDCService", "StartDeviceAuthorization", {}).n("SSOOIDCClient", "StartDeviceAuthorizationCommand").f(StartDeviceAuthorizationRequestFilterSensitiveLog, void 0).ser(se_StartDeviceAuthorizationCommand).de(de_StartDeviceAuthorizationCommand).build() { +}; +__name(_StartDeviceAuthorizationCommand, "StartDeviceAuthorizationCommand"); +var StartDeviceAuthorizationCommand = _StartDeviceAuthorizationCommand; + +// src/SSOOIDC.ts +var commands = { + CreateTokenCommand, + CreateTokenWithIAMCommand, + RegisterClientCommand, + StartDeviceAuthorizationCommand +}; +var _SSOOIDC = class _SSOOIDC extends SSOOIDCClient { +}; +__name(_SSOOIDC, "SSOOIDC"); +var SSOOIDC = _SSOOIDC; +(0, import_smithy_client.createAggregatedClient)(commands, SSOOIDC); + +// src/index.ts +var import_util_endpoints = require("@aws-sdk/util-endpoints"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + SSOOIDCServiceException, + __Client, + SSOOIDCClient, + SSOOIDC, + $Command, + CreateTokenCommand, + CreateTokenWithIAMCommand, + RegisterClientCommand, + StartDeviceAuthorizationCommand, + AccessDeniedException, + AuthorizationPendingException, + ExpiredTokenException, + InternalServerException, + InvalidClientException, + InvalidGrantException, + InvalidRequestException, + InvalidScopeException, + SlowDownException, + UnauthorizedClientException, + UnsupportedGrantTypeException, + InvalidRequestRegionException, + InvalidClientMetadataException, + CreateTokenRequestFilterSensitiveLog, + CreateTokenResponseFilterSensitiveLog, + CreateTokenWithIAMRequestFilterSensitiveLog, + CreateTokenWithIAMResponseFilterSensitiveLog, + RegisterClientResponseFilterSensitiveLog, + StartDeviceAuthorizationRequestFilterSensitiveLog +}); + diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.browser.js b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.browser.js new file mode 100644 index 0000000..39bd218 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.browser.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const tslib_1 = require("tslib"); +const package_json_1 = tslib_1.__importDefault(require("../package.json")); +const sha256_browser_1 = require("@aws-crypto/sha256-browser"); +const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser"); +const config_resolver_1 = require("@smithy/config-resolver"); +const fetch_http_handler_1 = require("@smithy/fetch-http-handler"); +const invalid_dependency_1 = require("@smithy/invalid-dependency"); +const util_body_length_browser_1 = require("@smithy/util-body-length-browser"); +const util_retry_1 = require("@smithy/util-retry"); +const runtimeConfig_shared_1 = require("./runtimeConfig.shared"); +const smithy_client_1 = require("@smithy/smithy-client"); +const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser"); +const getRuntimeConfig = (config) => { + const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"), + requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? sha256_browser_1.Sha256, + streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js new file mode 100644 index 0000000..9f13442 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const tslib_1 = require("tslib"); +const package_json_1 = tslib_1.__importDefault(require("../package.json")); +const credentialDefaultProvider_1 = require("./credentialDefaultProvider"); +const core_1 = require("@aws-sdk/core"); +const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node"); +const config_resolver_1 = require("@smithy/config-resolver"); +const hash_node_1 = require("@smithy/hash-node"); +const middleware_retry_1 = require("@smithy/middleware-retry"); +const node_config_provider_1 = require("@smithy/node-config-provider"); +const node_http_handler_1 = require("@smithy/node-http-handler"); +const util_body_length_node_1 = require("@smithy/util-body-length-node"); +const util_retry_1 = require("@smithy/util-retry"); +const runtimeConfig_shared_1 = require("./runtimeConfig.shared"); +const smithy_client_1 = require("@smithy/smithy-client"); +const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node"); +const smithy_client_2 = require("@smithy/smithy-client"); +const getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.native.js b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.native.js new file mode 100644 index 0000000..34c5f8e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.native.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const sha256_js_1 = require("@aws-crypto/sha256-js"); +const runtimeConfig_browser_1 = require("./runtimeConfig.browser"); +const getRuntimeConfig = (config) => { + const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? sha256_js_1.Sha256, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js new file mode 100644 index 0000000..a305a1b --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const core_1 = require("@aws-sdk/core"); +const core_2 = require("@smithy/core"); +const smithy_client_1 = require("@smithy/smithy-client"); +const url_parser_1 = require("@smithy/url-parser"); +const util_base64_1 = require("@smithy/util-base64"); +const util_utf8_1 = require("@smithy/util-utf8"); +const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider"); +const endpointResolver_1 = require("./endpoint/endpointResolver"); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO OIDC", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js new file mode 100644 index 0000000..a439b05 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDC.js @@ -0,0 +1,15 @@ +import { createAggregatedClient } from "@smithy/smithy-client"; +import { CreateTokenCommand } from "./commands/CreateTokenCommand"; +import { CreateTokenWithIAMCommand, } from "./commands/CreateTokenWithIAMCommand"; +import { RegisterClientCommand, } from "./commands/RegisterClientCommand"; +import { StartDeviceAuthorizationCommand, } from "./commands/StartDeviceAuthorizationCommand"; +import { SSOOIDCClient } from "./SSOOIDCClient"; +const commands = { + CreateTokenCommand, + CreateTokenWithIAMCommand, + RegisterClientCommand, + StartDeviceAuthorizationCommand, +}; +export class SSOOIDC extends SSOOIDCClient { +} +createAggregatedClient(commands, SSOOIDC); diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js new file mode 100644 index 0000000..a728fb6 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js @@ -0,0 +1,52 @@ +import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent"; +import { resolveRegionConfig } from "@smithy/config-resolver"; +import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry"; +import { Client as __Client, } from "@smithy/smithy-client"; +import { defaultSSOOIDCHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider"; +import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions } from "./runtimeExtensions"; +export { __Client }; +export class SSOOIDCClient extends __Client { + constructor(...[configuration]) { + const _config_0 = __getRuntimeConfig(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveRegionConfig(_config_1); + const _config_3 = resolveEndpointConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider(), + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + getDefaultHttpAuthSchemeParametersProvider() { + return defaultSSOOIDCHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }); + } +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js new file mode 100644 index 0000000..2ba1d48 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthExtensionConfiguration.js @@ -0,0 +1,38 @@ +export const getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } + else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + }, + }; +}; +export const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js new file mode 100644 index 0000000..b7effad --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/auth/httpAuthSchemeProvider.js @@ -0,0 +1,58 @@ +import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core"; +import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware"; +export const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: getSmithyContext(context).operation, + region: (await normalizeProvider(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sso-oauth", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +export const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateToken": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "RegisterClient": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "StartDeviceAuthorization": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +export const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveAwsSdkSigV4Config(config); + return { + ...config_0, + }; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js new file mode 100644 index 0000000..9f68180 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_CreateTokenCommand, se_CreateTokenCommand } from "../protocols/Aws_restJson1"; +export { $Command }; +export class CreateTokenCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSSOOIDCService", "CreateToken", {}) + .n("SSOOIDCClient", "CreateTokenCommand") + .f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog) + .ser(se_CreateTokenCommand) + .de(de_CreateTokenCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js new file mode 100644 index 0000000..bc17d4e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenWithIAMCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_CreateTokenWithIAMCommand, se_CreateTokenWithIAMCommand } from "../protocols/Aws_restJson1"; +export { $Command }; +export class CreateTokenWithIAMCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSSOOIDCService", "CreateTokenWithIAM", {}) + .n("SSOOIDCClient", "CreateTokenWithIAMCommand") + .f(CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog) + .ser(se_CreateTokenWithIAMCommand) + .de(de_CreateTokenWithIAMCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js new file mode 100644 index 0000000..fa091e6 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { RegisterClientResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_RegisterClientCommand, se_RegisterClientCommand } from "../protocols/Aws_restJson1"; +export { $Command }; +export class RegisterClientCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSSOOIDCService", "RegisterClient", {}) + .n("SSOOIDCClient", "RegisterClientCommand") + .f(void 0, RegisterClientResponseFilterSensitiveLog) + .ser(se_RegisterClientCommand) + .de(de_RegisterClientCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js new file mode 100644 index 0000000..9287009 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { StartDeviceAuthorizationRequestFilterSensitiveLog, } from "../models/models_0"; +import { de_StartDeviceAuthorizationCommand, se_StartDeviceAuthorizationCommand } from "../protocols/Aws_restJson1"; +export { $Command }; +export class StartDeviceAuthorizationCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSSOOIDCService", "StartDeviceAuthorization", {}) + .n("SSOOIDCClient", "StartDeviceAuthorizationCommand") + .f(StartDeviceAuthorizationRequestFilterSensitiveLog, void 0) + .ser(se_StartDeviceAuthorizationCommand) + .de(de_StartDeviceAuthorizationCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js new file mode 100644 index 0000000..0018350 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/index.js @@ -0,0 +1,4 @@ +export * from "./CreateTokenCommand"; +export * from "./CreateTokenWithIAMCommand"; +export * from "./RegisterClientCommand"; +export * from "./StartDeviceAuthorizationCommand"; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/credentialDefaultProvider.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/credentialDefaultProvider.js new file mode 100644 index 0000000..47da3b5 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/credentialDefaultProvider.js @@ -0,0 +1,3 @@ +export const defaultProvider = ((input) => { + return () => import("@aws-sdk/credential-provider-node").then(({ defaultProvider }) => defaultProvider(input)()); +}); diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js new file mode 100644 index 0000000..d48b0e8 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/EndpointParameters.js @@ -0,0 +1,14 @@ +export const resolveClientEndpointParameters = (options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "sso-oauth", + }; +}; +export const commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js new file mode 100644 index 0000000..5c35926 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/endpointResolver.js @@ -0,0 +1,8 @@ +import { resolveEndpoint } from "@smithy/util-endpoints"; +import { ruleSet } from "./ruleset"; +export const defaultEndpointResolver = (endpointParams, context = {}) => { + return resolveEndpoint(ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js new file mode 100644 index 0000000..040ea39 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/endpoint/ruleset.js @@ -0,0 +1,4 @@ +const u = "required", v = "fn", w = "argv", x = "ref"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; +const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +export const ruleSet = _data; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/extensionConfiguration.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/extensionConfiguration.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/extensionConfiguration.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js new file mode 100644 index 0000000..4918fee --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/index.js @@ -0,0 +1,6 @@ +export * from "./SSOOIDCClient"; +export * from "./SSOOIDC"; +export * from "./commands"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export { SSOOIDCServiceException } from "./models/SSOOIDCServiceException"; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js new file mode 100644 index 0000000..176cec3 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/SSOOIDCServiceException.js @@ -0,0 +1,8 @@ +import { ServiceException as __ServiceException, } from "@smithy/smithy-client"; +export { __ServiceException }; +export class SSOOIDCServiceException extends __ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, SSOOIDCServiceException.prototype); + } +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/index.js @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js new file mode 100644 index 0000000..7423d5f --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js @@ -0,0 +1,217 @@ +import { SENSITIVE_STRING } from "@smithy/smithy-client"; +import { SSOOIDCServiceException as __BaseException } from "./SSOOIDCServiceException"; +export class AccessDeniedException extends __BaseException { + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + this.name = "AccessDeniedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, AccessDeniedException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class AuthorizationPendingException extends __BaseException { + constructor(opts) { + super({ + name: "AuthorizationPendingException", + $fault: "client", + ...opts, + }); + this.name = "AuthorizationPendingException"; + this.$fault = "client"; + Object.setPrototypeOf(this, AuthorizationPendingException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class ExpiredTokenException extends __BaseException { + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts, + }); + this.name = "ExpiredTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, ExpiredTokenException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class InternalServerException extends __BaseException { + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts, + }); + this.name = "InternalServerException"; + this.$fault = "server"; + Object.setPrototypeOf(this, InternalServerException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class InvalidClientException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidClientException", + $fault: "client", + ...opts, + }); + this.name = "InvalidClientException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class InvalidGrantException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidGrantException", + $fault: "client", + ...opts, + }); + this.name = "InvalidGrantException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidGrantException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class InvalidRequestException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts, + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidRequestException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class InvalidScopeException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidScopeException", + $fault: "client", + ...opts, + }); + this.name = "InvalidScopeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidScopeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class SlowDownException extends __BaseException { + constructor(opts) { + super({ + name: "SlowDownException", + $fault: "client", + ...opts, + }); + this.name = "SlowDownException"; + this.$fault = "client"; + Object.setPrototypeOf(this, SlowDownException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class UnauthorizedClientException extends __BaseException { + constructor(opts) { + super({ + name: "UnauthorizedClientException", + $fault: "client", + ...opts, + }); + this.name = "UnauthorizedClientException"; + this.$fault = "client"; + Object.setPrototypeOf(this, UnauthorizedClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class UnsupportedGrantTypeException extends __BaseException { + constructor(opts) { + super({ + name: "UnsupportedGrantTypeException", + $fault: "client", + ...opts, + }); + this.name = "UnsupportedGrantTypeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export class InvalidRequestRegionException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidRequestRegionException", + $fault: "client", + ...opts, + }); + this.name = "InvalidRequestRegionException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidRequestRegionException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + this.endpoint = opts.endpoint; + this.region = opts.region; + } +} +export class InvalidClientMetadataException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidClientMetadataException", + $fault: "client", + ...opts, + }); + this.name = "InvalidClientMetadataException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidClientMetadataException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +} +export const CreateTokenRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.clientSecret && { clientSecret: SENSITIVE_STRING }), + ...(obj.refreshToken && { refreshToken: SENSITIVE_STRING }), +}); +export const CreateTokenResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: SENSITIVE_STRING }), + ...(obj.refreshToken && { refreshToken: SENSITIVE_STRING }), + ...(obj.idToken && { idToken: SENSITIVE_STRING }), +}); +export const CreateTokenWithIAMRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.refreshToken && { refreshToken: SENSITIVE_STRING }), + ...(obj.assertion && { assertion: SENSITIVE_STRING }), + ...(obj.subjectToken && { subjectToken: SENSITIVE_STRING }), +}); +export const CreateTokenWithIAMResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: SENSITIVE_STRING }), + ...(obj.refreshToken && { refreshToken: SENSITIVE_STRING }), + ...(obj.idToken && { idToken: SENSITIVE_STRING }), +}); +export const RegisterClientResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.clientSecret && { clientSecret: SENSITIVE_STRING }), +}); +export const StartDeviceAuthorizationRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.clientSecret && { clientSecret: SENSITIVE_STRING }), +}); diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js new file mode 100644 index 0000000..ed0dcd6 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js @@ -0,0 +1,409 @@ +import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core"; +import { requestBuilder as rb } from "@smithy/core"; +import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client"; +import { AccessDeniedException, AuthorizationPendingException, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidClientMetadataException, InvalidGrantException, InvalidRequestException, InvalidRequestRegionException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException, } from "../models/models_0"; +import { SSOOIDCServiceException as __BaseException } from "../models/SSOOIDCServiceException"; +export const se_CreateTokenCommand = async (input, context) => { + const b = rb(input, context); + const headers = { + "content-type": "application/json", + }; + b.bp("/token"); + let body; + body = JSON.stringify(take(input, { + clientId: [], + clientSecret: [], + code: [], + deviceCode: [], + grantType: [], + redirectUri: [], + refreshToken: [], + scope: (_) => _json(_), + })); + b.m("POST").h(headers).b(body); + return b.build(); +}; +export const se_CreateTokenWithIAMCommand = async (input, context) => { + const b = rb(input, context); + const headers = { + "content-type": "application/json", + }; + b.bp("/token"); + const query = map({ + [_ai]: [, "t"], + }); + let body; + body = JSON.stringify(take(input, { + assertion: [], + clientId: [], + code: [], + grantType: [], + redirectUri: [], + refreshToken: [], + requestedTokenType: [], + scope: (_) => _json(_), + subjectToken: [], + subjectTokenType: [], + })); + b.m("POST").h(headers).q(query).b(body); + return b.build(); +}; +export const se_RegisterClientCommand = async (input, context) => { + const b = rb(input, context); + const headers = { + "content-type": "application/json", + }; + b.bp("/client/register"); + let body; + body = JSON.stringify(take(input, { + clientName: [], + clientType: [], + scopes: (_) => _json(_), + })); + b.m("POST").h(headers).b(body); + return b.build(); +}; +export const se_StartDeviceAuthorizationCommand = async (input, context) => { + const b = rb(input, context); + const headers = { + "content-type": "application/json", + }; + b.bp("/device_authorization"); + let body; + body = JSON.stringify(take(input, { + clientId: [], + clientSecret: [], + startUrl: [], + })); + b.m("POST").h(headers).b(body); + return b.build(); +}; +export const de_CreateTokenCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = map({ + $metadata: deserializeMetadata(output), + }); + const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + accessToken: __expectString, + expiresIn: __expectInt32, + idToken: __expectString, + refreshToken: __expectString, + tokenType: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; +export const de_CreateTokenWithIAMCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = map({ + $metadata: deserializeMetadata(output), + }); + const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + accessToken: __expectString, + expiresIn: __expectInt32, + idToken: __expectString, + issuedTokenType: __expectString, + refreshToken: __expectString, + scope: _json, + tokenType: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; +export const de_RegisterClientCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = map({ + $metadata: deserializeMetadata(output), + }); + const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + authorizationEndpoint: __expectString, + clientId: __expectString, + clientIdIssuedAt: __expectLong, + clientSecret: __expectString, + clientSecretExpiresAt: __expectLong, + tokenEndpoint: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; +export const de_StartDeviceAuthorizationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = map({ + $metadata: deserializeMetadata(output), + }); + const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + deviceCode: __expectString, + expiresIn: __expectInt32, + interval: __expectInt32, + userCode: __expectString, + verificationUri: __expectString, + verificationUriComplete: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; +const de_CommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.ssooidc#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "AuthorizationPendingException": + case "com.amazonaws.ssooidc#AuthorizationPendingException": + throw await de_AuthorizationPendingExceptionRes(parsedOutput, context); + case "ExpiredTokenException": + case "com.amazonaws.ssooidc#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.ssooidc#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "InvalidClientException": + case "com.amazonaws.ssooidc#InvalidClientException": + throw await de_InvalidClientExceptionRes(parsedOutput, context); + case "InvalidGrantException": + case "com.amazonaws.ssooidc#InvalidGrantException": + throw await de_InvalidGrantExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.ssooidc#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "InvalidScopeException": + case "com.amazonaws.ssooidc#InvalidScopeException": + throw await de_InvalidScopeExceptionRes(parsedOutput, context); + case "SlowDownException": + case "com.amazonaws.ssooidc#SlowDownException": + throw await de_SlowDownExceptionRes(parsedOutput, context); + case "UnauthorizedClientException": + case "com.amazonaws.ssooidc#UnauthorizedClientException": + throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); + case "UnsupportedGrantTypeException": + case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": + throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context); + case "InvalidRequestRegionException": + case "com.amazonaws.ssooidc#InvalidRequestRegionException": + throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context); + case "InvalidClientMetadataException": + case "com.amazonaws.ssooidc#InvalidClientMetadataException": + throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; +const throwDefaultError = withBaseException(__BaseException); +const de_AccessDeniedExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new AuthorizationPendingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_InternalServerExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_InvalidClientExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidClientMetadataException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_InvalidGrantExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidGrantException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_InvalidRequestExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_InvalidRequestRegionExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + endpoint: __expectString, + error: __expectString, + error_description: __expectString, + region: __expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidRequestRegionException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_InvalidScopeExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidScopeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_SlowDownExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new SlowDownException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new UnauthorizedClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); + const exception = new UnsupportedGrantTypeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); +const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const isSerializableHeaderValue = (value) => value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); +const _ai = "aws_iam"; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.browser.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.browser.js new file mode 100644 index 0000000..bad1f85 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.browser.js @@ -0,0 +1,34 @@ +import packageInfo from "../package.json"; +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; +import { invalidProvider } from "@smithy/invalid-dependency"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser"; +export const getRuntimeConfig = (config) => { + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js new file mode 100644 index 0000000..13f69bb --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js @@ -0,0 +1,44 @@ +import packageInfo from "../package.json"; +import { defaultProvider as credentialDefaultProvider } from "./credentialDefaultProvider"; +import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver"; +import { Hash } from "@smithy/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; +import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler"; +import { calculateBodyLength } from "@smithy/util-body-length-node"; +import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node"; +import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client"; +export const getRuntimeConfig = (config) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + awsCheckVersion(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + loadNodeConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.native.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.native.js new file mode 100644 index 0000000..0b54695 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.native.js @@ -0,0 +1,11 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; +export const getRuntimeConfig = (config) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js new file mode 100644 index 0000000..49a0235 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.shared.js @@ -0,0 +1,36 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { NoOpLogger } from "@smithy/smithy-client"; +import { parseUrl } from "@smithy/url-parser"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; +import { defaultSSOOIDCHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider"; +import { defaultEndpointResolver } from "./endpoint/endpointResolver"; +export const getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner(), + }, + ], + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "SSO OIDC", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js b/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js new file mode 100644 index 0000000..1502ff7 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeExtensions.js @@ -0,0 +1,21 @@ +import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver"; +import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http"; +import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client"; +import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration"; +const asPartial = (t) => t; +export const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), + ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)), + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), + ...resolveDefaultRuntimeConfig(extensionConfiguration), + ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration), + }; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDC.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDC.d.ts new file mode 100644 index 0000000..6c1b04f --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDC.d.ts @@ -0,0 +1,75 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; +import { CreateTokenCommandInput, CreateTokenCommandOutput } from "./commands/CreateTokenCommand"; +import { CreateTokenWithIAMCommandInput, CreateTokenWithIAMCommandOutput } from "./commands/CreateTokenWithIAMCommand"; +import { RegisterClientCommandInput, RegisterClientCommandOutput } from "./commands/RegisterClientCommand"; +import { StartDeviceAuthorizationCommandInput, StartDeviceAuthorizationCommandOutput } from "./commands/StartDeviceAuthorizationCommand"; +import { SSOOIDCClient } from "./SSOOIDCClient"; +export interface SSOOIDC { + /** + * @see {@link CreateTokenCommand} + */ + createToken(args: CreateTokenCommandInput, options?: __HttpHandlerOptions): Promise; + createToken(args: CreateTokenCommandInput, cb: (err: any, data?: CreateTokenCommandOutput) => void): void; + createToken(args: CreateTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateTokenCommandOutput) => void): void; + /** + * @see {@link CreateTokenWithIAMCommand} + */ + createTokenWithIAM(args: CreateTokenWithIAMCommandInput, options?: __HttpHandlerOptions): Promise; + createTokenWithIAM(args: CreateTokenWithIAMCommandInput, cb: (err: any, data?: CreateTokenWithIAMCommandOutput) => void): void; + createTokenWithIAM(args: CreateTokenWithIAMCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateTokenWithIAMCommandOutput) => void): void; + /** + * @see {@link RegisterClientCommand} + */ + registerClient(args: RegisterClientCommandInput, options?: __HttpHandlerOptions): Promise; + registerClient(args: RegisterClientCommandInput, cb: (err: any, data?: RegisterClientCommandOutput) => void): void; + registerClient(args: RegisterClientCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RegisterClientCommandOutput) => void): void; + /** + * @see {@link StartDeviceAuthorizationCommand} + */ + startDeviceAuthorization(args: StartDeviceAuthorizationCommandInput, options?: __HttpHandlerOptions): Promise; + startDeviceAuthorization(args: StartDeviceAuthorizationCommandInput, cb: (err: any, data?: StartDeviceAuthorizationCommandOutput) => void): void; + startDeviceAuthorization(args: StartDeviceAuthorizationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartDeviceAuthorizationCommandOutput) => void): void; +} +/** + *

IAM Identity Center OpenID Connect (OIDC) is a web service that enables a client (such as CLI + * or a native application) to register with IAM Identity Center. The service also enables the client to + * fetch the user’s access token upon successful authentication and authorization with + * IAM Identity Center.

+ * + *

IAM Identity Center uses the sso and identitystore API namespaces.

+ *
+ *

+ * Considerations for Using This Guide + *

+ *

Before you begin using this guide, we recommend that you first review the following + * important information about how the IAM Identity Center OIDC service works.

+ *
    + *
  • + *

    The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device + * Authorization Grant standard (https://tools.ietf.org/html/rfc8628) that are necessary to enable single + * sign-on authentication with the CLI.

    + *
  • + *
  • + *

    With older versions of the CLI, the service only emits OIDC access tokens, so to + * obtain a new token, users must explicitly re-authenticate. To access the OIDC flow that + * supports token refresh and doesn’t require re-authentication, update to the latest CLI + * version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with support for OIDC token refresh and + * configurable IAM Identity Center session durations. For more information, see Configure Amazon Web Services access portal session duration .

    + *
  • + *
  • + *

    The access tokens provided by this service grant access to all Amazon Web Services account + * entitlements assigned to an IAM Identity Center user, not just a particular application.

    + *
  • + *
  • + *

    The documentation in this guide does not describe the mechanism to convert the access + * token into Amazon Web Services Auth (“sigv4”) credentials for use with IAM-protected Amazon Web Services service + * endpoints. For more information, see GetRoleCredentials in the IAM Identity Center Portal API Reference + * Guide.

    + *
  • + *
+ *

For general information about IAM Identity Center, see What is + * IAM Identity Center? in the IAM Identity Center User Guide.

+ * @public + */ +export declare class SSOOIDC extends SSOOIDCClient implements SSOOIDC { +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts new file mode 100644 index 0000000..dbcd6a3 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts @@ -0,0 +1,212 @@ +import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header"; +import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent"; +import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver"; +import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint"; +import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client"; +import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types"; +import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider"; +import { CreateTokenCommandInput, CreateTokenCommandOutput } from "./commands/CreateTokenCommand"; +import { CreateTokenWithIAMCommandInput, CreateTokenWithIAMCommandOutput } from "./commands/CreateTokenWithIAMCommand"; +import { RegisterClientCommandInput, RegisterClientCommandOutput } from "./commands/RegisterClientCommand"; +import { StartDeviceAuthorizationCommandInput, StartDeviceAuthorizationCommandOutput } from "./commands/StartDeviceAuthorizationCommand"; +import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters"; +import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; +export { __Client }; +/** + * @public + */ +export type ServiceInputTypes = CreateTokenCommandInput | CreateTokenWithIAMCommandInput | RegisterClientCommandInput | StartDeviceAuthorizationCommandInput; +/** + * @public + */ +export type ServiceOutputTypes = CreateTokenCommandOutput | CreateTokenWithIAMCommandOutput | RegisterClientCommandOutput | StartDeviceAuthorizationCommandOutput; +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandlerUserInput; + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + /** + * The runtime environment. + * @internal + */ + runtime?: string; + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + /** + * Default credentials provider; Not available in browser runtime. + * @deprecated + * @internal + */ + credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider; + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + /** + * Specifies which retry algorithm to use. + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ + * + */ + retryMode?: string | __Provider; + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + /** + * Optional extensions + */ + extensions?: RuntimeExtension[]; + /** + * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. + */ + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} +/** + * @public + */ +export type SSOOIDCClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig & RetryInputConfig & HostHeaderInputConfig & UserAgentInputConfig & HttpAuthSchemeInputConfig & ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of SSOOIDCClient class constructor that set the region, credentials and other options. + */ +export interface SSOOIDCClientConfig extends SSOOIDCClientConfigType { +} +/** + * @public + */ +export type SSOOIDCClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & UserAgentResolvedConfig & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of SSOOIDCClient class. This is resolved and normalized from the {@link SSOOIDCClientConfig | constructor configuration interface}. + */ +export interface SSOOIDCClientResolvedConfig extends SSOOIDCClientResolvedConfigType { +} +/** + *

IAM Identity Center OpenID Connect (OIDC) is a web service that enables a client (such as CLI + * or a native application) to register with IAM Identity Center. The service also enables the client to + * fetch the user’s access token upon successful authentication and authorization with + * IAM Identity Center.

+ * + *

IAM Identity Center uses the sso and identitystore API namespaces.

+ *
+ *

+ * Considerations for Using This Guide + *

+ *

Before you begin using this guide, we recommend that you first review the following + * important information about how the IAM Identity Center OIDC service works.

+ *
    + *
  • + *

    The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device + * Authorization Grant standard (https://tools.ietf.org/html/rfc8628) that are necessary to enable single + * sign-on authentication with the CLI.

    + *
  • + *
  • + *

    With older versions of the CLI, the service only emits OIDC access tokens, so to + * obtain a new token, users must explicitly re-authenticate. To access the OIDC flow that + * supports token refresh and doesn’t require re-authentication, update to the latest CLI + * version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with support for OIDC token refresh and + * configurable IAM Identity Center session durations. For more information, see Configure Amazon Web Services access portal session duration .

    + *
  • + *
  • + *

    The access tokens provided by this service grant access to all Amazon Web Services account + * entitlements assigned to an IAM Identity Center user, not just a particular application.

    + *
  • + *
  • + *

    The documentation in this guide does not describe the mechanism to convert the access + * token into Amazon Web Services Auth (“sigv4”) credentials for use with IAM-protected Amazon Web Services service + * endpoints. For more information, see GetRoleCredentials in the IAM Identity Center Portal API Reference + * Guide.

    + *
  • + *
+ *

For general information about IAM Identity Center, see What is + * IAM Identity Center? in the IAM Identity Center User Guide.

+ * @public + */ +export declare class SSOOIDCClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SSOOIDCClientResolvedConfig> { + /** + * The resolved configuration of SSOOIDCClient class. This is resolved and normalized from the {@link SSOOIDCClientConfig | constructor configuration interface}. + */ + readonly config: SSOOIDCClientResolvedConfig; + constructor(...[configuration]: __CheckOptionalClientConfig); + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void; + private getDefaultHttpAuthSchemeParametersProvider; + private getIdentityProviderConfigProvider; +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthExtensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthExtensionConfiguration.d.ts new file mode 100644 index 0000000..a56a608 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthExtensionConfiguration.d.ts @@ -0,0 +1,29 @@ +import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types"; +import { SSOOIDCHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; +/** + * @internal + */ +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider(httpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider): void; + httpAuthSchemeProvider(): SSOOIDCHttpAuthSchemeProvider; + setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void; + credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined; +} +/** + * @internal + */ +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; +/** + * @internal + */ +export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration; +/** + * @internal + */ +export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthSchemeProvider.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthSchemeProvider.d.ts new file mode 100644 index 0000000..76c9d61 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthSchemeProvider.d.ts @@ -0,0 +1,61 @@ +import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core"; +import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types"; +import { SSOOIDCClientResolvedConfig } from "../SSOOIDCClient"; +/** + * @internal + */ +export interface SSOOIDCHttpAuthSchemeParameters extends HttpAuthSchemeParameters { + region?: string; +} +/** + * @internal + */ +export interface SSOOIDCHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider { +} +/** + * @internal + */ +export declare const defaultSSOOIDCHttpAuthSchemeParametersProvider: (config: SSOOIDCClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise; +/** + * @internal + */ +export interface SSOOIDCHttpAuthSchemeProvider extends HttpAuthSchemeProvider { +} +/** + * @internal + */ +export declare const defaultSSOOIDCHttpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider; +/** + * @internal + */ +export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig { + /** + * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + httpAuthSchemes?: HttpAuthScheme[]; + /** + * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + httpAuthSchemeProvider?: SSOOIDCHttpAuthSchemeProvider; +} +/** + * @internal + */ +export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig { + /** + * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + readonly httpAuthSchemes: HttpAuthScheme[]; + /** + * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + readonly httpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider; +} +/** + * @internal + */ +export declare const resolveHttpAuthSchemeConfig: (config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/CreateTokenCommand.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/CreateTokenCommand.d.ts new file mode 100644 index 0000000..eb43434 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/CreateTokenCommand.d.ts @@ -0,0 +1,162 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { CreateTokenRequest, CreateTokenResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, SSOOIDCClientResolvedConfig } from "../SSOOIDCClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateTokenCommand}. + */ +export interface CreateTokenCommandInput extends CreateTokenRequest { +} +/** + * @public + * + * The output of {@link CreateTokenCommand}. + */ +export interface CreateTokenCommandOutput extends CreateTokenResponse, __MetadataBearer { +} +declare const CreateTokenCommand_base: { + new (input: CreateTokenCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: CreateTokenCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Creates and returns access and refresh tokens for clients that are authenticated using + * client secrets. The access token can be used to fetch short-term credentials for the assigned + * AWS accounts or to access application APIs using bearer authentication.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SSOOIDCClient, CreateTokenCommand } from "@aws-sdk/client-sso-oidc"; // ES Modules import + * // const { SSOOIDCClient, CreateTokenCommand } = require("@aws-sdk/client-sso-oidc"); // CommonJS import + * const client = new SSOOIDCClient(config); + * const input = { // CreateTokenRequest + * clientId: "STRING_VALUE", // required + * clientSecret: "STRING_VALUE", // required + * grantType: "STRING_VALUE", // required + * deviceCode: "STRING_VALUE", + * code: "STRING_VALUE", + * refreshToken: "STRING_VALUE", + * scope: [ // Scopes + * "STRING_VALUE", + * ], + * redirectUri: "STRING_VALUE", + * }; + * const command = new CreateTokenCommand(input); + * const response = await client.send(command); + * // { // CreateTokenResponse + * // accessToken: "STRING_VALUE", + * // tokenType: "STRING_VALUE", + * // expiresIn: Number("int"), + * // refreshToken: "STRING_VALUE", + * // idToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreateTokenCommandInput - {@link CreateTokenCommandInput} + * @returns {@link CreateTokenCommandOutput} + * @see {@link CreateTokenCommandInput} for command's `input` shape. + * @see {@link CreateTokenCommandOutput} for command's `response` shape. + * @see {@link SSOOIDCClientResolvedConfig | config} for SSOOIDCClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link AuthorizationPendingException} (client fault) + *

Indicates that a request to authorize a client with an access user session token is + * pending.

+ * + * @throws {@link ExpiredTokenException} (client fault) + *

Indicates that the token issued by the service is expired and is no longer valid.

+ * + * @throws {@link InternalServerException} (server fault) + *

Indicates that an error from the service occurred while trying to process a + * request.

+ * + * @throws {@link InvalidClientException} (client fault) + *

Indicates that the clientId or clientSecret in the request is + * invalid. For example, this can occur when a client sends an incorrect clientId or + * an expired clientSecret.

+ * + * @throws {@link InvalidGrantException} (client fault) + *

Indicates that a request contains an invalid grant. This can occur if a client makes a + * CreateToken request with an invalid grant type.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

Indicates that something is wrong with the input to the request. For example, a required + * parameter might be missing or out of range.

+ * + * @throws {@link InvalidScopeException} (client fault) + *

Indicates that the scope provided in the request is invalid.

+ * + * @throws {@link SlowDownException} (client fault) + *

Indicates that the client is making the request too frequently and is more than the + * service can handle.

+ * + * @throws {@link UnauthorizedClientException} (client fault) + *

Indicates that the client is not currently authorized to make the request. This can happen + * when a clientId is not issued for a public client.

+ * + * @throws {@link UnsupportedGrantTypeException} (client fault) + *

Indicates that the grant type in the request is not supported by the service.

+ * + * @throws {@link SSOOIDCServiceException} + *

Base exception class for all service exceptions from SSOOIDC service.

+ * + * @public + * @example Call OAuth/OIDC /token endpoint for Device Code grant with Secret authentication + * ```javascript + * // + * const input = { + * "clientId": "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID", + * "clientSecret": "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0", + * "deviceCode": "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE", + * "grantType": "urn:ietf:params:oauth:grant-type:device-code" + * }; + * const command = new CreateTokenCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "accessToken": "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN", + * "expiresIn": 1579729529, + * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN", + * "tokenType": "Bearer" + * } + * *\/ + * // example id: create-token-for-device-code + * ``` + * + * @example Call OAuth/OIDC /token endpoint for Refresh Token grant with Secret authentication + * ```javascript + * // + * const input = { + * "clientId": "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID", + * "clientSecret": "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0", + * "grantType": "refresh_token", + * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN", + * "scope": [ + * "codewhisperer:completions" + * ] + * }; + * const command = new CreateTokenCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "accessToken": "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN", + * "expiresIn": 1579729529, + * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN", + * "tokenType": "Bearer" + * } + * *\/ + * // example id: create-token-for-refresh-token + * ``` + * + */ +export declare class CreateTokenCommand extends CreateTokenCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/CreateTokenWithIAMCommand.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/CreateTokenWithIAMCommand.d.ts new file mode 100644 index 0000000..217e92d --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/CreateTokenWithIAMCommand.d.ts @@ -0,0 +1,244 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { CreateTokenWithIAMRequest, CreateTokenWithIAMResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, SSOOIDCClientResolvedConfig } from "../SSOOIDCClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateTokenWithIAMCommand}. + */ +export interface CreateTokenWithIAMCommandInput extends CreateTokenWithIAMRequest { +} +/** + * @public + * + * The output of {@link CreateTokenWithIAMCommand}. + */ +export interface CreateTokenWithIAMCommandOutput extends CreateTokenWithIAMResponse, __MetadataBearer { +} +declare const CreateTokenWithIAMCommand_base: { + new (input: CreateTokenWithIAMCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: CreateTokenWithIAMCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Creates and returns access and refresh tokens for clients and applications that are + * authenticated using IAM entities. The access token can be used to fetch short-term credentials + * for the assigned AWS accounts or to access application APIs using bearer + * authentication.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SSOOIDCClient, CreateTokenWithIAMCommand } from "@aws-sdk/client-sso-oidc"; // ES Modules import + * // const { SSOOIDCClient, CreateTokenWithIAMCommand } = require("@aws-sdk/client-sso-oidc"); // CommonJS import + * const client = new SSOOIDCClient(config); + * const input = { // CreateTokenWithIAMRequest + * clientId: "STRING_VALUE", // required + * grantType: "STRING_VALUE", // required + * code: "STRING_VALUE", + * refreshToken: "STRING_VALUE", + * assertion: "STRING_VALUE", + * scope: [ // Scopes + * "STRING_VALUE", + * ], + * redirectUri: "STRING_VALUE", + * subjectToken: "STRING_VALUE", + * subjectTokenType: "STRING_VALUE", + * requestedTokenType: "STRING_VALUE", + * }; + * const command = new CreateTokenWithIAMCommand(input); + * const response = await client.send(command); + * // { // CreateTokenWithIAMResponse + * // accessToken: "STRING_VALUE", + * // tokenType: "STRING_VALUE", + * // expiresIn: Number("int"), + * // refreshToken: "STRING_VALUE", + * // idToken: "STRING_VALUE", + * // issuedTokenType: "STRING_VALUE", + * // scope: [ // Scopes + * // "STRING_VALUE", + * // ], + * // }; + * + * ``` + * + * @param CreateTokenWithIAMCommandInput - {@link CreateTokenWithIAMCommandInput} + * @returns {@link CreateTokenWithIAMCommandOutput} + * @see {@link CreateTokenWithIAMCommandInput} for command's `input` shape. + * @see {@link CreateTokenWithIAMCommandOutput} for command's `response` shape. + * @see {@link SSOOIDCClientResolvedConfig | config} for SSOOIDCClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link AuthorizationPendingException} (client fault) + *

Indicates that a request to authorize a client with an access user session token is + * pending.

+ * + * @throws {@link ExpiredTokenException} (client fault) + *

Indicates that the token issued by the service is expired and is no longer valid.

+ * + * @throws {@link InternalServerException} (server fault) + *

Indicates that an error from the service occurred while trying to process a + * request.

+ * + * @throws {@link InvalidClientException} (client fault) + *

Indicates that the clientId or clientSecret in the request is + * invalid. For example, this can occur when a client sends an incorrect clientId or + * an expired clientSecret.

+ * + * @throws {@link InvalidGrantException} (client fault) + *

Indicates that a request contains an invalid grant. This can occur if a client makes a + * CreateToken request with an invalid grant type.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

Indicates that something is wrong with the input to the request. For example, a required + * parameter might be missing or out of range.

+ * + * @throws {@link InvalidRequestRegionException} (client fault) + *

Indicates that a token provided as input to the request was issued by and is only usable + * by calling IAM Identity Center endpoints in another region.

+ * + * @throws {@link InvalidScopeException} (client fault) + *

Indicates that the scope provided in the request is invalid.

+ * + * @throws {@link SlowDownException} (client fault) + *

Indicates that the client is making the request too frequently and is more than the + * service can handle.

+ * + * @throws {@link UnauthorizedClientException} (client fault) + *

Indicates that the client is not currently authorized to make the request. This can happen + * when a clientId is not issued for a public client.

+ * + * @throws {@link UnsupportedGrantTypeException} (client fault) + *

Indicates that the grant type in the request is not supported by the service.

+ * + * @throws {@link SSOOIDCServiceException} + *

Base exception class for all service exceptions from SSOOIDC service.

+ * + * @public + * @example Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication + * ```javascript + * // + * const input = { + * "clientId": "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222", + * "code": "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzg0In0EXAMPLEAUTHCODE", + * "grantType": "authorization_code", + * "redirectUri": "https://mywebapp.example/redirect", + * "scope": [ + * "openid", + * "aws", + * "sts:identity_context" + * ] + * }; + * const command = new CreateTokenWithIAMCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "accessToken": "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN", + * "expiresIn": 1579729529, + * "idToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0", + * "issuedTokenType": "urn:ietf:params:oauth:token-type:refresh_token", + * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN", + * "scope": [ + * "openid", + * "aws", + * "sts:identity_context" + * ], + * "tokenType": "Bearer" + * } + * *\/ + * // example id: create-token-with-iam-for-auth-code + * ``` + * + * @example Call OAuth/OIDC /token endpoint for Refresh Token grant with IAM authentication + * ```javascript + * // + * const input = { + * "clientId": "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222", + * "grantType": "refresh_token", + * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN" + * }; + * const command = new CreateTokenWithIAMCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "accessToken": "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN", + * "expiresIn": 1579729529, + * "issuedTokenType": "urn:ietf:params:oauth:token-type:refresh_token", + * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN", + * "scope": [ + * "openid", + * "aws", + * "sts:identity_context" + * ], + * "tokenType": "Bearer" + * } + * *\/ + * // example id: create-token-with-iam-for-refresh-token + * ``` + * + * @example Call OAuth/OIDC /token endpoint for JWT Bearer grant with IAM authentication + * ```javascript + * // + * const input = { + * "assertion": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjFMVE16YWtpaGlSbGFfOHoyQkVKVlhlV01xbyJ9.eyJ2ZXIiOiIyLjAiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vOTEyMjA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkL3YyLjAiLCJzdWIiOiJBQUFBQUFBQUFBQUFBQUFBQUFBQUFJa3pxRlZyU2FTYUZIeTc4MmJidGFRIiwiYXVkIjoiNmNiMDQwMTgtYTNmNS00NmE3LWI5OTUtOTQwYzc4ZjVhZWYzIiwiZXhwIjoxNTM2MzYxNDExLCJpYXQiOjE1MzYyNzQ3MTEsIm5iZiI6MTUzNjI3NDcxMSwibmFtZSI6IkFiZSBMaW5jb2xuIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiQWJlTGlAbWljcm9zb2Z0LmNvbSIsIm9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC02NmYzLTMzMzJlY2E3ZWE4MSIsInRpZCI6IjkxMjIwNDBkLTZjNjctNGM1Yi1iMTEyLTM2YTMwNGI2NmRhZCIsIm5vbmNlIjoiMTIzNTIzIiwiYWlvIjoiRGYyVVZYTDFpeCFsTUNXTVNPSkJjRmF0emNHZnZGR2hqS3Y4cTVnMHg3MzJkUjVNQjVCaXN2R1FPN1lXQnlqZDhpUURMcSFlR2JJRGFreXA1bW5PcmNkcUhlWVNubHRlcFFtUnA2QUlaOGpZIn0.1AFWW-Ck5nROwSlltm7GzZvDwUkqvhSQpm55TQsmVo9Y59cLhRXpvB8n-55HCr9Z6G_31_UbeUkoz612I2j_Sm9FFShSDDjoaLQr54CreGIJvjtmS3EkK9a7SJBbcpL1MpUtlfygow39tFjY7EVNW9plWUvRrTgVk7lYLprvfzw-CIqw3gHC-T7IK_m_xkr08INERBtaecwhTeN4chPC4W3jdmw_lIxzC48YoQ0dB1L9-ImX98Egypfrlbm0IBL5spFzL6JDZIRRJOu8vecJvj1mq-IUhGt0MacxX8jdxYLP-KUu2d9MbNKpCKJuZ7p8gwTL5B7NlUdh_dmSviPWrw", + * "clientId": "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222", + * "grantType": "urn:ietf:params:oauth:grant-type:jwt-bearer" + * }; + * const command = new CreateTokenWithIAMCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "accessToken": "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN", + * "expiresIn": 1579729529, + * "idToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0", + * "issuedTokenType": "urn:ietf:params:oauth:token-type:refresh_token", + * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN", + * "scope": [ + * "openid", + * "aws", + * "sts:identity_context" + * ], + * "tokenType": "Bearer" + * } + * *\/ + * // example id: create-token-with-iam-for-jwt-bearer + * ``` + * + * @example Call OAuth/OIDC /token endpoint for Token Exchange grant with IAM authentication + * ```javascript + * // + * const input = { + * "clientId": "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222", + * "grantType": "urn:ietf:params:oauth:grant-type:token-exchange", + * "requestedTokenType": "urn:ietf:params:oauth:token-type:access_token", + * "subjectToken": "aoak-Hig8TUDPNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZDIFFERENTACCESSTOKEN", + * "subjectTokenType": "urn:ietf:params:oauth:token-type:access_token" + * }; + * const command = new CreateTokenWithIAMCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "accessToken": "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN", + * "expiresIn": 1579729529, + * "idToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM", + * "issuedTokenType": "urn:ietf:params:oauth:token-type:access_token", + * "scope": [ + * "openid", + * "aws", + * "sts:identity_context" + * ], + * "tokenType": "Bearer" + * } + * *\/ + * // example id: create-token-with-iam-for-token-exchange + * ``` + * + */ +export declare class CreateTokenWithIAMCommand extends CreateTokenWithIAMCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/RegisterClientCommand.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/RegisterClientCommand.d.ts new file mode 100644 index 0000000..f36fd1e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/RegisterClientCommand.d.ts @@ -0,0 +1,108 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { RegisterClientRequest, RegisterClientResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, SSOOIDCClientResolvedConfig } from "../SSOOIDCClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link RegisterClientCommand}. + */ +export interface RegisterClientCommandInput extends RegisterClientRequest { +} +/** + * @public + * + * The output of {@link RegisterClientCommand}. + */ +export interface RegisterClientCommandOutput extends RegisterClientResponse, __MetadataBearer { +} +declare const RegisterClientCommand_base: { + new (input: RegisterClientCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: RegisterClientCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Registers a client with IAM Identity Center. This allows clients to initiate device authorization. + * The output should be persisted for reuse through many authentication requests.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SSOOIDCClient, RegisterClientCommand } from "@aws-sdk/client-sso-oidc"; // ES Modules import + * // const { SSOOIDCClient, RegisterClientCommand } = require("@aws-sdk/client-sso-oidc"); // CommonJS import + * const client = new SSOOIDCClient(config); + * const input = { // RegisterClientRequest + * clientName: "STRING_VALUE", // required + * clientType: "STRING_VALUE", // required + * scopes: [ // Scopes + * "STRING_VALUE", + * ], + * }; + * const command = new RegisterClientCommand(input); + * const response = await client.send(command); + * // { // RegisterClientResponse + * // clientId: "STRING_VALUE", + * // clientSecret: "STRING_VALUE", + * // clientIdIssuedAt: Number("long"), + * // clientSecretExpiresAt: Number("long"), + * // authorizationEndpoint: "STRING_VALUE", + * // tokenEndpoint: "STRING_VALUE", + * // }; + * + * ``` + * + * @param RegisterClientCommandInput - {@link RegisterClientCommandInput} + * @returns {@link RegisterClientCommandOutput} + * @see {@link RegisterClientCommandInput} for command's `input` shape. + * @see {@link RegisterClientCommandOutput} for command's `response` shape. + * @see {@link SSOOIDCClientResolvedConfig | config} for SSOOIDCClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

Indicates that an error from the service occurred while trying to process a + * request.

+ * + * @throws {@link InvalidClientMetadataException} (client fault) + *

Indicates that the client information sent in the request during registration is + * invalid.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

Indicates that something is wrong with the input to the request. For example, a required + * parameter might be missing or out of range.

+ * + * @throws {@link InvalidScopeException} (client fault) + *

Indicates that the scope provided in the request is invalid.

+ * + * @throws {@link SSOOIDCServiceException} + *

Base exception class for all service exceptions from SSOOIDC service.

+ * + * @public + * @example Call OAuth/OIDC /register-client endpoint + * ```javascript + * // + * const input = { + * "clientName": "My IDE Plugin", + * "clientType": "public", + * "scopes": [ + * "sso:account:access", + * "codewhisperer:completions" + * ] + * }; + * const command = new RegisterClientCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "clientId": "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID", + * "clientIdIssuedAt": 1579725929, + * "clientSecret": "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0", + * "clientSecretExpiresAt": 1587584729 + * } + * *\/ + * // example id: register-client + * ``` + * + */ +export declare class RegisterClientCommand extends RegisterClientCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/StartDeviceAuthorizationCommand.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/StartDeviceAuthorizationCommand.d.ts new file mode 100644 index 0000000..584c3c0 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/StartDeviceAuthorizationCommand.d.ts @@ -0,0 +1,111 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { StartDeviceAuthorizationRequest, StartDeviceAuthorizationResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, SSOOIDCClientResolvedConfig } from "../SSOOIDCClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StartDeviceAuthorizationCommand}. + */ +export interface StartDeviceAuthorizationCommandInput extends StartDeviceAuthorizationRequest { +} +/** + * @public + * + * The output of {@link StartDeviceAuthorizationCommand}. + */ +export interface StartDeviceAuthorizationCommandOutput extends StartDeviceAuthorizationResponse, __MetadataBearer { +} +declare const StartDeviceAuthorizationCommand_base: { + new (input: StartDeviceAuthorizationCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: StartDeviceAuthorizationCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Initiates device authorization by requesting a pair of verification codes from the + * authorization service.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SSOOIDCClient, StartDeviceAuthorizationCommand } from "@aws-sdk/client-sso-oidc"; // ES Modules import + * // const { SSOOIDCClient, StartDeviceAuthorizationCommand } = require("@aws-sdk/client-sso-oidc"); // CommonJS import + * const client = new SSOOIDCClient(config); + * const input = { // StartDeviceAuthorizationRequest + * clientId: "STRING_VALUE", // required + * clientSecret: "STRING_VALUE", // required + * startUrl: "STRING_VALUE", // required + * }; + * const command = new StartDeviceAuthorizationCommand(input); + * const response = await client.send(command); + * // { // StartDeviceAuthorizationResponse + * // deviceCode: "STRING_VALUE", + * // userCode: "STRING_VALUE", + * // verificationUri: "STRING_VALUE", + * // verificationUriComplete: "STRING_VALUE", + * // expiresIn: Number("int"), + * // interval: Number("int"), + * // }; + * + * ``` + * + * @param StartDeviceAuthorizationCommandInput - {@link StartDeviceAuthorizationCommandInput} + * @returns {@link StartDeviceAuthorizationCommandOutput} + * @see {@link StartDeviceAuthorizationCommandInput} for command's `input` shape. + * @see {@link StartDeviceAuthorizationCommandOutput} for command's `response` shape. + * @see {@link SSOOIDCClientResolvedConfig | config} for SSOOIDCClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *

Indicates that an error from the service occurred while trying to process a + * request.

+ * + * @throws {@link InvalidClientException} (client fault) + *

Indicates that the clientId or clientSecret in the request is + * invalid. For example, this can occur when a client sends an incorrect clientId or + * an expired clientSecret.

+ * + * @throws {@link InvalidRequestException} (client fault) + *

Indicates that something is wrong with the input to the request. For example, a required + * parameter might be missing or out of range.

+ * + * @throws {@link SlowDownException} (client fault) + *

Indicates that the client is making the request too frequently and is more than the + * service can handle.

+ * + * @throws {@link UnauthorizedClientException} (client fault) + *

Indicates that the client is not currently authorized to make the request. This can happen + * when a clientId is not issued for a public client.

+ * + * @throws {@link SSOOIDCServiceException} + *

Base exception class for all service exceptions from SSOOIDC service.

+ * + * @public + * @example Call OAuth/OIDC /start-device-authorization endpoint + * ```javascript + * // + * const input = { + * "clientId": "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID", + * "clientSecret": "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0", + * "startUrl": "https://identitycenter.amazonaws.com/ssoins-111111111111" + * }; + * const command = new StartDeviceAuthorizationCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "deviceCode": "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE", + * "expiresIn": 1579729529, + * "interval": 1, + * "userCode": "makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE", + * "verificationUri": "https://device.sso.us-west-2.amazonaws.com", + * "verificationUriComplete": "https://device.sso.us-west-2.amazonaws.com?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE" + * } + * *\/ + * // example id: start-device-authorization + * ``` + * + */ +export declare class StartDeviceAuthorizationCommand extends StartDeviceAuthorizationCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/index.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/index.d.ts new file mode 100644 index 0000000..0018350 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/commands/index.d.ts @@ -0,0 +1,4 @@ +export * from "./CreateTokenCommand"; +export * from "./CreateTokenWithIAMCommand"; +export * from "./RegisterClientCommand"; +export * from "./StartDeviceAuthorizationCommand"; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/credentialDefaultProvider.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/credentialDefaultProvider.d.ts new file mode 100644 index 0000000..78f0d07 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/credentialDefaultProvider.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const defaultProvider: any; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/EndpointParameters.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/EndpointParameters.d.ts new file mode 100644 index 0000000..23f42e3 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/EndpointParameters.d.ts @@ -0,0 +1,40 @@ +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; +/** + * @public + */ +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; +} +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const resolveClientEndpointParameters: (options: T & ClientInputEndpointParameters) => T & ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const commonParams: { + readonly UseFIPS: { + readonly type: "builtInParams"; + readonly name: "useFipsEndpoint"; + }; + readonly Endpoint: { + readonly type: "builtInParams"; + readonly name: "endpoint"; + }; + readonly Region: { + readonly type: "builtInParams"; + readonly name: "region"; + }; + readonly UseDualStack: { + readonly type: "builtInParams"; + readonly name: "useDualstackEndpoint"; + }; +}; +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/endpointResolver.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/endpointResolver.d.ts new file mode 100644 index 0000000..70a8eae --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/endpointResolver.d.ts @@ -0,0 +1,5 @@ +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParameters } from "./EndpointParameters"; +export declare const defaultEndpointResolver: (endpointParams: EndpointParameters, context?: { + logger?: Logger; +}) => EndpointV2; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/ruleset.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/ruleset.d.ts new file mode 100644 index 0000000..4b23899 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/ruleset.d.ts @@ -0,0 +1,2 @@ +import { RuleSetObject } from "@smithy/types"; +export declare const ruleSet: RuleSetObject; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/extensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/extensionConfiguration.d.ts new file mode 100644 index 0000000..c78de85 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/extensionConfiguration.d.ts @@ -0,0 +1,9 @@ +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; +/** + * @internal + */ +export interface SSOOIDCExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration { +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/index.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/index.d.ts new file mode 100644 index 0000000..90d86f6 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/index.d.ts @@ -0,0 +1,51 @@ +/** + *

IAM Identity Center OpenID Connect (OIDC) is a web service that enables a client (such as CLI + * or a native application) to register with IAM Identity Center. The service also enables the client to + * fetch the user’s access token upon successful authentication and authorization with + * IAM Identity Center.

+ * + *

IAM Identity Center uses the sso and identitystore API namespaces.

+ *
+ *

+ * Considerations for Using This Guide + *

+ *

Before you begin using this guide, we recommend that you first review the following + * important information about how the IAM Identity Center OIDC service works.

+ *
    + *
  • + *

    The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device + * Authorization Grant standard (https://tools.ietf.org/html/rfc8628) that are necessary to enable single + * sign-on authentication with the CLI.

    + *
  • + *
  • + *

    With older versions of the CLI, the service only emits OIDC access tokens, so to + * obtain a new token, users must explicitly re-authenticate. To access the OIDC flow that + * supports token refresh and doesn’t require re-authentication, update to the latest CLI + * version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with support for OIDC token refresh and + * configurable IAM Identity Center session durations. For more information, see Configure Amazon Web Services access portal session duration .

    + *
  • + *
  • + *

    The access tokens provided by this service grant access to all Amazon Web Services account + * entitlements assigned to an IAM Identity Center user, not just a particular application.

    + *
  • + *
  • + *

    The documentation in this guide does not describe the mechanism to convert the access + * token into Amazon Web Services Auth (“sigv4”) credentials for use with IAM-protected Amazon Web Services service + * endpoints. For more information, see GetRoleCredentials in the IAM Identity Center Portal API Reference + * Guide.

    + *
  • + *
+ *

For general information about IAM Identity Center, see What is + * IAM Identity Center? in the IAM Identity Center User Guide.

+ * + * @packageDocumentation + */ +export * from "./SSOOIDCClient"; +export * from "./SSOOIDC"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { SSOOIDCExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export { SSOOIDCServiceException } from "./models/SSOOIDCServiceException"; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/SSOOIDCServiceException.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/SSOOIDCServiceException.d.ts new file mode 100644 index 0000000..ca51d85 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/SSOOIDCServiceException.d.ts @@ -0,0 +1,13 @@ +import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client"; +export { __ServiceException, __ServiceExceptionOptions }; +/** + * @public + * + * Base exception class for all service exceptions from SSOOIDC service. + */ +export declare class SSOOIDCServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions); +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/index.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/index.d.ts new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/index.d.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/models_0.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/models_0.d.ts new file mode 100644 index 0000000..f00a76c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/models/models_0.d.ts @@ -0,0 +1,734 @@ +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { SSOOIDCServiceException as __BaseException } from "./SSOOIDCServiceException"; +/** + *

You do not have sufficient access to perform this action.

+ * @public + */ +export declare class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be access_denied.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that a request to authorize a client with an access user session token is + * pending.

+ * @public + */ +export declare class AuthorizationPendingException extends __BaseException { + readonly name: "AuthorizationPendingException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be authorization_pending.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface CreateTokenRequest { + /** + *

The unique identifier string for the client or application. This value comes from the + * result of the RegisterClient API.

+ * @public + */ + clientId: string | undefined; + /** + *

A secret string generated for the client. This value should come from the persisted result + * of the RegisterClient API.

+ * @public + */ + clientSecret: string | undefined; + /** + *

Supports the following OAuth grant types: Device Code and Refresh Token. + * Specify either of the following values, depending on the grant type that you want:

+ *

* Device Code - urn:ietf:params:oauth:grant-type:device_code + *

+ *

* Refresh Token - refresh_token + *

+ *

For information about how to obtain the device code, see the StartDeviceAuthorization topic.

+ * @public + */ + grantType: string | undefined; + /** + *

Used only when calling this API for the Device Code grant type. This short-term code is + * used to identify this authorization request. This comes from the result of the + * StartDeviceAuthorization API.

+ * @public + */ + deviceCode?: string; + /** + *

Used only when calling this API for the Authorization Code grant type. The short-term code is + * used to identify this authorization request. This grant type is currently unsupported for the + * CreateToken API.

+ * @public + */ + code?: string; + /** + *

Used only when calling this API for the Refresh Token grant type. This token is used to + * refresh short-term tokens, such as the access token, that might expire.

+ *

For more information about the features and limitations of the current IAM Identity Center OIDC + * implementation, see Considerations for Using this Guide in the IAM Identity Center + * OIDC API Reference.

+ * @public + */ + refreshToken?: string; + /** + *

The list of scopes for which authorization is requested. The access token that is issued + * is limited to the scopes that are granted. If this value is not specified, IAM Identity Center authorizes + * all scopes that are configured for the client during the call to + * RegisterClient.

+ * @public + */ + scope?: string[]; + /** + *

Used only when calling this API for the Authorization Code grant type. This value specifies + * the location of the client or application that has registered to receive the authorization + * code.

+ * @public + */ + redirectUri?: string; +} +/** + * @public + */ +export interface CreateTokenResponse { + /** + *

A bearer token to access AWS accounts and applications assigned to a user.

+ * @public + */ + accessToken?: string; + /** + *

Used to notify the client that the returned token is an access token. The supported token + * type is Bearer.

+ * @public + */ + tokenType?: string; + /** + *

Indicates the time in seconds when an access token will expire.

+ * @public + */ + expiresIn?: number; + /** + *

A token that, if present, can be used to refresh a previously issued access token that + * might have expired.

+ *

For more + * information about the features and limitations of the current IAM Identity Center OIDC implementation, + * see Considerations for Using this Guide in the IAM Identity Center + * OIDC API Reference.

+ * @public + */ + refreshToken?: string; + /** + *

The idToken is not implemented or supported. For more information about the + * features and limitations of the current IAM Identity Center OIDC implementation, see Considerations + * for Using this Guide in the IAM Identity Center + * OIDC API Reference.

+ *

A JSON Web Token (JWT) that identifies who is associated with the issued access token. + *

+ * @public + */ + idToken?: string; +} +/** + *

Indicates that the token issued by the service is expired and is no longer valid.

+ * @public + */ +export declare class ExpiredTokenException extends __BaseException { + readonly name: "ExpiredTokenException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be expired_token.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that an error from the service occurred while trying to process a + * request.

+ * @public + */ +export declare class InternalServerException extends __BaseException { + readonly name: "InternalServerException"; + readonly $fault: "server"; + /** + *

Single error code. + * For this exception the value will be server_error.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that the clientId or clientSecret in the request is + * invalid. For example, this can occur when a client sends an incorrect clientId or + * an expired clientSecret.

+ * @public + */ +export declare class InvalidClientException extends __BaseException { + readonly name: "InvalidClientException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be invalid_client.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that a request contains an invalid grant. This can occur if a client makes a + * CreateToken request with an invalid grant type.

+ * @public + */ +export declare class InvalidGrantException extends __BaseException { + readonly name: "InvalidGrantException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be invalid_grant.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that something is wrong with the input to the request. For example, a required + * parameter might be missing or out of range.

+ * @public + */ +export declare class InvalidRequestException extends __BaseException { + readonly name: "InvalidRequestException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be invalid_request.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that the scope provided in the request is invalid.

+ * @public + */ +export declare class InvalidScopeException extends __BaseException { + readonly name: "InvalidScopeException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be invalid_scope.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that the client is making the request too frequently and is more than the + * service can handle.

+ * @public + */ +export declare class SlowDownException extends __BaseException { + readonly name: "SlowDownException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be slow_down.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that the client is not currently authorized to make the request. This can happen + * when a clientId is not issued for a public client.

+ * @public + */ +export declare class UnauthorizedClientException extends __BaseException { + readonly name: "UnauthorizedClientException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be unauthorized_client.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that the grant type in the request is not supported by the service.

+ * @public + */ +export declare class UnsupportedGrantTypeException extends __BaseException { + readonly name: "UnsupportedGrantTypeException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be unsupported_grant_type.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface CreateTokenWithIAMRequest { + /** + *

The unique identifier string for the client or application. This value is an application + * ARN that has OAuth grants configured.

+ * @public + */ + clientId: string | undefined; + /** + *

Supports the following OAuth grant types: Authorization Code, Refresh Token, JWT Bearer, + * and Token Exchange. Specify one of the following values, depending on the grant type that you + * want:

+ *

* Authorization Code - authorization_code + *

+ *

* Refresh Token - refresh_token + *

+ *

* JWT Bearer - urn:ietf:params:oauth:grant-type:jwt-bearer + *

+ *

* Token Exchange - urn:ietf:params:oauth:grant-type:token-exchange + *

+ * @public + */ + grantType: string | undefined; + /** + *

Used only when calling this API for the Authorization Code grant type. This short-term + * code is used to identify this authorization request. The code is obtained through a redirect + * from IAM Identity Center to a redirect URI persisted in the Authorization Code GrantOptions for the + * application.

+ * @public + */ + code?: string; + /** + *

Used only when calling this API for the Refresh Token grant type. This token is used to + * refresh short-term tokens, such as the access token, that might expire.

+ *

For more information about the features and limitations of the current IAM Identity Center OIDC + * implementation, see Considerations for Using this Guide in the IAM Identity Center + * OIDC API Reference.

+ * @public + */ + refreshToken?: string; + /** + *

Used only when calling this API for the JWT Bearer grant type. This value specifies the JSON + * Web Token (JWT) issued by a trusted token issuer. To authorize a trusted token issuer, + * configure the JWT Bearer GrantOptions for the application.

+ * @public + */ + assertion?: string; + /** + *

The list of scopes for which authorization is requested. The access token that is issued + * is limited to the scopes that are granted. If the value is not specified, IAM Identity Center authorizes all + * scopes configured for the application, including the following default scopes: + * openid, aws, sts:identity_context.

+ * @public + */ + scope?: string[]; + /** + *

Used only when calling this API for the Authorization Code grant type. This value specifies + * the location of the client or application that has registered to receive the authorization code. + *

+ * @public + */ + redirectUri?: string; + /** + *

Used only when calling this API for the Token Exchange grant type. This value specifies + * the subject of the exchange. The value of the subject token must be an access token issued by + * IAM Identity Center to a different client or application. The access token must have authorized scopes + * that indicate the requested application as a target audience.

+ * @public + */ + subjectToken?: string; + /** + *

Used only when calling this API for the Token Exchange grant type. This value specifies + * the type of token that is passed as the subject of the exchange. The following value is + * supported:

+ *

* Access Token - urn:ietf:params:oauth:token-type:access_token + *

+ * @public + */ + subjectTokenType?: string; + /** + *

Used only when calling this API for the Token Exchange grant type. This value specifies + * the type of token that the requester can receive. The following values are supported:

+ *

* Access Token - urn:ietf:params:oauth:token-type:access_token + *

+ *

* Refresh Token - urn:ietf:params:oauth:token-type:refresh_token + *

+ * @public + */ + requestedTokenType?: string; +} +/** + * @public + */ +export interface CreateTokenWithIAMResponse { + /** + *

A bearer token to access AWS accounts and applications assigned to a user.

+ * @public + */ + accessToken?: string; + /** + *

Used to notify the requester that the returned token is an access token. The supported + * token type is Bearer.

+ * @public + */ + tokenType?: string; + /** + *

Indicates the time in seconds when an access token will expire.

+ * @public + */ + expiresIn?: number; + /** + *

A token that, if present, can be used to refresh a previously issued access token that + * might have expired.

+ *

For more + * information about the features and limitations of the current IAM Identity Center OIDC implementation, + * see Considerations for Using this Guide in the IAM Identity Center + * OIDC API Reference.

+ * @public + */ + refreshToken?: string; + /** + *

A JSON Web Token (JWT) that identifies the user associated with the issued access token. + *

+ * @public + */ + idToken?: string; + /** + *

Indicates the type of tokens that are issued by IAM Identity Center. The following values are supported: + *

+ *

* Access Token - urn:ietf:params:oauth:token-type:access_token + *

+ *

* Refresh Token - urn:ietf:params:oauth:token-type:refresh_token + *

+ * @public + */ + issuedTokenType?: string; + /** + *

The list of scopes for which authorization is granted. The access token that is issued + * is limited to the scopes that are granted.

+ * @public + */ + scope?: string[]; +} +/** + *

Indicates that a token provided as input to the request was issued by and is only usable + * by calling IAM Identity Center endpoints in another region.

+ * @public + */ +export declare class InvalidRequestRegionException extends __BaseException { + readonly name: "InvalidRequestRegionException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be invalid_request.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + *

Indicates the IAM Identity Center endpoint which the requester may call with this token.

+ * @public + */ + endpoint?: string; + /** + *

Indicates the region which the requester may call with this token.

+ * @public + */ + region?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that the client information sent in the request during registration is + * invalid.

+ * @public + */ +export declare class InvalidClientMetadataException extends __BaseException { + readonly name: "InvalidClientMetadataException"; + readonly $fault: "client"; + /** + *

Single error code. + * For this exception the value will be invalid_client_metadata.

+ * @public + */ + error?: string; + /** + *

Human-readable text providing additional information, used to assist the + * client developer in understanding the error that occurred.

+ * @public + */ + error_description?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface RegisterClientRequest { + /** + *

The friendly name of the client.

+ * @public + */ + clientName: string | undefined; + /** + *

The type of client. The service supports only public as a client type. + * Anything other than public will be rejected by the service.

+ * @public + */ + clientType: string | undefined; + /** + *

The list of scopes that are defined by the client. Upon authorization, this list is used + * to restrict permissions when granting an access token.

+ * @public + */ + scopes?: string[]; +} +/** + * @public + */ +export interface RegisterClientResponse { + /** + *

The unique identifier string for each client. This client uses this identifier to get + * authenticated by the service in subsequent calls.

+ * @public + */ + clientId?: string; + /** + *

A secret string generated for the client. The client will use this string to get + * authenticated by the service in subsequent calls.

+ * @public + */ + clientSecret?: string; + /** + *

Indicates the time at which the clientId and clientSecret were + * issued.

+ * @public + */ + clientIdIssuedAt?: number; + /** + *

Indicates the time at which the clientId and clientSecret will + * become invalid.

+ * @public + */ + clientSecretExpiresAt?: number; + /** + *

An endpoint that the client can use to request authorization.

+ * @public + */ + authorizationEndpoint?: string; + /** + *

An endpoint that the client can use to create tokens.

+ * @public + */ + tokenEndpoint?: string; +} +/** + * @public + */ +export interface StartDeviceAuthorizationRequest { + /** + *

The unique identifier string for the client that is registered with IAM Identity Center. This value + * should come from the persisted result of the RegisterClient API + * operation.

+ * @public + */ + clientId: string | undefined; + /** + *

A secret string that is generated for the client. This value should come from the + * persisted result of the RegisterClient API operation.

+ * @public + */ + clientSecret: string | undefined; + /** + *

The URL for the Amazon Web Services access portal. For more information, see Using + * the Amazon Web Services access portal in the IAM Identity Center User Guide.

+ * @public + */ + startUrl: string | undefined; +} +/** + * @public + */ +export interface StartDeviceAuthorizationResponse { + /** + *

The short-lived code that is used by the device when polling for a session token.

+ * @public + */ + deviceCode?: string; + /** + *

A one-time user verification code. This is needed to authorize an in-use device.

+ * @public + */ + userCode?: string; + /** + *

The URI of the verification page that takes the userCode to authorize the + * device.

+ * @public + */ + verificationUri?: string; + /** + *

An alternate URL that the client can use to automatically launch a browser. This process + * skips the manual step in which the user visits the verification page and enters their + * code.

+ * @public + */ + verificationUriComplete?: string; + /** + *

Indicates the number of seconds in which the verification code will become invalid.

+ * @public + */ + expiresIn?: number; + /** + *

Indicates the number of seconds the client must wait between attempts when polling for a + * session.

+ * @public + */ + interval?: number; +} +/** + * @internal + */ +export declare const CreateTokenRequestFilterSensitiveLog: (obj: CreateTokenRequest) => any; +/** + * @internal + */ +export declare const CreateTokenResponseFilterSensitiveLog: (obj: CreateTokenResponse) => any; +/** + * @internal + */ +export declare const CreateTokenWithIAMRequestFilterSensitiveLog: (obj: CreateTokenWithIAMRequest) => any; +/** + * @internal + */ +export declare const CreateTokenWithIAMResponseFilterSensitiveLog: (obj: CreateTokenWithIAMResponse) => any; +/** + * @internal + */ +export declare const RegisterClientResponseFilterSensitiveLog: (obj: RegisterClientResponse) => any; +/** + * @internal + */ +export declare const StartDeviceAuthorizationRequestFilterSensitiveLog: (obj: StartDeviceAuthorizationRequest) => any; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/protocols/Aws_restJson1.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/protocols/Aws_restJson1.d.ts new file mode 100644 index 0000000..fa609ba --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/protocols/Aws_restJson1.d.ts @@ -0,0 +1,38 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; +import { CreateTokenCommandInput, CreateTokenCommandOutput } from "../commands/CreateTokenCommand"; +import { CreateTokenWithIAMCommandInput, CreateTokenWithIAMCommandOutput } from "../commands/CreateTokenWithIAMCommand"; +import { RegisterClientCommandInput, RegisterClientCommandOutput } from "../commands/RegisterClientCommand"; +import { StartDeviceAuthorizationCommandInput, StartDeviceAuthorizationCommandOutput } from "../commands/StartDeviceAuthorizationCommand"; +/** + * serializeAws_restJson1CreateTokenCommand + */ +export declare const se_CreateTokenCommand: (input: CreateTokenCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_restJson1CreateTokenWithIAMCommand + */ +export declare const se_CreateTokenWithIAMCommand: (input: CreateTokenWithIAMCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_restJson1RegisterClientCommand + */ +export declare const se_RegisterClientCommand: (input: RegisterClientCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_restJson1StartDeviceAuthorizationCommand + */ +export declare const se_StartDeviceAuthorizationCommand: (input: StartDeviceAuthorizationCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * deserializeAws_restJson1CreateTokenCommand + */ +export declare const de_CreateTokenCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_restJson1CreateTokenWithIAMCommand + */ +export declare const de_CreateTokenWithIAMCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_restJson1RegisterClientCommand + */ +export declare const de_RegisterClientCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_restJson1StartDeviceAuthorizationCommand + */ +export declare const de_StartDeviceAuthorizationCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts new file mode 100644 index 0000000..4fca277 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts @@ -0,0 +1,53 @@ +import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler"; +import { SSOOIDCClientConfig } from "./SSOOIDCClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider; + defaultUserAgentProvider: import("@smithy/types").Provider; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: import("@smithy/protocol-http").HttpHandler | RequestHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider) & (string | import("@smithy/types").Provider | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider)) | undefined; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + })[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOOIDCHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts new file mode 100644 index 0000000..1b72b77 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts @@ -0,0 +1,53 @@ +import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler"; +import { SSOOIDCClientConfig } from "./SSOOIDCClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: any; + defaultUserAgentProvider: import("@smithy/types").Provider; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: RequestHandler | import("@smithy/protocol-http").HttpHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider) & (string | import("@smithy/types").Provider | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider)) | undefined; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + })[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOOIDCHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts new file mode 100644 index 0000000..359bf36 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts @@ -0,0 +1,52 @@ +import { SSOOIDCClientConfig } from "./SSOOIDCClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => { + runtime: string; + sha256: import("@smithy/types").HashConstructor; + requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record | import("@smithy/protocol-http").HttpHandler | import("@smithy/fetch-http-handler").FetchHttpHandler; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + streamCollector: import("@smithy/types").StreamCollector; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + defaultUserAgentProvider: import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider; + maxAttempts: number | import("@smithy/types").Provider; + retryMode: string | import("@smithy/types").Provider; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider; + endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider | undefined; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + })[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOOIDCHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.shared.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.shared.d.ts new file mode 100644 index 0000000..e110017 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.shared.d.ts @@ -0,0 +1,32 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { IdentityProviderConfig } from "@smithy/types"; +import { SSOOIDCClientConfig } from "./SSOOIDCClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => { + apiVersion: string; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + disableHostPrefix: boolean; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOOIDCHttpAuthSchemeProvider; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: NoAuthSigner; + })[]; + logger: import("@smithy/types").Logger; + serviceId: string; + urlParser: import("@smithy/types").UrlParser; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeExtensions.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeExtensions.d.ts new file mode 100644 index 0000000..1bdf704 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeExtensions.d.ts @@ -0,0 +1,17 @@ +import { SSOOIDCExtensionConfiguration } from "./extensionConfiguration"; +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: SSOOIDCExtensionConfiguration): void; +} +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} +/** + * @internal + */ +export declare const resolveRuntimeExtensions: (runtimeConfig: any, extensions: RuntimeExtension[]) => any; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDC.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDC.d.ts new file mode 100644 index 0000000..49eef2f --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDC.d.ts @@ -0,0 +1,73 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; +import { + CreateTokenCommandInput, + CreateTokenCommandOutput, +} from "./commands/CreateTokenCommand"; +import { + CreateTokenWithIAMCommandInput, + CreateTokenWithIAMCommandOutput, +} from "./commands/CreateTokenWithIAMCommand"; +import { + RegisterClientCommandInput, + RegisterClientCommandOutput, +} from "./commands/RegisterClientCommand"; +import { + StartDeviceAuthorizationCommandInput, + StartDeviceAuthorizationCommandOutput, +} from "./commands/StartDeviceAuthorizationCommand"; +import { SSOOIDCClient } from "./SSOOIDCClient"; +export interface SSOOIDC { + createToken( + args: CreateTokenCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createToken( + args: CreateTokenCommandInput, + cb: (err: any, data?: CreateTokenCommandOutput) => void + ): void; + createToken( + args: CreateTokenCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateTokenCommandOutput) => void + ): void; + createTokenWithIAM( + args: CreateTokenWithIAMCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createTokenWithIAM( + args: CreateTokenWithIAMCommandInput, + cb: (err: any, data?: CreateTokenWithIAMCommandOutput) => void + ): void; + createTokenWithIAM( + args: CreateTokenWithIAMCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateTokenWithIAMCommandOutput) => void + ): void; + registerClient( + args: RegisterClientCommandInput, + options?: __HttpHandlerOptions + ): Promise; + registerClient( + args: RegisterClientCommandInput, + cb: (err: any, data?: RegisterClientCommandOutput) => void + ): void; + registerClient( + args: RegisterClientCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: RegisterClientCommandOutput) => void + ): void; + startDeviceAuthorization( + args: StartDeviceAuthorizationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startDeviceAuthorization( + args: StartDeviceAuthorizationCommandInput, + cb: (err: any, data?: StartDeviceAuthorizationCommandOutput) => void + ): void; + startDeviceAuthorization( + args: StartDeviceAuthorizationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartDeviceAuthorizationCommandOutput) => void + ): void; +} +export declare class SSOOIDC extends SSOOIDCClient implements SSOOIDC {} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts new file mode 100644 index 0000000..8356555 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts @@ -0,0 +1,144 @@ +import { + HostHeaderInputConfig, + HostHeaderResolvedConfig, +} from "@aws-sdk/middleware-host-header"; +import { + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { + RegionInputConfig, + RegionResolvedConfig, +} from "@smithy/config-resolver"; +import { + EndpointInputConfig, + EndpointResolvedConfig, +} from "@smithy/middleware-endpoint"; +import { + RetryInputConfig, + RetryResolvedConfig, +} from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + AwsCredentialIdentityProvider, + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; +import { + HttpAuthSchemeInputConfig, + HttpAuthSchemeResolvedConfig, +} from "./auth/httpAuthSchemeProvider"; +import { + CreateTokenCommandInput, + CreateTokenCommandOutput, +} from "./commands/CreateTokenCommand"; +import { + CreateTokenWithIAMCommandInput, + CreateTokenWithIAMCommandOutput, +} from "./commands/CreateTokenWithIAMCommand"; +import { + RegisterClientCommandInput, + RegisterClientCommandOutput, +} from "./commands/RegisterClientCommand"; +import { + StartDeviceAuthorizationCommandInput, + StartDeviceAuthorizationCommandOutput, +} from "./commands/StartDeviceAuthorizationCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, +} from "./endpoint/EndpointParameters"; +import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; +export { __Client }; +export type ServiceInputTypes = + | CreateTokenCommandInput + | CreateTokenWithIAMCommandInput + | RegisterClientCommandInput + | StartDeviceAuthorizationCommandInput; +export type ServiceOutputTypes = + | CreateTokenCommandOutput + | CreateTokenWithIAMCommandOutput + | RegisterClientCommandOutput + | StartDeviceAuthorizationCommandOutput; +export interface ClientDefaults + extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + requestHandler?: __HttpHandlerUserInput; + sha256?: __ChecksumConstructor | __HashConstructor; + urlParser?: __UrlParser; + bodyLengthChecker?: __BodyLengthCalculator; + streamCollector?: __StreamCollector; + base64Decoder?: __Decoder; + base64Encoder?: __Encoder; + utf8Decoder?: __Decoder; + utf8Encoder?: __Encoder; + runtime?: string; + disableHostPrefix?: boolean; + serviceId?: string; + useDualstackEndpoint?: boolean | __Provider; + useFipsEndpoint?: boolean | __Provider; + defaultUserAgentProvider?: Provider<__UserAgent>; + region?: string | __Provider; + credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider; + maxAttempts?: number | __Provider; + retryMode?: string | __Provider; + logger?: __Logger; + extensions?: RuntimeExtension[]; + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} +export type SSOOIDCClientConfigType = Partial< + __SmithyConfiguration<__HttpHandlerOptions> +> & + ClientDefaults & + RegionInputConfig & + EndpointInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + UserAgentInputConfig & + HttpAuthSchemeInputConfig & + ClientInputEndpointParameters; +export interface SSOOIDCClientConfig extends SSOOIDCClientConfigType {} +export type SSOOIDCClientResolvedConfigType = + __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + RegionResolvedConfig & + EndpointResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + UserAgentResolvedConfig & + HttpAuthSchemeResolvedConfig & + ClientResolvedEndpointParameters; +export interface SSOOIDCClientResolvedConfig + extends SSOOIDCClientResolvedConfigType {} +export declare class SSOOIDCClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + SSOOIDCClientResolvedConfig +> { + readonly config: SSOOIDCClientResolvedConfig; + constructor( + ...[configuration]: __CheckOptionalClientConfig + ); + destroy(): void; + private getDefaultHttpAuthSchemeParametersProvider; + private getIdentityProviderConfigProvider; +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts new file mode 100644 index 0000000..c39ba91 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts @@ -0,0 +1,32 @@ +import { + AwsCredentialIdentity, + AwsCredentialIdentityProvider, + HttpAuthScheme, +} from "@smithy/types"; +import { SSOOIDCHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider( + httpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider + ): void; + httpAuthSchemeProvider(): SSOOIDCHttpAuthSchemeProvider; + setCredentials( + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider + ): void; + credentials(): + | AwsCredentialIdentity + | AwsCredentialIdentityProvider + | undefined; +} +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; +export declare const getHttpAuthExtensionConfiguration: ( + runtimeConfig: HttpAuthRuntimeConfig +) => HttpAuthExtensionConfiguration; +export declare const resolveHttpAuthRuntimeConfig: ( + config: HttpAuthExtensionConfiguration +) => HttpAuthRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts new file mode 100644 index 0000000..4f04885 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts @@ -0,0 +1,44 @@ +import { + AwsSdkSigV4AuthInputConfig, + AwsSdkSigV4AuthResolvedConfig, + AwsSdkSigV4PreviouslyResolved, +} from "@aws-sdk/core"; +import { + HandlerExecutionContext, + HttpAuthScheme, + HttpAuthSchemeParameters, + HttpAuthSchemeParametersProvider, + HttpAuthSchemeProvider, +} from "@smithy/types"; +import { SSOOIDCClientResolvedConfig } from "../SSOOIDCClient"; +export interface SSOOIDCHttpAuthSchemeParameters + extends HttpAuthSchemeParameters { + region?: string; +} +export interface SSOOIDCHttpAuthSchemeParametersProvider + extends HttpAuthSchemeParametersProvider< + SSOOIDCClientResolvedConfig, + HandlerExecutionContext, + SSOOIDCHttpAuthSchemeParameters, + object + > {} +export declare const defaultSSOOIDCHttpAuthSchemeParametersProvider: ( + config: SSOOIDCClientResolvedConfig, + context: HandlerExecutionContext, + input: object +) => Promise; +export interface SSOOIDCHttpAuthSchemeProvider + extends HttpAuthSchemeProvider {} +export declare const defaultSSOOIDCHttpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider; +export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig { + httpAuthSchemes?: HttpAuthScheme[]; + httpAuthSchemeProvider?: SSOOIDCHttpAuthSchemeProvider; +} +export interface HttpAuthSchemeResolvedConfig + extends AwsSdkSigV4AuthResolvedConfig { + readonly httpAuthSchemes: HttpAuthScheme[]; + readonly httpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider; +} +export declare const resolveHttpAuthSchemeConfig: ( + config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved +) => T & HttpAuthSchemeResolvedConfig; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/CreateTokenCommand.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/CreateTokenCommand.d.ts new file mode 100644 index 0000000..4e180cb --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/CreateTokenCommand.d.ts @@ -0,0 +1,35 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { CreateTokenRequest, CreateTokenResponse } from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + SSOOIDCClientResolvedConfig, +} from "../SSOOIDCClient"; +export { __MetadataBearer, $Command }; +export interface CreateTokenCommandInput extends CreateTokenRequest {} +export interface CreateTokenCommandOutput + extends CreateTokenResponse, + __MetadataBearer {} +declare const CreateTokenCommand_base: { + new ( + input: CreateTokenCommandInput + ): import("@smithy/smithy-client").CommandImpl< + CreateTokenCommandInput, + CreateTokenCommandOutput, + SSOOIDCClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: CreateTokenCommandInput + ): import("@smithy/smithy-client").CommandImpl< + CreateTokenCommandInput, + CreateTokenCommandOutput, + SSOOIDCClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class CreateTokenCommand extends CreateTokenCommand_base {} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/CreateTokenWithIAMCommand.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/CreateTokenWithIAMCommand.d.ts new file mode 100644 index 0000000..2f84c5c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/CreateTokenWithIAMCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + CreateTokenWithIAMRequest, + CreateTokenWithIAMResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + SSOOIDCClientResolvedConfig, +} from "../SSOOIDCClient"; +export { __MetadataBearer, $Command }; +export interface CreateTokenWithIAMCommandInput + extends CreateTokenWithIAMRequest {} +export interface CreateTokenWithIAMCommandOutput + extends CreateTokenWithIAMResponse, + __MetadataBearer {} +declare const CreateTokenWithIAMCommand_base: { + new ( + input: CreateTokenWithIAMCommandInput + ): import("@smithy/smithy-client").CommandImpl< + CreateTokenWithIAMCommandInput, + CreateTokenWithIAMCommandOutput, + SSOOIDCClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: CreateTokenWithIAMCommandInput + ): import("@smithy/smithy-client").CommandImpl< + CreateTokenWithIAMCommandInput, + CreateTokenWithIAMCommandOutput, + SSOOIDCClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class CreateTokenWithIAMCommand extends CreateTokenWithIAMCommand_base {} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/RegisterClientCommand.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/RegisterClientCommand.d.ts new file mode 100644 index 0000000..e1e741d --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/RegisterClientCommand.d.ts @@ -0,0 +1,38 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + RegisterClientRequest, + RegisterClientResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + SSOOIDCClientResolvedConfig, +} from "../SSOOIDCClient"; +export { __MetadataBearer, $Command }; +export interface RegisterClientCommandInput extends RegisterClientRequest {} +export interface RegisterClientCommandOutput + extends RegisterClientResponse, + __MetadataBearer {} +declare const RegisterClientCommand_base: { + new ( + input: RegisterClientCommandInput + ): import("@smithy/smithy-client").CommandImpl< + RegisterClientCommandInput, + RegisterClientCommandOutput, + SSOOIDCClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: RegisterClientCommandInput + ): import("@smithy/smithy-client").CommandImpl< + RegisterClientCommandInput, + RegisterClientCommandOutput, + SSOOIDCClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class RegisterClientCommand extends RegisterClientCommand_base {} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/StartDeviceAuthorizationCommand.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/StartDeviceAuthorizationCommand.d.ts new file mode 100644 index 0000000..2039317 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/StartDeviceAuthorizationCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + StartDeviceAuthorizationRequest, + StartDeviceAuthorizationResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + SSOOIDCClientResolvedConfig, +} from "../SSOOIDCClient"; +export { __MetadataBearer, $Command }; +export interface StartDeviceAuthorizationCommandInput + extends StartDeviceAuthorizationRequest {} +export interface StartDeviceAuthorizationCommandOutput + extends StartDeviceAuthorizationResponse, + __MetadataBearer {} +declare const StartDeviceAuthorizationCommand_base: { + new ( + input: StartDeviceAuthorizationCommandInput + ): import("@smithy/smithy-client").CommandImpl< + StartDeviceAuthorizationCommandInput, + StartDeviceAuthorizationCommandOutput, + SSOOIDCClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: StartDeviceAuthorizationCommandInput + ): import("@smithy/smithy-client").CommandImpl< + StartDeviceAuthorizationCommandInput, + StartDeviceAuthorizationCommandOutput, + SSOOIDCClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class StartDeviceAuthorizationCommand extends StartDeviceAuthorizationCommand_base {} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/index.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/index.d.ts new file mode 100644 index 0000000..0018350 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/commands/index.d.ts @@ -0,0 +1,4 @@ +export * from "./CreateTokenCommand"; +export * from "./CreateTokenWithIAMCommand"; +export * from "./RegisterClientCommand"; +export * from "./StartDeviceAuthorizationCommand"; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/credentialDefaultProvider.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/credentialDefaultProvider.d.ts new file mode 100644 index 0000000..bf579d6 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/credentialDefaultProvider.d.ts @@ -0,0 +1 @@ +export declare const defaultProvider: any; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/EndpointParameters.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/EndpointParameters.d.ts new file mode 100644 index 0000000..7f24540 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/EndpointParameters.d.ts @@ -0,0 +1,51 @@ +import { + Endpoint, + EndpointParameters as __EndpointParameters, + EndpointV2, + Provider, +} from "@smithy/types"; +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: + | string + | Provider + | Endpoint + | Provider + | EndpointV2 + | Provider; +} +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const resolveClientEndpointParameters: ( + options: T & ClientInputEndpointParameters +) => T & + ClientInputEndpointParameters & { + defaultSigningName: string; + }; +export declare const commonParams: { + readonly UseFIPS: { + readonly type: "builtInParams"; + readonly name: "useFipsEndpoint"; + }; + readonly Endpoint: { + readonly type: "builtInParams"; + readonly name: "endpoint"; + }; + readonly Region: { + readonly type: "builtInParams"; + readonly name: "region"; + }; + readonly UseDualStack: { + readonly type: "builtInParams"; + readonly name: "useDualstackEndpoint"; + }; +}; +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/endpointResolver.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/endpointResolver.d.ts new file mode 100644 index 0000000..5909925 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/endpointResolver.d.ts @@ -0,0 +1,8 @@ +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParameters } from "./EndpointParameters"; +export declare const defaultEndpointResolver: ( + endpointParams: EndpointParameters, + context?: { + logger?: Logger; + } +) => EndpointV2; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/ruleset.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/ruleset.d.ts new file mode 100644 index 0000000..4b23899 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/ruleset.d.ts @@ -0,0 +1,2 @@ +import { RuleSetObject } from "@smithy/types"; +export declare const ruleSet: RuleSetObject; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/extensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/extensionConfiguration.d.ts new file mode 100644 index 0000000..c208e33 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/extensionConfiguration.d.ts @@ -0,0 +1,9 @@ +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; +export interface SSOOIDCExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration, + HttpAuthExtensionConfiguration {} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..d50618f --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/index.d.ts @@ -0,0 +1,9 @@ +export * from "./SSOOIDCClient"; +export * from "./SSOOIDC"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { SSOOIDCExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export { SSOOIDCServiceException } from "./models/SSOOIDCServiceException"; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/SSOOIDCServiceException.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/SSOOIDCServiceException.d.ts new file mode 100644 index 0000000..459eb83 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/SSOOIDCServiceException.d.ts @@ -0,0 +1,8 @@ +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; +export { __ServiceException, __ServiceExceptionOptions }; +export declare class SSOOIDCServiceException extends __ServiceException { + constructor(options: __ServiceExceptionOptions); +} diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/index.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/index.d.ts new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/index.d.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/models_0.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/models_0.d.ts new file mode 100644 index 0000000..d2a5e0b --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/models/models_0.d.ts @@ -0,0 +1,201 @@ +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { SSOOIDCServiceException as __BaseException } from "./SSOOIDCServiceException"; +export declare class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class AuthorizationPendingException extends __BaseException { + readonly name: "AuthorizationPendingException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export interface CreateTokenRequest { + clientId: string | undefined; + clientSecret: string | undefined; + grantType: string | undefined; + deviceCode?: string; + code?: string; + refreshToken?: string; + scope?: string[]; + redirectUri?: string; +} +export interface CreateTokenResponse { + accessToken?: string; + tokenType?: string; + expiresIn?: number; + refreshToken?: string; + idToken?: string; +} +export declare class ExpiredTokenException extends __BaseException { + readonly name: "ExpiredTokenException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class InternalServerException extends __BaseException { + readonly name: "InternalServerException"; + readonly $fault: "server"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class InvalidClientException extends __BaseException { + readonly name: "InvalidClientException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class InvalidGrantException extends __BaseException { + readonly name: "InvalidGrantException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class InvalidRequestException extends __BaseException { + readonly name: "InvalidRequestException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class InvalidScopeException extends __BaseException { + readonly name: "InvalidScopeException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class SlowDownException extends __BaseException { + readonly name: "SlowDownException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor(opts: __ExceptionOptionType); +} +export declare class UnauthorizedClientException extends __BaseException { + readonly name: "UnauthorizedClientException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class UnsupportedGrantTypeException extends __BaseException { + readonly name: "UnsupportedGrantTypeException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export interface CreateTokenWithIAMRequest { + clientId: string | undefined; + grantType: string | undefined; + code?: string; + refreshToken?: string; + assertion?: string; + scope?: string[]; + redirectUri?: string; + subjectToken?: string; + subjectTokenType?: string; + requestedTokenType?: string; +} +export interface CreateTokenWithIAMResponse { + accessToken?: string; + tokenType?: string; + expiresIn?: number; + refreshToken?: string; + idToken?: string; + issuedTokenType?: string; + scope?: string[]; +} +export declare class InvalidRequestRegionException extends __BaseException { + readonly name: "InvalidRequestRegionException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + endpoint?: string; + region?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class InvalidClientMetadataException extends __BaseException { + readonly name: "InvalidClientMetadataException"; + readonly $fault: "client"; + error?: string; + error_description?: string; + constructor( + opts: __ExceptionOptionType + ); +} +export interface RegisterClientRequest { + clientName: string | undefined; + clientType: string | undefined; + scopes?: string[]; +} +export interface RegisterClientResponse { + clientId?: string; + clientSecret?: string; + clientIdIssuedAt?: number; + clientSecretExpiresAt?: number; + authorizationEndpoint?: string; + tokenEndpoint?: string; +} +export interface StartDeviceAuthorizationRequest { + clientId: string | undefined; + clientSecret: string | undefined; + startUrl: string | undefined; +} +export interface StartDeviceAuthorizationResponse { + deviceCode?: string; + userCode?: string; + verificationUri?: string; + verificationUriComplete?: string; + expiresIn?: number; + interval?: number; +} +export declare const CreateTokenRequestFilterSensitiveLog: ( + obj: CreateTokenRequest +) => any; +export declare const CreateTokenResponseFilterSensitiveLog: ( + obj: CreateTokenResponse +) => any; +export declare const CreateTokenWithIAMRequestFilterSensitiveLog: ( + obj: CreateTokenWithIAMRequest +) => any; +export declare const CreateTokenWithIAMResponseFilterSensitiveLog: ( + obj: CreateTokenWithIAMResponse +) => any; +export declare const RegisterClientResponseFilterSensitiveLog: ( + obj: RegisterClientResponse +) => any; +export declare const StartDeviceAuthorizationRequestFilterSensitiveLog: ( + obj: StartDeviceAuthorizationRequest +) => any; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/protocols/Aws_restJson1.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/protocols/Aws_restJson1.d.ts new file mode 100644 index 0000000..875fc81 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/protocols/Aws_restJson1.d.ts @@ -0,0 +1,53 @@ +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; +import { + CreateTokenCommandInput, + CreateTokenCommandOutput, +} from "../commands/CreateTokenCommand"; +import { + CreateTokenWithIAMCommandInput, + CreateTokenWithIAMCommandOutput, +} from "../commands/CreateTokenWithIAMCommand"; +import { + RegisterClientCommandInput, + RegisterClientCommandOutput, +} from "../commands/RegisterClientCommand"; +import { + StartDeviceAuthorizationCommandInput, + StartDeviceAuthorizationCommandOutput, +} from "../commands/StartDeviceAuthorizationCommand"; +export declare const se_CreateTokenCommand: ( + input: CreateTokenCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_CreateTokenWithIAMCommand: ( + input: CreateTokenWithIAMCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_RegisterClientCommand: ( + input: RegisterClientCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_StartDeviceAuthorizationCommand: ( + input: StartDeviceAuthorizationCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const de_CreateTokenCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_CreateTokenWithIAMCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_RegisterClientCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_StartDeviceAuthorizationCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts new file mode 100644 index 0000000..7b77cfb --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts @@ -0,0 +1,110 @@ +import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler"; +import { SSOOIDCClientConfig } from "./SSOOIDCClient"; +export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider< + import("@smithy/smithy-client").ResolvedDefaultsMode + >; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: ( + input: any + ) => import("@smithy/types").AwsCredentialIdentityProvider; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: + | import("@smithy/protocol-http").HttpHandler + | RequestHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: + | (( + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + ) & + ( + | string + | import("@smithy/types").Provider + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + )) + | undefined; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + } + )[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOOIDCHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts new file mode 100644 index 0000000..8fa21a2 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts @@ -0,0 +1,108 @@ +import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler"; +import { SSOOIDCClientConfig } from "./SSOOIDCClient"; +export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider< + import("@smithy/smithy-client").ResolvedDefaultsMode + >; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: any; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: + | RequestHandler + | import("@smithy/protocol-http").HttpHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: + | (( + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + ) & + ( + | string + | import("@smithy/types").Provider + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + )) + | undefined; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + } + )[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOOIDCHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts new file mode 100644 index 0000000..7b31ecc --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts @@ -0,0 +1,104 @@ +import { SSOOIDCClientConfig } from "./SSOOIDCClient"; +export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => { + runtime: string; + sha256: import("@smithy/types").HashConstructor; + requestHandler: + | import("@smithy/types").NodeHttpHandlerOptions + | import("@smithy/types").FetchHttpHandlerOptions + | Record + | import("@smithy/protocol-http").HttpHandler + | import("@smithy/fetch-http-handler").FetchHttpHandler; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + streamCollector: import("@smithy/types").StreamCollector; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + region: string | import("@smithy/types").Provider; + credentialDefaultProvider: ( + input: any + ) => import("@smithy/types").AwsCredentialIdentityProvider; + maxAttempts: number | import("@smithy/types").Provider; + retryMode: string | import("@smithy/types").Provider; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + defaultsMode: + | import("@smithy/smithy-client").DefaultsMode + | import("@smithy/types").Provider< + import("@smithy/smithy-client").DefaultsMode + >; + endpoint?: + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + | undefined; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + } + )[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOOIDCHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.shared.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.shared.d.ts new file mode 100644 index 0000000..130a1e3 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.shared.d.ts @@ -0,0 +1,49 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { IdentityProviderConfig } from "@smithy/types"; +import { SSOOIDCClientConfig } from "./SSOOIDCClient"; +export declare const getRuntimeConfig: (config: SSOOIDCClientConfig) => { + apiVersion: string; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + disableHostPrefix: boolean; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOOIDCHttpAuthSchemeProvider; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: NoAuthSigner; + } + )[]; + logger: import("@smithy/types").Logger; + serviceId: string; + urlParser: import("@smithy/types").UrlParser; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; +}; diff --git a/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeExtensions.d.ts b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeExtensions.d.ts new file mode 100644 index 0000000..d226882 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeExtensions.d.ts @@ -0,0 +1,11 @@ +import { SSOOIDCExtensionConfiguration } from "./extensionConfiguration"; +export interface RuntimeExtension { + configure(extensionConfiguration: SSOOIDCExtensionConfiguration): void; +} +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} +export declare const resolveRuntimeExtensions: ( + runtimeConfig: any, + extensions: RuntimeExtension[] +) => any; diff --git a/node_modules/@aws-sdk/client-sso-oidc/package.json b/node_modules/@aws-sdk/client-sso-oidc/package.json new file mode 100644 index 0000000..de03ece --- /dev/null +++ b/node_modules/@aws-sdk/client-sso-oidc/package.json @@ -0,0 +1,103 @@ +{ + "name": "@aws-sdk/client-sso-oidc", + "description": "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sso-oidc", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "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 sso-oidc" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.535.0", + "@aws-sdk/core": "3.535.0", + "@aws-sdk/middleware-host-header": "3.535.0", + "@aws-sdk/middleware-logger": "3.535.0", + "@aws-sdk/middleware-recursion-detection": "3.535.0", + "@aws-sdk/middleware-user-agent": "3.535.0", + "@aws-sdk/region-config-resolver": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@aws-sdk/util-endpoints": "3.535.0", + "@aws-sdk/util-user-agent-browser": "3.535.0", + "@aws-sdk/util-user-agent-node": "3.535.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-retry": "^2.2.0", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.0", + "@smithy/util-defaults-mode-node": "^2.3.0", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@smithy/service-client-documentation-generator": "^2.2.0", + "@tsconfig/node14": "1.0.3", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.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", + "peerDependencies": { + "@aws-sdk/credential-provider-node": "^3.535.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-sso-oidc", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-sso-oidc" + } +} diff --git a/node_modules/@aws-sdk/client-sso/LICENSE b/node_modules/@aws-sdk/client-sso/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-sdk/client-sso/README.md b/node_modules/@aws-sdk/client-sso/README.md new file mode 100644 index 0000000..6a18304 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/README.md @@ -0,0 +1,252 @@ + + +# @aws-sdk/client-sso + +## Description + +AWS SDK for JavaScript SSO Client for Node.js, Browser and React Native. + +

AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to +IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles +assigned to them and get federated into the application.

+ +

Although AWS Single Sign-On was renamed, the sso and +identitystore API namespaces will continue to retain their original name for +backward compatibility purposes. For more information, see IAM Identity Center rename.

+
+

This reference guide describes the IAM Identity Center Portal operations that you can call +programatically and includes detailed information on data types and errors.

+ +

AWS provides SDKs that consist of libraries and sample code for various programming +languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a +convenient way to create programmatic access to IAM Identity Center and other AWS services. For more +information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.

+
+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-sso +using your favorite package manager: + +- `npm install @aws-sdk/client-sso` +- `yarn add @aws-sdk/client-sso` +- `pnpm add @aws-sdk/client-sso` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `SSOClient` and +the commands you need, for example `ListAccountsCommand`: + +```js +// ES5 example +const { SSOClient, ListAccountsCommand } = require("@aws-sdk/client-sso"); +``` + +```ts +// ES6+ example +import { SSOClient, ListAccountsCommand } from "@aws-sdk/client-sso"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new SSOClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new ListAccountsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-sso"; +const client = new AWS.SSO({ region: "REGION" }); + +// async/await. +try { + const data = await client.listAccounts(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .listAccounts(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.listAccounts(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-sso` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +
+ +GetRoleCredentials + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/GetRoleCredentialsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/GetRoleCredentialsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/GetRoleCredentialsCommandOutput/) + +
+
+ +ListAccountRoles + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/ListAccountRolesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountRolesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountRolesCommandOutput/) + +
+
+ +ListAccounts + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/ListAccountsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountsCommandOutput/) + +
+
+ +Logout + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/LogoutCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/LogoutCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/LogoutCommandOutput/) + +
diff --git a/node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js b/node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js new file mode 100644 index 0000000..2b181b2 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js @@ -0,0 +1,68 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0; +const core_1 = require("@aws-sdk/core"); +const util_middleware_1 = require("@smithy/util-middleware"); +const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "awsssoportal", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +const defaultSSOHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "GetRoleCredentials": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccountRoles": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccounts": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "Logout": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0, + }; +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; diff --git a/node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js b/node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js new file mode 100644 index 0000000..3d8d8de --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = require("@smithy/util-endpoints"); +const ruleset_1 = require("./ruleset"); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); +}; +exports.defaultEndpointResolver = defaultEndpointResolver; diff --git a/node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js b/node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js new file mode 100644 index 0000000..4321ed9 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ruleSet = void 0; +const u = "required", v = "fn", w = "argv", x = "ref"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; +const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +exports.ruleSet = _data; diff --git a/node_modules/@aws-sdk/client-sso/dist-cjs/index.js b/node_modules/@aws-sdk/client-sso/dist-cjs/index.js new file mode 100644 index 0000000..3ce9f81 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-cjs/index.js @@ -0,0 +1,633 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + GetRoleCredentialsCommand: () => GetRoleCredentialsCommand, + GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog, + GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog, + InvalidRequestException: () => InvalidRequestException, + ListAccountRolesCommand: () => ListAccountRolesCommand, + ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog, + ListAccountsCommand: () => ListAccountsCommand, + ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog, + LogoutCommand: () => LogoutCommand, + LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog, + ResourceNotFoundException: () => ResourceNotFoundException, + RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog, + SSO: () => SSO, + SSOClient: () => SSOClient, + SSOServiceException: () => SSOServiceException, + TooManyRequestsException: () => TooManyRequestsException, + UnauthorizedException: () => UnauthorizedException, + __Client: () => import_smithy_client.Client, + paginateListAccountRoles: () => paginateListAccountRoles, + paginateListAccounts: () => paginateListAccounts +}); +module.exports = __toCommonJS(src_exports); + +// src/SSOClient.ts +var import_middleware_host_header = require("@aws-sdk/middleware-host-header"); +var import_middleware_logger = require("@aws-sdk/middleware-logger"); +var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection"); +var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent"); +var import_config_resolver = require("@smithy/config-resolver"); +var import_core = require("@smithy/core"); +var import_middleware_content_length = require("@smithy/middleware-content-length"); +var import_middleware_endpoint = require("@smithy/middleware-endpoint"); +var import_middleware_retry = require("@smithy/middleware-retry"); + +var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider"); + +// src/endpoint/EndpointParameters.ts +var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "awsssoportal" + }; +}, "resolveClientEndpointParameters"); +var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } +}; + +// src/SSOClient.ts +var import_runtimeConfig = require("././runtimeConfig"); + +// src/runtimeExtensions.ts +var import_region_config_resolver = require("@aws-sdk/region-config-resolver"); +var import_protocol_http = require("@smithy/protocol-http"); +var import_smithy_client = require("@smithy/smithy-client"); + +// src/auth/httpAuthExtensionConfiguration.ts +var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; +}, "getHttpAuthExtensionConfiguration"); +var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; +}, "resolveHttpAuthRuntimeConfig"); + +// src/runtimeExtensions.ts +var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); +var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) + }; +}, "resolveRuntimeExtensions"); + +// src/SSOClient.ts +var _SSOClient = class _SSOClient extends import_smithy_client.Client { + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1); + const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2); + const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider() + }) + ); + this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); + } + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); + } + getDefaultHttpAuthSchemeParametersProvider() { + return import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new import_core.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }); + } +}; +__name(_SSOClient, "SSOClient"); +var SSOClient = _SSOClient; + +// src/SSO.ts + + +// src/commands/GetRoleCredentialsCommand.ts + +var import_middleware_serde = require("@smithy/middleware-serde"); + +var import_types = require("@smithy/types"); + +// src/models/models_0.ts + + +// src/models/SSOServiceException.ts + +var _SSOServiceException = class _SSOServiceException extends import_smithy_client.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOServiceException.prototype); + } +}; +__name(_SSOServiceException, "SSOServiceException"); +var SSOServiceException = _SSOServiceException; + +// src/models/models_0.ts +var _InvalidRequestException = class _InvalidRequestException extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestException.prototype); + } +}; +__name(_InvalidRequestException, "InvalidRequestException"); +var InvalidRequestException = _InvalidRequestException; +var _ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts + }); + this.name = "ResourceNotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); + } +}; +__name(_ResourceNotFoundException, "ResourceNotFoundException"); +var ResourceNotFoundException = _ResourceNotFoundException; +var _TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "TooManyRequestsException", + $fault: "client", + ...opts + }); + this.name = "TooManyRequestsException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _TooManyRequestsException.prototype); + } +}; +__name(_TooManyRequestsException, "TooManyRequestsException"); +var TooManyRequestsException = _TooManyRequestsException; +var _UnauthorizedException = class _UnauthorizedException extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnauthorizedException", + $fault: "client", + ...opts + }); + this.name = "UnauthorizedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnauthorizedException.prototype); + } +}; +__name(_UnauthorizedException, "UnauthorizedException"); +var UnauthorizedException = _UnauthorizedException; +var GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } +}), "GetRoleCredentialsRequestFilterSensitiveLog"); +var RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING }, + ...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING } +}), "RoleCredentialsFilterSensitiveLog"); +var GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) } +}), "GetRoleCredentialsResponseFilterSensitiveLog"); +var ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } +}), "ListAccountRolesRequestFilterSensitiveLog"); +var ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } +}), "ListAccountsRequestFilterSensitiveLog"); +var LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } +}), "LogoutRequestFilterSensitiveLog"); + +// src/protocols/Aws_restJson1.ts +var import_core2 = require("@aws-sdk/core"); + + +var se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core.requestBuilder)(input, context); + const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/federation/credentials"); + const query = (0, import_smithy_client.map)({ + [_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)], + [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)] + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}, "se_GetRoleCredentialsCommand"); +var se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core.requestBuilder)(input, context); + const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/assignment/roles"); + const query = (0, import_smithy_client.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)] + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}, "se_ListAccountRolesCommand"); +var se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core.requestBuilder)(input, context); + const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/assignment/accounts"); + const query = (0, import_smithy_client.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()] + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}, "se_ListAccountsCommand"); +var se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core.requestBuilder)(input, context); + const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/logout"); + let body; + b.m("POST").h(headers).b(body); + return b.build(); +}, "se_LogoutCommand"); +var de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client.take)(data, { + roleCredentials: import_smithy_client._json + }); + Object.assign(contents, doc); + return contents; +}, "de_GetRoleCredentialsCommand"); +var de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client.take)(data, { + nextToken: import_smithy_client.expectString, + roleList: import_smithy_client._json + }); + Object.assign(contents, doc); + return contents; +}, "de_ListAccountRolesCommand"); +var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client.take)(data, { + accountList: import_smithy_client._json, + nextToken: import_smithy_client.expectString + }); + Object.assign(contents, doc); + return contents; +}, "de_ListAccountsCommand"); +var de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client.map)({ + $metadata: deserializeMetadata(output) + }); + await (0, import_smithy_client.collectBody)(output.body, context); + return contents; +}, "de_LogoutCommand"); +var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core2.parseJsonErrorBody)(output.body, context) + }; + const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sso#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + throw await de_TooManyRequestsExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode + }); + } +}, "de_CommandError"); +var throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException); +var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + message: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_InvalidRequestExceptionRes"); +var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + message: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_ResourceNotFoundExceptionRes"); +var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + message: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new TooManyRequestsException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_TooManyRequestsExceptionRes"); +var de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client.take)(data, { + message: import_smithy_client.expectString + }); + Object.assign(contents, doc); + const exception = new UnauthorizedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); +}, "de_UnauthorizedExceptionRes"); +var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] +}), "deserializeMetadata"); +var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0), "isSerializableHeaderValue"); +var _aI = "accountId"; +var _aT = "accessToken"; +var _ai = "account_id"; +var _mR = "maxResults"; +var _mr = "max_result"; +var _nT = "nextToken"; +var _nt = "next_token"; +var _rN = "roleName"; +var _rn = "role_name"; +var _xasbt = "x-amz-sso_bearer_token"; + +// src/commands/GetRoleCredentialsCommand.ts +var _GetRoleCredentialsCommand = class _GetRoleCredentialsCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() { +}; +__name(_GetRoleCredentialsCommand, "GetRoleCredentialsCommand"); +var GetRoleCredentialsCommand = _GetRoleCredentialsCommand; + +// src/commands/ListAccountRolesCommand.ts + + + + +var _ListAccountRolesCommand = class _ListAccountRolesCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() { +}; +__name(_ListAccountRolesCommand, "ListAccountRolesCommand"); +var ListAccountRolesCommand = _ListAccountRolesCommand; + +// src/commands/ListAccountsCommand.ts + + + + +var _ListAccountsCommand = class _ListAccountsCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() { +}; +__name(_ListAccountsCommand, "ListAccountsCommand"); +var ListAccountsCommand = _ListAccountsCommand; + +// src/commands/LogoutCommand.ts + + + + +var _LogoutCommand = class _LogoutCommand extends import_smithy_client.Command.classBuilder().ep({ + ...commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() { +}; +__name(_LogoutCommand, "LogoutCommand"); +var LogoutCommand = _LogoutCommand; + +// src/SSO.ts +var commands = { + GetRoleCredentialsCommand, + ListAccountRolesCommand, + ListAccountsCommand, + LogoutCommand +}; +var _SSO = class _SSO extends SSOClient { +}; +__name(_SSO, "SSO"); +var SSO = _SSO; +(0, import_smithy_client.createAggregatedClient)(commands, SSO); + +// src/pagination/ListAccountRolesPaginator.ts + +var paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); + +// src/pagination/ListAccountsPaginator.ts + +var paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); + +// src/index.ts +var import_util_endpoints = require("@aws-sdk/util-endpoints"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + SSOServiceException, + __Client, + SSOClient, + SSO, + $Command, + GetRoleCredentialsCommand, + ListAccountRolesCommand, + ListAccountsCommand, + LogoutCommand, + paginateListAccountRoles, + paginateListAccounts, + InvalidRequestException, + ResourceNotFoundException, + TooManyRequestsException, + UnauthorizedException, + GetRoleCredentialsRequestFilterSensitiveLog, + RoleCredentialsFilterSensitiveLog, + GetRoleCredentialsResponseFilterSensitiveLog, + ListAccountRolesRequestFilterSensitiveLog, + ListAccountsRequestFilterSensitiveLog, + LogoutRequestFilterSensitiveLog +}); + diff --git a/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.browser.js b/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.browser.js new file mode 100644 index 0000000..95dbc5c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.browser.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const tslib_1 = require("tslib"); +const package_json_1 = tslib_1.__importDefault(require("../package.json")); +const sha256_browser_1 = require("@aws-crypto/sha256-browser"); +const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser"); +const config_resolver_1 = require("@smithy/config-resolver"); +const fetch_http_handler_1 = require("@smithy/fetch-http-handler"); +const invalid_dependency_1 = require("@smithy/invalid-dependency"); +const util_body_length_browser_1 = require("@smithy/util-body-length-browser"); +const util_retry_1 = require("@smithy/util-retry"); +const runtimeConfig_shared_1 = require("./runtimeConfig.shared"); +const smithy_client_1 = require("@smithy/smithy-client"); +const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser"); +const getRuntimeConfig = (config) => { + const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"), + requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? sha256_browser_1.Sha256, + streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js b/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js new file mode 100644 index 0000000..d211480 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const tslib_1 = require("tslib"); +const package_json_1 = tslib_1.__importDefault(require("../package.json")); +const core_1 = require("@aws-sdk/core"); +const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node"); +const config_resolver_1 = require("@smithy/config-resolver"); +const hash_node_1 = require("@smithy/hash-node"); +const middleware_retry_1 = require("@smithy/middleware-retry"); +const node_config_provider_1 = require("@smithy/node-config-provider"); +const node_http_handler_1 = require("@smithy/node-http-handler"); +const util_body_length_node_1 = require("@smithy/util-body-length-node"); +const util_retry_1 = require("@smithy/util-retry"); +const runtimeConfig_shared_1 = require("./runtimeConfig.shared"); +const smithy_client_1 = require("@smithy/smithy-client"); +const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node"); +const smithy_client_2 = require("@smithy/smithy-client"); +const getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.native.js b/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.native.js new file mode 100644 index 0000000..34c5f8e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.native.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const sha256_js_1 = require("@aws-crypto/sha256-js"); +const runtimeConfig_browser_1 = require("./runtimeConfig.browser"); +const getRuntimeConfig = (config) => { + const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? sha256_js_1.Sha256, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js b/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js new file mode 100644 index 0000000..24a378c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const core_1 = require("@aws-sdk/core"); +const core_2 = require("@smithy/core"); +const smithy_client_1 = require("@smithy/smithy-client"); +const url_parser_1 = require("@smithy/url-parser"); +const util_base64_1 = require("@smithy/util-base64"); +const util_utf8_1 = require("@smithy/util-utf8"); +const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider"); +const endpointResolver_1 = require("./endpoint/endpointResolver"); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/SSO.js b/node_modules/@aws-sdk/client-sso/dist-es/SSO.js new file mode 100644 index 0000000..04d3169 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/SSO.js @@ -0,0 +1,15 @@ +import { createAggregatedClient } from "@smithy/smithy-client"; +import { GetRoleCredentialsCommand, } from "./commands/GetRoleCredentialsCommand"; +import { ListAccountRolesCommand, } from "./commands/ListAccountRolesCommand"; +import { ListAccountsCommand, } from "./commands/ListAccountsCommand"; +import { LogoutCommand } from "./commands/LogoutCommand"; +import { SSOClient } from "./SSOClient"; +const commands = { + GetRoleCredentialsCommand, + ListAccountRolesCommand, + ListAccountsCommand, + LogoutCommand, +}; +export class SSO extends SSOClient { +} +createAggregatedClient(commands, SSO); diff --git a/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js b/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js new file mode 100644 index 0000000..c2a3510 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js @@ -0,0 +1,52 @@ +import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent"; +import { resolveRegionConfig } from "@smithy/config-resolver"; +import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry"; +import { Client as __Client, } from "@smithy/smithy-client"; +import { defaultSSOHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider"; +import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions } from "./runtimeExtensions"; +export { __Client }; +export class SSOClient extends __Client { + constructor(...[configuration]) { + const _config_0 = __getRuntimeConfig(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveRegionConfig(_config_1); + const _config_3 = resolveEndpointConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider(), + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + getDefaultHttpAuthSchemeParametersProvider() { + return defaultSSOHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }); + } +} diff --git a/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthExtensionConfiguration.js b/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthExtensionConfiguration.js new file mode 100644 index 0000000..2ba1d48 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthExtensionConfiguration.js @@ -0,0 +1,38 @@ +export const getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } + else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + }, + }; +}; +export const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthSchemeProvider.js b/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthSchemeProvider.js new file mode 100644 index 0000000..bf1cd02 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthSchemeProvider.js @@ -0,0 +1,62 @@ +import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core"; +import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware"; +export const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: getSmithyContext(context).operation, + region: (await normalizeProvider(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "awsssoportal", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +export const defaultSSOHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "GetRoleCredentials": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccountRoles": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccounts": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "Logout": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +export const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveAwsSdkSigV4Config(config); + return { + ...config_0, + }; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/commands/GetRoleCredentialsCommand.js b/node_modules/@aws-sdk/client-sso/dist-es/commands/GetRoleCredentialsCommand.js new file mode 100644 index 0000000..54e6695 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/commands/GetRoleCredentialsCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_GetRoleCredentialsCommand, se_GetRoleCredentialsCommand } from "../protocols/Aws_restJson1"; +export { $Command }; +export class GetRoleCredentialsCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("SWBPortalService", "GetRoleCredentials", {}) + .n("SSOClient", "GetRoleCredentialsCommand") + .f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog) + .ser(se_GetRoleCredentialsCommand) + .de(de_GetRoleCredentialsCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sso/dist-es/commands/ListAccountRolesCommand.js b/node_modules/@aws-sdk/client-sso/dist-es/commands/ListAccountRolesCommand.js new file mode 100644 index 0000000..d5bafd8 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/commands/ListAccountRolesCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListAccountRolesRequestFilterSensitiveLog, } from "../models/models_0"; +import { de_ListAccountRolesCommand, se_ListAccountRolesCommand } from "../protocols/Aws_restJson1"; +export { $Command }; +export class ListAccountRolesCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("SWBPortalService", "ListAccountRoles", {}) + .n("SSOClient", "ListAccountRolesCommand") + .f(ListAccountRolesRequestFilterSensitiveLog, void 0) + .ser(se_ListAccountRolesCommand) + .de(de_ListAccountRolesCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sso/dist-es/commands/ListAccountsCommand.js b/node_modules/@aws-sdk/client-sso/dist-es/commands/ListAccountsCommand.js new file mode 100644 index 0000000..b588b9c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/commands/ListAccountsCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListAccountsRequestFilterSensitiveLog } from "../models/models_0"; +import { de_ListAccountsCommand, se_ListAccountsCommand } from "../protocols/Aws_restJson1"; +export { $Command }; +export class ListAccountsCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("SWBPortalService", "ListAccounts", {}) + .n("SSOClient", "ListAccountsCommand") + .f(ListAccountsRequestFilterSensitiveLog, void 0) + .ser(se_ListAccountsCommand) + .de(de_ListAccountsCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sso/dist-es/commands/LogoutCommand.js b/node_modules/@aws-sdk/client-sso/dist-es/commands/LogoutCommand.js new file mode 100644 index 0000000..8af9ce9 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/commands/LogoutCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { LogoutRequestFilterSensitiveLog } from "../models/models_0"; +import { de_LogoutCommand, se_LogoutCommand } from "../protocols/Aws_restJson1"; +export { $Command }; +export class LogoutCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("SWBPortalService", "Logout", {}) + .n("SSOClient", "LogoutCommand") + .f(LogoutRequestFilterSensitiveLog, void 0) + .ser(se_LogoutCommand) + .de(de_LogoutCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sso/dist-es/commands/index.js b/node_modules/@aws-sdk/client-sso/dist-es/commands/index.js new file mode 100644 index 0000000..0ab890d --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/commands/index.js @@ -0,0 +1,4 @@ +export * from "./GetRoleCredentialsCommand"; +export * from "./ListAccountRolesCommand"; +export * from "./ListAccountsCommand"; +export * from "./LogoutCommand"; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/endpoint/EndpointParameters.js b/node_modules/@aws-sdk/client-sso/dist-es/endpoint/EndpointParameters.js new file mode 100644 index 0000000..0b446a4 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/endpoint/EndpointParameters.js @@ -0,0 +1,14 @@ +export const resolveClientEndpointParameters = (options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "awsssoportal", + }; +}; +export const commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/endpoint/endpointResolver.js b/node_modules/@aws-sdk/client-sso/dist-es/endpoint/endpointResolver.js new file mode 100644 index 0000000..5c35926 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/endpoint/endpointResolver.js @@ -0,0 +1,8 @@ +import { resolveEndpoint } from "@smithy/util-endpoints"; +import { ruleSet } from "./ruleset"; +export const defaultEndpointResolver = (endpointParams, context = {}) => { + return resolveEndpoint(ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/endpoint/ruleset.js b/node_modules/@aws-sdk/client-sso/dist-es/endpoint/ruleset.js new file mode 100644 index 0000000..c48673d --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/endpoint/ruleset.js @@ -0,0 +1,4 @@ +const u = "required", v = "fn", w = "argv", x = "ref"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; +const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +export const ruleSet = _data; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/extensionConfiguration.js b/node_modules/@aws-sdk/client-sso/dist-es/extensionConfiguration.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/extensionConfiguration.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/index.js b/node_modules/@aws-sdk/client-sso/dist-es/index.js new file mode 100644 index 0000000..e55d618 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/index.js @@ -0,0 +1,7 @@ +export * from "./SSOClient"; +export * from "./SSO"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export { SSOServiceException } from "./models/SSOServiceException"; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/models/SSOServiceException.js b/node_modules/@aws-sdk/client-sso/dist-es/models/SSOServiceException.js new file mode 100644 index 0000000..fa5d8fb --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/models/SSOServiceException.js @@ -0,0 +1,8 @@ +import { ServiceException as __ServiceException, } from "@smithy/smithy-client"; +export { __ServiceException }; +export class SSOServiceException extends __ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, SSOServiceException.prototype); + } +} diff --git a/node_modules/@aws-sdk/client-sso/dist-es/models/index.js b/node_modules/@aws-sdk/client-sso/dist-es/models/index.js new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/models/index.js @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/models/models_0.js b/node_modules/@aws-sdk/client-sso/dist-es/models/models_0.js new file mode 100644 index 0000000..acaa73b --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/models/models_0.js @@ -0,0 +1,75 @@ +import { SENSITIVE_STRING } from "@smithy/smithy-client"; +import { SSOServiceException as __BaseException } from "./SSOServiceException"; +export class InvalidRequestException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts, + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidRequestException.prototype); + } +} +export class ResourceNotFoundException extends __BaseException { + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + this.name = "ResourceNotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + } +} +export class TooManyRequestsException extends __BaseException { + constructor(opts) { + super({ + name: "TooManyRequestsException", + $fault: "client", + ...opts, + }); + this.name = "TooManyRequestsException"; + this.$fault = "client"; + Object.setPrototypeOf(this, TooManyRequestsException.prototype); + } +} +export class UnauthorizedException extends __BaseException { + constructor(opts) { + super({ + name: "UnauthorizedException", + $fault: "client", + ...opts, + }); + this.name = "UnauthorizedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, UnauthorizedException.prototype); + } +} +export const GetRoleCredentialsRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: SENSITIVE_STRING }), +}); +export const RoleCredentialsFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.secretAccessKey && { secretAccessKey: SENSITIVE_STRING }), + ...(obj.sessionToken && { sessionToken: SENSITIVE_STRING }), +}); +export const GetRoleCredentialsResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }), +}); +export const ListAccountRolesRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: SENSITIVE_STRING }), +}); +export const ListAccountsRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: SENSITIVE_STRING }), +}); +export const LogoutRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: SENSITIVE_STRING }), +}); diff --git a/node_modules/@aws-sdk/client-sso/dist-es/pagination/Interfaces.js b/node_modules/@aws-sdk/client-sso/dist-es/pagination/Interfaces.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/pagination/Interfaces.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/pagination/ListAccountRolesPaginator.js b/node_modules/@aws-sdk/client-sso/dist-es/pagination/ListAccountRolesPaginator.js new file mode 100644 index 0000000..b18c3a8 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/pagination/ListAccountRolesPaginator.js @@ -0,0 +1,4 @@ +import { createPaginator } from "@smithy/core"; +import { ListAccountRolesCommand, } from "../commands/ListAccountRolesCommand"; +import { SSOClient } from "../SSOClient"; +export const paginateListAccountRoles = createPaginator(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); diff --git a/node_modules/@aws-sdk/client-sso/dist-es/pagination/ListAccountsPaginator.js b/node_modules/@aws-sdk/client-sso/dist-es/pagination/ListAccountsPaginator.js new file mode 100644 index 0000000..342c663 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/pagination/ListAccountsPaginator.js @@ -0,0 +1,4 @@ +import { createPaginator } from "@smithy/core"; +import { ListAccountsCommand, } from "../commands/ListAccountsCommand"; +import { SSOClient } from "../SSOClient"; +export const paginateListAccounts = createPaginator(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); diff --git a/node_modules/@aws-sdk/client-sso/dist-es/pagination/index.js b/node_modules/@aws-sdk/client-sso/dist-es/pagination/index.js new file mode 100644 index 0000000..1e7866f --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/pagination/index.js @@ -0,0 +1,3 @@ +export * from "./Interfaces"; +export * from "./ListAccountRolesPaginator"; +export * from "./ListAccountsPaginator"; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/protocols/Aws_restJson1.js b/node_modules/@aws-sdk/client-sso/dist-es/protocols/Aws_restJson1.js new file mode 100644 index 0000000..4ee82ea --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/protocols/Aws_restJson1.js @@ -0,0 +1,215 @@ +import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core"; +import { requestBuilder as rb } from "@smithy/core"; +import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client"; +import { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0"; +import { SSOServiceException as __BaseException } from "../models/SSOServiceException"; +export const se_GetRoleCredentialsCommand = async (input, context) => { + const b = rb(input, context); + const headers = map({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT], + }); + b.bp("/federation/credentials"); + const query = map({ + [_rn]: [, __expectNonNull(input[_rN], `roleName`)], + [_ai]: [, __expectNonNull(input[_aI], `accountId`)], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +export const se_ListAccountRolesCommand = async (input, context) => { + const b = rb(input, context); + const headers = map({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT], + }); + b.bp("/assignment/roles"); + const query = map({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + [_ai]: [, __expectNonNull(input[_aI], `accountId`)], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +export const se_ListAccountsCommand = async (input, context) => { + const b = rb(input, context); + const headers = map({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT], + }); + b.bp("/assignment/accounts"); + const query = map({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +export const se_LogoutCommand = async (input, context) => { + const b = rb(input, context); + const headers = map({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT], + }); + b.bp("/logout"); + let body; + b.m("POST").h(headers).b(body); + return b.build(); +}; +export const de_GetRoleCredentialsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = map({ + $metadata: deserializeMetadata(output), + }); + const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + roleCredentials: _json, + }); + Object.assign(contents, doc); + return contents; +}; +export const de_ListAccountRolesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = map({ + $metadata: deserializeMetadata(output), + }); + const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + roleList: _json, + }); + Object.assign(contents, doc); + return contents; +}; +export const de_ListAccountsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = map({ + $metadata: deserializeMetadata(output), + }); + const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + accountList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; +export const de_LogoutCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; +const de_CommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sso#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + throw await de_TooManyRequestsExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; +const throwDefaultError = withBaseException(__BaseException); +const de_InvalidRequestExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new TooManyRequestsException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const de_UnauthorizedExceptionRes = async (parsedOutput, context) => { + const contents = map({}); + const data = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new UnauthorizedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; +const deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); +const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const isSerializableHeaderValue = (value) => value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); +const _aI = "accountId"; +const _aT = "accessToken"; +const _ai = "account_id"; +const _mR = "maxResults"; +const _mr = "max_result"; +const _nT = "nextToken"; +const _nt = "next_token"; +const _rN = "roleName"; +const _rn = "role_name"; +const _xasbt = "x-amz-sso_bearer_token"; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.browser.js b/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.browser.js new file mode 100644 index 0000000..734b9c0 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.browser.js @@ -0,0 +1,33 @@ +import packageInfo from "../package.json"; +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; +import { invalidProvider } from "@smithy/invalid-dependency"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser"; +export const getRuntimeConfig = (config) => { + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.js b/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.js new file mode 100644 index 0000000..7985d94 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.js @@ -0,0 +1,42 @@ +import packageInfo from "../package.json"; +import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver"; +import { Hash } from "@smithy/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; +import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler"; +import { calculateBodyLength } from "@smithy/util-body-length-node"; +import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node"; +import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client"; +export const getRuntimeConfig = (config) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + awsCheckVersion(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + loadNodeConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.native.js b/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.native.js new file mode 100644 index 0000000..0b54695 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.native.js @@ -0,0 +1,11 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; +export const getRuntimeConfig = (config) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.shared.js b/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.shared.js new file mode 100644 index 0000000..3dfac58 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.shared.js @@ -0,0 +1,36 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { NoOpLogger } from "@smithy/smithy-client"; +import { parseUrl } from "@smithy/url-parser"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; +import { defaultSSOHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider"; +import { defaultEndpointResolver } from "./endpoint/endpointResolver"; +export const getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner(), + }, + ], + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "SSO", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-es/runtimeExtensions.js b/node_modules/@aws-sdk/client-sso/dist-es/runtimeExtensions.js new file mode 100644 index 0000000..1502ff7 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-es/runtimeExtensions.js @@ -0,0 +1,21 @@ +import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver"; +import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http"; +import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client"; +import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration"; +const asPartial = (t) => t; +export const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), + ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)), + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), + ...resolveDefaultRuntimeConfig(extensionConfiguration), + ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration), + }; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/SSO.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/SSO.d.ts new file mode 100644 index 0000000..8500e0c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/SSO.d.ts @@ -0,0 +1,53 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; +import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "./commands/GetRoleCredentialsCommand"; +import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "./commands/ListAccountRolesCommand"; +import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/ListAccountsCommand"; +import { LogoutCommandInput, LogoutCommandOutput } from "./commands/LogoutCommand"; +import { SSOClient } from "./SSOClient"; +export interface SSO { + /** + * @see {@link GetRoleCredentialsCommand} + */ + getRoleCredentials(args: GetRoleCredentialsCommandInput, options?: __HttpHandlerOptions): Promise; + getRoleCredentials(args: GetRoleCredentialsCommandInput, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void; + getRoleCredentials(args: GetRoleCredentialsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void; + /** + * @see {@link ListAccountRolesCommand} + */ + listAccountRoles(args: ListAccountRolesCommandInput, options?: __HttpHandlerOptions): Promise; + listAccountRoles(args: ListAccountRolesCommandInput, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void; + listAccountRoles(args: ListAccountRolesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void; + /** + * @see {@link ListAccountsCommand} + */ + listAccounts(args: ListAccountsCommandInput, options?: __HttpHandlerOptions): Promise; + listAccounts(args: ListAccountsCommandInput, cb: (err: any, data?: ListAccountsCommandOutput) => void): void; + listAccounts(args: ListAccountsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountsCommandOutput) => void): void; + /** + * @see {@link LogoutCommand} + */ + logout(args: LogoutCommandInput, options?: __HttpHandlerOptions): Promise; + logout(args: LogoutCommandInput, cb: (err: any, data?: LogoutCommandOutput) => void): void; + logout(args: LogoutCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: LogoutCommandOutput) => void): void; +} +/** + *

AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to + * IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles + * assigned to them and get federated into the application.

+ * + *

Although AWS Single Sign-On was renamed, the sso and + * identitystore API namespaces will continue to retain their original name for + * backward compatibility purposes. For more information, see IAM Identity Center rename.

+ *
+ *

This reference guide describes the IAM Identity Center Portal operations that you can call + * programatically and includes detailed information on data types and errors.

+ * + *

AWS provides SDKs that consist of libraries and sample code for various programming + * languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a + * convenient way to create programmatic access to IAM Identity Center and other AWS services. For more + * information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.

+ *
+ * @public + */ +export declare class SSO extends SSOClient implements SSO { +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts new file mode 100644 index 0000000..405f651 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts @@ -0,0 +1,184 @@ +import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header"; +import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent"; +import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver"; +import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint"; +import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client"; +import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types"; +import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider"; +import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "./commands/GetRoleCredentialsCommand"; +import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "./commands/ListAccountRolesCommand"; +import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/ListAccountsCommand"; +import { LogoutCommandInput, LogoutCommandOutput } from "./commands/LogoutCommand"; +import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters"; +import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; +export { __Client }; +/** + * @public + */ +export type ServiceInputTypes = GetRoleCredentialsCommandInput | ListAccountRolesCommandInput | ListAccountsCommandInput | LogoutCommandInput; +/** + * @public + */ +export type ServiceOutputTypes = GetRoleCredentialsCommandOutput | ListAccountRolesCommandOutput | ListAccountsCommandOutput | LogoutCommandOutput; +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandlerUserInput; + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + /** + * The runtime environment. + * @internal + */ + runtime?: string; + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + /** + * Specifies which retry algorithm to use. + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ + * + */ + retryMode?: string | __Provider; + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + /** + * Optional extensions + */ + extensions?: RuntimeExtension[]; + /** + * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. + */ + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} +/** + * @public + */ +export type SSOClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig & RetryInputConfig & HostHeaderInputConfig & UserAgentInputConfig & HttpAuthSchemeInputConfig & ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of SSOClient class constructor that set the region, credentials and other options. + */ +export interface SSOClientConfig extends SSOClientConfigType { +} +/** + * @public + */ +export type SSOClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & UserAgentResolvedConfig & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}. + */ +export interface SSOClientResolvedConfig extends SSOClientResolvedConfigType { +} +/** + *

AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to + * IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles + * assigned to them and get federated into the application.

+ * + *

Although AWS Single Sign-On was renamed, the sso and + * identitystore API namespaces will continue to retain their original name for + * backward compatibility purposes. For more information, see IAM Identity Center rename.

+ *
+ *

This reference guide describes the IAM Identity Center Portal operations that you can call + * programatically and includes detailed information on data types and errors.

+ * + *

AWS provides SDKs that consist of libraries and sample code for various programming + * languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a + * convenient way to create programmatic access to IAM Identity Center and other AWS services. For more + * information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.

+ *
+ * @public + */ +export declare class SSOClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig> { + /** + * The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}. + */ + readonly config: SSOClientResolvedConfig; + constructor(...[configuration]: __CheckOptionalClientConfig); + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void; + private getDefaultHttpAuthSchemeParametersProvider; + private getIdentityProviderConfigProvider; +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthExtensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthExtensionConfiguration.d.ts new file mode 100644 index 0000000..7e7ff4c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthExtensionConfiguration.d.ts @@ -0,0 +1,29 @@ +import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types"; +import { SSOHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; +/** + * @internal + */ +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider(httpAuthSchemeProvider: SSOHttpAuthSchemeProvider): void; + httpAuthSchemeProvider(): SSOHttpAuthSchemeProvider; + setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void; + credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined; +} +/** + * @internal + */ +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: SSOHttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; +/** + * @internal + */ +export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration; +/** + * @internal + */ +export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthSchemeProvider.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthSchemeProvider.d.ts new file mode 100644 index 0000000..36655cb --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthSchemeProvider.d.ts @@ -0,0 +1,61 @@ +import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core"; +import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types"; +import { SSOClientResolvedConfig } from "../SSOClient"; +/** + * @internal + */ +export interface SSOHttpAuthSchemeParameters extends HttpAuthSchemeParameters { + region?: string; +} +/** + * @internal + */ +export interface SSOHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider { +} +/** + * @internal + */ +export declare const defaultSSOHttpAuthSchemeParametersProvider: (config: SSOClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise; +/** + * @internal + */ +export interface SSOHttpAuthSchemeProvider extends HttpAuthSchemeProvider { +} +/** + * @internal + */ +export declare const defaultSSOHttpAuthSchemeProvider: SSOHttpAuthSchemeProvider; +/** + * @internal + */ +export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig { + /** + * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + httpAuthSchemes?: HttpAuthScheme[]; + /** + * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + httpAuthSchemeProvider?: SSOHttpAuthSchemeProvider; +} +/** + * @internal + */ +export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig { + /** + * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + readonly httpAuthSchemes: HttpAuthScheme[]; + /** + * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + readonly httpAuthSchemeProvider: SSOHttpAuthSchemeProvider; +} +/** + * @internal + */ +export declare const resolveHttpAuthSchemeConfig: (config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/commands/GetRoleCredentialsCommand.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/commands/GetRoleCredentialsCommand.d.ts new file mode 100644 index 0000000..6a07bb3 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/commands/GetRoleCredentialsCommand.d.ts @@ -0,0 +1,82 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { GetRoleCredentialsRequest, GetRoleCredentialsResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetRoleCredentialsCommand}. + */ +export interface GetRoleCredentialsCommandInput extends GetRoleCredentialsRequest { +} +/** + * @public + * + * The output of {@link GetRoleCredentialsCommand}. + */ +export interface GetRoleCredentialsCommandOutput extends GetRoleCredentialsResponse, __MetadataBearer { +} +declare const GetRoleCredentialsCommand_base: { + new (input: GetRoleCredentialsCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: GetRoleCredentialsCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Returns the STS short-term credentials for a given role name that is assigned to the + * user.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SSOClient, GetRoleCredentialsCommand } from "@aws-sdk/client-sso"; // ES Modules import + * // const { SSOClient, GetRoleCredentialsCommand } = require("@aws-sdk/client-sso"); // CommonJS import + * const client = new SSOClient(config); + * const input = { // GetRoleCredentialsRequest + * roleName: "STRING_VALUE", // required + * accountId: "STRING_VALUE", // required + * accessToken: "STRING_VALUE", // required + * }; + * const command = new GetRoleCredentialsCommand(input); + * const response = await client.send(command); + * // { // GetRoleCredentialsResponse + * // roleCredentials: { // RoleCredentials + * // accessKeyId: "STRING_VALUE", + * // secretAccessKey: "STRING_VALUE", + * // sessionToken: "STRING_VALUE", + * // expiration: Number("long"), + * // }, + * // }; + * + * ``` + * + * @param GetRoleCredentialsCommandInput - {@link GetRoleCredentialsCommandInput} + * @returns {@link GetRoleCredentialsCommandOutput} + * @see {@link GetRoleCredentialsCommandInput} for command's `input` shape. + * @see {@link GetRoleCredentialsCommandOutput} for command's `response` shape. + * @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape. + * + * @throws {@link InvalidRequestException} (client fault) + *

Indicates that a problem occurred with the input to the request. For example, a required + * parameter might be missing or out of range.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource doesn't exist.

+ * + * @throws {@link TooManyRequestsException} (client fault) + *

Indicates that the request is being made too frequently and is more than what the server + * can handle.

+ * + * @throws {@link UnauthorizedException} (client fault) + *

Indicates that the request is not authorized. This can happen due to an invalid access + * token in the request.

+ * + * @throws {@link SSOServiceException} + *

Base exception class for all service exceptions from SSO service.

+ * + * @public + */ +export declare class GetRoleCredentialsCommand extends GetRoleCredentialsCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/commands/ListAccountRolesCommand.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/commands/ListAccountRolesCommand.d.ts new file mode 100644 index 0000000..3ca5544 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/commands/ListAccountRolesCommand.d.ts @@ -0,0 +1,83 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { ListAccountRolesRequest, ListAccountRolesResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListAccountRolesCommand}. + */ +export interface ListAccountRolesCommandInput extends ListAccountRolesRequest { +} +/** + * @public + * + * The output of {@link ListAccountRolesCommand}. + */ +export interface ListAccountRolesCommandOutput extends ListAccountRolesResponse, __MetadataBearer { +} +declare const ListAccountRolesCommand_base: { + new (input: ListAccountRolesCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: ListAccountRolesCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Lists all roles that are assigned to the user for a given AWS account.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SSOClient, ListAccountRolesCommand } from "@aws-sdk/client-sso"; // ES Modules import + * // const { SSOClient, ListAccountRolesCommand } = require("@aws-sdk/client-sso"); // CommonJS import + * const client = new SSOClient(config); + * const input = { // ListAccountRolesRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * accessToken: "STRING_VALUE", // required + * accountId: "STRING_VALUE", // required + * }; + * const command = new ListAccountRolesCommand(input); + * const response = await client.send(command); + * // { // ListAccountRolesResponse + * // nextToken: "STRING_VALUE", + * // roleList: [ // RoleListType + * // { // RoleInfo + * // roleName: "STRING_VALUE", + * // accountId: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListAccountRolesCommandInput - {@link ListAccountRolesCommandInput} + * @returns {@link ListAccountRolesCommandOutput} + * @see {@link ListAccountRolesCommandInput} for command's `input` shape. + * @see {@link ListAccountRolesCommandOutput} for command's `response` shape. + * @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape. + * + * @throws {@link InvalidRequestException} (client fault) + *

Indicates that a problem occurred with the input to the request. For example, a required + * parameter might be missing or out of range.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource doesn't exist.

+ * + * @throws {@link TooManyRequestsException} (client fault) + *

Indicates that the request is being made too frequently and is more than what the server + * can handle.

+ * + * @throws {@link UnauthorizedException} (client fault) + *

Indicates that the request is not authorized. This can happen due to an invalid access + * token in the request.

+ * + * @throws {@link SSOServiceException} + *

Base exception class for all service exceptions from SSO service.

+ * + * @public + */ +export declare class ListAccountRolesCommand extends ListAccountRolesCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/commands/ListAccountsCommand.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/commands/ListAccountsCommand.d.ts new file mode 100644 index 0000000..4f7a1e3 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/commands/ListAccountsCommand.d.ts @@ -0,0 +1,85 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { ListAccountsRequest, ListAccountsResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListAccountsCommand}. + */ +export interface ListAccountsCommandInput extends ListAccountsRequest { +} +/** + * @public + * + * The output of {@link ListAccountsCommand}. + */ +export interface ListAccountsCommandOutput extends ListAccountsResponse, __MetadataBearer { +} +declare const ListAccountsCommand_base: { + new (input: ListAccountsCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: ListAccountsCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the + * administrator of the account. For more information, see Assign User Access in the IAM Identity Center User Guide. This operation + * returns a paginated response.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SSOClient, ListAccountsCommand } from "@aws-sdk/client-sso"; // ES Modules import + * // const { SSOClient, ListAccountsCommand } = require("@aws-sdk/client-sso"); // CommonJS import + * const client = new SSOClient(config); + * const input = { // ListAccountsRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * accessToken: "STRING_VALUE", // required + * }; + * const command = new ListAccountsCommand(input); + * const response = await client.send(command); + * // { // ListAccountsResponse + * // nextToken: "STRING_VALUE", + * // accountList: [ // AccountListType + * // { // AccountInfo + * // accountId: "STRING_VALUE", + * // accountName: "STRING_VALUE", + * // emailAddress: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListAccountsCommandInput - {@link ListAccountsCommandInput} + * @returns {@link ListAccountsCommandOutput} + * @see {@link ListAccountsCommandInput} for command's `input` shape. + * @see {@link ListAccountsCommandOutput} for command's `response` shape. + * @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape. + * + * @throws {@link InvalidRequestException} (client fault) + *

Indicates that a problem occurred with the input to the request. For example, a required + * parameter might be missing or out of range.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource doesn't exist.

+ * + * @throws {@link TooManyRequestsException} (client fault) + *

Indicates that the request is being made too frequently and is more than what the server + * can handle.

+ * + * @throws {@link UnauthorizedException} (client fault) + *

Indicates that the request is not authorized. This can happen due to an invalid access + * token in the request.

+ * + * @throws {@link SSOServiceException} + *

Base exception class for all service exceptions from SSO service.

+ * + * @public + */ +export declare class ListAccountsCommand extends ListAccountsCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/commands/LogoutCommand.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/commands/LogoutCommand.d.ts new file mode 100644 index 0000000..3bb0eec --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/commands/LogoutCommand.d.ts @@ -0,0 +1,82 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { LogoutRequest } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link LogoutCommand}. + */ +export interface LogoutCommandInput extends LogoutRequest { +} +/** + * @public + * + * The output of {@link LogoutCommand}. + */ +export interface LogoutCommandOutput extends __MetadataBearer { +} +declare const LogoutCommand_base: { + new (input: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Removes the locally stored SSO tokens from the client-side cache and sends an API call to + * the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in + * session.

+ * + *

If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM Identity Center sign in session is + * used to obtain an IAM session, as specified in the corresponding IAM Identity Center permission set. + * More specifically, IAM Identity Center assumes an IAM role in the target account on behalf of the user, + * and the corresponding temporary AWS credentials are returned to the client.

+ *

After user logout, any existing IAM role sessions that were created by using IAM Identity Center + * permission sets continue based on the duration configured in the permission set. + * For more information, see User + * authentications in the IAM Identity Center User + * Guide.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SSOClient, LogoutCommand } from "@aws-sdk/client-sso"; // ES Modules import + * // const { SSOClient, LogoutCommand } = require("@aws-sdk/client-sso"); // CommonJS import + * const client = new SSOClient(config); + * const input = { // LogoutRequest + * accessToken: "STRING_VALUE", // required + * }; + * const command = new LogoutCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param LogoutCommandInput - {@link LogoutCommandInput} + * @returns {@link LogoutCommandOutput} + * @see {@link LogoutCommandInput} for command's `input` shape. + * @see {@link LogoutCommandOutput} for command's `response` shape. + * @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape. + * + * @throws {@link InvalidRequestException} (client fault) + *

Indicates that a problem occurred with the input to the request. For example, a required + * parameter might be missing or out of range.

+ * + * @throws {@link TooManyRequestsException} (client fault) + *

Indicates that the request is being made too frequently and is more than what the server + * can handle.

+ * + * @throws {@link UnauthorizedException} (client fault) + *

Indicates that the request is not authorized. This can happen due to an invalid access + * token in the request.

+ * + * @throws {@link SSOServiceException} + *

Base exception class for all service exceptions from SSO service.

+ * + * @public + */ +export declare class LogoutCommand extends LogoutCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/commands/index.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/commands/index.d.ts new file mode 100644 index 0000000..0ab890d --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/commands/index.d.ts @@ -0,0 +1,4 @@ +export * from "./GetRoleCredentialsCommand"; +export * from "./ListAccountRolesCommand"; +export * from "./ListAccountsCommand"; +export * from "./LogoutCommand"; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/endpoint/EndpointParameters.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/endpoint/EndpointParameters.d.ts new file mode 100644 index 0000000..23f42e3 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/endpoint/EndpointParameters.d.ts @@ -0,0 +1,40 @@ +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; +/** + * @public + */ +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; +} +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const resolveClientEndpointParameters: (options: T & ClientInputEndpointParameters) => T & ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const commonParams: { + readonly UseFIPS: { + readonly type: "builtInParams"; + readonly name: "useFipsEndpoint"; + }; + readonly Endpoint: { + readonly type: "builtInParams"; + readonly name: "endpoint"; + }; + readonly Region: { + readonly type: "builtInParams"; + readonly name: "region"; + }; + readonly UseDualStack: { + readonly type: "builtInParams"; + readonly name: "useDualstackEndpoint"; + }; +}; +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/endpoint/endpointResolver.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/endpoint/endpointResolver.d.ts new file mode 100644 index 0000000..70a8eae --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/endpoint/endpointResolver.d.ts @@ -0,0 +1,5 @@ +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParameters } from "./EndpointParameters"; +export declare const defaultEndpointResolver: (endpointParams: EndpointParameters, context?: { + logger?: Logger; +}) => EndpointV2; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/endpoint/ruleset.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/endpoint/ruleset.d.ts new file mode 100644 index 0000000..4b23899 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/endpoint/ruleset.d.ts @@ -0,0 +1,2 @@ +import { RuleSetObject } from "@smithy/types"; +export declare const ruleSet: RuleSetObject; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/extensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/extensionConfiguration.d.ts new file mode 100644 index 0000000..0f76dd3 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/extensionConfiguration.d.ts @@ -0,0 +1,9 @@ +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; +/** + * @internal + */ +export interface SSOExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration { +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/index.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/index.d.ts new file mode 100644 index 0000000..17c0cf6 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/index.d.ts @@ -0,0 +1,30 @@ +/** + *

AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to + * IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles + * assigned to them and get federated into the application.

+ * + *

Although AWS Single Sign-On was renamed, the sso and + * identitystore API namespaces will continue to retain their original name for + * backward compatibility purposes. For more information, see IAM Identity Center rename.

+ *
+ *

This reference guide describes the IAM Identity Center Portal operations that you can call + * programatically and includes detailed information on data types and errors.

+ * + *

AWS provides SDKs that consist of libraries and sample code for various programming + * languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a + * convenient way to create programmatic access to IAM Identity Center and other AWS services. For more + * information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.

+ *
+ * + * @packageDocumentation + */ +export * from "./SSOClient"; +export * from "./SSO"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { SSOExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export { SSOServiceException } from "./models/SSOServiceException"; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/models/SSOServiceException.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/models/SSOServiceException.d.ts new file mode 100644 index 0000000..89d8422 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/models/SSOServiceException.d.ts @@ -0,0 +1,13 @@ +import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client"; +export { __ServiceException, __ServiceExceptionOptions }; +/** + * @public + * + * Base exception class for all service exceptions from SSO service. + */ +export declare class SSOServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions); +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/models/index.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/models/index.d.ts new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/models/index.d.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/models/models_0.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/models/models_0.d.ts new file mode 100644 index 0000000..349603f --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/models/models_0.d.ts @@ -0,0 +1,266 @@ +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { SSOServiceException as __BaseException } from "./SSOServiceException"; +/** + *

Provides information about your AWS account.

+ * @public + */ +export interface AccountInfo { + /** + *

The identifier of the AWS account that is assigned to the user.

+ * @public + */ + accountId?: string; + /** + *

The display name of the AWS account that is assigned to the user.

+ * @public + */ + accountName?: string; + /** + *

The email address of the AWS account that is assigned to the user.

+ * @public + */ + emailAddress?: string; +} +/** + * @public + */ +export interface GetRoleCredentialsRequest { + /** + *

The friendly name of the role that is assigned to the user.

+ * @public + */ + roleName: string | undefined; + /** + *

The identifier for the AWS account that is assigned to the user.

+ * @public + */ + accountId: string | undefined; + /** + *

The token issued by the CreateToken API call. For more information, see + * CreateToken in the IAM Identity Center OIDC API Reference Guide.

+ * @public + */ + accessToken: string | undefined; +} +/** + *

Provides information about the role credentials that are assigned to the user.

+ * @public + */ +export interface RoleCredentials { + /** + *

The identifier used for the temporary security credentials. For more information, see + * Using Temporary Security Credentials to Request Access to AWS Resources in the + * AWS IAM User Guide.

+ * @public + */ + accessKeyId?: string; + /** + *

The key that is used to sign the request. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the + * AWS IAM User Guide.

+ * @public + */ + secretAccessKey?: string; + /** + *

The token used for temporary credentials. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the + * AWS IAM User Guide.

+ * @public + */ + sessionToken?: string; + /** + *

The date on which temporary security credentials expire.

+ * @public + */ + expiration?: number; +} +/** + * @public + */ +export interface GetRoleCredentialsResponse { + /** + *

The credentials for the role that is assigned to the user.

+ * @public + */ + roleCredentials?: RoleCredentials; +} +/** + *

Indicates that a problem occurred with the input to the request. For example, a required + * parameter might be missing or out of range.

+ * @public + */ +export declare class InvalidRequestException extends __BaseException { + readonly name: "InvalidRequestException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

The specified resource doesn't exist.

+ * @public + */ +export declare class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that the request is being made too frequently and is more than what the server + * can handle.

+ * @public + */ +export declare class TooManyRequestsException extends __BaseException { + readonly name: "TooManyRequestsException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

Indicates that the request is not authorized. This can happen due to an invalid access + * token in the request.

+ * @public + */ +export declare class UnauthorizedException extends __BaseException { + readonly name: "UnauthorizedException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface ListAccountRolesRequest { + /** + *

The page token from the previous response output when you request subsequent pages.

+ * @public + */ + nextToken?: string; + /** + *

The number of items that clients can request per page.

+ * @public + */ + maxResults?: number; + /** + *

The token issued by the CreateToken API call. For more information, see + * CreateToken in the IAM Identity Center OIDC API Reference Guide.

+ * @public + */ + accessToken: string | undefined; + /** + *

The identifier for the AWS account that is assigned to the user.

+ * @public + */ + accountId: string | undefined; +} +/** + *

Provides information about the role that is assigned to the user.

+ * @public + */ +export interface RoleInfo { + /** + *

The friendly name of the role that is assigned to the user.

+ * @public + */ + roleName?: string; + /** + *

The identifier of the AWS account assigned to the user.

+ * @public + */ + accountId?: string; +} +/** + * @public + */ +export interface ListAccountRolesResponse { + /** + *

The page token client that is used to retrieve the list of accounts.

+ * @public + */ + nextToken?: string; + /** + *

A paginated response with the list of roles and the next token if more results are + * available.

+ * @public + */ + roleList?: RoleInfo[]; +} +/** + * @public + */ +export interface ListAccountsRequest { + /** + *

(Optional) When requesting subsequent pages, this is the page token from the previous + * response output.

+ * @public + */ + nextToken?: string; + /** + *

This is the number of items clients can request per page.

+ * @public + */ + maxResults?: number; + /** + *

The token issued by the CreateToken API call. For more information, see + * CreateToken in the IAM Identity Center OIDC API Reference Guide.

+ * @public + */ + accessToken: string | undefined; +} +/** + * @public + */ +export interface ListAccountsResponse { + /** + *

The page token client that is used to retrieve the list of accounts.

+ * @public + */ + nextToken?: string; + /** + *

A paginated response with the list of account information and the next token if more + * results are available.

+ * @public + */ + accountList?: AccountInfo[]; +} +/** + * @public + */ +export interface LogoutRequest { + /** + *

The token issued by the CreateToken API call. For more information, see + * CreateToken in the IAM Identity Center OIDC API Reference Guide.

+ * @public + */ + accessToken: string | undefined; +} +/** + * @internal + */ +export declare const GetRoleCredentialsRequestFilterSensitiveLog: (obj: GetRoleCredentialsRequest) => any; +/** + * @internal + */ +export declare const RoleCredentialsFilterSensitiveLog: (obj: RoleCredentials) => any; +/** + * @internal + */ +export declare const GetRoleCredentialsResponseFilterSensitiveLog: (obj: GetRoleCredentialsResponse) => any; +/** + * @internal + */ +export declare const ListAccountRolesRequestFilterSensitiveLog: (obj: ListAccountRolesRequest) => any; +/** + * @internal + */ +export declare const ListAccountsRequestFilterSensitiveLog: (obj: ListAccountsRequest) => any; +/** + * @internal + */ +export declare const LogoutRequestFilterSensitiveLog: (obj: LogoutRequest) => any; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/pagination/Interfaces.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/pagination/Interfaces.d.ts new file mode 100644 index 0000000..81addca --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/pagination/Interfaces.d.ts @@ -0,0 +1,8 @@ +import { PaginationConfiguration } from "@smithy/types"; +import { SSOClient } from "../SSOClient"; +/** + * @public + */ +export interface SSOPaginationConfiguration extends PaginationConfiguration { + client: SSOClient; +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/pagination/ListAccountRolesPaginator.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/pagination/ListAccountRolesPaginator.d.ts new file mode 100644 index 0000000..fa309d4 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/pagination/ListAccountRolesPaginator.d.ts @@ -0,0 +1,7 @@ +import { Paginator } from "@smithy/types"; +import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "../commands/ListAccountRolesCommand"; +import { SSOPaginationConfiguration } from "./Interfaces"; +/** + * @public + */ +export declare const paginateListAccountRoles: (config: SSOPaginationConfiguration, input: ListAccountRolesCommandInput, ...rest: any[]) => Paginator; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/pagination/ListAccountsPaginator.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/pagination/ListAccountsPaginator.d.ts new file mode 100644 index 0000000..21c2559 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/pagination/ListAccountsPaginator.d.ts @@ -0,0 +1,7 @@ +import { Paginator } from "@smithy/types"; +import { ListAccountsCommandInput, ListAccountsCommandOutput } from "../commands/ListAccountsCommand"; +import { SSOPaginationConfiguration } from "./Interfaces"; +/** + * @public + */ +export declare const paginateListAccounts: (config: SSOPaginationConfiguration, input: ListAccountsCommandInput, ...rest: any[]) => Paginator; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/pagination/index.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/pagination/index.d.ts new file mode 100644 index 0000000..1e7866f --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/pagination/index.d.ts @@ -0,0 +1,3 @@ +export * from "./Interfaces"; +export * from "./ListAccountRolesPaginator"; +export * from "./ListAccountsPaginator"; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/protocols/Aws_restJson1.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/protocols/Aws_restJson1.d.ts new file mode 100644 index 0000000..02d97aa --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/protocols/Aws_restJson1.d.ts @@ -0,0 +1,38 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; +import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "../commands/GetRoleCredentialsCommand"; +import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "../commands/ListAccountRolesCommand"; +import { ListAccountsCommandInput, ListAccountsCommandOutput } from "../commands/ListAccountsCommand"; +import { LogoutCommandInput, LogoutCommandOutput } from "../commands/LogoutCommand"; +/** + * serializeAws_restJson1GetRoleCredentialsCommand + */ +export declare const se_GetRoleCredentialsCommand: (input: GetRoleCredentialsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_restJson1ListAccountRolesCommand + */ +export declare const se_ListAccountRolesCommand: (input: ListAccountRolesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_restJson1ListAccountsCommand + */ +export declare const se_ListAccountsCommand: (input: ListAccountsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_restJson1LogoutCommand + */ +export declare const se_LogoutCommand: (input: LogoutCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * deserializeAws_restJson1GetRoleCredentialsCommand + */ +export declare const de_GetRoleCredentialsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_restJson1ListAccountRolesCommand + */ +export declare const de_ListAccountRolesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_restJson1ListAccountsCommand + */ +export declare const de_ListAccountsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_restJson1LogoutCommand + */ +export declare const de_LogoutCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts new file mode 100644 index 0000000..e921d2a --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts @@ -0,0 +1,52 @@ +import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler"; +import { SSOClientConfig } from "./SSOClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SSOClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + defaultUserAgentProvider: import("@smithy/types").Provider; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: import("@smithy/protocol-http").HttpHandler | RequestHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider) & (string | import("@smithy/types").Provider | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider)) | undefined; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + })[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts new file mode 100644 index 0000000..942492b --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts @@ -0,0 +1,52 @@ +import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler"; +import { SSOClientConfig } from "./SSOClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SSOClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + defaultUserAgentProvider: import("@smithy/types").Provider; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: RequestHandler | import("@smithy/protocol-http").HttpHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider) & (string | import("@smithy/types").Provider | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider)) | undefined; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + })[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts new file mode 100644 index 0000000..ccf545e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts @@ -0,0 +1,51 @@ +import { SSOClientConfig } from "./SSOClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SSOClientConfig) => { + runtime: string; + sha256: import("@smithy/types").HashConstructor; + requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record | import("@smithy/protocol-http").HttpHandler | import("@smithy/fetch-http-handler").FetchHttpHandler; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + streamCollector: import("@smithy/types").StreamCollector; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + defaultUserAgentProvider: import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + maxAttempts: number | import("@smithy/types").Provider; + retryMode: string | import("@smithy/types").Provider; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider; + endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider | undefined; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + })[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.shared.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.shared.d.ts new file mode 100644 index 0000000..20ab682 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.shared.d.ts @@ -0,0 +1,32 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { IdentityProviderConfig } from "@smithy/types"; +import { SSOClientConfig } from "./SSOClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: SSOClientConfig) => { + apiVersion: string; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + disableHostPrefix: boolean; + endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + }) => import("@smithy/types").EndpointV2; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: NoAuthSigner; + })[]; + logger: import("@smithy/types").Logger; + serviceId: string; + urlParser: import("@smithy/types").UrlParser; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/runtimeExtensions.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/runtimeExtensions.d.ts new file mode 100644 index 0000000..a0f078c --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/runtimeExtensions.d.ts @@ -0,0 +1,17 @@ +import { SSOExtensionConfiguration } from "./extensionConfiguration"; +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: SSOExtensionConfiguration): void; +} +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} +/** + * @internal + */ +export declare const resolveRuntimeExtensions: (runtimeConfig: any, extensions: RuntimeExtension[]) => any; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSO.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSO.d.ts new file mode 100644 index 0000000..9a242fc --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSO.d.ts @@ -0,0 +1,73 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; +import { + GetRoleCredentialsCommandInput, + GetRoleCredentialsCommandOutput, +} from "./commands/GetRoleCredentialsCommand"; +import { + ListAccountRolesCommandInput, + ListAccountRolesCommandOutput, +} from "./commands/ListAccountRolesCommand"; +import { + ListAccountsCommandInput, + ListAccountsCommandOutput, +} from "./commands/ListAccountsCommand"; +import { + LogoutCommandInput, + LogoutCommandOutput, +} from "./commands/LogoutCommand"; +import { SSOClient } from "./SSOClient"; +export interface SSO { + getRoleCredentials( + args: GetRoleCredentialsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getRoleCredentials( + args: GetRoleCredentialsCommandInput, + cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void + ): void; + getRoleCredentials( + args: GetRoleCredentialsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void + ): void; + listAccountRoles( + args: ListAccountRolesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listAccountRoles( + args: ListAccountRolesCommandInput, + cb: (err: any, data?: ListAccountRolesCommandOutput) => void + ): void; + listAccountRoles( + args: ListAccountRolesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListAccountRolesCommandOutput) => void + ): void; + listAccounts( + args: ListAccountsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listAccounts( + args: ListAccountsCommandInput, + cb: (err: any, data?: ListAccountsCommandOutput) => void + ): void; + listAccounts( + args: ListAccountsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListAccountsCommandOutput) => void + ): void; + logout( + args: LogoutCommandInput, + options?: __HttpHandlerOptions + ): Promise; + logout( + args: LogoutCommandInput, + cb: (err: any, data?: LogoutCommandOutput) => void + ): void; + logout( + args: LogoutCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: LogoutCommandOutput) => void + ): void; +} +export declare class SSO extends SSOClient implements SSO {} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts new file mode 100644 index 0000000..2fd3b04 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts @@ -0,0 +1,139 @@ +import { + HostHeaderInputConfig, + HostHeaderResolvedConfig, +} from "@aws-sdk/middleware-host-header"; +import { + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { + RegionInputConfig, + RegionResolvedConfig, +} from "@smithy/config-resolver"; +import { + EndpointInputConfig, + EndpointResolvedConfig, +} from "@smithy/middleware-endpoint"; +import { + RetryInputConfig, + RetryResolvedConfig, +} from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; +import { + HttpAuthSchemeInputConfig, + HttpAuthSchemeResolvedConfig, +} from "./auth/httpAuthSchemeProvider"; +import { + GetRoleCredentialsCommandInput, + GetRoleCredentialsCommandOutput, +} from "./commands/GetRoleCredentialsCommand"; +import { + ListAccountRolesCommandInput, + ListAccountRolesCommandOutput, +} from "./commands/ListAccountRolesCommand"; +import { + ListAccountsCommandInput, + ListAccountsCommandOutput, +} from "./commands/ListAccountsCommand"; +import { + LogoutCommandInput, + LogoutCommandOutput, +} from "./commands/LogoutCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, +} from "./endpoint/EndpointParameters"; +import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; +export { __Client }; +export type ServiceInputTypes = + | GetRoleCredentialsCommandInput + | ListAccountRolesCommandInput + | ListAccountsCommandInput + | LogoutCommandInput; +export type ServiceOutputTypes = + | GetRoleCredentialsCommandOutput + | ListAccountRolesCommandOutput + | ListAccountsCommandOutput + | LogoutCommandOutput; +export interface ClientDefaults + extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + requestHandler?: __HttpHandlerUserInput; + sha256?: __ChecksumConstructor | __HashConstructor; + urlParser?: __UrlParser; + bodyLengthChecker?: __BodyLengthCalculator; + streamCollector?: __StreamCollector; + base64Decoder?: __Decoder; + base64Encoder?: __Encoder; + utf8Decoder?: __Decoder; + utf8Encoder?: __Encoder; + runtime?: string; + disableHostPrefix?: boolean; + serviceId?: string; + useDualstackEndpoint?: boolean | __Provider; + useFipsEndpoint?: boolean | __Provider; + defaultUserAgentProvider?: Provider<__UserAgent>; + region?: string | __Provider; + maxAttempts?: number | __Provider; + retryMode?: string | __Provider; + logger?: __Logger; + extensions?: RuntimeExtension[]; + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} +export type SSOClientConfigType = Partial< + __SmithyConfiguration<__HttpHandlerOptions> +> & + ClientDefaults & + RegionInputConfig & + EndpointInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + UserAgentInputConfig & + HttpAuthSchemeInputConfig & + ClientInputEndpointParameters; +export interface SSOClientConfig extends SSOClientConfigType {} +export type SSOClientResolvedConfigType = + __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + RegionResolvedConfig & + EndpointResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + UserAgentResolvedConfig & + HttpAuthSchemeResolvedConfig & + ClientResolvedEndpointParameters; +export interface SSOClientResolvedConfig extends SSOClientResolvedConfigType {} +export declare class SSOClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + SSOClientResolvedConfig +> { + readonly config: SSOClientResolvedConfig; + constructor(...[configuration]: __CheckOptionalClientConfig); + destroy(): void; + private getDefaultHttpAuthSchemeParametersProvider; + private getIdentityProviderConfigProvider; +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts new file mode 100644 index 0000000..29f38b3 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts @@ -0,0 +1,32 @@ +import { + AwsCredentialIdentity, + AwsCredentialIdentityProvider, + HttpAuthScheme, +} from "@smithy/types"; +import { SSOHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider( + httpAuthSchemeProvider: SSOHttpAuthSchemeProvider + ): void; + httpAuthSchemeProvider(): SSOHttpAuthSchemeProvider; + setCredentials( + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider + ): void; + credentials(): + | AwsCredentialIdentity + | AwsCredentialIdentityProvider + | undefined; +} +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: SSOHttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; +export declare const getHttpAuthExtensionConfiguration: ( + runtimeConfig: HttpAuthRuntimeConfig +) => HttpAuthExtensionConfiguration; +export declare const resolveHttpAuthRuntimeConfig: ( + config: HttpAuthExtensionConfiguration +) => HttpAuthRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts new file mode 100644 index 0000000..1579b10 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts @@ -0,0 +1,43 @@ +import { + AwsSdkSigV4AuthInputConfig, + AwsSdkSigV4AuthResolvedConfig, + AwsSdkSigV4PreviouslyResolved, +} from "@aws-sdk/core"; +import { + HandlerExecutionContext, + HttpAuthScheme, + HttpAuthSchemeParameters, + HttpAuthSchemeParametersProvider, + HttpAuthSchemeProvider, +} from "@smithy/types"; +import { SSOClientResolvedConfig } from "../SSOClient"; +export interface SSOHttpAuthSchemeParameters extends HttpAuthSchemeParameters { + region?: string; +} +export interface SSOHttpAuthSchemeParametersProvider + extends HttpAuthSchemeParametersProvider< + SSOClientResolvedConfig, + HandlerExecutionContext, + SSOHttpAuthSchemeParameters, + object + > {} +export declare const defaultSSOHttpAuthSchemeParametersProvider: ( + config: SSOClientResolvedConfig, + context: HandlerExecutionContext, + input: object +) => Promise; +export interface SSOHttpAuthSchemeProvider + extends HttpAuthSchemeProvider {} +export declare const defaultSSOHttpAuthSchemeProvider: SSOHttpAuthSchemeProvider; +export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig { + httpAuthSchemes?: HttpAuthScheme[]; + httpAuthSchemeProvider?: SSOHttpAuthSchemeProvider; +} +export interface HttpAuthSchemeResolvedConfig + extends AwsSdkSigV4AuthResolvedConfig { + readonly httpAuthSchemes: HttpAuthScheme[]; + readonly httpAuthSchemeProvider: SSOHttpAuthSchemeProvider; +} +export declare const resolveHttpAuthSchemeConfig: ( + config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved +) => T & HttpAuthSchemeResolvedConfig; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/GetRoleCredentialsCommand.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/GetRoleCredentialsCommand.d.ts new file mode 100644 index 0000000..08663d7 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/GetRoleCredentialsCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + GetRoleCredentialsRequest, + GetRoleCredentialsResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + SSOClientResolvedConfig, +} from "../SSOClient"; +export { __MetadataBearer, $Command }; +export interface GetRoleCredentialsCommandInput + extends GetRoleCredentialsRequest {} +export interface GetRoleCredentialsCommandOutput + extends GetRoleCredentialsResponse, + __MetadataBearer {} +declare const GetRoleCredentialsCommand_base: { + new ( + input: GetRoleCredentialsCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetRoleCredentialsCommandInput, + GetRoleCredentialsCommandOutput, + SSOClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: GetRoleCredentialsCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetRoleCredentialsCommandInput, + GetRoleCredentialsCommandOutput, + SSOClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class GetRoleCredentialsCommand extends GetRoleCredentialsCommand_base {} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/ListAccountRolesCommand.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/ListAccountRolesCommand.d.ts new file mode 100644 index 0000000..edd4e4e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/ListAccountRolesCommand.d.ts @@ -0,0 +1,38 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + ListAccountRolesRequest, + ListAccountRolesResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + SSOClientResolvedConfig, +} from "../SSOClient"; +export { __MetadataBearer, $Command }; +export interface ListAccountRolesCommandInput extends ListAccountRolesRequest {} +export interface ListAccountRolesCommandOutput + extends ListAccountRolesResponse, + __MetadataBearer {} +declare const ListAccountRolesCommand_base: { + new ( + input: ListAccountRolesCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ListAccountRolesCommandInput, + ListAccountRolesCommandOutput, + SSOClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: ListAccountRolesCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ListAccountRolesCommandInput, + ListAccountRolesCommandOutput, + SSOClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class ListAccountRolesCommand extends ListAccountRolesCommand_base {} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/ListAccountsCommand.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/ListAccountsCommand.d.ts new file mode 100644 index 0000000..157a641 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/ListAccountsCommand.d.ts @@ -0,0 +1,35 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { ListAccountsRequest, ListAccountsResponse } from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + SSOClientResolvedConfig, +} from "../SSOClient"; +export { __MetadataBearer, $Command }; +export interface ListAccountsCommandInput extends ListAccountsRequest {} +export interface ListAccountsCommandOutput + extends ListAccountsResponse, + __MetadataBearer {} +declare const ListAccountsCommand_base: { + new ( + input: ListAccountsCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ListAccountsCommandInput, + ListAccountsCommandOutput, + SSOClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: ListAccountsCommandInput + ): import("@smithy/smithy-client").CommandImpl< + ListAccountsCommandInput, + ListAccountsCommandOutput, + SSOClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class ListAccountsCommand extends ListAccountsCommand_base {} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/LogoutCommand.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/LogoutCommand.d.ts new file mode 100644 index 0000000..74cadb4 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/LogoutCommand.d.ts @@ -0,0 +1,29 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { LogoutRequest } from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + SSOClientResolvedConfig, +} from "../SSOClient"; +export { __MetadataBearer, $Command }; +export interface LogoutCommandInput extends LogoutRequest {} +export interface LogoutCommandOutput extends __MetadataBearer {} +declare const LogoutCommand_base: { + new (input: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl< + LogoutCommandInput, + LogoutCommandOutput, + SSOClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new (__0_0: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl< + LogoutCommandInput, + LogoutCommandOutput, + SSOClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class LogoutCommand extends LogoutCommand_base {} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/index.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/index.d.ts new file mode 100644 index 0000000..0ab890d --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/index.d.ts @@ -0,0 +1,4 @@ +export * from "./GetRoleCredentialsCommand"; +export * from "./ListAccountRolesCommand"; +export * from "./ListAccountsCommand"; +export * from "./LogoutCommand"; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/EndpointParameters.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/EndpointParameters.d.ts new file mode 100644 index 0000000..7f24540 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/EndpointParameters.d.ts @@ -0,0 +1,51 @@ +import { + Endpoint, + EndpointParameters as __EndpointParameters, + EndpointV2, + Provider, +} from "@smithy/types"; +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: + | string + | Provider + | Endpoint + | Provider + | EndpointV2 + | Provider; +} +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const resolveClientEndpointParameters: ( + options: T & ClientInputEndpointParameters +) => T & + ClientInputEndpointParameters & { + defaultSigningName: string; + }; +export declare const commonParams: { + readonly UseFIPS: { + readonly type: "builtInParams"; + readonly name: "useFipsEndpoint"; + }; + readonly Endpoint: { + readonly type: "builtInParams"; + readonly name: "endpoint"; + }; + readonly Region: { + readonly type: "builtInParams"; + readonly name: "region"; + }; + readonly UseDualStack: { + readonly type: "builtInParams"; + readonly name: "useDualstackEndpoint"; + }; +}; +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/endpointResolver.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/endpointResolver.d.ts new file mode 100644 index 0000000..5909925 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/endpointResolver.d.ts @@ -0,0 +1,8 @@ +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParameters } from "./EndpointParameters"; +export declare const defaultEndpointResolver: ( + endpointParams: EndpointParameters, + context?: { + logger?: Logger; + } +) => EndpointV2; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/ruleset.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/ruleset.d.ts new file mode 100644 index 0000000..4b23899 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/ruleset.d.ts @@ -0,0 +1,2 @@ +import { RuleSetObject } from "@smithy/types"; +export declare const ruleSet: RuleSetObject; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/extensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/extensionConfiguration.d.ts new file mode 100644 index 0000000..c1b43ff --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/extensionConfiguration.d.ts @@ -0,0 +1,9 @@ +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; +export interface SSOExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration, + HttpAuthExtensionConfiguration {} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..a3f8a9a --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/index.d.ts @@ -0,0 +1,10 @@ +export * from "./SSOClient"; +export * from "./SSO"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { SSOExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export { SSOServiceException } from "./models/SSOServiceException"; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/SSOServiceException.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/SSOServiceException.d.ts new file mode 100644 index 0000000..1116dc8 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/SSOServiceException.d.ts @@ -0,0 +1,8 @@ +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; +export { __ServiceException, __ServiceExceptionOptions }; +export declare class SSOServiceException extends __ServiceException { + constructor(options: __ServiceExceptionOptions); +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/index.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/index.d.ts new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/index.d.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/models_0.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/models_0.d.ts new file mode 100644 index 0000000..cb731fa --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/models_0.d.ts @@ -0,0 +1,93 @@ +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { SSOServiceException as __BaseException } from "./SSOServiceException"; +export interface AccountInfo { + accountId?: string; + accountName?: string; + emailAddress?: string; +} +export interface GetRoleCredentialsRequest { + roleName: string | undefined; + accountId: string | undefined; + accessToken: string | undefined; +} +export interface RoleCredentials { + accessKeyId?: string; + secretAccessKey?: string; + sessionToken?: string; + expiration?: number; +} +export interface GetRoleCredentialsResponse { + roleCredentials?: RoleCredentials; +} +export declare class InvalidRequestException extends __BaseException { + readonly name: "InvalidRequestException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class TooManyRequestsException extends __BaseException { + readonly name: "TooManyRequestsException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class UnauthorizedException extends __BaseException { + readonly name: "UnauthorizedException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType + ); +} +export interface ListAccountRolesRequest { + nextToken?: string; + maxResults?: number; + accessToken: string | undefined; + accountId: string | undefined; +} +export interface RoleInfo { + roleName?: string; + accountId?: string; +} +export interface ListAccountRolesResponse { + nextToken?: string; + roleList?: RoleInfo[]; +} +export interface ListAccountsRequest { + nextToken?: string; + maxResults?: number; + accessToken: string | undefined; +} +export interface ListAccountsResponse { + nextToken?: string; + accountList?: AccountInfo[]; +} +export interface LogoutRequest { + accessToken: string | undefined; +} +export declare const GetRoleCredentialsRequestFilterSensitiveLog: ( + obj: GetRoleCredentialsRequest +) => any; +export declare const RoleCredentialsFilterSensitiveLog: ( + obj: RoleCredentials +) => any; +export declare const GetRoleCredentialsResponseFilterSensitiveLog: ( + obj: GetRoleCredentialsResponse +) => any; +export declare const ListAccountRolesRequestFilterSensitiveLog: ( + obj: ListAccountRolesRequest +) => any; +export declare const ListAccountsRequestFilterSensitiveLog: ( + obj: ListAccountsRequest +) => any; +export declare const LogoutRequestFilterSensitiveLog: ( + obj: LogoutRequest +) => any; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/Interfaces.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/Interfaces.d.ts new file mode 100644 index 0000000..2970898 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/Interfaces.d.ts @@ -0,0 +1,5 @@ +import { PaginationConfiguration } from "@smithy/types"; +import { SSOClient } from "../SSOClient"; +export interface SSOPaginationConfiguration extends PaginationConfiguration { + client: SSOClient; +} diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/ListAccountRolesPaginator.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/ListAccountRolesPaginator.d.ts new file mode 100644 index 0000000..174f32b --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/ListAccountRolesPaginator.d.ts @@ -0,0 +1,11 @@ +import { Paginator } from "@smithy/types"; +import { + ListAccountRolesCommandInput, + ListAccountRolesCommandOutput, +} from "../commands/ListAccountRolesCommand"; +import { SSOPaginationConfiguration } from "./Interfaces"; +export declare const paginateListAccountRoles: ( + config: SSOPaginationConfiguration, + input: ListAccountRolesCommandInput, + ...rest: any[] +) => Paginator; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/ListAccountsPaginator.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/ListAccountsPaginator.d.ts new file mode 100644 index 0000000..bb5e66d --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/ListAccountsPaginator.d.ts @@ -0,0 +1,11 @@ +import { Paginator } from "@smithy/types"; +import { + ListAccountsCommandInput, + ListAccountsCommandOutput, +} from "../commands/ListAccountsCommand"; +import { SSOPaginationConfiguration } from "./Interfaces"; +export declare const paginateListAccounts: ( + config: SSOPaginationConfiguration, + input: ListAccountsCommandInput, + ...rest: any[] +) => Paginator; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/index.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/index.d.ts new file mode 100644 index 0000000..1e7866f --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/index.d.ts @@ -0,0 +1,3 @@ +export * from "./Interfaces"; +export * from "./ListAccountRolesPaginator"; +export * from "./ListAccountsPaginator"; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/protocols/Aws_restJson1.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/protocols/Aws_restJson1.d.ts new file mode 100644 index 0000000..74eebdc --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/protocols/Aws_restJson1.d.ts @@ -0,0 +1,53 @@ +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; +import { + GetRoleCredentialsCommandInput, + GetRoleCredentialsCommandOutput, +} from "../commands/GetRoleCredentialsCommand"; +import { + ListAccountRolesCommandInput, + ListAccountRolesCommandOutput, +} from "../commands/ListAccountRolesCommand"; +import { + ListAccountsCommandInput, + ListAccountsCommandOutput, +} from "../commands/ListAccountsCommand"; +import { + LogoutCommandInput, + LogoutCommandOutput, +} from "../commands/LogoutCommand"; +export declare const se_GetRoleCredentialsCommand: ( + input: GetRoleCredentialsCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_ListAccountRolesCommand: ( + input: ListAccountRolesCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_ListAccountsCommand: ( + input: ListAccountsCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_LogoutCommand: ( + input: LogoutCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const de_GetRoleCredentialsCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_ListAccountRolesCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_ListAccountsCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_LogoutCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts new file mode 100644 index 0000000..16a4eb0 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts @@ -0,0 +1,107 @@ +import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler"; +import { SSOClientConfig } from "./SSOClient"; +export declare const getRuntimeConfig: (config: SSOClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider< + import("@smithy/smithy-client").ResolvedDefaultsMode + >; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: + | import("@smithy/protocol-http").HttpHandler + | RequestHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: + | (( + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + ) & + ( + | string + | import("@smithy/types").Provider + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + )) + | undefined; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + } + )[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts new file mode 100644 index 0000000..537e3e4 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts @@ -0,0 +1,107 @@ +import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler"; +import { SSOClientConfig } from "./SSOClient"; +export declare const getRuntimeConfig: (config: SSOClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider< + import("@smithy/smithy-client").ResolvedDefaultsMode + >; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: + | RequestHandler + | import("@smithy/protocol-http").HttpHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: + | (( + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + ) & + ( + | string + | import("@smithy/types").Provider + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + )) + | undefined; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + } + )[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts new file mode 100644 index 0000000..2dc5ad6 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts @@ -0,0 +1,101 @@ +import { SSOClientConfig } from "./SSOClient"; +export declare const getRuntimeConfig: (config: SSOClientConfig) => { + runtime: string; + sha256: import("@smithy/types").HashConstructor; + requestHandler: + | import("@smithy/types").NodeHttpHandlerOptions + | import("@smithy/types").FetchHttpHandlerOptions + | Record + | import("@smithy/protocol-http").HttpHandler + | import("@smithy/fetch-http-handler").FetchHttpHandler; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + streamCollector: import("@smithy/types").StreamCollector; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + region: string | import("@smithy/types").Provider; + maxAttempts: number | import("@smithy/types").Provider; + retryMode: string | import("@smithy/types").Provider; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + defaultsMode: + | import("@smithy/smithy-client").DefaultsMode + | import("@smithy/types").Provider< + import("@smithy/smithy-client").DefaultsMode + >; + endpoint?: + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + | undefined; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + } + )[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.shared.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.shared.d.ts new file mode 100644 index 0000000..00b2942 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.shared.d.ts @@ -0,0 +1,49 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { IdentityProviderConfig } from "@smithy/types"; +import { SSOClientConfig } from "./SSOClient"; +export declare const getRuntimeConfig: (config: SSOClientConfig) => { + apiVersion: string; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + disableHostPrefix: boolean; + endpointProvider: ( + endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, + context?: { + logger?: import("@smithy/types").Logger | undefined; + } + ) => import("@smithy/types").EndpointV2; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: NoAuthSigner; + } + )[]; + logger: import("@smithy/types").Logger; + serviceId: string; + urlParser: import("@smithy/types").UrlParser; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; +}; diff --git a/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeExtensions.d.ts b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeExtensions.d.ts new file mode 100644 index 0000000..fbec1e5 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeExtensions.d.ts @@ -0,0 +1,11 @@ +import { SSOExtensionConfiguration } from "./extensionConfiguration"; +export interface RuntimeExtension { + configure(extensionConfiguration: SSOExtensionConfiguration): void; +} +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} +export declare const resolveRuntimeExtensions: ( + runtimeConfig: any, + extensions: RuntimeExtension[] +) => any; diff --git a/node_modules/@aws-sdk/client-sso/package.json b/node_modules/@aws-sdk/client-sso/package.json new file mode 100644 index 0000000..db84138 --- /dev/null +++ b/node_modules/@aws-sdk/client-sso/package.json @@ -0,0 +1,99 @@ +{ + "name": "@aws-sdk/client-sso", + "description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sso", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "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 sso" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.535.0", + "@aws-sdk/middleware-host-header": "3.535.0", + "@aws-sdk/middleware-logger": "3.535.0", + "@aws-sdk/middleware-recursion-detection": "3.535.0", + "@aws-sdk/middleware-user-agent": "3.535.0", + "@aws-sdk/region-config-resolver": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@aws-sdk/util-endpoints": "3.535.0", + "@aws-sdk/util-user-agent-browser": "3.535.0", + "@aws-sdk/util-user-agent-node": "3.535.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-retry": "^2.2.0", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.0", + "@smithy/util-defaults-mode-node": "^2.3.0", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@smithy/service-client-documentation-generator": "^2.2.0", + "@tsconfig/node14": "1.0.3", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.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-sso", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-sso" + } +} diff --git a/node_modules/@aws-sdk/client-sts/LICENSE b/node_modules/@aws-sdk/client-sts/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-sdk/client-sts/README.md b/node_modules/@aws-sdk/client-sts/README.md new file mode 100644 index 0000000..307b4b7 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/README.md @@ -0,0 +1,273 @@ + + +# @aws-sdk/client-sts + +## Description + +AWS SDK for JavaScript STS Client for Node.js, Browser and React Native. + +Security Token Service + +

Security Token Service (STS) enables you to request temporary, limited-privilege +credentials for users. This guide provides descriptions of the STS API. For +more information about using this service, see Temporary Security Credentials.

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-sts +using your favorite package manager: + +- `npm install @aws-sdk/client-sts` +- `yarn add @aws-sdk/client-sts` +- `pnpm add @aws-sdk/client-sts` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `STSClient` and +the commands you need, for example `GetCallerIdentityCommand`: + +```js +// ES5 example +const { STSClient, GetCallerIdentityCommand } = require("@aws-sdk/client-sts"); +``` + +```ts +// ES6+ example +import { STSClient, GetCallerIdentityCommand } from "@aws-sdk/client-sts"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new STSClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new GetCallerIdentityCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-sts"; +const client = new AWS.STS({ region: "REGION" }); + +// async/await. +try { + const data = await client.getCallerIdentity(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .getCallerIdentity(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.getCallerIdentity(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-sts` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +
+ +AssumeRole + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/AssumeRoleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleCommandOutput/) + +
+
+ +AssumeRoleWithSAML + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/AssumeRoleWithSAMLCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleWithSAMLCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleWithSAMLCommandOutput/) + +
+
+ +AssumeRoleWithWebIdentity + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/AssumeRoleWithWebIdentityCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleWithWebIdentityCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleWithWebIdentityCommandOutput/) + +
+
+ +DecodeAuthorizationMessage + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/DecodeAuthorizationMessageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/DecodeAuthorizationMessageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/DecodeAuthorizationMessageCommandOutput/) + +
+
+ +GetAccessKeyInfo + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetAccessKeyInfoCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetAccessKeyInfoCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetAccessKeyInfoCommandOutput/) + +
+
+ +GetCallerIdentity + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetCallerIdentityCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetCallerIdentityCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetCallerIdentityCommandOutput/) + +
+
+ +GetFederationToken + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetFederationTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetFederationTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetFederationTokenCommandOutput/) + +
+
+ +GetSessionToken + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetSessionTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetSessionTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetSessionTokenCommandOutput/) + +
diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js b/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js new file mode 100644 index 0000000..7c8c902 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.STSClient = exports.__Client = void 0; +const middleware_host_header_1 = require("@aws-sdk/middleware-host-header"); +const middleware_logger_1 = require("@aws-sdk/middleware-logger"); +const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection"); +const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent"); +const config_resolver_1 = require("@smithy/config-resolver"); +const core_1 = require("@smithy/core"); +const middleware_content_length_1 = require("@smithy/middleware-content-length"); +const middleware_endpoint_1 = require("@smithy/middleware-endpoint"); +const middleware_retry_1 = require("@smithy/middleware-retry"); +const smithy_client_1 = require("@smithy/smithy-client"); +Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } }); +const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider"); +const EndpointParameters_1 = require("./endpoint/EndpointParameters"); +const runtimeConfig_1 = require("./runtimeConfig"); +const runtimeExtensions_1 = require("./runtimeExtensions"); +class STSClient extends smithy_client_1.Client { + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); + const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); + const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); + const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); + const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); + const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5); + const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider(), + })); + this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config)); + } + destroy() { + super.destroy(); + } + getDefaultHttpAuthSchemeParametersProvider() { + return httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new core_1.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }); + } +} +exports.STSClient = STSClient; diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js b/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js new file mode 100644 index 0000000..239095e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0; +const getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } + else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + }, + }; +}; +exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration; +const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; +exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js b/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js new file mode 100644 index 0000000..3360a82 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js @@ -0,0 +1,67 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0; +const core_1 = require("@aws-sdk/core"); +const util_middleware_1 = require("@smithy/util-middleware"); +const STSClient_1 = require("../STSClient"); +const defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sts", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +const defaultSTSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "AssumeRoleWithSAML": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "AssumeRoleWithWebIdentity": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider; +const resolveStsAuthConfig = (input) => ({ + ...input, + stsClientCtor: STSClient_1.STSClient, +}); +exports.resolveStsAuthConfig = resolveStsAuthConfig; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, exports.resolveStsAuthConfig)(config); + const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0); + return { + ...config_1, + }; +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/credentialDefaultProvider.js b/node_modules/@aws-sdk/client-sts/dist-cjs/credentialDefaultProvider.js new file mode 100644 index 0000000..18de72c --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/credentialDefaultProvider.js @@ -0,0 +1,29 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultProvider = void 0; +exports.defaultProvider = ((input) => { + return () => Promise.resolve().then(() => __importStar(require("@aws-sdk/credential-provider-node"))).then(({ defaultProvider }) => defaultProvider(input)()); +}); diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js b/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js new file mode 100644 index 0000000..7f176d0 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.commonParams = exports.resolveClientEndpointParameters = void 0; +const resolveClientEndpointParameters = (options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + defaultSigningName: "sts", + }; +}; +exports.resolveClientEndpointParameters = resolveClientEndpointParameters; +exports.commonParams = { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js b/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js new file mode 100644 index 0000000..3d8d8de --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = require("@smithy/util-endpoints"); +const ruleset_1 = require("./ruleset"); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); +}; +exports.defaultEndpointResolver = defaultEndpointResolver; diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js b/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js new file mode 100644 index 0000000..7428259 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js @@ -0,0 +1,7 @@ +"use strict"; +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 _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; diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/index.js b/node_modules/@aws-sdk/client-sts/dist-cjs/index.js new file mode 100644 index 0000000..63415cc --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/index.js @@ -0,0 +1,1458 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AssumeRoleCommand: () => AssumeRoleCommand, + AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog, + AssumeRoleWithSAMLCommand: () => AssumeRoleWithSAMLCommand, + AssumeRoleWithSAMLRequestFilterSensitiveLog: () => AssumeRoleWithSAMLRequestFilterSensitiveLog, + AssumeRoleWithSAMLResponseFilterSensitiveLog: () => AssumeRoleWithSAMLResponseFilterSensitiveLog, + AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand, + AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog, + AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog, + ClientInputEndpointParameters: () => import_EndpointParameters9.ClientInputEndpointParameters, + CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog, + DecodeAuthorizationMessageCommand: () => DecodeAuthorizationMessageCommand, + ExpiredTokenException: () => ExpiredTokenException, + GetAccessKeyInfoCommand: () => GetAccessKeyInfoCommand, + GetCallerIdentityCommand: () => GetCallerIdentityCommand, + GetFederationTokenCommand: () => GetFederationTokenCommand, + GetFederationTokenResponseFilterSensitiveLog: () => GetFederationTokenResponseFilterSensitiveLog, + GetSessionTokenCommand: () => GetSessionTokenCommand, + GetSessionTokenResponseFilterSensitiveLog: () => GetSessionTokenResponseFilterSensitiveLog, + IDPCommunicationErrorException: () => IDPCommunicationErrorException, + IDPRejectedClaimException: () => IDPRejectedClaimException, + InvalidAuthorizationMessageException: () => InvalidAuthorizationMessageException, + InvalidIdentityTokenException: () => InvalidIdentityTokenException, + MalformedPolicyDocumentException: () => MalformedPolicyDocumentException, + PackedPolicyTooLargeException: () => PackedPolicyTooLargeException, + RegionDisabledException: () => RegionDisabledException, + RuntimeExtension: () => import_runtimeExtensions.RuntimeExtension, + STS: () => STS, + STSServiceException: () => STSServiceException, + decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider, + getDefaultRoleAssumer: () => getDefaultRoleAssumer2, + getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2 +}); +module.exports = __toCommonJS(src_exports); +__reExport(src_exports, require("././STSClient"), module.exports); + +// src/STS.ts + + +// src/commands/AssumeRoleCommand.ts +var import_middleware_endpoint = require("@smithy/middleware-endpoint"); +var import_middleware_serde = require("@smithy/middleware-serde"); + +var import_types = require("@smithy/types"); +var import_EndpointParameters = require("./endpoint/EndpointParameters"); + +// src/models/models_0.ts + + +// src/models/STSServiceException.ts +var import_smithy_client = require("@smithy/smithy-client"); +var _STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _STSServiceException.prototype); + } +}; +__name(_STSServiceException, "STSServiceException"); +var STSServiceException = _STSServiceException; + +// src/models/models_0.ts +var _ExpiredTokenException = class _ExpiredTokenException extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + this.name = "ExpiredTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExpiredTokenException.prototype); + } +}; +__name(_ExpiredTokenException, "ExpiredTokenException"); +var ExpiredTokenException = _ExpiredTokenException; +var _MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts + }); + this.name = "MalformedPolicyDocumentException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype); + } +}; +__name(_MalformedPolicyDocumentException, "MalformedPolicyDocumentException"); +var MalformedPolicyDocumentException = _MalformedPolicyDocumentException; +var _PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "PackedPolicyTooLargeException", + $fault: "client", + ...opts + }); + this.name = "PackedPolicyTooLargeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype); + } +}; +__name(_PackedPolicyTooLargeException, "PackedPolicyTooLargeException"); +var PackedPolicyTooLargeException = _PackedPolicyTooLargeException; +var _RegionDisabledException = class _RegionDisabledException extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "RegionDisabledException", + $fault: "client", + ...opts + }); + this.name = "RegionDisabledException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _RegionDisabledException.prototype); + } +}; +__name(_RegionDisabledException, "RegionDisabledException"); +var RegionDisabledException = _RegionDisabledException; +var _IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "IDPRejectedClaimException", + $fault: "client", + ...opts + }); + this.name = "IDPRejectedClaimException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype); + } +}; +__name(_IDPRejectedClaimException, "IDPRejectedClaimException"); +var IDPRejectedClaimException = _IDPRejectedClaimException; +var _InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidIdentityTokenException", + $fault: "client", + ...opts + }); + this.name = "InvalidIdentityTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype); + } +}; +__name(_InvalidIdentityTokenException, "InvalidIdentityTokenException"); +var InvalidIdentityTokenException = _InvalidIdentityTokenException; +var _IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "IDPCommunicationErrorException", + $fault: "client", + ...opts + }); + this.name = "IDPCommunicationErrorException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype); + } +}; +__name(_IDPCommunicationErrorException, "IDPCommunicationErrorException"); +var IDPCommunicationErrorException = _IDPCommunicationErrorException; +var _InvalidAuthorizationMessageException = class _InvalidAuthorizationMessageException extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidAuthorizationMessageException", + $fault: "client", + ...opts + }); + this.name = "InvalidAuthorizationMessageException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidAuthorizationMessageException.prototype); + } +}; +__name(_InvalidAuthorizationMessageException, "InvalidAuthorizationMessageException"); +var InvalidAuthorizationMessageException = _InvalidAuthorizationMessageException; +var CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client.SENSITIVE_STRING } +}), "CredentialsFilterSensitiveLog"); +var AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } +}), "AssumeRoleResponseFilterSensitiveLog"); +var AssumeRoleWithSAMLRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SAMLAssertion && { SAMLAssertion: import_smithy_client.SENSITIVE_STRING } +}), "AssumeRoleWithSAMLRequestFilterSensitiveLog"); +var AssumeRoleWithSAMLResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } +}), "AssumeRoleWithSAMLResponseFilterSensitiveLog"); +var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client.SENSITIVE_STRING } +}), "AssumeRoleWithWebIdentityRequestFilterSensitiveLog"); +var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } +}), "AssumeRoleWithWebIdentityResponseFilterSensitiveLog"); +var GetFederationTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } +}), "GetFederationTokenResponseFilterSensitiveLog"); +var GetSessionTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } +}), "GetSessionTokenResponseFilterSensitiveLog"); + +// src/protocols/Aws_query.ts +var import_core = require("@aws-sdk/core"); +var import_protocol_http = require("@smithy/protocol-http"); + +var se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleRequest(input, context), + [_A]: _AR, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_AssumeRoleCommand"); +var se_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithSAMLRequest(input, context), + [_A]: _ARWSAML, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_AssumeRoleWithSAMLCommand"); +var se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithWebIdentityRequest(input, context), + [_A]: _ARWWI, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_AssumeRoleWithWebIdentityCommand"); +var se_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_DecodeAuthorizationMessageRequest(input, context), + [_A]: _DAM, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_DecodeAuthorizationMessageCommand"); +var se_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetAccessKeyInfoRequest(input, context), + [_A]: _GAKI, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_GetAccessKeyInfoCommand"); +var se_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetCallerIdentityRequest(input, context), + [_A]: _GCI, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_GetCallerIdentityCommand"); +var se_GetFederationTokenCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetFederationTokenRequest(input, context), + [_A]: _GFT, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_GetFederationTokenCommand"); +var se_GetSessionTokenCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetSessionTokenRequest(input, context), + [_A]: _GST, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); +}, "se_GetSessionTokenCommand"); +var de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_AssumeRoleResponse(data.AssumeRoleResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_AssumeRoleCommand"); +var de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_AssumeRoleWithSAMLCommand"); +var de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_AssumeRoleWithWebIdentityCommand"); +var de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_DecodeAuthorizationMessageCommand"); +var de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_GetAccessKeyInfoCommand"); +var de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_GetCallerIdentityCommand"); +var de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_GetFederationTokenCommand"); +var de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; +}, "de_GetSessionTokenCommand"); +var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core.parseXmlErrorBody)(output.body, context) + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ExpiredTokenException": + case "com.amazonaws.sts#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "MalformedPolicyDocument": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PackedPolicyTooLarge": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + throw await de_RegionDisabledExceptionRes(parsedOutput, context); + case "IDPRejectedClaim": + case "com.amazonaws.sts#IDPRejectedClaimException": + throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); + case "InvalidIdentityToken": + case "com.amazonaws.sts#InvalidIdentityTokenException": + throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); + case "IDPCommunicationError": + case "com.amazonaws.sts#IDPCommunicationErrorException": + throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context); + case "InvalidAuthorizationMessageException": + case "com.amazonaws.sts#InvalidAuthorizationMessageException": + throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode + }); + } +}, "de_CommandError"); +var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_ExpiredTokenException(body.Error, context); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_ExpiredTokenExceptionRes"); +var de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPCommunicationErrorException(body.Error, context); + const exception = new IDPCommunicationErrorException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_IDPCommunicationErrorExceptionRes"); +var de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPRejectedClaimException(body.Error, context); + const exception = new IDPRejectedClaimException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_IDPRejectedClaimExceptionRes"); +var de_InvalidAuthorizationMessageExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_InvalidAuthorizationMessageException(body.Error, context); + const exception = new InvalidAuthorizationMessageException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_InvalidAuthorizationMessageExceptionRes"); +var de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_InvalidIdentityTokenException(body.Error, context); + const exception = new InvalidIdentityTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_InvalidIdentityTokenExceptionRes"); +var de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_MalformedPolicyDocumentException(body.Error, context); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_MalformedPolicyDocumentExceptionRes"); +var de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_PackedPolicyTooLargeException(body.Error, context); + const exception = new PackedPolicyTooLargeException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_PackedPolicyTooLargeExceptionRes"); +var de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_RegionDisabledException(body.Error, context); + const exception = new RegionDisabledException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client.decorateServiceException)(exception, body); +}, "de_RegionDisabledExceptionRes"); +var se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => { + var _a2, _b, _c, _d; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) { + entries.Tags = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input[_TTK] != null) { + const memberEntries = se_tagKeyListType(input[_TTK], context); + if (((_c = input[_TTK]) == null ? void 0 : _c.length) === 0) { + entries.TransitiveTagKeys = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TransitiveTagKeys.${key}`; + entries[loc] = value; + }); + } + if (input[_EI] != null) { + entries[_EI] = input[_EI]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + if (input[_SI] != null) { + entries[_SI] = input[_SI]; + } + if (input[_PC] != null) { + const memberEntries = se_ProvidedContextsListType(input[_PC], context); + if (((_d = input[_PC]) == null ? void 0 : _d.length) === 0) { + entries.ProvidedContexts = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); + } + return entries; +}, "se_AssumeRoleRequest"); +var se_AssumeRoleWithSAMLRequest = /* @__PURE__ */ __name((input, context) => { + var _a2; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_PAr] != null) { + entries[_PAr] = input[_PAr]; + } + if (input[_SAMLA] != null) { + entries[_SAMLA] = input[_SAMLA]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; +}, "se_AssumeRoleWithSAMLRequest"); +var se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => { + var _a2; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_WIT] != null) { + entries[_WIT] = input[_WIT]; + } + if (input[_PI] != null) { + entries[_PI] = input[_PI]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; +}, "se_AssumeRoleWithWebIdentityRequest"); +var se_DecodeAuthorizationMessageRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_EM] != null) { + entries[_EM] = input[_EM]; + } + return entries; +}, "se_DecodeAuthorizationMessageRequest"); +var se_GetAccessKeyInfoRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_AKI] != null) { + entries[_AKI] = input[_AKI]; + } + return entries; +}, "se_GetAccessKeyInfoRequest"); +var se_GetCallerIdentityRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + return entries; +}, "se_GetCallerIdentityRequest"); +var se_GetFederationTokenRequest = /* @__PURE__ */ __name((input, context) => { + var _a2, _b; + const entries = {}; + if (input[_N] != null) { + entries[_N] = input[_N]; + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) { + entries.Tags = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + return entries; +}, "se_GetFederationTokenRequest"); +var se_GetSessionTokenRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + return entries; +}, "se_GetSessionTokenRequest"); +var se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_PolicyDescriptorType(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}, "se_policyDescriptorListType"); +var se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_a] != null) { + entries[_a] = input[_a]; + } + return entries; +}, "se_PolicyDescriptorType"); +var se_ProvidedContext = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_PAro] != null) { + entries[_PAro] = input[_PAro]; + } + if (input[_CA] != null) { + entries[_CA] = input[_CA]; + } + return entries; +}, "se_ProvidedContext"); +var se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ProvidedContext(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}, "se_ProvidedContextsListType"); +var se_Tag = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_K] != null) { + entries[_K] = input[_K]; + } + if (input[_Va] != null) { + entries[_Va] = input[_Va]; + } + return entries; +}, "se_Tag"); +var se_tagKeyListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}, "se_tagKeyListType"); +var se_tagListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_Tag(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}, "se_tagListType"); +var de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_ARI] != null) { + contents[_ARI] = (0, import_smithy_client.expectString)(output[_ARI]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); + } + return contents; +}, "de_AssumedRoleUser"); +var de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); + } + return contents; +}, "de_AssumeRoleResponse"); +var de_AssumeRoleWithSAMLResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); + } + if (output[_S] != null) { + contents[_S] = (0, import_smithy_client.expectString)(output[_S]); + } + if (output[_ST] != null) { + contents[_ST] = (0, import_smithy_client.expectString)(output[_ST]); + } + if (output[_I] != null) { + contents[_I] = (0, import_smithy_client.expectString)(output[_I]); + } + if (output[_Au] != null) { + contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]); + } + if (output[_NQ] != null) { + contents[_NQ] = (0, import_smithy_client.expectString)(output[_NQ]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); + } + return contents; +}, "de_AssumeRoleWithSAMLResponse"); +var de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_SFWIT] != null) { + contents[_SFWIT] = (0, import_smithy_client.expectString)(output[_SFWIT]); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); + } + if (output[_Pr] != null) { + contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]); + } + if (output[_Au] != null) { + contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); + } + return contents; +}, "de_AssumeRoleWithWebIdentityResponse"); +var de_Credentials = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_AKI] != null) { + contents[_AKI] = (0, import_smithy_client.expectString)(output[_AKI]); + } + if (output[_SAK] != null) { + contents[_SAK] = (0, import_smithy_client.expectString)(output[_SAK]); + } + if (output[_STe] != null) { + contents[_STe] = (0, import_smithy_client.expectString)(output[_STe]); + } + if (output[_E] != null) { + contents[_E] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_E])); + } + return contents; +}, "de_Credentials"); +var de_DecodeAuthorizationMessageResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_DM] != null) { + contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]); + } + return contents; +}, "de_DecodeAuthorizationMessageResponse"); +var de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + } + return contents; +}, "de_ExpiredTokenException"); +var de_FederatedUser = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_FUI] != null) { + contents[_FUI] = (0, import_smithy_client.expectString)(output[_FUI]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); + } + return contents; +}, "de_FederatedUser"); +var de_GetAccessKeyInfoResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_Ac] != null) { + contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]); + } + return contents; +}, "de_GetAccessKeyInfoResponse"); +var de_GetCallerIdentityResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_UI] != null) { + contents[_UI] = (0, import_smithy_client.expectString)(output[_UI]); + } + if (output[_Ac] != null) { + contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); + } + return contents; +}, "de_GetCallerIdentityResponse"); +var de_GetFederationTokenResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_FU] != null) { + contents[_FU] = de_FederatedUser(output[_FU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); + } + return contents; +}, "de_GetFederationTokenResponse"); +var de_GetSessionTokenResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + return contents; +}, "de_GetSessionTokenResponse"); +var de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + } + return contents; +}, "de_IDPCommunicationErrorException"); +var de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + } + return contents; +}, "de_IDPRejectedClaimException"); +var de_InvalidAuthorizationMessageException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + } + return contents; +}, "de_InvalidAuthorizationMessageException"); +var de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + } + return contents; +}, "de_InvalidIdentityTokenException"); +var de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + } + return contents; +}, "de_MalformedPolicyDocumentException"); +var de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + } + return contents; +}, "de_PackedPolicyTooLargeException"); +var de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + } + return contents; +}, "de_RegionDisabledException"); +var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] +}), "deserializeMetadata"); +var throwDefaultError = (0, import_smithy_client.withBaseException)(STSServiceException); +var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers + }; + if (resolvedHostname !== void 0) { + contents.hostname = resolvedHostname; + } + if (body !== void 0) { + contents.body = body; + } + return new import_protocol_http.HttpRequest(contents); +}, "buildHttpRpcRequest"); +var SHARED_HEADERS = { + "content-type": "application/x-www-form-urlencoded" +}; +var _ = "2011-06-15"; +var _A = "Action"; +var _AKI = "AccessKeyId"; +var _AR = "AssumeRole"; +var _ARI = "AssumedRoleId"; +var _ARU = "AssumedRoleUser"; +var _ARWSAML = "AssumeRoleWithSAML"; +var _ARWWI = "AssumeRoleWithWebIdentity"; +var _Ac = "Account"; +var _Ar = "Arn"; +var _Au = "Audience"; +var _C = "Credentials"; +var _CA = "ContextAssertion"; +var _DAM = "DecodeAuthorizationMessage"; +var _DM = "DecodedMessage"; +var _DS = "DurationSeconds"; +var _E = "Expiration"; +var _EI = "ExternalId"; +var _EM = "EncodedMessage"; +var _FU = "FederatedUser"; +var _FUI = "FederatedUserId"; +var _GAKI = "GetAccessKeyInfo"; +var _GCI = "GetCallerIdentity"; +var _GFT = "GetFederationToken"; +var _GST = "GetSessionToken"; +var _I = "Issuer"; +var _K = "Key"; +var _N = "Name"; +var _NQ = "NameQualifier"; +var _P = "Policy"; +var _PA = "PolicyArns"; +var _PAr = "PrincipalArn"; +var _PAro = "ProviderArn"; +var _PC = "ProvidedContexts"; +var _PI = "ProviderId"; +var _PPS = "PackedPolicySize"; +var _Pr = "Provider"; +var _RA = "RoleArn"; +var _RSN = "RoleSessionName"; +var _S = "Subject"; +var _SAK = "SecretAccessKey"; +var _SAMLA = "SAMLAssertion"; +var _SFWIT = "SubjectFromWebIdentityToken"; +var _SI = "SourceIdentity"; +var _SN = "SerialNumber"; +var _ST = "SubjectType"; +var _STe = "SessionToken"; +var _T = "Tags"; +var _TC = "TokenCode"; +var _TTK = "TransitiveTagKeys"; +var _UI = "UserId"; +var _V = "Version"; +var _Va = "Value"; +var _WIT = "WebIdentityToken"; +var _a = "arn"; +var _m = "message"; +var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString"); +var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => { + var _a2; + if (((_a2 = data.Error) == null ? void 0 : _a2.Code) !== void 0) { + return data.Error.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } +}, "loadQueryErrorCode"); + +// src/commands/AssumeRoleCommand.ts +var _AssumeRoleCommand = class _AssumeRoleCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() { +}; +__name(_AssumeRoleCommand, "AssumeRoleCommand"); +var AssumeRoleCommand = _AssumeRoleCommand; + +// src/commands/AssumeRoleWithSAMLCommand.ts + + + + +var import_EndpointParameters2 = require("./endpoint/EndpointParameters"); +var _AssumeRoleWithSAMLCommand = class _AssumeRoleWithSAMLCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters2.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}).n("STSClient", "AssumeRoleWithSAMLCommand").f(AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog).ser(se_AssumeRoleWithSAMLCommand).de(de_AssumeRoleWithSAMLCommand).build() { +}; +__name(_AssumeRoleWithSAMLCommand, "AssumeRoleWithSAMLCommand"); +var AssumeRoleWithSAMLCommand = _AssumeRoleWithSAMLCommand; + +// src/commands/AssumeRoleWithWebIdentityCommand.ts + + + + +var import_EndpointParameters3 = require("./endpoint/EndpointParameters"); +var _AssumeRoleWithWebIdentityCommand = class _AssumeRoleWithWebIdentityCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters3.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() { +}; +__name(_AssumeRoleWithWebIdentityCommand, "AssumeRoleWithWebIdentityCommand"); +var AssumeRoleWithWebIdentityCommand = _AssumeRoleWithWebIdentityCommand; + +// src/commands/DecodeAuthorizationMessageCommand.ts + + + + +var import_EndpointParameters4 = require("./endpoint/EndpointParameters"); +var _DecodeAuthorizationMessageCommand = class _DecodeAuthorizationMessageCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters4.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}).n("STSClient", "DecodeAuthorizationMessageCommand").f(void 0, void 0).ser(se_DecodeAuthorizationMessageCommand).de(de_DecodeAuthorizationMessageCommand).build() { +}; +__name(_DecodeAuthorizationMessageCommand, "DecodeAuthorizationMessageCommand"); +var DecodeAuthorizationMessageCommand = _DecodeAuthorizationMessageCommand; + +// src/commands/GetAccessKeyInfoCommand.ts + + + + +var import_EndpointParameters5 = require("./endpoint/EndpointParameters"); +var _GetAccessKeyInfoCommand = class _GetAccessKeyInfoCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters5.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}).n("STSClient", "GetAccessKeyInfoCommand").f(void 0, void 0).ser(se_GetAccessKeyInfoCommand).de(de_GetAccessKeyInfoCommand).build() { +}; +__name(_GetAccessKeyInfoCommand, "GetAccessKeyInfoCommand"); +var GetAccessKeyInfoCommand = _GetAccessKeyInfoCommand; + +// src/commands/GetCallerIdentityCommand.ts + + + + +var import_EndpointParameters6 = require("./endpoint/EndpointParameters"); +var _GetCallerIdentityCommand = class _GetCallerIdentityCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters6.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}).n("STSClient", "GetCallerIdentityCommand").f(void 0, void 0).ser(se_GetCallerIdentityCommand).de(de_GetCallerIdentityCommand).build() { +}; +__name(_GetCallerIdentityCommand, "GetCallerIdentityCommand"); +var GetCallerIdentityCommand = _GetCallerIdentityCommand; + +// src/commands/GetFederationTokenCommand.ts + + + + +var import_EndpointParameters7 = require("./endpoint/EndpointParameters"); +var _GetFederationTokenCommand = class _GetFederationTokenCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters7.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}).n("STSClient", "GetFederationTokenCommand").f(void 0, GetFederationTokenResponseFilterSensitiveLog).ser(se_GetFederationTokenCommand).de(de_GetFederationTokenCommand).build() { +}; +__name(_GetFederationTokenCommand, "GetFederationTokenCommand"); +var GetFederationTokenCommand = _GetFederationTokenCommand; + +// src/commands/GetSessionTokenCommand.ts + + + + +var import_EndpointParameters8 = require("./endpoint/EndpointParameters"); +var _GetSessionTokenCommand = class _GetSessionTokenCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters8.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}).n("STSClient", "GetSessionTokenCommand").f(void 0, GetSessionTokenResponseFilterSensitiveLog).ser(se_GetSessionTokenCommand).de(de_GetSessionTokenCommand).build() { +}; +__name(_GetSessionTokenCommand, "GetSessionTokenCommand"); +var GetSessionTokenCommand = _GetSessionTokenCommand; + +// src/STS.ts +var import_STSClient = require("././STSClient"); +var commands = { + AssumeRoleCommand, + AssumeRoleWithSAMLCommand, + AssumeRoleWithWebIdentityCommand, + DecodeAuthorizationMessageCommand, + GetAccessKeyInfoCommand, + GetCallerIdentityCommand, + GetFederationTokenCommand, + GetSessionTokenCommand +}; +var _STS = class _STS extends import_STSClient.STSClient { +}; +__name(_STS, "STS"); +var STS = _STS; +(0, import_smithy_client.createAggregatedClient)(commands, STS); + +// src/index.ts +var import_EndpointParameters9 = require("./endpoint/EndpointParameters"); +var import_runtimeExtensions = require("././runtimeExtensions"); +var import_util_endpoints = require("@aws-sdk/util-endpoints"); + +// src/defaultStsRoleAssumers.ts +var ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; +var resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => { + var _a2; + const region = typeof _region === "function" ? await _region() : _region; + const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; + (_a2 = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _a2.call( + credentialProviderLogger, + "@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; +}, "resolveRegion"); +var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => { + let stsClient; + let closureSourceCreds; + return async (sourceCreds, params) => { + var _a2, _b, _c; + closureSourceCreds = sourceCreds; + if (!stsClient) { + const { + logger = (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.logger, + region, + requestHandler = (_b = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _b.requestHandler, + credentialProviderLogger + } = stsOptions; + const resolvedRegion = await resolveRegion( + region, + (_c = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _c.region, + credentialProviderLogger + ); + stsClient = new stsClientCtor({ + // A hack to make sts client uses the credential in current closure. + credentialDefaultProvider: () => async () => closureSourceCreds, + region: resolvedRegion, + requestHandler, + logger + }); + } + const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleCommand(params)); + if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); + } + return { + accessKeyId: Credentials2.AccessKeyId, + secretAccessKey: Credentials2.SecretAccessKey, + sessionToken: Credentials2.SessionToken, + expiration: Credentials2.Expiration, + // TODO(credentialScope): access normally when shape is updated. + credentialScope: Credentials2.CredentialScope + }; + }; +}, "getDefaultRoleAssumer"); +var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => { + let stsClient; + return async (params) => { + var _a2, _b, _c; + if (!stsClient) { + const { + logger = (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.logger, + region, + requestHandler = (_b = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _b.requestHandler, + credentialProviderLogger + } = stsOptions; + const resolvedRegion = await resolveRegion( + region, + (_c = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _c.region, + credentialProviderLogger + ); + stsClient = new stsClientCtor({ + region: resolvedRegion, + requestHandler, + logger + }); + } + const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); + if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); + } + return { + accessKeyId: Credentials2.AccessKeyId, + secretAccessKey: Credentials2.SecretAccessKey, + sessionToken: Credentials2.SessionToken, + expiration: Credentials2.Expiration, + // TODO(credentialScope): access normally when shape is updated. + credentialScope: Credentials2.CredentialScope + }; + }; +}, "getDefaultRoleAssumerWithWebIdentity"); + +// src/defaultRoleAssumers.ts +var import_STSClient2 = require("././STSClient"); +var getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => { + var _a2; + if (!customizations) + return baseCtor; + else + return _a2 = class extends baseCtor { + constructor(config) { + super(config); + for (const customization of customizations) { + this.middlewareStack.use(customization); + } + } + }, __name(_a2, "CustomizableSTSClient"), _a2; +}, "getCustomizableStsClientCtor"); +var getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumer"); +var getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumerWithWebIdentity"); +var decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({ + roleAssumer: getDefaultRoleAssumer2(input), + roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input), + ...input +}), "decorateDefaultCredentialProvider"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + STSServiceException, + __Client, + STSClient, + STS, + $Command, + AssumeRoleCommand, + AssumeRoleWithSAMLCommand, + AssumeRoleWithWebIdentityCommand, + DecodeAuthorizationMessageCommand, + GetAccessKeyInfoCommand, + GetCallerIdentityCommand, + GetFederationTokenCommand, + GetSessionTokenCommand, + ExpiredTokenException, + MalformedPolicyDocumentException, + PackedPolicyTooLargeException, + RegionDisabledException, + IDPRejectedClaimException, + InvalidIdentityTokenException, + IDPCommunicationErrorException, + InvalidAuthorizationMessageException, + CredentialsFilterSensitiveLog, + AssumeRoleResponseFilterSensitiveLog, + AssumeRoleWithSAMLRequestFilterSensitiveLog, + AssumeRoleWithSAMLResponseFilterSensitiveLog, + AssumeRoleWithWebIdentityRequestFilterSensitiveLog, + AssumeRoleWithWebIdentityResponseFilterSensitiveLog, + GetFederationTokenResponseFilterSensitiveLog, + GetSessionTokenResponseFilterSensitiveLog, + getDefaultRoleAssumer, + getDefaultRoleAssumerWithWebIdentity, + decorateDefaultCredentialProvider +}); + diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.browser.js b/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.browser.js new file mode 100644 index 0000000..39bd218 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.browser.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const tslib_1 = require("tslib"); +const package_json_1 = tslib_1.__importDefault(require("../package.json")); +const sha256_browser_1 = require("@aws-crypto/sha256-browser"); +const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser"); +const config_resolver_1 = require("@smithy/config-resolver"); +const fetch_http_handler_1 = require("@smithy/fetch-http-handler"); +const invalid_dependency_1 = require("@smithy/invalid-dependency"); +const util_body_length_browser_1 = require("@smithy/util-body-length-browser"); +const util_retry_1 = require("@smithy/util-retry"); +const runtimeConfig_shared_1 = require("./runtimeConfig.shared"); +const smithy_client_1 = require("@smithy/smithy-client"); +const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser"); +const getRuntimeConfig = (config) => { + const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"), + requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? sha256_browser_1.Sha256, + streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js b/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js new file mode 100644 index 0000000..9988dec --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js @@ -0,0 +1,63 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const tslib_1 = require("tslib"); +const package_json_1 = tslib_1.__importDefault(require("../package.json")); +const credentialDefaultProvider_1 = require("./credentialDefaultProvider"); +const core_1 = require("@aws-sdk/core"); +const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node"); +const config_resolver_1 = require("@smithy/config-resolver"); +const core_2 = require("@smithy/core"); +const hash_node_1 = require("@smithy/hash-node"); +const middleware_retry_1 = require("@smithy/middleware-retry"); +const node_config_provider_1 = require("@smithy/node-config-provider"); +const node_http_handler_1 = require("@smithy/node-http-handler"); +const util_body_length_node_1 = require("@smithy/util-body-length-node"); +const util_retry_1 = require("@smithy/util-retry"); +const runtimeConfig_shared_1 = require("./runtimeConfig.shared"); +const smithy_client_1 = require("@smithy/smithy-client"); +const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node"); +const smithy_client_2 = require("@smithy/smithy-client"); +const getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || + (async (idProps) => await (0, credentialDefaultProvider_1.defaultProvider)(idProps?.__config || {})()), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.native.js b/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.native.js new file mode 100644 index 0000000..34c5f8e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.native.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const sha256_js_1 = require("@aws-crypto/sha256-js"); +const runtimeConfig_browser_1 = require("./runtimeConfig.browser"); +const getRuntimeConfig = (config) => { + const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? sha256_js_1.Sha256, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js b/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js new file mode 100644 index 0000000..1e03d8b --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRuntimeConfig = void 0; +const core_1 = require("@aws-sdk/core"); +const core_2 = require("@smithy/core"); +const smithy_client_1 = require("@smithy/smithy-client"); +const url_parser_1 = require("@smithy/url-parser"); +const util_base64_1 = require("@smithy/util-base64"); +const util_utf8_1 = require("@smithy/util-utf8"); +const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider"); +const endpointResolver_1 = require("./endpoint/endpointResolver"); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2011-06-15", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "STS", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js b/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js new file mode 100644 index 0000000..0db48bb --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveRuntimeExtensions = void 0; +const region_config_resolver_1 = require("@aws-sdk/region-config-resolver"); +const protocol_http_1 = require("@smithy/protocol-http"); +const smithy_client_1 = require("@smithy/smithy-client"); +const httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration"); +const asPartial = (t) => t; +const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)), + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration), + }; +}; +exports.resolveRuntimeExtensions = resolveRuntimeExtensions; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/STS.js b/node_modules/@aws-sdk/client-sts/dist-es/STS.js new file mode 100644 index 0000000..67ad5c1 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/STS.js @@ -0,0 +1,23 @@ +import { createAggregatedClient } from "@smithy/smithy-client"; +import { AssumeRoleCommand } from "./commands/AssumeRoleCommand"; +import { AssumeRoleWithSAMLCommand, } from "./commands/AssumeRoleWithSAMLCommand"; +import { AssumeRoleWithWebIdentityCommand, } from "./commands/AssumeRoleWithWebIdentityCommand"; +import { DecodeAuthorizationMessageCommand, } from "./commands/DecodeAuthorizationMessageCommand"; +import { GetAccessKeyInfoCommand, } from "./commands/GetAccessKeyInfoCommand"; +import { GetCallerIdentityCommand, } from "./commands/GetCallerIdentityCommand"; +import { GetFederationTokenCommand, } from "./commands/GetFederationTokenCommand"; +import { GetSessionTokenCommand, } from "./commands/GetSessionTokenCommand"; +import { STSClient } from "./STSClient"; +const commands = { + AssumeRoleCommand, + AssumeRoleWithSAMLCommand, + AssumeRoleWithWebIdentityCommand, + DecodeAuthorizationMessageCommand, + GetAccessKeyInfoCommand, + GetCallerIdentityCommand, + GetFederationTokenCommand, + GetSessionTokenCommand, +}; +export class STS extends STSClient { +} +createAggregatedClient(commands, STS); diff --git a/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js b/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js new file mode 100644 index 0000000..19acf16 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js @@ -0,0 +1,52 @@ +import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent"; +import { resolveRegionConfig } from "@smithy/config-resolver"; +import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry"; +import { Client as __Client, } from "@smithy/smithy-client"; +import { defaultSTSHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider"; +import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions } from "./runtimeExtensions"; +export { __Client }; +export class STSClient extends __Client { + constructor(...[configuration]) { + const _config_0 = __getRuntimeConfig(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveRegionConfig(_config_1); + const _config_3 = resolveEndpointConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider(), + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + getDefaultHttpAuthSchemeParametersProvider() { + return defaultSTSHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }); + } +} diff --git a/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js b/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js new file mode 100644 index 0000000..2ba1d48 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthExtensionConfiguration.js @@ -0,0 +1,38 @@ +export const getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } + else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + }, + }; +}; +export const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js b/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js new file mode 100644 index 0000000..1c33003 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/auth/httpAuthSchemeProvider.js @@ -0,0 +1,60 @@ +import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core"; +import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware"; +import { STSClient } from "../STSClient"; +export const defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: getSmithyContext(context).operation, + region: (await normalizeProvider(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sts", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +export const defaultSTSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "AssumeRoleWithSAML": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "AssumeRoleWithWebIdentity": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +export const resolveStsAuthConfig = (input) => ({ + ...input, + stsClientCtor: STSClient, +}); +export const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveStsAuthConfig(config); + const config_1 = resolveAwsSdkSigV4Config(config_0); + return { + ...config_1, + }; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js b/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js new file mode 100644 index 0000000..1dce585 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { AssumeRoleResponseFilterSensitiveLog } from "../models/models_0"; +import { de_AssumeRoleCommand, se_AssumeRoleCommand } from "../protocols/Aws_query"; +export { $Command }; +export class AssumeRoleCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}) + .n("STSClient", "AssumeRoleCommand") + .f(void 0, AssumeRoleResponseFilterSensitiveLog) + .ser(se_AssumeRoleCommand) + .de(de_AssumeRoleCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js b/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js new file mode 100644 index 0000000..1c4c04b --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_AssumeRoleWithSAMLCommand, se_AssumeRoleWithSAMLCommand } from "../protocols/Aws_query"; +export { $Command }; +export class AssumeRoleWithSAMLCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}) + .n("STSClient", "AssumeRoleWithSAMLCommand") + .f(AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog) + .ser(se_AssumeRoleWithSAMLCommand) + .de(de_AssumeRoleWithSAMLCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js b/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js new file mode 100644 index 0000000..ed43768 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_AssumeRoleWithWebIdentityCommand, se_AssumeRoleWithWebIdentityCommand } from "../protocols/Aws_query"; +export { $Command }; +export class AssumeRoleWithWebIdentityCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}) + .n("STSClient", "AssumeRoleWithWebIdentityCommand") + .f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog) + .ser(se_AssumeRoleWithWebIdentityCommand) + .de(de_AssumeRoleWithWebIdentityCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js b/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js new file mode 100644 index 0000000..d3bf338 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_DecodeAuthorizationMessageCommand, se_DecodeAuthorizationMessageCommand } from "../protocols/Aws_query"; +export { $Command }; +export class DecodeAuthorizationMessageCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}) + .n("STSClient", "DecodeAuthorizationMessageCommand") + .f(void 0, void 0) + .ser(se_DecodeAuthorizationMessageCommand) + .de(de_DecodeAuthorizationMessageCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js b/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js new file mode 100644 index 0000000..afe6eb8 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_GetAccessKeyInfoCommand, se_GetAccessKeyInfoCommand } from "../protocols/Aws_query"; +export { $Command }; +export class GetAccessKeyInfoCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}) + .n("STSClient", "GetAccessKeyInfoCommand") + .f(void 0, void 0) + .ser(se_GetAccessKeyInfoCommand) + .de(de_GetAccessKeyInfoCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js b/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js new file mode 100644 index 0000000..cf1c2b2 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js @@ -0,0 +1,24 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { de_GetCallerIdentityCommand, se_GetCallerIdentityCommand } from "../protocols/Aws_query"; +export { $Command }; +export class GetCallerIdentityCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}) + .n("STSClient", "GetCallerIdentityCommand") + .f(void 0, void 0) + .ser(se_GetCallerIdentityCommand) + .de(de_GetCallerIdentityCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js b/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js new file mode 100644 index 0000000..88aae68 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetFederationTokenResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_GetFederationTokenCommand, se_GetFederationTokenCommand } from "../protocols/Aws_query"; +export { $Command }; +export class GetFederationTokenCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}) + .n("STSClient", "GetFederationTokenCommand") + .f(void 0, GetFederationTokenResponseFilterSensitiveLog) + .ser(se_GetFederationTokenCommand) + .de(de_GetFederationTokenCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js b/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js new file mode 100644 index 0000000..5d86ebb --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js @@ -0,0 +1,25 @@ +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetSessionTokenResponseFilterSensitiveLog, } from "../models/models_0"; +import { de_GetSessionTokenCommand, se_GetSessionTokenCommand } from "../protocols/Aws_query"; +export { $Command }; +export class GetSessionTokenCommand extends $Command + .classBuilder() + .ep({ + ...commonParams, +}) + .m(function (Command, cs, config, o) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}) + .n("STSClient", "GetSessionTokenCommand") + .f(void 0, GetSessionTokenResponseFilterSensitiveLog) + .ser(se_GetSessionTokenCommand) + .de(de_GetSessionTokenCommand) + .build() { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js b/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js new file mode 100644 index 0000000..802202f --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/commands/index.js @@ -0,0 +1,8 @@ +export * from "./AssumeRoleCommand"; +export * from "./AssumeRoleWithSAMLCommand"; +export * from "./AssumeRoleWithWebIdentityCommand"; +export * from "./DecodeAuthorizationMessageCommand"; +export * from "./GetAccessKeyInfoCommand"; +export * from "./GetCallerIdentityCommand"; +export * from "./GetFederationTokenCommand"; +export * from "./GetSessionTokenCommand"; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/credentialDefaultProvider.js b/node_modules/@aws-sdk/client-sts/dist-es/credentialDefaultProvider.js new file mode 100644 index 0000000..47da3b5 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/credentialDefaultProvider.js @@ -0,0 +1,3 @@ +export const defaultProvider = ((input) => { + return () => import("@aws-sdk/credential-provider-node").then(({ defaultProvider }) => defaultProvider(input)()); +}); diff --git a/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js b/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js new file mode 100644 index 0000000..aafb8c4 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/defaultRoleAssumers.js @@ -0,0 +1,22 @@ +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, +}); diff --git a/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js b/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js new file mode 100644 index 0000000..563c1db --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js @@ -0,0 +1,67 @@ +import { AssumeRoleCommand } from "./commands/AssumeRoleCommand"; +import { AssumeRoleWithWebIdentityCommand, } from "./commands/AssumeRoleWithWebIdentityCommand"; +const ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; +const resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => { + 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; +}; +export const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => { + let stsClient; + let closureSourceCreds; + 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); + stsClient = new stsClientCtor({ + credentialDefaultProvider: () => async () => closureSourceCreds, + region: resolvedRegion, + requestHandler: requestHandler, + logger: logger, + }); + } + const { Credentials } = await stsClient.send(new AssumeRoleCommand(params)); + if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); + } + return { + accessKeyId: Credentials.AccessKeyId, + secretAccessKey: Credentials.SecretAccessKey, + sessionToken: Credentials.SessionToken, + expiration: Credentials.Expiration, + credentialScope: Credentials.CredentialScope, + }; + }; +}; +export const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => { + 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); + stsClient = new stsClientCtor({ + region: resolvedRegion, + requestHandler: requestHandler, + logger: logger, + }); + } + const { Credentials } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); + if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); + } + return { + accessKeyId: Credentials.AccessKeyId, + secretAccessKey: Credentials.SecretAccessKey, + sessionToken: Credentials.SessionToken, + expiration: Credentials.Expiration, + credentialScope: Credentials.CredentialScope, + }; + }; +}; +export const decorateDefaultCredentialProvider = (provider) => (input) => provider({ + roleAssumer: getDefaultRoleAssumer(input, input.stsClientCtor), + roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input, input.stsClientCtor), + ...input, +}); diff --git a/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js b/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js new file mode 100644 index 0000000..7f41cc7 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/endpoint/EndpointParameters.js @@ -0,0 +1,16 @@ +export const resolveClientEndpointParameters = (options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + defaultSigningName: "sts", + }; +}; +export const commonParams = { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js b/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js new file mode 100644 index 0000000..5c35926 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js @@ -0,0 +1,8 @@ +import { resolveEndpoint } from "@smithy/util-endpoints"; +import { ruleSet } from "./ruleset"; +export const defaultEndpointResolver = (endpointParams, context = {}) => { + return resolveEndpoint(ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js b/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js new file mode 100644 index 0000000..99a438a --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/endpoint/ruleset.js @@ -0,0 +1,4 @@ +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 _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 }] }; +export const ruleSet = _data; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/extensionConfiguration.js b/node_modules/@aws-sdk/client-sts/dist-es/extensionConfiguration.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/extensionConfiguration.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/index.js b/node_modules/@aws-sdk/client-sts/dist-es/index.js new file mode 100644 index 0000000..dade617 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/index.js @@ -0,0 +1,7 @@ +export * from "./STSClient"; +export * from "./STS"; +export * from "./commands"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export * from "./defaultRoleAssumers"; +export { STSServiceException } from "./models/STSServiceException"; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js b/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js new file mode 100644 index 0000000..6d2963c --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/models/STSServiceException.js @@ -0,0 +1,8 @@ +import { ServiceException as __ServiceException, } from "@smithy/smithy-client"; +export { __ServiceException }; +export class STSServiceException extends __ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, STSServiceException.prototype); + } +} diff --git a/node_modules/@aws-sdk/client-sts/dist-es/models/index.js b/node_modules/@aws-sdk/client-sts/dist-es/models/index.js new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/models/index.js @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js b/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js new file mode 100644 index 0000000..79ff9af --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js @@ -0,0 +1,130 @@ +import { SENSITIVE_STRING } from "@smithy/smithy-client"; +import { STSServiceException as __BaseException } from "./STSServiceException"; +export class ExpiredTokenException extends __BaseException { + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts, + }); + this.name = "ExpiredTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, ExpiredTokenException.prototype); + } +} +export class MalformedPolicyDocumentException extends __BaseException { + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts, + }); + this.name = "MalformedPolicyDocumentException"; + this.$fault = "client"; + Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype); + } +} +export class PackedPolicyTooLargeException extends __BaseException { + constructor(opts) { + super({ + name: "PackedPolicyTooLargeException", + $fault: "client", + ...opts, + }); + this.name = "PackedPolicyTooLargeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype); + } +} +export class RegionDisabledException extends __BaseException { + constructor(opts) { + super({ + name: "RegionDisabledException", + $fault: "client", + ...opts, + }); + this.name = "RegionDisabledException"; + this.$fault = "client"; + Object.setPrototypeOf(this, RegionDisabledException.prototype); + } +} +export class IDPRejectedClaimException extends __BaseException { + constructor(opts) { + super({ + name: "IDPRejectedClaimException", + $fault: "client", + ...opts, + }); + this.name = "IDPRejectedClaimException"; + this.$fault = "client"; + Object.setPrototypeOf(this, IDPRejectedClaimException.prototype); + } +} +export class InvalidIdentityTokenException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidIdentityTokenException", + $fault: "client", + ...opts, + }); + this.name = "InvalidIdentityTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype); + } +} +export class IDPCommunicationErrorException extends __BaseException { + constructor(opts) { + super({ + name: "IDPCommunicationErrorException", + $fault: "client", + ...opts, + }); + this.name = "IDPCommunicationErrorException"; + this.$fault = "client"; + Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype); + } +} +export class InvalidAuthorizationMessageException extends __BaseException { + constructor(opts) { + super({ + name: "InvalidAuthorizationMessageException", + $fault: "client", + ...opts, + }); + this.name = "InvalidAuthorizationMessageException"; + this.$fault = "client"; + Object.setPrototypeOf(this, InvalidAuthorizationMessageException.prototype); + } +} +export const CredentialsFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.SecretAccessKey && { SecretAccessKey: SENSITIVE_STRING }), +}); +export const AssumeRoleResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }), +}); +export const AssumeRoleWithSAMLRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.SAMLAssertion && { SAMLAssertion: SENSITIVE_STRING }), +}); +export const AssumeRoleWithSAMLResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }), +}); +export const AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.WebIdentityToken && { WebIdentityToken: SENSITIVE_STRING }), +}); +export const AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }), +}); +export const GetFederationTokenResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }), +}); +export const GetSessionTokenResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }), +}); diff --git a/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js b/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js new file mode 100644 index 0000000..27709c5 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js @@ -0,0 +1,885 @@ +import { parseXmlBody as parseBody, parseXmlErrorBody as parseErrorBody } from "@aws-sdk/core"; +import { HttpRequest as __HttpRequest } from "@smithy/protocol-http"; +import { collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, withBaseException, } from "@smithy/smithy-client"; +import { ExpiredTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidAuthorizationMessageException, InvalidIdentityTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, } from "../models/models_0"; +import { STSServiceException as __BaseException } from "../models/STSServiceException"; +export const se_AssumeRoleCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleRequest(input, context), + [_A]: _AR, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_AssumeRoleWithSAMLCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithSAMLRequest(input, context), + [_A]: _ARWSAML, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_AssumeRoleWithWebIdentityCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithWebIdentityRequest(input, context), + [_A]: _ARWWI, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_DecodeAuthorizationMessageCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_DecodeAuthorizationMessageRequest(input, context), + [_A]: _DAM, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_GetAccessKeyInfoCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetAccessKeyInfoRequest(input, context), + [_A]: _GAKI, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_GetCallerIdentityCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetCallerIdentityRequest(input, context), + [_A]: _GCI, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_GetFederationTokenCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetFederationTokenRequest(input, context), + [_A]: _GFT, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const se_GetSessionTokenCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetSessionTokenRequest(input, context), + [_A]: _GST, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +export const de_AssumeRoleCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_AssumeRoleResponse(data.AssumeRoleResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_AssumeRoleWithSAMLCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_AssumeRoleWithWebIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_DecodeAuthorizationMessageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_GetAccessKeyInfoCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_GetCallerIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_GetFederationTokenCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +export const de_GetSessionTokenCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_CommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ExpiredTokenException": + case "com.amazonaws.sts#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "MalformedPolicyDocument": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PackedPolicyTooLarge": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + throw await de_RegionDisabledExceptionRes(parsedOutput, context); + case "IDPRejectedClaim": + case "com.amazonaws.sts#IDPRejectedClaimException": + throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); + case "InvalidIdentityToken": + case "com.amazonaws.sts#InvalidIdentityTokenException": + throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); + case "IDPCommunicationError": + case "com.amazonaws.sts#IDPCommunicationErrorException": + throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context); + case "InvalidAuthorizationMessageException": + case "com.amazonaws.sts#InvalidAuthorizationMessageException": + throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; +const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_ExpiredTokenException(body.Error, context); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPCommunicationErrorException(body.Error, context); + const exception = new IDPCommunicationErrorException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPRejectedClaimException(body.Error, context); + const exception = new IDPRejectedClaimException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_InvalidAuthorizationMessageExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_InvalidAuthorizationMessageException(body.Error, context); + const exception = new InvalidAuthorizationMessageException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_InvalidIdentityTokenException(body.Error, context); + const exception = new InvalidIdentityTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_MalformedPolicyDocumentException(body.Error, context); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_PackedPolicyTooLargeException(body.Error, context); + const exception = new PackedPolicyTooLargeException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const de_RegionDisabledExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_RegionDisabledException(body.Error, context); + const exception = new RegionDisabledException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; +const se_AssumeRoleRequest = (input, context) => { + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (input[_T]?.length === 0) { + entries.Tags = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input[_TTK] != null) { + const memberEntries = se_tagKeyListType(input[_TTK], context); + if (input[_TTK]?.length === 0) { + entries.TransitiveTagKeys = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TransitiveTagKeys.${key}`; + entries[loc] = value; + }); + } + if (input[_EI] != null) { + entries[_EI] = input[_EI]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + if (input[_SI] != null) { + entries[_SI] = input[_SI]; + } + if (input[_PC] != null) { + const memberEntries = se_ProvidedContextsListType(input[_PC], context); + if (input[_PC]?.length === 0) { + entries.ProvidedContexts = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); + } + return entries; +}; +const se_AssumeRoleWithSAMLRequest = (input, context) => { + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_PAr] != null) { + entries[_PAr] = input[_PAr]; + } + if (input[_SAMLA] != null) { + entries[_SAMLA] = input[_SAMLA]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; +}; +const se_AssumeRoleWithWebIdentityRequest = (input, context) => { + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_WIT] != null) { + entries[_WIT] = input[_WIT]; + } + if (input[_PI] != null) { + entries[_PI] = input[_PI]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; +}; +const se_DecodeAuthorizationMessageRequest = (input, context) => { + const entries = {}; + if (input[_EM] != null) { + entries[_EM] = input[_EM]; + } + return entries; +}; +const se_GetAccessKeyInfoRequest = (input, context) => { + const entries = {}; + if (input[_AKI] != null) { + entries[_AKI] = input[_AKI]; + } + return entries; +}; +const se_GetCallerIdentityRequest = (input, context) => { + const entries = {}; + return entries; +}; +const se_GetFederationTokenRequest = (input, context) => { + const entries = {}; + if (input[_N] != null) { + entries[_N] = input[_N]; + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (input[_T]?.length === 0) { + entries.Tags = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + return entries; +}; +const se_GetSessionTokenRequest = (input, context) => { + const entries = {}; + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + return entries; +}; +const se_policyDescriptorListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_PolicyDescriptorType(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const se_PolicyDescriptorType = (input, context) => { + const entries = {}; + if (input[_a] != null) { + entries[_a] = input[_a]; + } + return entries; +}; +const se_ProvidedContext = (input, context) => { + const entries = {}; + if (input[_PAro] != null) { + entries[_PAro] = input[_PAro]; + } + if (input[_CA] != null) { + entries[_CA] = input[_CA]; + } + return entries; +}; +const se_ProvidedContextsListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ProvidedContext(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const se_Tag = (input, context) => { + const entries = {}; + if (input[_K] != null) { + entries[_K] = input[_K]; + } + if (input[_Va] != null) { + entries[_Va] = input[_Va]; + } + return entries; +}; +const se_tagKeyListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const se_tagListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_Tag(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const de_AssumedRoleUser = (output, context) => { + const contents = {}; + if (output[_ARI] != null) { + contents[_ARI] = __expectString(output[_ARI]); + } + if (output[_Ar] != null) { + contents[_Ar] = __expectString(output[_Ar]); + } + return contents; +}; +const de_AssumeRoleResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = __strictParseInt32(output[_PPS]); + } + if (output[_SI] != null) { + contents[_SI] = __expectString(output[_SI]); + } + return contents; +}; +const de_AssumeRoleWithSAMLResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = __strictParseInt32(output[_PPS]); + } + if (output[_S] != null) { + contents[_S] = __expectString(output[_S]); + } + if (output[_ST] != null) { + contents[_ST] = __expectString(output[_ST]); + } + if (output[_I] != null) { + contents[_I] = __expectString(output[_I]); + } + if (output[_Au] != null) { + contents[_Au] = __expectString(output[_Au]); + } + if (output[_NQ] != null) { + contents[_NQ] = __expectString(output[_NQ]); + } + if (output[_SI] != null) { + contents[_SI] = __expectString(output[_SI]); + } + return contents; +}; +const de_AssumeRoleWithWebIdentityResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_SFWIT] != null) { + contents[_SFWIT] = __expectString(output[_SFWIT]); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = __strictParseInt32(output[_PPS]); + } + if (output[_Pr] != null) { + contents[_Pr] = __expectString(output[_Pr]); + } + if (output[_Au] != null) { + contents[_Au] = __expectString(output[_Au]); + } + if (output[_SI] != null) { + contents[_SI] = __expectString(output[_SI]); + } + return contents; +}; +const de_Credentials = (output, context) => { + const contents = {}; + if (output[_AKI] != null) { + contents[_AKI] = __expectString(output[_AKI]); + } + if (output[_SAK] != null) { + contents[_SAK] = __expectString(output[_SAK]); + } + if (output[_STe] != null) { + contents[_STe] = __expectString(output[_STe]); + } + if (output[_E] != null) { + contents[_E] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_E])); + } + return contents; +}; +const de_DecodeAuthorizationMessageResponse = (output, context) => { + const contents = {}; + if (output[_DM] != null) { + contents[_DM] = __expectString(output[_DM]); + } + return contents; +}; +const de_ExpiredTokenException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = __expectString(output[_m]); + } + return contents; +}; +const de_FederatedUser = (output, context) => { + const contents = {}; + if (output[_FUI] != null) { + contents[_FUI] = __expectString(output[_FUI]); + } + if (output[_Ar] != null) { + contents[_Ar] = __expectString(output[_Ar]); + } + return contents; +}; +const de_GetAccessKeyInfoResponse = (output, context) => { + const contents = {}; + if (output[_Ac] != null) { + contents[_Ac] = __expectString(output[_Ac]); + } + return contents; +}; +const de_GetCallerIdentityResponse = (output, context) => { + const contents = {}; + if (output[_UI] != null) { + contents[_UI] = __expectString(output[_UI]); + } + if (output[_Ac] != null) { + contents[_Ac] = __expectString(output[_Ac]); + } + if (output[_Ar] != null) { + contents[_Ar] = __expectString(output[_Ar]); + } + return contents; +}; +const de_GetFederationTokenResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_FU] != null) { + contents[_FU] = de_FederatedUser(output[_FU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = __strictParseInt32(output[_PPS]); + } + return contents; +}; +const de_GetSessionTokenResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + return contents; +}; +const de_IDPCommunicationErrorException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = __expectString(output[_m]); + } + return contents; +}; +const de_IDPRejectedClaimException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = __expectString(output[_m]); + } + return contents; +}; +const de_InvalidAuthorizationMessageException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = __expectString(output[_m]); + } + return contents; +}; +const de_InvalidIdentityTokenException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = __expectString(output[_m]); + } + return contents; +}; +const de_MalformedPolicyDocumentException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = __expectString(output[_m]); + } + return contents; +}; +const de_PackedPolicyTooLargeException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = __expectString(output[_m]); + } + return contents; +}; +const de_RegionDisabledException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = __expectString(output[_m]); + } + return contents; +}; +const deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); +const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); +const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new __HttpRequest(contents); +}; +const SHARED_HEADERS = { + "content-type": "application/x-www-form-urlencoded", +}; +const _ = "2011-06-15"; +const _A = "Action"; +const _AKI = "AccessKeyId"; +const _AR = "AssumeRole"; +const _ARI = "AssumedRoleId"; +const _ARU = "AssumedRoleUser"; +const _ARWSAML = "AssumeRoleWithSAML"; +const _ARWWI = "AssumeRoleWithWebIdentity"; +const _Ac = "Account"; +const _Ar = "Arn"; +const _Au = "Audience"; +const _C = "Credentials"; +const _CA = "ContextAssertion"; +const _DAM = "DecodeAuthorizationMessage"; +const _DM = "DecodedMessage"; +const _DS = "DurationSeconds"; +const _E = "Expiration"; +const _EI = "ExternalId"; +const _EM = "EncodedMessage"; +const _FU = "FederatedUser"; +const _FUI = "FederatedUserId"; +const _GAKI = "GetAccessKeyInfo"; +const _GCI = "GetCallerIdentity"; +const _GFT = "GetFederationToken"; +const _GST = "GetSessionToken"; +const _I = "Issuer"; +const _K = "Key"; +const _N = "Name"; +const _NQ = "NameQualifier"; +const _P = "Policy"; +const _PA = "PolicyArns"; +const _PAr = "PrincipalArn"; +const _PAro = "ProviderArn"; +const _PC = "ProvidedContexts"; +const _PI = "ProviderId"; +const _PPS = "PackedPolicySize"; +const _Pr = "Provider"; +const _RA = "RoleArn"; +const _RSN = "RoleSessionName"; +const _S = "Subject"; +const _SAK = "SecretAccessKey"; +const _SAMLA = "SAMLAssertion"; +const _SFWIT = "SubjectFromWebIdentityToken"; +const _SI = "SourceIdentity"; +const _SN = "SerialNumber"; +const _ST = "SubjectType"; +const _STe = "SessionToken"; +const _T = "Tags"; +const _TC = "TokenCode"; +const _TTK = "TransitiveTagKeys"; +const _UI = "UserId"; +const _V = "Version"; +const _Va = "Value"; +const _WIT = "WebIdentityToken"; +const _a = "arn"; +const _m = "message"; +const buildFormUrlencodedString = (formEntries) => Object.entries(formEntries) + .map(([key, value]) => __extendedEncodeURIComponent(key) + "=" + __extendedEncodeURIComponent(value)) + .join("&"); +const loadQueryErrorCode = (output, data) => { + if (data.Error?.Code !== undefined) { + return data.Error.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.browser.js b/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.browser.js new file mode 100644 index 0000000..bad1f85 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.browser.js @@ -0,0 +1,34 @@ +import packageInfo from "../package.json"; +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; +import { invalidProvider } from "@smithy/invalid-dependency"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser"; +export const getRuntimeConfig = (config) => { + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js b/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js new file mode 100644 index 0000000..48a0a09 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js @@ -0,0 +1,58 @@ +import packageInfo from "../package.json"; +import { defaultProvider as credentialDefaultProvider } from "./credentialDefaultProvider"; +import { AwsSdkSigV4Signer, emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver"; +import { NoAuthSigner } from "@smithy/core"; +import { Hash } from "@smithy/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; +import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler"; +import { calculateBodyLength } from "@smithy/util-body-length-node"; +import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node"; +import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client"; +export const getRuntimeConfig = (config) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + awsCheckVersion(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || + (async (idProps) => await credentialDefaultProvider(idProps?.__config || {})()), + signer: new AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner(), + }, + ], + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + loadNodeConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.native.js b/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.native.js new file mode 100644 index 0000000..0b54695 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.native.js @@ -0,0 +1,11 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; +export const getRuntimeConfig = (config) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js b/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js new file mode 100644 index 0000000..5c6df20 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.shared.js @@ -0,0 +1,36 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { NoOpLogger } from "@smithy/smithy-client"; +import { parseUrl } from "@smithy/url-parser"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; +import { defaultSTSHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider"; +import { defaultEndpointResolver } from "./endpoint/endpointResolver"; +export const getRuntimeConfig = (config) => { + return { + apiVersion: "2011-06-15", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner(), + }, + ], + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "STS", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js b/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js new file mode 100644 index 0000000..1502ff7 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-es/runtimeExtensions.js @@ -0,0 +1,21 @@ +import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver"; +import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http"; +import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client"; +import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration"; +const asPartial = (t) => t; +export const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), + ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)), + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), + ...resolveDefaultRuntimeConfig(extensionConfiguration), + ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration), + }; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/STS.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/STS.d.ts new file mode 100644 index 0000000..165143a --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/STS.d.ts @@ -0,0 +1,71 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; +import { AssumeRoleCommandInput, AssumeRoleCommandOutput } from "./commands/AssumeRoleCommand"; +import { AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput } from "./commands/AssumeRoleWithSAMLCommand"; +import { AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput } from "./commands/AssumeRoleWithWebIdentityCommand"; +import { DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput } from "./commands/DecodeAuthorizationMessageCommand"; +import { GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput } from "./commands/GetAccessKeyInfoCommand"; +import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from "./commands/GetCallerIdentityCommand"; +import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "./commands/GetFederationTokenCommand"; +import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "./commands/GetSessionTokenCommand"; +import { STSClient } from "./STSClient"; +export interface STS { + /** + * @see {@link AssumeRoleCommand} + */ + assumeRole(args: AssumeRoleCommandInput, options?: __HttpHandlerOptions): Promise; + assumeRole(args: AssumeRoleCommandInput, cb: (err: any, data?: AssumeRoleCommandOutput) => void): void; + assumeRole(args: AssumeRoleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AssumeRoleCommandOutput) => void): void; + /** + * @see {@link AssumeRoleWithSAMLCommand} + */ + assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, options?: __HttpHandlerOptions): Promise; + assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, cb: (err: any, data?: AssumeRoleWithSAMLCommandOutput) => void): void; + assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AssumeRoleWithSAMLCommandOutput) => void): void; + /** + * @see {@link AssumeRoleWithWebIdentityCommand} + */ + assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, options?: __HttpHandlerOptions): Promise; + assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, cb: (err: any, data?: AssumeRoleWithWebIdentityCommandOutput) => void): void; + assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AssumeRoleWithWebIdentityCommandOutput) => void): void; + /** + * @see {@link DecodeAuthorizationMessageCommand} + */ + decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, options?: __HttpHandlerOptions): Promise; + decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, cb: (err: any, data?: DecodeAuthorizationMessageCommandOutput) => void): void; + decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DecodeAuthorizationMessageCommandOutput) => void): void; + /** + * @see {@link GetAccessKeyInfoCommand} + */ + getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, options?: __HttpHandlerOptions): Promise; + getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, cb: (err: any, data?: GetAccessKeyInfoCommandOutput) => void): void; + getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAccessKeyInfoCommandOutput) => void): void; + /** + * @see {@link GetCallerIdentityCommand} + */ + getCallerIdentity(): Promise; + getCallerIdentity(args: GetCallerIdentityCommandInput, options?: __HttpHandlerOptions): Promise; + getCallerIdentity(args: GetCallerIdentityCommandInput, cb: (err: any, data?: GetCallerIdentityCommandOutput) => void): void; + getCallerIdentity(args: GetCallerIdentityCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetCallerIdentityCommandOutput) => void): void; + /** + * @see {@link GetFederationTokenCommand} + */ + getFederationToken(args: GetFederationTokenCommandInput, options?: __HttpHandlerOptions): Promise; + getFederationToken(args: GetFederationTokenCommandInput, cb: (err: any, data?: GetFederationTokenCommandOutput) => void): void; + getFederationToken(args: GetFederationTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetFederationTokenCommandOutput) => void): void; + /** + * @see {@link GetSessionTokenCommand} + */ + getSessionToken(): Promise; + getSessionToken(args: GetSessionTokenCommandInput, options?: __HttpHandlerOptions): Promise; + getSessionToken(args: GetSessionTokenCommandInput, cb: (err: any, data?: GetSessionTokenCommandOutput) => void): void; + getSessionToken(args: GetSessionTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSessionTokenCommandOutput) => void): void; +} +/** + * Security Token Service + *

Security Token Service (STS) enables you to request temporary, limited-privilege + * credentials for users. This guide provides descriptions of the STS API. For + * more information about using this service, see Temporary Security Credentials.

+ * @public + */ +export declare class STS extends STSClient implements STS { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts new file mode 100644 index 0000000..8f7cef2 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts @@ -0,0 +1,182 @@ +import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header"; +import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent"; +import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver"; +import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint"; +import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client"; +import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types"; +import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider"; +import { AssumeRoleCommandInput, AssumeRoleCommandOutput } from "./commands/AssumeRoleCommand"; +import { AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput } from "./commands/AssumeRoleWithSAMLCommand"; +import { AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput } from "./commands/AssumeRoleWithWebIdentityCommand"; +import { DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput } from "./commands/DecodeAuthorizationMessageCommand"; +import { GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput } from "./commands/GetAccessKeyInfoCommand"; +import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from "./commands/GetCallerIdentityCommand"; +import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "./commands/GetFederationTokenCommand"; +import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "./commands/GetSessionTokenCommand"; +import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters"; +import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; +export { __Client }; +/** + * @public + */ +export type ServiceInputTypes = AssumeRoleCommandInput | AssumeRoleWithSAMLCommandInput | AssumeRoleWithWebIdentityCommandInput | DecodeAuthorizationMessageCommandInput | GetAccessKeyInfoCommandInput | GetCallerIdentityCommandInput | GetFederationTokenCommandInput | GetSessionTokenCommandInput; +/** + * @public + */ +export type ServiceOutputTypes = AssumeRoleCommandOutput | AssumeRoleWithSAMLCommandOutput | AssumeRoleWithWebIdentityCommandOutput | DecodeAuthorizationMessageCommandOutput | GetAccessKeyInfoCommandOutput | GetCallerIdentityCommandOutput | GetFederationTokenCommandOutput | GetSessionTokenCommandOutput; +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandlerUserInput; + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + /** + * The runtime environment. + * @internal + */ + runtime?: string; + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + /** + * Default credentials provider; Not available in browser runtime. + * @deprecated + * @internal + */ + credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider; + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + /** + * Specifies which retry algorithm to use. + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ + * + */ + retryMode?: string | __Provider; + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + /** + * Optional extensions + */ + extensions?: RuntimeExtension[]; + /** + * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. + */ + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} +/** + * @public + */ +export type STSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig & RetryInputConfig & HostHeaderInputConfig & UserAgentInputConfig & HttpAuthSchemeInputConfig & ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of STSClient class constructor that set the region, credentials and other options. + */ +export interface STSClientConfig extends STSClientConfigType { +} +/** + * @public + */ +export type STSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & UserAgentResolvedConfig & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of STSClient class. This is resolved and normalized from the {@link STSClientConfig | constructor configuration interface}. + */ +export interface STSClientResolvedConfig extends STSClientResolvedConfigType { +} +/** + * Security Token Service + *

Security Token Service (STS) enables you to request temporary, limited-privilege + * credentials for users. This guide provides descriptions of the STS API. For + * more information about using this service, see Temporary Security Credentials.

+ * @public + */ +export declare class STSClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig> { + /** + * The resolved configuration of STSClient class. This is resolved and normalized from the {@link STSClientConfig | constructor configuration interface}. + */ + readonly config: STSClientResolvedConfig; + constructor(...[configuration]: __CheckOptionalClientConfig); + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void; + private getDefaultHttpAuthSchemeParametersProvider; + private getIdentityProviderConfigProvider; +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthExtensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthExtensionConfiguration.d.ts new file mode 100644 index 0000000..1066c88 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthExtensionConfiguration.d.ts @@ -0,0 +1,29 @@ +import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types"; +import { STSHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; +/** + * @internal + */ +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider(httpAuthSchemeProvider: STSHttpAuthSchemeProvider): void; + httpAuthSchemeProvider(): STSHttpAuthSchemeProvider; + setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void; + credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined; +} +/** + * @internal + */ +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: STSHttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; +/** + * @internal + */ +export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration; +/** + * @internal + */ +export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts new file mode 100644 index 0000000..2419803 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts @@ -0,0 +1,71 @@ +import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core"; +import { Client, HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types"; +import { STSClientResolvedConfig } from "../STSClient"; +/** + * @internal + */ +export interface STSHttpAuthSchemeParameters extends HttpAuthSchemeParameters { + region?: string; +} +/** + * @internal + */ +export interface STSHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider { +} +/** + * @internal + */ +export declare const defaultSTSHttpAuthSchemeParametersProvider: (config: STSClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise; +/** + * @internal + */ +export interface STSHttpAuthSchemeProvider extends HttpAuthSchemeProvider { +} +/** + * @internal + */ +export declare const defaultSTSHttpAuthSchemeProvider: STSHttpAuthSchemeProvider; +export interface StsAuthInputConfig { +} +export interface StsAuthResolvedConfig { + /** + * Reference to STSClient class constructor. + * @internal + */ + stsClientCtor: new (clientConfig: any) => Client; +} +export declare const resolveStsAuthConfig: (input: T & StsAuthInputConfig) => T & StsAuthResolvedConfig; +/** + * @internal + */ +export interface HttpAuthSchemeInputConfig extends StsAuthInputConfig, AwsSdkSigV4AuthInputConfig { + /** + * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + httpAuthSchemes?: HttpAuthScheme[]; + /** + * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + httpAuthSchemeProvider?: STSHttpAuthSchemeProvider; +} +/** + * @internal + */ +export interface HttpAuthSchemeResolvedConfig extends StsAuthResolvedConfig, AwsSdkSigV4AuthResolvedConfig { + /** + * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + readonly httpAuthSchemes: HttpAuthScheme[]; + /** + * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + readonly httpAuthSchemeProvider: STSHttpAuthSchemeProvider; +} +/** + * @internal + */ +export declare const resolveHttpAuthSchemeConfig: (config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleCommand.d.ts new file mode 100644 index 0000000..d810d58 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleCommand.d.ts @@ -0,0 +1,257 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { AssumeRoleRequest, AssumeRoleResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link AssumeRoleCommand}. + */ +export interface AssumeRoleCommandInput extends AssumeRoleRequest { +} +/** + * @public + * + * The output of {@link AssumeRoleCommand}. + */ +export interface AssumeRoleCommandOutput extends AssumeRoleResponse, __MetadataBearer { +} +declare const AssumeRoleCommand_base: { + new (input: AssumeRoleCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: AssumeRoleCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Returns a set of temporary security credentials that you can use to access Amazon Web Services + * resources. These temporary credentials consist of an access key ID, a secret access key, + * and a security token. Typically, you use AssumeRole within your account or for + * cross-account access. For a comparison of AssumeRole with other API operations + * that produce temporary credentials, see Requesting Temporary Security + * Credentials and Comparing the + * Amazon Web Services STS API operations in the IAM User Guide.

+ *

+ * Permissions + *

+ *

The temporary security credentials created by AssumeRole can be used to + * make API calls to any Amazon Web Services service with the following exception: You cannot call the + * Amazon Web Services STS GetFederationToken or GetSessionToken API + * operations.

+ *

(Optional) You can pass inline or managed session policies to + * this operation. You can pass a single JSON policy document to use as an inline session + * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as + * managed session policies. The plaintext that you use for both inline and managed session + * policies can't exceed 2,048 characters. Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ *

When you create a role, you create two policies: a role trust policy that specifies + * who can assume the role, and a permissions policy that specifies + * what can be done with the role. You specify the trusted principal + * that is allowed to assume the role in the role trust policy.

+ *

To assume a role from a different account, your Amazon Web Services account must be trusted by the + * role. The trust relationship is defined in the role's trust policy when the role is + * created. That trust policy states which accounts are allowed to delegate that access to + * users in the account.

+ *

A user who wants to access a role in a different account must also have permissions that + * are delegated from the account administrator. The administrator must attach a policy that + * allows the user to call AssumeRole for the ARN of the role in the other + * account.

+ *

To allow a user to assume a role in the same account, you can do either of the + * following:

+ *
    + *
  • + *

    Attach a policy to the user that allows the user to call AssumeRole + * (as long as the role's trust policy trusts the account).

    + *
  • + *
  • + *

    Add the user as a principal directly in the role's trust policy.

    + *
  • + *
+ *

You can do either because the role’s trust policy acts as an IAM resource-based + * policy. When a resource-based policy grants access to a principal in the same account, no + * additional identity-based policy is required. For more information about trust policies and + * resource-based policies, see IAM Policies in the + * IAM User Guide.

+ *

+ * Tags + *

+ *

(Optional) You can pass tag key-value pairs to your session. These tags are called + * session tags. For more information about session tags, see Passing Session Tags in STS in the + * IAM User Guide.

+ *

An administrator must grant you the permissions necessary to pass session tags. The + * administrator can also create granular permissions to allow you to pass only specific + * session tags. For more information, see Tutorial: Using Tags + * for Attribute-Based Access Control in the + * IAM User Guide.

+ *

You can set the session tags as transitive. Transitive tags persist during role + * chaining. For more information, see Chaining Roles + * with Session Tags in the IAM User Guide.

+ *

+ * Using MFA with AssumeRole + *

+ *

(Optional) You can include multi-factor authentication (MFA) information when you call + * AssumeRole. This is useful for cross-account scenarios to ensure that the + * user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that + * scenario, the trust policy of the role being assumed includes a condition that tests for + * MFA authentication. If the caller does not include valid MFA information, the request to + * assume the role is denied. The condition in a trust policy that tests for MFA + * authentication might look like the following example.

+ *

+ * "Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\} + *

+ *

For more information, see Configuring MFA-Protected API Access + * in the IAM User Guide guide.

+ *

To use MFA with AssumeRole, you pass values for the + * SerialNumber and TokenCode parameters. The + * SerialNumber value identifies the user's hardware or virtual MFA device. + * The TokenCode is the time-based one-time password (TOTP) that the MFA device + * produces.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { STSClient, AssumeRoleCommand } from "@aws-sdk/client-sts"; // ES Modules import + * // const { STSClient, AssumeRoleCommand } = require("@aws-sdk/client-sts"); // CommonJS import + * const client = new STSClient(config); + * const input = { // AssumeRoleRequest + * RoleArn: "STRING_VALUE", // required + * RoleSessionName: "STRING_VALUE", // required + * PolicyArns: [ // policyDescriptorListType + * { // PolicyDescriptorType + * arn: "STRING_VALUE", + * }, + * ], + * Policy: "STRING_VALUE", + * DurationSeconds: Number("int"), + * Tags: [ // tagListType + * { // Tag + * Key: "STRING_VALUE", // required + * Value: "STRING_VALUE", // required + * }, + * ], + * TransitiveTagKeys: [ // tagKeyListType + * "STRING_VALUE", + * ], + * ExternalId: "STRING_VALUE", + * SerialNumber: "STRING_VALUE", + * TokenCode: "STRING_VALUE", + * SourceIdentity: "STRING_VALUE", + * ProvidedContexts: [ // ProvidedContextsListType + * { // ProvidedContext + * ProviderArn: "STRING_VALUE", + * ContextAssertion: "STRING_VALUE", + * }, + * ], + * }; + * const command = new AssumeRoleCommand(input); + * const response = await client.send(command); + * // { // AssumeRoleResponse + * // Credentials: { // Credentials + * // AccessKeyId: "STRING_VALUE", // required + * // SecretAccessKey: "STRING_VALUE", // required + * // SessionToken: "STRING_VALUE", // required + * // Expiration: new Date("TIMESTAMP"), // required + * // }, + * // AssumedRoleUser: { // AssumedRoleUser + * // AssumedRoleId: "STRING_VALUE", // required + * // Arn: "STRING_VALUE", // required + * // }, + * // PackedPolicySize: Number("int"), + * // SourceIdentity: "STRING_VALUE", + * // }; + * + * ``` + * + * @param AssumeRoleCommandInput - {@link AssumeRoleCommandInput} + * @returns {@link AssumeRoleCommandOutput} + * @see {@link AssumeRoleCommandInput} for command's `input` shape. + * @see {@link AssumeRoleCommandOutput} for command's `response` shape. + * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. + * + * @throws {@link ExpiredTokenException} (client fault) + *

The web identity token that was passed is expired or is not valid. Get a new identity + * token from the identity provider and then retry the request.

+ * + * @throws {@link MalformedPolicyDocumentException} (client fault) + *

The request was rejected because the policy document was malformed. The error message + * describes the specific error.

+ * + * @throws {@link PackedPolicyTooLargeException} (client fault) + *

The request was rejected because the total packed size of the session policies and + * session tags combined was too large. An Amazon Web Services conversion compresses the session policy + * document, session policy ARNs, and session tags into a packed binary format that has a + * separate limit. The error message indicates by percentage how close the policies and + * tags are to the upper size limit. For more information, see Passing Session Tags in STS in + * the IAM User Guide.

+ *

You could receive this error even though you meet other defined session policy and + * session tag limits. For more information, see IAM and STS Entity + * Character Limits in the IAM User Guide.

+ * + * @throws {@link RegionDisabledException} (client fault) + *

STS is not activated in the requested region for the account that is being asked to + * generate credentials. The account administrator must use the IAM console to activate STS + * in that region. For more information, see Activating and + * Deactivating Amazon Web Services STS in an Amazon Web Services Region in the IAM User + * Guide.

+ * + * @throws {@link STSServiceException} + *

Base exception class for all service exceptions from STS service.

+ * + * @public + * @example To assume a role + * ```javascript + * // + * const input = { + * "ExternalId": "123ABC", + * "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}", + * "RoleArn": "arn:aws:iam::123456789012:role/demo", + * "RoleSessionName": "testAssumeRoleSession", + * "Tags": [ + * { + * "Key": "Project", + * "Value": "Unicorn" + * }, + * { + * "Key": "Team", + * "Value": "Automation" + * }, + * { + * "Key": "Cost-Center", + * "Value": "12345" + * } + * ], + * "TransitiveTagKeys": [ + * "Project", + * "Cost-Center" + * ] + * }; + * const command = new AssumeRoleCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "AssumedRoleUser": { + * "Arn": "arn:aws:sts::123456789012:assumed-role/demo/Bob", + * "AssumedRoleId": "ARO123EXAMPLE123:Bob" + * }, + * "Credentials": { + * "AccessKeyId": "AKIAIOSFODNN7EXAMPLE", + * "Expiration": "2011-07-15T23:28:33.359Z", + * "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + * "SessionToken": "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==" + * }, + * "PackedPolicySize": 8 + * } + * *\/ + * // example id: to-assume-a-role-1480532402212 + * ``` + * + */ +export declare class AssumeRoleCommand extends AssumeRoleCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleWithSAMLCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleWithSAMLCommand.d.ts new file mode 100644 index 0000000..d541aa1 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleWithSAMLCommand.d.ts @@ -0,0 +1,282 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { AssumeRoleWithSAMLRequest, AssumeRoleWithSAMLResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link AssumeRoleWithSAMLCommand}. + */ +export interface AssumeRoleWithSAMLCommandInput extends AssumeRoleWithSAMLRequest { +} +/** + * @public + * + * The output of {@link AssumeRoleWithSAMLCommand}. + */ +export interface AssumeRoleWithSAMLCommandOutput extends AssumeRoleWithSAMLResponse, __MetadataBearer { +} +declare const AssumeRoleWithSAMLCommand_base: { + new (input: AssumeRoleWithSAMLCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: AssumeRoleWithSAMLCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Returns a set of temporary security credentials for users who have been authenticated + * via a SAML authentication response. This operation provides a mechanism for tying an + * enterprise identity store or directory to role-based Amazon Web Services access without user-specific + * credentials or configuration. For a comparison of AssumeRoleWithSAML with the + * other API operations that produce temporary credentials, see Requesting Temporary Security + * Credentials and Comparing the + * Amazon Web Services STS API operations in the IAM User Guide.

+ *

The temporary security credentials returned by this operation consist of an access key + * ID, a secret access key, and a security token. Applications can use these temporary + * security credentials to sign calls to Amazon Web Services services.

+ *

+ * Session Duration + *

+ *

By default, the temporary security credentials created by + * AssumeRoleWithSAML last for one hour. However, you can use the optional + * DurationSeconds parameter to specify the duration of your session. Your + * role session lasts for the duration that you specify, or until the time specified in the + * SAML authentication response's SessionNotOnOrAfter value, whichever is + * shorter. You can provide a DurationSeconds value from 900 seconds (15 minutes) + * up to the maximum session duration setting for the role. This setting can have a value from + * 1 hour to 12 hours. To learn how to view the maximum value for your role, see View the + * Maximum Session Duration Setting for a Role in the + * IAM User Guide. The maximum session duration limit applies when + * you use the AssumeRole* API operations or the assume-role* CLI + * commands. However the limit does not apply when you use those operations to create a + * console URL. For more information, see Using IAM Roles in the + * IAM User Guide.

+ * + *

+ * Role chaining limits your CLI or Amazon Web Services API role + * session to a maximum of one hour. When you use the AssumeRole API operation + * to assume a role, you can specify the duration of your role session with the + * DurationSeconds parameter. You can specify a parameter value of up to + * 43200 seconds (12 hours), depending on the maximum session duration setting for your + * role. However, if you assume a role using role chaining and provide a + * DurationSeconds parameter value greater than one hour, the operation + * fails.

+ *
+ *

+ * Permissions + *

+ *

The temporary security credentials created by AssumeRoleWithSAML can be + * used to make API calls to any Amazon Web Services service with the following exception: you cannot call + * the STS GetFederationToken or GetSessionToken API + * operations.

+ *

(Optional) You can pass inline or managed session policies to + * this operation. You can pass a single JSON policy document to use as an inline session + * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as + * managed session policies. The plaintext that you use for both inline and managed session + * policies can't exceed 2,048 characters. Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ *

Calling AssumeRoleWithSAML does not require the use of Amazon Web Services security + * credentials. The identity of the caller is validated by using keys in the metadata document + * that is uploaded for the SAML provider entity for your identity provider.

+ * + *

Calling AssumeRoleWithSAML can result in an entry in your CloudTrail logs. + * The entry includes the value in the NameID element of the SAML assertion. + * We recommend that you use a NameIDType that is not associated with any + * personally identifiable information (PII). For example, you could instead use the + * persistent identifier + * (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).

+ *
+ *

+ * Tags + *

+ *

(Optional) You can configure your IdP to pass attributes into your SAML assertion as + * session tags. Each session tag consists of a key name and an associated value. For more + * information about session tags, see Passing Session Tags in STS in the + * IAM User Guide.

+ *

You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128 + * characters and the values can’t exceed 256 characters. For these and additional limits, see + * IAM + * and STS Character Limits in the IAM User Guide.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ *

You can pass a session tag with the same key as a tag that is attached to the role. When + * you do, session tags override the role's tags with the same key.

+ *

An administrator must grant you the permissions necessary to pass session tags. The + * administrator can also create granular permissions to allow you to pass only specific + * session tags. For more information, see Tutorial: Using Tags + * for Attribute-Based Access Control in the + * IAM User Guide.

+ *

You can set the session tags as transitive. Transitive tags persist during role + * chaining. For more information, see Chaining Roles + * with Session Tags in the IAM User Guide.

+ *

+ * SAML Configuration + *

+ *

Before your application can call AssumeRoleWithSAML, you must configure + * your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you + * must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that + * represents your identity provider. You must also create an IAM role that specifies this + * SAML provider in its trust policy.

+ *

For more information, see the following resources:

+ * + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { STSClient, AssumeRoleWithSAMLCommand } from "@aws-sdk/client-sts"; // ES Modules import + * // const { STSClient, AssumeRoleWithSAMLCommand } = require("@aws-sdk/client-sts"); // CommonJS import + * const client = new STSClient(config); + * const input = { // AssumeRoleWithSAMLRequest + * RoleArn: "STRING_VALUE", // required + * PrincipalArn: "STRING_VALUE", // required + * SAMLAssertion: "STRING_VALUE", // required + * PolicyArns: [ // policyDescriptorListType + * { // PolicyDescriptorType + * arn: "STRING_VALUE", + * }, + * ], + * Policy: "STRING_VALUE", + * DurationSeconds: Number("int"), + * }; + * const command = new AssumeRoleWithSAMLCommand(input); + * const response = await client.send(command); + * // { // AssumeRoleWithSAMLResponse + * // Credentials: { // Credentials + * // AccessKeyId: "STRING_VALUE", // required + * // SecretAccessKey: "STRING_VALUE", // required + * // SessionToken: "STRING_VALUE", // required + * // Expiration: new Date("TIMESTAMP"), // required + * // }, + * // AssumedRoleUser: { // AssumedRoleUser + * // AssumedRoleId: "STRING_VALUE", // required + * // Arn: "STRING_VALUE", // required + * // }, + * // PackedPolicySize: Number("int"), + * // Subject: "STRING_VALUE", + * // SubjectType: "STRING_VALUE", + * // Issuer: "STRING_VALUE", + * // Audience: "STRING_VALUE", + * // NameQualifier: "STRING_VALUE", + * // SourceIdentity: "STRING_VALUE", + * // }; + * + * ``` + * + * @param AssumeRoleWithSAMLCommandInput - {@link AssumeRoleWithSAMLCommandInput} + * @returns {@link AssumeRoleWithSAMLCommandOutput} + * @see {@link AssumeRoleWithSAMLCommandInput} for command's `input` shape. + * @see {@link AssumeRoleWithSAMLCommandOutput} for command's `response` shape. + * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. + * + * @throws {@link ExpiredTokenException} (client fault) + *

The web identity token that was passed is expired or is not valid. Get a new identity + * token from the identity provider and then retry the request.

+ * + * @throws {@link IDPRejectedClaimException} (client fault) + *

The identity provider (IdP) reported that authentication failed. This might be because + * the claim is invalid.

+ *

If this error is returned for the AssumeRoleWithWebIdentity operation, it + * can also mean that the claim has expired or has been explicitly revoked.

+ * + * @throws {@link InvalidIdentityTokenException} (client fault) + *

The web identity token that was passed could not be validated by Amazon Web Services. Get a new + * identity token from the identity provider and then retry the request.

+ * + * @throws {@link MalformedPolicyDocumentException} (client fault) + *

The request was rejected because the policy document was malformed. The error message + * describes the specific error.

+ * + * @throws {@link PackedPolicyTooLargeException} (client fault) + *

The request was rejected because the total packed size of the session policies and + * session tags combined was too large. An Amazon Web Services conversion compresses the session policy + * document, session policy ARNs, and session tags into a packed binary format that has a + * separate limit. The error message indicates by percentage how close the policies and + * tags are to the upper size limit. For more information, see Passing Session Tags in STS in + * the IAM User Guide.

+ *

You could receive this error even though you meet other defined session policy and + * session tag limits. For more information, see IAM and STS Entity + * Character Limits in the IAM User Guide.

+ * + * @throws {@link RegionDisabledException} (client fault) + *

STS is not activated in the requested region for the account that is being asked to + * generate credentials. The account administrator must use the IAM console to activate STS + * in that region. For more information, see Activating and + * Deactivating Amazon Web Services STS in an Amazon Web Services Region in the IAM User + * Guide.

+ * + * @throws {@link STSServiceException} + *

Base exception class for all service exceptions from STS service.

+ * + * @public + * @example To assume a role using a SAML assertion + * ```javascript + * // + * const input = { + * "DurationSeconds": 3600, + * "PrincipalArn": "arn:aws:iam::123456789012:saml-provider/SAML-test", + * "RoleArn": "arn:aws:iam::123456789012:role/TestSaml", + * "SAMLAssertion": "VERYLONGENCODEDASSERTIONEXAMPLExzYW1sOkF1ZGllbmNlPmJsYW5rPC9zYW1sOkF1ZGllbmNlPjwvc2FtbDpBdWRpZW5jZVJlc3RyaWN0aW9uPjwvc2FtbDpDb25kaXRpb25zPjxzYW1sOlN1YmplY3Q+PHNhbWw6TmFtZUlEIEZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOm5hbWVpZC1mb3JtYXQ6dHJhbnNpZW50Ij5TYW1sRXhhbXBsZTwvc2FtbDpOYW1lSUQ+PHNhbWw6U3ViamVjdENvbmZpcm1hdGlvbiBNZXRob2Q9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpjbTpiZWFyZXIiPjxzYW1sOlN1YmplY3RDb25maXJtYXRpb25EYXRhIE5vdE9uT3JBZnRlcj0iMjAxOS0xMS0wMVQyMDoyNTowNS4xNDVaIiBSZWNpcGllbnQ9Imh0dHBzOi8vc2lnbmluLmF3cy5hbWF6b24uY29tL3NhbWwiLz48L3NhbWw6U3ViamVjdENvbmZpcm1hdGlvbj48L3NhbWw6U3ViamVjdD48c2FtbDpBdXRoblN0YXRlbWVudCBBdXRoPD94bWwgdmpSZXNwb25zZT4=" + * }; + * const command = new AssumeRoleWithSAMLCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "AssumedRoleUser": { + * "Arn": "arn:aws:sts::123456789012:assumed-role/TestSaml", + * "AssumedRoleId": "ARO456EXAMPLE789:TestSaml" + * }, + * "Audience": "https://signin.aws.amazon.com/saml", + * "Credentials": { + * "AccessKeyId": "ASIAV3ZUEFP6EXAMPLE", + * "Expiration": "2019-11-01T20:26:47Z", + * "SecretAccessKey": "8P+SQvWIuLnKhh8d++jpw0nNmQRBZvNEXAMPLEKEY", + * "SessionToken": "IQoJb3JpZ2luX2VjEOz////////////////////wEXAMPLEtMSJHMEUCIDoKK3JH9uGQE1z0sINr5M4jk+Na8KHDcCYRVjJCZEvOAiEA3OvJGtw1EcViOleS2vhs8VdCKFJQWPQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==" + * }, + * "Issuer": "https://integ.example.com/idp/shibboleth", + * "NameQualifier": "SbdGOnUkh1i4+EXAMPLExL/jEvs=", + * "PackedPolicySize": 6, + * "Subject": "SamlExample", + * "SubjectType": "transient" + * } + * *\/ + * // example id: to-assume-role-with-saml-14882749597814 + * ``` + * + */ +export declare class AssumeRoleWithSAMLCommand extends AssumeRoleWithSAMLCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleWithWebIdentityCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleWithWebIdentityCommand.d.ts new file mode 100644 index 0000000..56032b7 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleWithWebIdentityCommand.d.ts @@ -0,0 +1,291 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { AssumeRoleWithWebIdentityRequest, AssumeRoleWithWebIdentityResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link AssumeRoleWithWebIdentityCommand}. + */ +export interface AssumeRoleWithWebIdentityCommandInput extends AssumeRoleWithWebIdentityRequest { +} +/** + * @public + * + * The output of {@link AssumeRoleWithWebIdentityCommand}. + */ +export interface AssumeRoleWithWebIdentityCommandOutput extends AssumeRoleWithWebIdentityResponse, __MetadataBearer { +} +declare const AssumeRoleWithWebIdentityCommand_base: { + new (input: AssumeRoleWithWebIdentityCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: AssumeRoleWithWebIdentityCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Returns a set of temporary security credentials for users who have been authenticated in + * a mobile or web application with a web identity provider. Example providers include the + * OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID Connect-compatible + * identity provider such as Google or Amazon Cognito federated identities.

+ * + *

For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the + * Amazon Web Services SDK for iOS Developer Guide and the Amazon Web Services SDK for Android Developer Guide to uniquely + * identify a user. You can also supply the user with a consistent identity throughout the + * lifetime of an application.

+ *

To learn more about Amazon Cognito, see Amazon Cognito identity + * pools in Amazon Cognito Developer Guide.

+ *
+ *

Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web Services + * security credentials. Therefore, you can distribute an application (for example, on mobile + * devices) that requests temporary security credentials without including long-term Amazon Web Services + * credentials in the application. You also don't need to deploy server-based proxy services + * that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by + * using a token from the web identity provider. For a comparison of + * AssumeRoleWithWebIdentity with the other API operations that produce + * temporary credentials, see Requesting Temporary Security + * Credentials and Comparing the + * Amazon Web Services STS API operations in the IAM User Guide.

+ *

The temporary security credentials returned by this API consist of an access key ID, a + * secret access key, and a security token. Applications can use these temporary security + * credentials to sign calls to Amazon Web Services service API operations.

+ *

+ * Session Duration + *

+ *

By default, the temporary security credentials created by + * AssumeRoleWithWebIdentity last for one hour. However, you can use the + * optional DurationSeconds parameter to specify the duration of your session. + * You can provide a value from 900 seconds (15 minutes) up to the maximum session duration + * setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how + * to view the maximum value for your role, see View the + * Maximum Session Duration Setting for a Role in the + * IAM User Guide. The maximum session duration limit applies when + * you use the AssumeRole* API operations or the assume-role* CLI + * commands. However the limit does not apply when you use those operations to create a + * console URL. For more information, see Using IAM Roles in the + * IAM User Guide.

+ *

+ * Permissions + *

+ *

The temporary security credentials created by AssumeRoleWithWebIdentity can + * be used to make API calls to any Amazon Web Services service with the following exception: you cannot + * call the STS GetFederationToken or GetSessionToken API + * operations.

+ *

(Optional) You can pass inline or managed session policies to + * this operation. You can pass a single JSON policy document to use as an inline session + * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as + * managed session policies. The plaintext that you use for both inline and managed session + * policies can't exceed 2,048 characters. Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ *

+ * Tags + *

+ *

(Optional) You can configure your IdP to pass attributes into your web identity token as + * session tags. Each session tag consists of a key name and an associated value. For more + * information about session tags, see Passing Session Tags in STS in the + * IAM User Guide.

+ *

You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128 + * characters and the values can’t exceed 256 characters. For these and additional limits, see + * IAM + * and STS Character Limits in the IAM User Guide.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ *

You can pass a session tag with the same key as a tag that is attached to the role. When + * you do, the session tag overrides the role tag with the same key.

+ *

An administrator must grant you the permissions necessary to pass session tags. The + * administrator can also create granular permissions to allow you to pass only specific + * session tags. For more information, see Tutorial: Using Tags + * for Attribute-Based Access Control in the + * IAM User Guide.

+ *

You can set the session tags as transitive. Transitive tags persist during role + * chaining. For more information, see Chaining Roles + * with Session Tags in the IAM User Guide.

+ *

+ * Identities + *

+ *

Before your application can call AssumeRoleWithWebIdentity, you must have + * an identity token from a supported identity provider and create a role that the application + * can assume. The role that your application assumes must trust the identity provider that is + * associated with the identity token. In other words, the identity provider must be specified + * in the role's trust policy.

+ * + *

Calling AssumeRoleWithWebIdentity can result in an entry in your + * CloudTrail logs. The entry includes the Subject of + * the provided web identity token. We recommend that you avoid using any personally + * identifiable information (PII) in this field. For example, you could instead use a GUID + * or a pairwise identifier, as suggested + * in the OIDC specification.

+ *
+ *

For more information about how to use web identity federation and the + * AssumeRoleWithWebIdentity API, see the following resources:

+ * + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { STSClient, AssumeRoleWithWebIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import + * // const { STSClient, AssumeRoleWithWebIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import + * const client = new STSClient(config); + * const input = { // AssumeRoleWithWebIdentityRequest + * RoleArn: "STRING_VALUE", // required + * RoleSessionName: "STRING_VALUE", // required + * WebIdentityToken: "STRING_VALUE", // required + * ProviderId: "STRING_VALUE", + * PolicyArns: [ // policyDescriptorListType + * { // PolicyDescriptorType + * arn: "STRING_VALUE", + * }, + * ], + * Policy: "STRING_VALUE", + * DurationSeconds: Number("int"), + * }; + * const command = new AssumeRoleWithWebIdentityCommand(input); + * const response = await client.send(command); + * // { // AssumeRoleWithWebIdentityResponse + * // Credentials: { // Credentials + * // AccessKeyId: "STRING_VALUE", // required + * // SecretAccessKey: "STRING_VALUE", // required + * // SessionToken: "STRING_VALUE", // required + * // Expiration: new Date("TIMESTAMP"), // required + * // }, + * // SubjectFromWebIdentityToken: "STRING_VALUE", + * // AssumedRoleUser: { // AssumedRoleUser + * // AssumedRoleId: "STRING_VALUE", // required + * // Arn: "STRING_VALUE", // required + * // }, + * // PackedPolicySize: Number("int"), + * // Provider: "STRING_VALUE", + * // Audience: "STRING_VALUE", + * // SourceIdentity: "STRING_VALUE", + * // }; + * + * ``` + * + * @param AssumeRoleWithWebIdentityCommandInput - {@link AssumeRoleWithWebIdentityCommandInput} + * @returns {@link AssumeRoleWithWebIdentityCommandOutput} + * @see {@link AssumeRoleWithWebIdentityCommandInput} for command's `input` shape. + * @see {@link AssumeRoleWithWebIdentityCommandOutput} for command's `response` shape. + * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. + * + * @throws {@link ExpiredTokenException} (client fault) + *

The web identity token that was passed is expired or is not valid. Get a new identity + * token from the identity provider and then retry the request.

+ * + * @throws {@link IDPCommunicationErrorException} (client fault) + *

The request could not be fulfilled because the identity provider (IDP) that + * was asked to verify the incoming identity token could not be reached. This is often a + * transient error caused by network conditions. Retry the request a limited number of + * times so that you don't exceed the request rate. If the error persists, the + * identity provider might be down or not responding.

+ * + * @throws {@link IDPRejectedClaimException} (client fault) + *

The identity provider (IdP) reported that authentication failed. This might be because + * the claim is invalid.

+ *

If this error is returned for the AssumeRoleWithWebIdentity operation, it + * can also mean that the claim has expired or has been explicitly revoked.

+ * + * @throws {@link InvalidIdentityTokenException} (client fault) + *

The web identity token that was passed could not be validated by Amazon Web Services. Get a new + * identity token from the identity provider and then retry the request.

+ * + * @throws {@link MalformedPolicyDocumentException} (client fault) + *

The request was rejected because the policy document was malformed. The error message + * describes the specific error.

+ * + * @throws {@link PackedPolicyTooLargeException} (client fault) + *

The request was rejected because the total packed size of the session policies and + * session tags combined was too large. An Amazon Web Services conversion compresses the session policy + * document, session policy ARNs, and session tags into a packed binary format that has a + * separate limit. The error message indicates by percentage how close the policies and + * tags are to the upper size limit. For more information, see Passing Session Tags in STS in + * the IAM User Guide.

+ *

You could receive this error even though you meet other defined session policy and + * session tag limits. For more information, see IAM and STS Entity + * Character Limits in the IAM User Guide.

+ * + * @throws {@link RegionDisabledException} (client fault) + *

STS is not activated in the requested region for the account that is being asked to + * generate credentials. The account administrator must use the IAM console to activate STS + * in that region. For more information, see Activating and + * Deactivating Amazon Web Services STS in an Amazon Web Services Region in the IAM User + * Guide.

+ * + * @throws {@link STSServiceException} + *

Base exception class for all service exceptions from STS service.

+ * + * @public + * @example To assume a role as an OpenID Connect-federated user + * ```javascript + * // + * const input = { + * "DurationSeconds": 3600, + * "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}", + * "ProviderId": "www.amazon.com", + * "RoleArn": "arn:aws:iam::123456789012:role/FederatedWebIdentityRole", + * "RoleSessionName": "app1", + * "WebIdentityToken": "Atza%7CIQEBLjAsAhRFiXuWpUXuRvQ9PZL3GMFcYevydwIUFAHZwXZXXXXXXXXJnrulxKDHwy87oGKPznh0D6bEQZTSCzyoCtL_8S07pLpr0zMbn6w1lfVZKNTBdDansFBmtGnIsIapjI6xKR02Yc_2bQ8LZbUXSGm6Ry6_BG7PrtLZtj_dfCTj92xNGed-CrKqjG7nPBjNIL016GGvuS5gSvPRUxWES3VYfm1wl7WTI7jn-Pcb6M-buCgHhFOzTQxod27L9CqnOLio7N3gZAGpsp6n1-AJBOCJckcyXe2c6uD0srOJeZlKUm2eTDVMf8IehDVI0r1QOnTV6KzzAI3OY87Vd_cVMQ" + * }; + * const command = new AssumeRoleWithWebIdentityCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "AssumedRoleUser": { + * "Arn": "arn:aws:sts::123456789012:assumed-role/FederatedWebIdentityRole/app1", + * "AssumedRoleId": "AROACLKWSDQRAOEXAMPLE:app1" + * }, + * "Audience": "client.5498841531868486423.1548@apps.example.com", + * "Credentials": { + * "AccessKeyId": "AKIAIOSFODNN7EXAMPLE", + * "Expiration": "2014-10-24T23:00:23Z", + * "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + * "SessionToken": "AQoDYXdzEE0a8ANXXXXXXXXNO1ewxE5TijQyp+IEXAMPLE" + * }, + * "PackedPolicySize": 123, + * "Provider": "www.amazon.com", + * "SubjectFromWebIdentityToken": "amzn1.account.AF6RHO7KZU5XRVQJGXK6HEXAMPLE" + * } + * *\/ + * // example id: to-assume-a-role-as-an-openid-connect-federated-user-1480533445696 + * ``` + * + */ +export declare class AssumeRoleWithWebIdentityCommand extends AssumeRoleWithWebIdentityCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/commands/DecodeAuthorizationMessageCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/commands/DecodeAuthorizationMessageCommand.d.ts new file mode 100644 index 0000000..285df0e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/commands/DecodeAuthorizationMessageCommand.d.ts @@ -0,0 +1,115 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { DecodeAuthorizationMessageRequest, DecodeAuthorizationMessageResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DecodeAuthorizationMessageCommand}. + */ +export interface DecodeAuthorizationMessageCommandInput extends DecodeAuthorizationMessageRequest { +} +/** + * @public + * + * The output of {@link DecodeAuthorizationMessageCommand}. + */ +export interface DecodeAuthorizationMessageCommandOutput extends DecodeAuthorizationMessageResponse, __MetadataBearer { +} +declare const DecodeAuthorizationMessageCommand_base: { + new (input: DecodeAuthorizationMessageCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: DecodeAuthorizationMessageCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Decodes additional information about the authorization status of a request from an + * encoded message returned in response to an Amazon Web Services request.

+ *

For example, if a user is not authorized to perform an operation that he or she has + * requested, the request returns a Client.UnauthorizedOperation response (an + * HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can + * provide details about this authorization failure.

+ * + *

Only certain Amazon Web Services operations return an encoded authorization message. The + * documentation for an individual operation indicates whether that operation returns an + * encoded message in addition to returning an HTTP code.

+ *
+ *

The message is encoded because the details of the authorization status can contain + * privileged information that the user who requested the operation should not see. To decode + * an authorization status message, a user must be granted permissions through an IAM policy to + * request the DecodeAuthorizationMessage + * (sts:DecodeAuthorizationMessage) action.

+ *

The decoded message includes the following type of information:

+ *
    + *
  • + *

    Whether the request was denied due to an explicit deny or due to the absence of an + * explicit allow. For more information, see Determining Whether a Request is Allowed or Denied in the + * IAM User Guide.

    + *
  • + *
  • + *

    The principal who made the request.

    + *
  • + *
  • + *

    The requested action.

    + *
  • + *
  • + *

    The requested resource.

    + *
  • + *
  • + *

    The values of condition keys in the context of the user's request.

    + *
  • + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { STSClient, DecodeAuthorizationMessageCommand } from "@aws-sdk/client-sts"; // ES Modules import + * // const { STSClient, DecodeAuthorizationMessageCommand } = require("@aws-sdk/client-sts"); // CommonJS import + * const client = new STSClient(config); + * const input = { // DecodeAuthorizationMessageRequest + * EncodedMessage: "STRING_VALUE", // required + * }; + * const command = new DecodeAuthorizationMessageCommand(input); + * const response = await client.send(command); + * // { // DecodeAuthorizationMessageResponse + * // DecodedMessage: "STRING_VALUE", + * // }; + * + * ``` + * + * @param DecodeAuthorizationMessageCommandInput - {@link DecodeAuthorizationMessageCommandInput} + * @returns {@link DecodeAuthorizationMessageCommandOutput} + * @see {@link DecodeAuthorizationMessageCommandInput} for command's `input` shape. + * @see {@link DecodeAuthorizationMessageCommandOutput} for command's `response` shape. + * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. + * + * @throws {@link InvalidAuthorizationMessageException} (client fault) + *

The error returned if the message passed to DecodeAuthorizationMessage + * was invalid. This can happen if the token contains invalid characters, such as + * linebreaks.

+ * + * @throws {@link STSServiceException} + *

Base exception class for all service exceptions from STS service.

+ * + * @public + * @example To decode information about an authorization status of a request + * ```javascript + * // + * const input = { + * "EncodedMessage": "" + * }; + * const command = new DecodeAuthorizationMessageCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "DecodedMessage": "{\"allowed\": \"false\",\"explicitDeny\": \"false\",\"matchedStatements\": \"\",\"failures\": \"\",\"context\": {\"principal\": {\"id\": \"AIDACKCEVSQ6C2EXAMPLE\",\"name\": \"Bob\",\"arn\": \"arn:aws:iam::123456789012:user/Bob\"},\"action\": \"ec2:StopInstances\",\"resource\": \"arn:aws:ec2:us-east-1:123456789012:instance/i-dd01c9bd\",\"conditions\": [{\"item\": {\"key\": \"ec2:Tenancy\",\"values\": [\"default\"]},{\"item\": {\"key\": \"ec2:ResourceTag/elasticbeanstalk:environment-name\",\"values\": [\"Default-Environment\"]}},(Additional items ...)]}}" + * } + * *\/ + * // example id: to-decode-information-about-an-authorization-status-of-a-request-1480533854499 + * ``` + * + */ +export declare class DecodeAuthorizationMessageCommand extends DecodeAuthorizationMessageCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/commands/GetAccessKeyInfoCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/commands/GetAccessKeyInfoCommand.d.ts new file mode 100644 index 0000000..e376dab --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/commands/GetAccessKeyInfoCommand.d.ts @@ -0,0 +1,75 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { GetAccessKeyInfoRequest, GetAccessKeyInfoResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetAccessKeyInfoCommand}. + */ +export interface GetAccessKeyInfoCommandInput extends GetAccessKeyInfoRequest { +} +/** + * @public + * + * The output of {@link GetAccessKeyInfoCommand}. + */ +export interface GetAccessKeyInfoCommandOutput extends GetAccessKeyInfoResponse, __MetadataBearer { +} +declare const GetAccessKeyInfoCommand_base: { + new (input: GetAccessKeyInfoCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: GetAccessKeyInfoCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Returns the account identifier for the specified access key ID.

+ *

Access keys consist of two parts: an access key ID (for example, + * AKIAIOSFODNN7EXAMPLE) and a secret access key (for example, + * wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). For more information about + * access keys, see Managing Access Keys for IAM + * Users in the IAM User Guide.

+ *

When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services account + * to which the keys belong. Access key IDs beginning with AKIA are long-term + * credentials for an IAM user or the Amazon Web Services account root user. Access key IDs + * beginning with ASIA are temporary credentials that are created using STS + * operations. If the account in the response belongs to you, you can sign in as the root user and review your root user access keys. Then, you can pull a credentials + * report to learn which IAM user owns the keys. To learn who + * requested the temporary credentials for an ASIA access key, view the STS + * events in your CloudTrail logs in the IAM User Guide.

+ *

This operation does not indicate the state of the access key. The key might be active, + * inactive, or deleted. Active keys might not have permissions to perform an operation. + * Providing a deleted access key might return an error that the key doesn't exist.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { STSClient, GetAccessKeyInfoCommand } from "@aws-sdk/client-sts"; // ES Modules import + * // const { STSClient, GetAccessKeyInfoCommand } = require("@aws-sdk/client-sts"); // CommonJS import + * const client = new STSClient(config); + * const input = { // GetAccessKeyInfoRequest + * AccessKeyId: "STRING_VALUE", // required + * }; + * const command = new GetAccessKeyInfoCommand(input); + * const response = await client.send(command); + * // { // GetAccessKeyInfoResponse + * // Account: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetAccessKeyInfoCommandInput - {@link GetAccessKeyInfoCommandInput} + * @returns {@link GetAccessKeyInfoCommandOutput} + * @see {@link GetAccessKeyInfoCommandInput} for command's `input` shape. + * @see {@link GetAccessKeyInfoCommandOutput} for command's `response` shape. + * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. + * + * @throws {@link STSServiceException} + *

Base exception class for all service exceptions from STS service.

+ * + * @public + */ +export declare class GetAccessKeyInfoCommand extends GetAccessKeyInfoCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/commands/GetCallerIdentityCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/commands/GetCallerIdentityCommand.d.ts new file mode 100644 index 0000000..224fca1 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/commands/GetCallerIdentityCommand.d.ts @@ -0,0 +1,116 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { GetCallerIdentityRequest, GetCallerIdentityResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetCallerIdentityCommand}. + */ +export interface GetCallerIdentityCommandInput extends GetCallerIdentityRequest { +} +/** + * @public + * + * The output of {@link GetCallerIdentityCommand}. + */ +export interface GetCallerIdentityCommandOutput extends GetCallerIdentityResponse, __MetadataBearer { +} +declare const GetCallerIdentityCommand_base: { + new (input: GetCallerIdentityCommandInput): import("@smithy/smithy-client").CommandImpl; + new (...[input]: [] | [GetCallerIdentityCommandInput]): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Returns details about the IAM user or role whose credentials are used to + * call the operation.

+ * + *

No permissions are required to perform this operation. If an administrator attaches a + * policy to your identity that explicitly denies access to the + * sts:GetCallerIdentity action, you can still perform this operation. + * Permissions are not required because the same information is returned when access is + * denied. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the + * IAM User Guide.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { STSClient, GetCallerIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import + * // const { STSClient, GetCallerIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import + * const client = new STSClient(config); + * const input = {}; + * const command = new GetCallerIdentityCommand(input); + * const response = await client.send(command); + * // { // GetCallerIdentityResponse + * // UserId: "STRING_VALUE", + * // Account: "STRING_VALUE", + * // Arn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetCallerIdentityCommandInput - {@link GetCallerIdentityCommandInput} + * @returns {@link GetCallerIdentityCommandOutput} + * @see {@link GetCallerIdentityCommandInput} for command's `input` shape. + * @see {@link GetCallerIdentityCommandOutput} for command's `response` shape. + * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. + * + * @throws {@link STSServiceException} + *

Base exception class for all service exceptions from STS service.

+ * + * @public + * @example To get details about a calling IAM user + * ```javascript + * // This example shows a request and response made with the credentials for a user named Alice in the AWS account 123456789012. + * const input = {}; + * const command = new GetCallerIdentityCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "Account": "123456789012", + * "Arn": "arn:aws:iam::123456789012:user/Alice", + * "UserId": "AKIAI44QH8DHBEXAMPLE" + * } + * *\/ + * // example id: to-get-details-about-a-calling-iam-user-1480540050376 + * ``` + * + * @example To get details about a calling user federated with AssumeRole + * ```javascript + * // This example shows a request and response made with temporary credentials created by AssumeRole. The name of the assumed role is my-role-name, and the RoleSessionName is set to my-role-session-name. + * const input = {}; + * const command = new GetCallerIdentityCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "Account": "123456789012", + * "Arn": "arn:aws:sts::123456789012:assumed-role/my-role-name/my-role-session-name", + * "UserId": "AKIAI44QH8DHBEXAMPLE:my-role-session-name" + * } + * *\/ + * // example id: to-get-details-about-a-calling-user-federated-with-assumerole-1480540158545 + * ``` + * + * @example To get details about a calling user federated with GetFederationToken + * ```javascript + * // This example shows a request and response made with temporary credentials created by using GetFederationToken. The Name parameter is set to my-federated-user-name. + * const input = {}; + * const command = new GetCallerIdentityCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "Account": "123456789012", + * "Arn": "arn:aws:sts::123456789012:federated-user/my-federated-user-name", + * "UserId": "123456789012:my-federated-user-name" + * } + * *\/ + * // example id: to-get-details-about-a-calling-user-federated-with-getfederationtoken-1480540231316 + * ``` + * + */ +export declare class GetCallerIdentityCommand extends GetCallerIdentityCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/commands/GetFederationTokenCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/commands/GetFederationTokenCommand.d.ts new file mode 100644 index 0000000..a85462a --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/commands/GetFederationTokenCommand.d.ts @@ -0,0 +1,230 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { GetFederationTokenRequest, GetFederationTokenResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetFederationTokenCommand}. + */ +export interface GetFederationTokenCommandInput extends GetFederationTokenRequest { +} +/** + * @public + * + * The output of {@link GetFederationTokenCommand}. + */ +export interface GetFederationTokenCommandOutput extends GetFederationTokenResponse, __MetadataBearer { +} +declare const GetFederationTokenCommand_base: { + new (input: GetFederationTokenCommandInput): import("@smithy/smithy-client").CommandImpl; + new (__0_0: GetFederationTokenCommandInput): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Returns a set of temporary security credentials (consisting of an access key ID, a + * secret access key, and a security token) for a user. A typical use is in a proxy + * application that gets temporary security credentials on behalf of distributed applications + * inside a corporate network.

+ *

You must call the GetFederationToken operation using the long-term security + * credentials of an IAM user. As a result, this call is appropriate in + * contexts where those credentials can be safeguarded, usually in a server-based application. + * For a comparison of GetFederationToken with the other API operations that + * produce temporary credentials, see Requesting Temporary Security + * Credentials and Comparing the + * Amazon Web Services STS API operations in the IAM User Guide.

+ *

Although it is possible to call GetFederationToken using the security + * credentials of an Amazon Web Services account root user rather than an IAM user that you + * create for the purpose of a proxy application, we do not recommend it. For more + * information, see Safeguard your root user credentials and don't use them for everyday tasks in the + * IAM User Guide.

+ * + *

You can create a mobile-based or browser-based app that can authenticate users using + * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID + * Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or + * AssumeRoleWithWebIdentity. For more information, see Federation Through a Web-based Identity Provider in the + * IAM User Guide.

+ *
+ *

+ * Session duration + *

+ *

The temporary credentials are valid for the specified duration, from 900 seconds (15 + * minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is + * 43,200 seconds (12 hours). Temporary credentials obtained by using the root user + * credentials have a maximum duration of 3,600 seconds (1 hour).

+ *

+ * Permissions + *

+ *

You can use the temporary credentials created by GetFederationToken in any + * Amazon Web Services service with the following exceptions:

+ *
    + *
  • + *

    You cannot call any IAM operations using the CLI or the Amazon Web Services API. This + * limitation does not apply to console sessions.

    + *
  • + *
  • + *

    You cannot call any STS operations except GetCallerIdentity.

    + *
  • + *
+ *

You can use temporary credentials for single sign-on (SSO) to the console.

+ *

You must pass an inline or managed session policy to + * this operation. You can pass a single JSON policy document to use as an inline session + * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as + * managed session policies. The plaintext that you use for both inline and managed session + * policies can't exceed 2,048 characters.

+ *

Though the session policy parameters are optional, if you do not pass a policy, then the + * resulting federated user session has no permissions. When you pass session policies, the + * session permissions are the intersection of the IAM user policies and the + * session policies that you pass. This gives you a way to further restrict the permissions + * for a federated user. You cannot use session policies to grant more permissions than those + * that are defined in the permissions policy of the IAM user. For more + * information, see Session Policies in + * the IAM User Guide. For information about using + * GetFederationToken to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.

+ *

You can use the credentials to access a resource that has a resource-based policy. If + * that policy specifically references the federated user session in the + * Principal element of the policy, the session has the permissions allowed by + * the policy. These permissions are granted in addition to the permissions granted by the + * session policies.

+ *

+ * Tags + *

+ *

(Optional) You can pass tag key-value pairs to your session. These are called session + * tags. For more information about session tags, see Passing Session Tags in STS in the + * IAM User Guide.

+ * + *

You can create a mobile-based or browser-based app that can authenticate users using + * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID + * Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or + * AssumeRoleWithWebIdentity. For more information, see Federation Through a Web-based Identity Provider in the + * IAM User Guide.

+ *
+ *

An administrator must grant you the permissions necessary to pass session tags. The + * administrator can also create granular permissions to allow you to pass only specific + * session tags. For more information, see Tutorial: Using Tags + * for Attribute-Based Access Control in the + * IAM User Guide.

+ *

Tag key–value pairs are not case sensitive, but case is preserved. This means that you + * cannot have separate Department and department tag keys. Assume + * that the user that you are federating has the + * Department=Marketing tag and you pass the + * department=engineering session tag. Department + * and department are not saved as separate tags, and the session tag passed in + * the request takes precedence over the user tag.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { STSClient, GetFederationTokenCommand } from "@aws-sdk/client-sts"; // ES Modules import + * // const { STSClient, GetFederationTokenCommand } = require("@aws-sdk/client-sts"); // CommonJS import + * const client = new STSClient(config); + * const input = { // GetFederationTokenRequest + * Name: "STRING_VALUE", // required + * Policy: "STRING_VALUE", + * PolicyArns: [ // policyDescriptorListType + * { // PolicyDescriptorType + * arn: "STRING_VALUE", + * }, + * ], + * DurationSeconds: Number("int"), + * Tags: [ // tagListType + * { // Tag + * Key: "STRING_VALUE", // required + * Value: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new GetFederationTokenCommand(input); + * const response = await client.send(command); + * // { // GetFederationTokenResponse + * // Credentials: { // Credentials + * // AccessKeyId: "STRING_VALUE", // required + * // SecretAccessKey: "STRING_VALUE", // required + * // SessionToken: "STRING_VALUE", // required + * // Expiration: new Date("TIMESTAMP"), // required + * // }, + * // FederatedUser: { // FederatedUser + * // FederatedUserId: "STRING_VALUE", // required + * // Arn: "STRING_VALUE", // required + * // }, + * // PackedPolicySize: Number("int"), + * // }; + * + * ``` + * + * @param GetFederationTokenCommandInput - {@link GetFederationTokenCommandInput} + * @returns {@link GetFederationTokenCommandOutput} + * @see {@link GetFederationTokenCommandInput} for command's `input` shape. + * @see {@link GetFederationTokenCommandOutput} for command's `response` shape. + * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. + * + * @throws {@link MalformedPolicyDocumentException} (client fault) + *

The request was rejected because the policy document was malformed. The error message + * describes the specific error.

+ * + * @throws {@link PackedPolicyTooLargeException} (client fault) + *

The request was rejected because the total packed size of the session policies and + * session tags combined was too large. An Amazon Web Services conversion compresses the session policy + * document, session policy ARNs, and session tags into a packed binary format that has a + * separate limit. The error message indicates by percentage how close the policies and + * tags are to the upper size limit. For more information, see Passing Session Tags in STS in + * the IAM User Guide.

+ *

You could receive this error even though you meet other defined session policy and + * session tag limits. For more information, see IAM and STS Entity + * Character Limits in the IAM User Guide.

+ * + * @throws {@link RegionDisabledException} (client fault) + *

STS is not activated in the requested region for the account that is being asked to + * generate credentials. The account administrator must use the IAM console to activate STS + * in that region. For more information, see Activating and + * Deactivating Amazon Web Services STS in an Amazon Web Services Region in the IAM User + * Guide.

+ * + * @throws {@link STSServiceException} + *

Base exception class for all service exceptions from STS service.

+ * + * @public + * @example To get temporary credentials for a role by using GetFederationToken + * ```javascript + * // + * const input = { + * "DurationSeconds": 3600, + * "Name": "testFedUserSession", + * "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}", + * "Tags": [ + * { + * "Key": "Project", + * "Value": "Pegasus" + * }, + * { + * "Key": "Cost-Center", + * "Value": "98765" + * } + * ] + * }; + * const command = new GetFederationTokenCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "Credentials": { + * "AccessKeyId": "AKIAIOSFODNN7EXAMPLE", + * "Expiration": "2011-07-15T23:28:33.359Z", + * "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + * "SessionToken": "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==" + * }, + * "FederatedUser": { + * "Arn": "arn:aws:sts::123456789012:federated-user/Bob", + * "FederatedUserId": "123456789012:Bob" + * }, + * "PackedPolicySize": 8 + * } + * *\/ + * // example id: to-get-temporary-credentials-for-a-role-by-using-getfederationtoken-1480540749900 + * ``` + * + */ +export declare class GetFederationTokenCommand extends GetFederationTokenCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/commands/GetSessionTokenCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/commands/GetSessionTokenCommand.d.ts new file mode 100644 index 0000000..8f1307f --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/commands/GetSessionTokenCommand.d.ts @@ -0,0 +1,154 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { GetSessionTokenRequest, GetSessionTokenResponse } from "../models/models_0"; +import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetSessionTokenCommand}. + */ +export interface GetSessionTokenCommandInput extends GetSessionTokenRequest { +} +/** + * @public + * + * The output of {@link GetSessionTokenCommand}. + */ +export interface GetSessionTokenCommandOutput extends GetSessionTokenResponse, __MetadataBearer { +} +declare const GetSessionTokenCommand_base: { + new (input: GetSessionTokenCommandInput): import("@smithy/smithy-client").CommandImpl; + new (...[input]: [] | [GetSessionTokenCommandInput]): import("@smithy/smithy-client").CommandImpl; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +/** + *

Returns a set of temporary credentials for an Amazon Web Services account or IAM user. + * The credentials consist of an access key ID, a secret access key, and a security token. + * Typically, you use GetSessionToken if you want to use MFA to protect + * programmatic calls to specific Amazon Web Services API operations like Amazon EC2 + * StopInstances.

+ *

MFA-enabled IAM users must call GetSessionToken and submit + * an MFA code that is associated with their MFA device. Using the temporary security + * credentials that the call returns, IAM users can then make programmatic + * calls to API operations that require MFA authentication. An incorrect MFA code causes the + * API to return an access denied error. For a comparison of GetSessionToken with + * the other API operations that produce temporary credentials, see Requesting + * Temporary Security Credentials and Comparing the + * Amazon Web Services STS API operations in the IAM User Guide.

+ * + *

No permissions are required for users to perform this operation. The purpose of the + * sts:GetSessionToken operation is to authenticate the user using MFA. You + * cannot use policies to control authentication operations. For more information, see + * Permissions for GetSessionToken in the + * IAM User Guide.

+ *
+ *

+ * Session Duration + *

+ *

The GetSessionToken operation must be called by using the long-term Amazon Web Services + * security credentials of an IAM user. Credentials that are created by IAM users are valid for the duration that you specify. This duration can range + * from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default + * of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900 + * seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.

+ *

+ * Permissions + *

+ *

The temporary security credentials created by GetSessionToken can be used + * to make API calls to any Amazon Web Services service with the following exceptions:

+ *
    + *
  • + *

    You cannot call any IAM API operations unless MFA authentication information is + * included in the request.

    + *
  • + *
  • + *

    You cannot call any STS API except + * AssumeRole or GetCallerIdentity.

    + *
  • + *
+ *

The credentials that GetSessionToken returns are based on permissions + * associated with the IAM user whose credentials were used to call the + * operation. The temporary credentials have the same permissions as the IAM user.

+ * + *

Although it is possible to call GetSessionToken using the security + * credentials of an Amazon Web Services account root user rather than an IAM user, we do + * not recommend it. If GetSessionToken is called using root user + * credentials, the temporary credentials have root user permissions. For more + * information, see Safeguard your root user credentials and don't use them for everyday tasks in the + * IAM User Guide + *

+ *
+ *

For more information about using GetSessionToken to create temporary + * credentials, see Temporary + * Credentials for Users in Untrusted Environments in the + * IAM User Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { STSClient, GetSessionTokenCommand } from "@aws-sdk/client-sts"; // ES Modules import + * // const { STSClient, GetSessionTokenCommand } = require("@aws-sdk/client-sts"); // CommonJS import + * const client = new STSClient(config); + * const input = { // GetSessionTokenRequest + * DurationSeconds: Number("int"), + * SerialNumber: "STRING_VALUE", + * TokenCode: "STRING_VALUE", + * }; + * const command = new GetSessionTokenCommand(input); + * const response = await client.send(command); + * // { // GetSessionTokenResponse + * // Credentials: { // Credentials + * // AccessKeyId: "STRING_VALUE", // required + * // SecretAccessKey: "STRING_VALUE", // required + * // SessionToken: "STRING_VALUE", // required + * // Expiration: new Date("TIMESTAMP"), // required + * // }, + * // }; + * + * ``` + * + * @param GetSessionTokenCommandInput - {@link GetSessionTokenCommandInput} + * @returns {@link GetSessionTokenCommandOutput} + * @see {@link GetSessionTokenCommandInput} for command's `input` shape. + * @see {@link GetSessionTokenCommandOutput} for command's `response` shape. + * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. + * + * @throws {@link RegionDisabledException} (client fault) + *

STS is not activated in the requested region for the account that is being asked to + * generate credentials. The account administrator must use the IAM console to activate STS + * in that region. For more information, see Activating and + * Deactivating Amazon Web Services STS in an Amazon Web Services Region in the IAM User + * Guide.

+ * + * @throws {@link STSServiceException} + *

Base exception class for all service exceptions from STS service.

+ * + * @public + * @example To get temporary credentials for an IAM user or an AWS account + * ```javascript + * // + * const input = { + * "DurationSeconds": 3600, + * "SerialNumber": "YourMFASerialNumber", + * "TokenCode": "123456" + * }; + * const command = new GetSessionTokenCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "Credentials": { + * "AccessKeyId": "AKIAIOSFODNN7EXAMPLE", + * "Expiration": "2011-07-11T19:55:29.611Z", + * "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + * "SessionToken": "AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/LTo6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3zrkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtpZ3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE" + * } + * } + * *\/ + * // example id: to-get-temporary-credentials-for-an-iam-user-or-an-aws-account-1480540814038 + * ``` + * + */ +export declare class GetSessionTokenCommand extends GetSessionTokenCommand_base { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/commands/index.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/commands/index.d.ts new file mode 100644 index 0000000..802202f --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/commands/index.d.ts @@ -0,0 +1,8 @@ +export * from "./AssumeRoleCommand"; +export * from "./AssumeRoleWithSAMLCommand"; +export * from "./AssumeRoleWithWebIdentityCommand"; +export * from "./DecodeAuthorizationMessageCommand"; +export * from "./GetAccessKeyInfoCommand"; +export * from "./GetCallerIdentityCommand"; +export * from "./GetFederationTokenCommand"; +export * from "./GetSessionTokenCommand"; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/credentialDefaultProvider.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/credentialDefaultProvider.d.ts new file mode 100644 index 0000000..78f0d07 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/credentialDefaultProvider.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const defaultProvider: any; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/defaultRoleAssumers.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/defaultRoleAssumers.d.ts new file mode 100644 index 0000000..0e25207 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/defaultRoleAssumers.d.ts @@ -0,0 +1,23 @@ +import { Pluggable } from "@smithy/types"; +import { DefaultCredentialProvider, RoleAssumer, RoleAssumerWithWebIdentity, STSRoleAssumerOptions } from "./defaultStsRoleAssumers"; +import { ServiceInputTypes, ServiceOutputTypes } from "./STSClient"; +/** + * The default role assumer that used by credential providers when sts:AssumeRole API is needed. + */ +export declare const getDefaultRoleAssumer: (stsOptions?: STSRoleAssumerOptions, stsPlugins?: Pluggable[]) => RoleAssumer; +/** + * The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed. + */ +export declare const getDefaultRoleAssumerWithWebIdentity: (stsOptions?: STSRoleAssumerOptions, stsPlugins?: Pluggable[]) => RoleAssumerWithWebIdentity; +/** + * The default credential providers depend STS client to assume role with desired API: sts:assumeRole, + * sts:assumeRoleWithWebIdentity, etc. This function decorates the default credential provider with role assumers which + * encapsulates the process of calling STS commands. This can only be imported by AWS client packages to avoid circular + * dependencies. + * + * @internal + * + * @deprecated this is no longer needed. Use the defaultProvider directly, + * which will load STS if needed. + */ +export declare const decorateDefaultCredentialProvider: (provider: DefaultCredentialProvider) => DefaultCredentialProvider; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers.d.ts new file mode 100644 index 0000000..7064273 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers.d.ts @@ -0,0 +1,43 @@ +import type { CredentialProviderOptions } from "@aws-sdk/types"; +import { AwsCredentialIdentity, Logger, Provider } from "@smithy/types"; +import { AssumeRoleCommandInput } from "./commands/AssumeRoleCommand"; +import { AssumeRoleWithWebIdentityCommandInput } from "./commands/AssumeRoleWithWebIdentityCommand"; +import type { STSClient, STSClientConfig } from "./STSClient"; +/** + * @public + */ +export type STSRoleAssumerOptions = Pick & { + credentialProviderLogger?: Logger; + parentClientConfig?: CredentialProviderOptions["parentClientConfig"]; +}; +/** + * @internal + */ +export type RoleAssumer = (sourceCreds: AwsCredentialIdentity, params: AssumeRoleCommandInput) => Promise; +/** + * The default role assumer that used by credential providers when sts:AssumeRole API is needed. + * @internal + */ +export declare const getDefaultRoleAssumer: (stsOptions: STSRoleAssumerOptions, stsClientCtor: new (options: STSClientConfig) => STSClient) => RoleAssumer; +/** + * @internal + */ +export type RoleAssumerWithWebIdentity = (params: AssumeRoleWithWebIdentityCommandInput) => Promise; +/** + * The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed. + * @internal + */ +export declare const getDefaultRoleAssumerWithWebIdentity: (stsOptions: STSRoleAssumerOptions, stsClientCtor: new (options: STSClientConfig) => STSClient) => RoleAssumerWithWebIdentity; +/** + * @internal + */ +export type DefaultCredentialProvider = (input: any) => Provider; +/** + * The default credential providers depend STS client to assume role with desired API: sts:assumeRole, + * sts:assumeRoleWithWebIdentity, etc. This function decorates the default credential provider with role assumers which + * encapsulates the process of calling STS commands. This can only be imported by AWS client packages to avoid circular + * dependencies. + * + * @internal + */ +export declare const decorateDefaultCredentialProvider: (provider: DefaultCredentialProvider) => DefaultCredentialProvider; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/endpoint/EndpointParameters.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/endpoint/EndpointParameters.d.ts new file mode 100644 index 0000000..39f6c7e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/endpoint/EndpointParameters.d.ts @@ -0,0 +1,46 @@ +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; +/** + * @public + */ +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; + useGlobalEndpoint?: boolean | Provider; +} +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const resolveClientEndpointParameters: (options: T & ClientInputEndpointParameters) => T & ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const commonParams: { + readonly UseGlobalEndpoint: { + readonly type: "builtInParams"; + readonly name: "useGlobalEndpoint"; + }; + readonly UseFIPS: { + readonly type: "builtInParams"; + readonly name: "useFipsEndpoint"; + }; + readonly Endpoint: { + readonly type: "builtInParams"; + readonly name: "endpoint"; + }; + readonly Region: { + readonly type: "builtInParams"; + readonly name: "region"; + }; + readonly UseDualStack: { + readonly type: "builtInParams"; + readonly name: "useDualstackEndpoint"; + }; +}; +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; + UseGlobalEndpoint?: boolean; +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/endpoint/endpointResolver.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/endpoint/endpointResolver.d.ts new file mode 100644 index 0000000..70a8eae --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/endpoint/endpointResolver.d.ts @@ -0,0 +1,5 @@ +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParameters } from "./EndpointParameters"; +export declare const defaultEndpointResolver: (endpointParams: EndpointParameters, context?: { + logger?: Logger; +}) => EndpointV2; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/endpoint/ruleset.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/endpoint/ruleset.d.ts new file mode 100644 index 0000000..4b23899 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/endpoint/ruleset.d.ts @@ -0,0 +1,2 @@ +import { RuleSetObject } from "@smithy/types"; +export declare const ruleSet: RuleSetObject; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/extensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/extensionConfiguration.d.ts new file mode 100644 index 0000000..970e12b --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/extensionConfiguration.d.ts @@ -0,0 +1,9 @@ +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; +/** + * @internal + */ +export interface STSExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration { +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/index.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/index.d.ts new file mode 100644 index 0000000..730be1a --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/index.d.ts @@ -0,0 +1,18 @@ +/** + * Security Token Service + *

Security Token Service (STS) enables you to request temporary, limited-privilege + * credentials for users. This guide provides descriptions of the STS API. For + * more information about using this service, see Temporary Security Credentials.

+ * + * @packageDocumentation + */ +export * from "./STSClient"; +export * from "./STS"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { STSExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export * from "./defaultRoleAssumers"; +export { STSServiceException } from "./models/STSServiceException"; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/models/STSServiceException.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/models/STSServiceException.d.ts new file mode 100644 index 0000000..4a05ac8 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/models/STSServiceException.d.ts @@ -0,0 +1,13 @@ +import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client"; +export { __ServiceException, __ServiceExceptionOptions }; +/** + * @public + * + * Base exception class for all service exceptions from STS service. + */ +export declare class STSServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions); +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/models/index.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/models/index.d.ts new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/models/index.d.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/models/models_0.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/models/models_0.d.ts new file mode 100644 index 0000000..a327626 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/models/models_0.d.ts @@ -0,0 +1,1213 @@ +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { STSServiceException as __BaseException } from "./STSServiceException"; +/** + *

The identifiers for the temporary security credentials that the operation + * returns.

+ * @public + */ +export interface AssumedRoleUser { + /** + *

A unique identifier that contains the role ID and the role session name of the role that + * is being assumed. The role ID is generated by Amazon Web Services when the role is created.

+ * @public + */ + AssumedRoleId: string | undefined; + /** + *

The ARN of the temporary security credentials that are returned from the AssumeRole action. For more information about ARNs and how to use them in + * policies, see IAM Identifiers in the + * IAM User Guide.

+ * @public + */ + Arn: string | undefined; +} +/** + *

A reference to the IAM managed policy that is passed as a session policy for a role + * session or a federated user session.

+ * @public + */ +export interface PolicyDescriptorType { + /** + *

The Amazon Resource Name (ARN) of the IAM managed policy to use as a session policy + * for the role. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services + * Service Namespaces in the Amazon Web Services General Reference.

+ * @public + */ + arn?: string; +} +/** + *

Contains information about the provided context. This includes the signed and encrypted + * trusted context assertion and the context provider ARN from which the trusted context + * assertion was generated.

+ * @public + */ +export interface ProvidedContext { + /** + *

The context provider ARN from which the trusted context assertion was generated.

+ * @public + */ + ProviderArn?: string; + /** + *

The signed and encrypted trusted context assertion generated by the context provider. + * The trusted context assertion is signed and encrypted by Amazon Web Services STS.

+ * @public + */ + ContextAssertion?: string; +} +/** + *

You can pass custom key-value pair attributes when you assume a role or federate a user. + * These are called session tags. You can then use the session tags to control access to + * resources. For more information, see Tagging Amazon Web Services STS Sessions in the + * IAM User Guide.

+ * @public + */ +export interface Tag { + /** + *

The key for a session tag.

+ *

You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 + * characters. For these and additional limits, see IAM + * and STS Character Limits in the IAM User Guide.

+ * @public + */ + Key: string | undefined; + /** + *

The value for a session tag.

+ *

You can pass up to 50 session tags. The plain text session tag values can’t exceed 256 + * characters. For these and additional limits, see IAM + * and STS Character Limits in the IAM User Guide.

+ * @public + */ + Value: string | undefined; +} +/** + * @public + */ +export interface AssumeRoleRequest { + /** + *

The Amazon Resource Name (ARN) of the role to assume.

+ * @public + */ + RoleArn: string | undefined; + /** + *

An identifier for the assumed role session.

+ *

Use the role session name to uniquely identify a session when the same role is assumed + * by different principals or for different reasons. In cross-account scenarios, the role + * session name is visible to, and can be logged by the account that owns the role. The role + * session name is also used in the ARN of the assumed role principal. This means that + * subsequent cross-account API requests that use the temporary security credentials will + * expose the role session name to the external account in their CloudTrail logs.

+ *

The regex used to validate this parameter is a string of characters + * consisting of upper- and lower-case alphanumeric characters with no spaces. You can + * also include underscores or any of the following characters: =,.@-

+ * @public + */ + RoleSessionName: string | undefined; + /** + *

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as + * managed session policies. The policies must exist in the same account as the role.

+ *

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the + * plaintext that you use for both inline and managed session policies can't exceed 2,048 + * characters. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services + * Service Namespaces in the Amazon Web Services General Reference.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ *

Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ * @public + */ + PolicyArns?: PolicyDescriptorType[]; + /** + *

An IAM policy in JSON format that you want to use as an inline session policy.

+ *

This parameter is optional. Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ *

The plaintext that you use for both inline and managed session policies can't exceed + * 2,048 characters. The JSON policy characters can be any ASCII character from the space + * character to the end of the valid character list (\u0020 through \u00FF). It can also + * include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) + * characters.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ * @public + */ + Policy?: string; + /** + *

The duration, in seconds, of the role session. The value specified can range from 900 + * seconds (15 minutes) up to the maximum session duration set for the role. The maximum + * session duration setting can have a value from 1 hour to 12 hours. If you specify a value + * higher than this setting or the administrator setting (whichever is lower), the operation + * fails. For example, if you specify a session duration of 12 hours, but your administrator + * set the maximum session duration to 6 hours, your operation fails.

+ *

Role chaining limits your Amazon Web Services CLI or Amazon Web Services API role session to a maximum of one hour. + * When you use the AssumeRole API operation to assume a role, you can specify + * the duration of your role session with the DurationSeconds parameter. You can + * specify a parameter value of up to 43200 seconds (12 hours), depending on the maximum + * session duration setting for your role. However, if you assume a role using role chaining + * and provide a DurationSeconds parameter value greater than one hour, the + * operation fails. To learn how to view the maximum value for your role, see View the + * Maximum Session Duration Setting for a Role in the + * IAM User Guide.

+ *

By default, the value is set to 3600 seconds.

+ * + *

The DurationSeconds parameter is separate from the duration of a console + * session that you might request using the returned credentials. The request to the + * federation endpoint for a console sign-in token takes a SessionDuration + * parameter that specifies the maximum length of the console session. For more + * information, see Creating a URL + * that Enables Federated Users to Access the Amazon Web Services Management Console in the + * IAM User Guide.

+ *
+ * @public + */ + DurationSeconds?: number; + /** + *

A list of session tags that you want to pass. Each session tag consists of a key name + * and an associated value. For more information about session tags, see Tagging Amazon Web Services STS + * Sessions in the IAM User Guide.

+ *

This parameter is optional. You can pass up to 50 session tags. The plaintext session + * tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these + * and additional limits, see IAM + * and STS Character Limits in the IAM User Guide.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ *

You can pass a session tag with the same key as a tag that is already attached to the + * role. When you do, session tags override a role tag with the same key.

+ *

Tag key–value pairs are not case sensitive, but case is preserved. This means that you + * cannot have separate Department and department tag keys. Assume + * that the role has the Department=Marketing tag and you pass the + * department=engineering session tag. Department + * and department are not saved as separate tags, and the session tag passed in + * the request takes precedence over the role tag.

+ *

Additionally, if you used temporary credentials to perform this operation, the new + * session inherits any transitive session tags from the calling session. If you pass a + * session tag with the same key as an inherited tag, the operation fails. To view the + * inherited tags for a session, see the CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the + * IAM User Guide.

+ * @public + */ + Tags?: Tag[]; + /** + *

A list of keys for session tags that you want to set as transitive. If you set a tag key + * as transitive, the corresponding key and value passes to subsequent sessions in a role + * chain. For more information, see Chaining Roles + * with Session Tags in the IAM User Guide.

+ *

This parameter is optional. When you set session tags as transitive, the session policy + * and session tags packed binary limit is not affected.

+ *

If you choose not to specify a transitive tag key, then no tags are passed from this + * session to any subsequent sessions.

+ * @public + */ + TransitiveTagKeys?: string[]; + /** + *

A unique identifier that might be required when you assume a role in another account. If + * the administrator of the account to which the role belongs provided you with an external + * ID, then provide that value in the ExternalId parameter. This value can be any + * string, such as a passphrase or account number. A cross-account role is usually set up to + * trust everyone in an account. Therefore, the administrator of the trusting account might + * send an external ID to the administrator of the trusted account. That way, only someone + * with the ID can assume the role, rather than everyone in the account. For more information + * about the external ID, see How to Use an External ID + * When Granting Access to Your Amazon Web Services Resources to a Third Party in the + * IAM User Guide.

+ *

The regex used to validate this parameter is a string of + * characters consisting of upper- and lower-case alphanumeric characters with no spaces. + * You can also include underscores or any of the following characters: =,.@:/-

+ * @public + */ + ExternalId?: string; + /** + *

The identification number of the MFA device that is associated with the user who is + * making the AssumeRole call. Specify this value if the trust policy of the role + * being assumed includes a condition that requires MFA authentication. The value is either + * the serial number for a hardware device (such as GAHT12345678) or an Amazon + * Resource Name (ARN) for a virtual device (such as + * arn:aws:iam::123456789012:mfa/user).

+ *

The regex used to validate this parameter is a string of characters + * consisting of upper- and lower-case alphanumeric characters with no spaces. You can + * also include underscores or any of the following characters: =,.@-

+ * @public + */ + SerialNumber?: string; + /** + *

The value provided by the MFA device, if the trust policy of the role being assumed + * requires MFA. (In other words, if the policy includes a condition that tests for MFA). If + * the role being assumed requires MFA and if the TokenCode value is missing or + * expired, the AssumeRole call returns an "access denied" error.

+ *

The format for this parameter, as described by its regex pattern, is a sequence of six + * numeric digits.

+ * @public + */ + TokenCode?: string; + /** + *

The source identity specified by the principal that is calling the + * AssumeRole operation.

+ *

You can require users to specify a source identity when they assume a role. You do this + * by using the sts:SourceIdentity condition key in a role trust policy. You can + * use source identity information in CloudTrail logs to determine who took actions with a role. + * You can use the aws:SourceIdentity condition key to further control access to + * Amazon Web Services resources based on the value of source identity. For more information about using + * source identity, see Monitor and control + * actions taken with assumed roles in the + * IAM User Guide.

+ *

The regex used to validate this parameter is a string of characters consisting of upper- + * and lower-case alphanumeric characters with no spaces. You can also include underscores or + * any of the following characters: =,.@-. You cannot use a value that begins with the text + * aws:. This prefix is reserved for Amazon Web Services internal use.

+ * @public + */ + SourceIdentity?: string; + /** + *

A list of previously acquired trusted context assertions in the format of a JSON array. + * The trusted context assertion is signed and encrypted by Amazon Web Services STS.

+ *

The following is an example of a ProvidedContext value that includes a + * single trusted context assertion and the ARN of the context provider from which the trusted + * context assertion was generated.

+ *

+ * [\{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"\}] + *

+ * @public + */ + ProvidedContexts?: ProvidedContext[]; +} +/** + *

Amazon Web Services credentials for API authentication.

+ * @public + */ +export interface Credentials { + /** + *

The access key ID that identifies the temporary security credentials.

+ * @public + */ + AccessKeyId: string | undefined; + /** + *

The secret access key that can be used to sign requests.

+ * @public + */ + SecretAccessKey: string | undefined; + /** + *

The token that users must pass to the service API to use the temporary + * credentials.

+ * @public + */ + SessionToken: string | undefined; + /** + *

The date on which the current credentials expire.

+ * @public + */ + Expiration: Date | undefined; +} +/** + *

Contains the response to a successful AssumeRole request, including + * temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests.

+ * @public + */ +export interface AssumeRoleResponse { + /** + *

The temporary security credentials, which include an access key ID, a secret access key, + * and a security (or session) token.

+ * + *

The size of the security token that STS API operations return is not fixed. We + * strongly recommend that you make no assumptions about the maximum size.

+ *
+ * @public + */ + Credentials?: Credentials; + /** + *

The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you + * can use to refer to the resulting temporary security credentials. For example, you can + * reference these credentials as a principal in a resource-based policy by using the ARN or + * assumed role ID. The ARN and ID include the RoleSessionName that you specified + * when you called AssumeRole.

+ * @public + */ + AssumedRoleUser?: AssumedRoleUser; + /** + *

A percentage value that indicates the packed size of the session policies and session + * tags combined passed in the request. The request fails if the packed size is greater than 100 percent, + * which means the policies and tags exceeded the allowed space.

+ * @public + */ + PackedPolicySize?: number; + /** + *

The source identity specified by the principal that is calling the + * AssumeRole operation.

+ *

You can require users to specify a source identity when they assume a role. You do this + * by using the sts:SourceIdentity condition key in a role trust policy. You can + * use source identity information in CloudTrail logs to determine who took actions with a role. + * You can use the aws:SourceIdentity condition key to further control access to + * Amazon Web Services resources based on the value of source identity. For more information about using + * source identity, see Monitor and control + * actions taken with assumed roles in the + * IAM User Guide.

+ *

The regex used to validate this parameter is a string of characters consisting of upper- + * and lower-case alphanumeric characters with no spaces. You can also include underscores or + * any of the following characters: =,.@-

+ * @public + */ + SourceIdentity?: string; +} +/** + *

The web identity token that was passed is expired or is not valid. Get a new identity + * token from the identity provider and then retry the request.

+ * @public + */ +export declare class ExpiredTokenException extends __BaseException { + readonly name: "ExpiredTokenException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

The request was rejected because the policy document was malformed. The error message + * describes the specific error.

+ * @public + */ +export declare class MalformedPolicyDocumentException extends __BaseException { + readonly name: "MalformedPolicyDocumentException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

The request was rejected because the total packed size of the session policies and + * session tags combined was too large. An Amazon Web Services conversion compresses the session policy + * document, session policy ARNs, and session tags into a packed binary format that has a + * separate limit. The error message indicates by percentage how close the policies and + * tags are to the upper size limit. For more information, see Passing Session Tags in STS in + * the IAM User Guide.

+ *

You could receive this error even though you meet other defined session policy and + * session tag limits. For more information, see IAM and STS Entity + * Character Limits in the IAM User Guide.

+ * @public + */ +export declare class PackedPolicyTooLargeException extends __BaseException { + readonly name: "PackedPolicyTooLargeException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

STS is not activated in the requested region for the account that is being asked to + * generate credentials. The account administrator must use the IAM console to activate STS + * in that region. For more information, see Activating and + * Deactivating Amazon Web Services STS in an Amazon Web Services Region in the IAM User + * Guide.

+ * @public + */ +export declare class RegionDisabledException extends __BaseException { + readonly name: "RegionDisabledException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface AssumeRoleWithSAMLRequest { + /** + *

The Amazon Resource Name (ARN) of the role that the caller is assuming.

+ * @public + */ + RoleArn: string | undefined; + /** + *

The Amazon Resource Name (ARN) of the SAML provider in IAM that describes the + * IdP.

+ * @public + */ + PrincipalArn: string | undefined; + /** + *

The base64 encoded SAML authentication response provided by the IdP.

+ *

For more information, see Configuring a Relying Party and + * Adding Claims in the IAM User Guide.

+ * @public + */ + SAMLAssertion: string | undefined; + /** + *

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as + * managed session policies. The policies must exist in the same account as the role.

+ *

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the + * plaintext that you use for both inline and managed session policies can't exceed 2,048 + * characters. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services + * Service Namespaces in the Amazon Web Services General Reference.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ *

Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ * @public + */ + PolicyArns?: PolicyDescriptorType[]; + /** + *

An IAM policy in JSON format that you want to use as an inline session policy.

+ *

This parameter is optional. Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ *

The plaintext that you use for both inline and managed session policies can't exceed + * 2,048 characters. The JSON policy characters can be any ASCII character from the space + * character to the end of the valid character list (\u0020 through \u00FF). It can also + * include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) + * characters.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ * @public + */ + Policy?: string; + /** + *

The duration, in seconds, of the role session. Your role session lasts for the duration + * that you specify for the DurationSeconds parameter, or until the time + * specified in the SAML authentication response's SessionNotOnOrAfter value, + * whichever is shorter. You can provide a DurationSeconds value from 900 seconds + * (15 minutes) up to the maximum session duration setting for the role. This setting can have + * a value from 1 hour to 12 hours. If you specify a value higher than this setting, the + * operation fails. For example, if you specify a session duration of 12 hours, but your + * administrator set the maximum session duration to 6 hours, your operation fails. To learn + * how to view the maximum value for your role, see View the + * Maximum Session Duration Setting for a Role in the + * IAM User Guide.

+ *

By default, the value is set to 3600 seconds.

+ * + *

The DurationSeconds parameter is separate from the duration of a console + * session that you might request using the returned credentials. The request to the + * federation endpoint for a console sign-in token takes a SessionDuration + * parameter that specifies the maximum length of the console session. For more + * information, see Creating a URL + * that Enables Federated Users to Access the Amazon Web Services Management Console in the + * IAM User Guide.

+ *
+ * @public + */ + DurationSeconds?: number; +} +/** + *

Contains the response to a successful AssumeRoleWithSAML request, + * including temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests.

+ * @public + */ +export interface AssumeRoleWithSAMLResponse { + /** + *

The temporary security credentials, which include an access key ID, a secret access key, + * and a security (or session) token.

+ * + *

The size of the security token that STS API operations return is not fixed. We + * strongly recommend that you make no assumptions about the maximum size.

+ *
+ * @public + */ + Credentials?: Credentials; + /** + *

The identifiers for the temporary security credentials that the operation + * returns.

+ * @public + */ + AssumedRoleUser?: AssumedRoleUser; + /** + *

A percentage value that indicates the packed size of the session policies and session + * tags combined passed in the request. The request fails if the packed size is greater than 100 percent, + * which means the policies and tags exceeded the allowed space.

+ * @public + */ + PackedPolicySize?: number; + /** + *

The value of the NameID element in the Subject element of the + * SAML assertion.

+ * @public + */ + Subject?: string; + /** + *

The format of the name ID, as defined by the Format attribute in the + * NameID element of the SAML assertion. Typical examples of the format are + * transient or persistent.

+ *

If the format includes the prefix + * urn:oasis:names:tc:SAML:2.0:nameid-format, that prefix is removed. For + * example, urn:oasis:names:tc:SAML:2.0:nameid-format:transient is returned as + * transient. If the format includes any other prefix, the format is returned + * with no modifications.

+ * @public + */ + SubjectType?: string; + /** + *

The value of the Issuer element of the SAML assertion.

+ * @public + */ + Issuer?: string; + /** + *

The value of the Recipient attribute of the + * SubjectConfirmationData element of the SAML assertion.

+ * @public + */ + Audience?: string; + /** + *

A hash value based on the concatenation of the following:

+ *
    + *
  • + *

    The Issuer response value.

    + *
  • + *
  • + *

    The Amazon Web Services account ID.

    + *
  • + *
  • + *

    The friendly name (the last part of the ARN) of the SAML provider in IAM.

    + *
  • + *
+ *

The combination of NameQualifier and Subject can be used to + * uniquely identify a user.

+ *

The following pseudocode shows how the hash value is calculated:

+ *

+ * BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) ) + *

+ * @public + */ + NameQualifier?: string; + /** + *

The value in the SourceIdentity attribute in the SAML assertion.

+ *

You can require users to set a source identity value when they assume a role. You do + * this by using the sts:SourceIdentity condition key in a role trust policy. + * That way, actions that are taken with the role are associated with that user. After the + * source identity is set, the value cannot be changed. It is present in the request for all + * actions that are taken by the role and persists across chained + * role sessions. You can configure your SAML identity provider to use an attribute + * associated with your users, like user name or email, as the source identity when calling + * AssumeRoleWithSAML. You do this by adding an attribute to the SAML + * assertion. For more information about using source identity, see Monitor and control + * actions taken with assumed roles in the + * IAM User Guide.

+ *

The regex used to validate this parameter is a string of characters + * consisting of upper- and lower-case alphanumeric characters with no spaces. You can + * also include underscores or any of the following characters: =,.@-

+ * @public + */ + SourceIdentity?: string; +} +/** + *

The identity provider (IdP) reported that authentication failed. This might be because + * the claim is invalid.

+ *

If this error is returned for the AssumeRoleWithWebIdentity operation, it + * can also mean that the claim has expired or has been explicitly revoked.

+ * @public + */ +export declare class IDPRejectedClaimException extends __BaseException { + readonly name: "IDPRejectedClaimException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + *

The web identity token that was passed could not be validated by Amazon Web Services. Get a new + * identity token from the identity provider and then retry the request.

+ * @public + */ +export declare class InvalidIdentityTokenException extends __BaseException { + readonly name: "InvalidIdentityTokenException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface AssumeRoleWithWebIdentityRequest { + /** + *

The Amazon Resource Name (ARN) of the role that the caller is assuming.

+ * @public + */ + RoleArn: string | undefined; + /** + *

An identifier for the assumed role session. Typically, you pass the name or identifier + * that is associated with the user who is using your application. That way, the temporary + * security credentials that your application will use are associated with that user. This + * session name is included as part of the ARN and assumed role ID in the + * AssumedRoleUser response element.

+ *

The regex used to validate this parameter is a string of characters + * consisting of upper- and lower-case alphanumeric characters with no spaces. You can + * also include underscores or any of the following characters: =,.@-

+ * @public + */ + RoleSessionName: string | undefined; + /** + *

The OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity + * provider. Your application must get this token by authenticating the user who is using your + * application with a web identity provider before the application makes an + * AssumeRoleWithWebIdentity call. Only tokens with RSA algorithms (RS256) are + * supported.

+ * @public + */ + WebIdentityToken: string | undefined; + /** + *

The fully qualified host component of the domain name of the OAuth 2.0 identity + * provider. Do not specify this value for an OpenID Connect identity provider.

+ *

Currently www.amazon.com and graph.facebook.com are the only + * supported identity providers for OAuth 2.0 access tokens. Do not include URL schemes and + * port numbers.

+ *

Do not specify this value for OpenID Connect ID tokens.

+ * @public + */ + ProviderId?: string; + /** + *

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as + * managed session policies. The policies must exist in the same account as the role.

+ *

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the + * plaintext that you use for both inline and managed session policies can't exceed 2,048 + * characters. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services + * Service Namespaces in the Amazon Web Services General Reference.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ *

Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ * @public + */ + PolicyArns?: PolicyDescriptorType[]; + /** + *

An IAM policy in JSON format that you want to use as an inline session policy.

+ *

This parameter is optional. Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ *

The plaintext that you use for both inline and managed session policies can't exceed + * 2,048 characters. The JSON policy characters can be any ASCII character from the space + * character to the end of the valid character list (\u0020 through \u00FF). It can also + * include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) + * characters.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ * @public + */ + Policy?: string; + /** + *

The duration, in seconds, of the role session. The value can range from 900 seconds (15 + * minutes) up to the maximum session duration setting for the role. This setting can have a + * value from 1 hour to 12 hours. If you specify a value higher than this setting, the + * operation fails. For example, if you specify a session duration of 12 hours, but your + * administrator set the maximum session duration to 6 hours, your operation fails. To learn + * how to view the maximum value for your role, see View the + * Maximum Session Duration Setting for a Role in the + * IAM User Guide.

+ *

By default, the value is set to 3600 seconds.

+ * + *

The DurationSeconds parameter is separate from the duration of a console + * session that you might request using the returned credentials. The request to the + * federation endpoint for a console sign-in token takes a SessionDuration + * parameter that specifies the maximum length of the console session. For more + * information, see Creating a URL + * that Enables Federated Users to Access the Amazon Web Services Management Console in the + * IAM User Guide.

+ *
+ * @public + */ + DurationSeconds?: number; +} +/** + *

Contains the response to a successful AssumeRoleWithWebIdentity + * request, including temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests.

+ * @public + */ +export interface AssumeRoleWithWebIdentityResponse { + /** + *

The temporary security credentials, which include an access key ID, a secret access key, + * and a security token.

+ * + *

The size of the security token that STS API operations return is not fixed. We + * strongly recommend that you make no assumptions about the maximum size.

+ *
+ * @public + */ + Credentials?: Credentials; + /** + *

The unique user identifier that is returned by the identity provider. This identifier is + * associated with the WebIdentityToken that was submitted with the + * AssumeRoleWithWebIdentity call. The identifier is typically unique to the + * user and the application that acquired the WebIdentityToken (pairwise + * identifier). For OpenID Connect ID tokens, this field contains the value returned by the + * identity provider as the token's sub (Subject) claim.

+ * @public + */ + SubjectFromWebIdentityToken?: string; + /** + *

The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you + * can use to refer to the resulting temporary security credentials. For example, you can + * reference these credentials as a principal in a resource-based policy by using the ARN or + * assumed role ID. The ARN and ID include the RoleSessionName that you specified + * when you called AssumeRole.

+ * @public + */ + AssumedRoleUser?: AssumedRoleUser; + /** + *

A percentage value that indicates the packed size of the session policies and session + * tags combined passed in the request. The request fails if the packed size is greater than 100 percent, + * which means the policies and tags exceeded the allowed space.

+ * @public + */ + PackedPolicySize?: number; + /** + *

The issuing authority of the web identity token presented. For OpenID Connect ID + * tokens, this contains the value of the iss field. For OAuth 2.0 access tokens, + * this contains the value of the ProviderId parameter that was passed in the + * AssumeRoleWithWebIdentity request.

+ * @public + */ + Provider?: string; + /** + *

The intended audience (also known as client ID) of the web identity token. This is + * traditionally the client identifier issued to the application that requested the web + * identity token.

+ * @public + */ + Audience?: string; + /** + *

The value of the source identity that is returned in the JSON web token (JWT) from the + * identity provider.

+ *

You can require users to set a source identity value when they assume a role. You do + * this by using the sts:SourceIdentity condition key in a role trust policy. + * That way, actions that are taken with the role are associated with that user. After the + * source identity is set, the value cannot be changed. It is present in the request for all + * actions that are taken by the role and persists across chained + * role sessions. You can configure your identity provider to use an attribute + * associated with your users, like user name or email, as the source identity when calling + * AssumeRoleWithWebIdentity. You do this by adding a claim to the JSON web + * token. To learn more about OIDC tokens and claims, see Using Tokens with User Pools in the Amazon Cognito Developer Guide. + * For more information about using source identity, see Monitor and control + * actions taken with assumed roles in the + * IAM User Guide.

+ *

The regex used to validate this parameter is a string of characters + * consisting of upper- and lower-case alphanumeric characters with no spaces. You can + * also include underscores or any of the following characters: =,.@-

+ * @public + */ + SourceIdentity?: string; +} +/** + *

The request could not be fulfilled because the identity provider (IDP) that + * was asked to verify the incoming identity token could not be reached. This is often a + * transient error caused by network conditions. Retry the request a limited number of + * times so that you don't exceed the request rate. If the error persists, the + * identity provider might be down or not responding.

+ * @public + */ +export declare class IDPCommunicationErrorException extends __BaseException { + readonly name: "IDPCommunicationErrorException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface DecodeAuthorizationMessageRequest { + /** + *

The encoded message that was returned with the response.

+ * @public + */ + EncodedMessage: string | undefined; +} +/** + *

A document that contains additional information about the authorization status of a + * request from an encoded message that is returned in response to an Amazon Web Services request.

+ * @public + */ +export interface DecodeAuthorizationMessageResponse { + /** + *

The API returns a response with the decoded message.

+ * @public + */ + DecodedMessage?: string; +} +/** + *

The error returned if the message passed to DecodeAuthorizationMessage + * was invalid. This can happen if the token contains invalid characters, such as + * linebreaks.

+ * @public + */ +export declare class InvalidAuthorizationMessageException extends __BaseException { + readonly name: "InvalidAuthorizationMessageException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType); +} +/** + * @public + */ +export interface GetAccessKeyInfoRequest { + /** + *

The identifier of an access key.

+ *

This parameter allows (through its regex pattern) a string of characters that can + * consist of any upper- or lowercase letter or digit.

+ * @public + */ + AccessKeyId: string | undefined; +} +/** + * @public + */ +export interface GetAccessKeyInfoResponse { + /** + *

The number used to identify the Amazon Web Services account.

+ * @public + */ + Account?: string; +} +/** + * @public + */ +export interface GetCallerIdentityRequest { +} +/** + *

Contains the response to a successful GetCallerIdentity request, + * including information about the entity making the request.

+ * @public + */ +export interface GetCallerIdentityResponse { + /** + *

The unique identifier of the calling entity. The exact value depends on the type of + * entity that is making the call. The values returned are those listed in the aws:userid column in the Principal + * table found on the Policy Variables reference + * page in the IAM User Guide.

+ * @public + */ + UserId?: string; + /** + *

The Amazon Web Services account ID number of the account that owns or contains the calling + * entity.

+ * @public + */ + Account?: string; + /** + *

The Amazon Web Services ARN associated with the calling entity.

+ * @public + */ + Arn?: string; +} +/** + * @public + */ +export interface GetFederationTokenRequest { + /** + *

The name of the federated user. The name is used as an identifier for the temporary + * security credentials (such as Bob). For example, you can reference the + * federated user name in a resource-based policy, such as in an Amazon S3 bucket policy.

+ *

The regex used to validate this parameter is a string of characters + * consisting of upper- and lower-case alphanumeric characters with no spaces. You can + * also include underscores or any of the following characters: =,.@-

+ * @public + */ + Name: string | undefined; + /** + *

An IAM policy in JSON format that you want to use as an inline session policy.

+ *

You must pass an inline or managed session policy to + * this operation. You can pass a single JSON policy document to use as an inline session + * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as + * managed session policies.

+ *

This parameter is optional. However, if you do not pass any session policies, then the + * resulting federated user session has no permissions.

+ *

When you pass session policies, the session permissions are the intersection of the + * IAM user policies and the session policies that you pass. This gives you + * a way to further restrict the permissions for a federated user. You cannot use session + * policies to grant more permissions than those that are defined in the permissions policy of + * the IAM user. For more information, see Session Policies in + * the IAM User Guide.

+ *

The resulting credentials can be used to access a resource that has a resource-based + * policy. If that policy specifically references the federated user session in the + * Principal element of the policy, the session has the permissions allowed by + * the policy. These permissions are granted in addition to the permissions that are granted + * by the session policies.

+ *

The plaintext that you use for both inline and managed session policies can't exceed + * 2,048 characters. The JSON policy characters can be any ASCII character from the space + * character to the end of the valid character list (\u0020 through \u00FF). It can also + * include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) + * characters.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ * @public + */ + Policy?: string; + /** + *

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as a + * managed session policy. The policies must exist in the same account as the IAM user that is requesting federated access.

+ *

You must pass an inline or managed session policy to + * this operation. You can pass a single JSON policy document to use as an inline session + * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as + * managed session policies. The plaintext that you use for both inline and managed session + * policies can't exceed 2,048 characters. You can provide up to 10 managed policy ARNs. For + * more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services + * Service Namespaces in the Amazon Web Services General Reference.

+ *

This parameter is optional. However, if you do not pass any session policies, then the + * resulting federated user session has no permissions.

+ *

When you pass session policies, the session permissions are the intersection of the + * IAM user policies and the session policies that you pass. This gives you + * a way to further restrict the permissions for a federated user. You cannot use session + * policies to grant more permissions than those that are defined in the permissions policy of + * the IAM user. For more information, see Session Policies in + * the IAM User Guide.

+ *

The resulting credentials can be used to access a resource that has a resource-based + * policy. If that policy specifically references the federated user session in the + * Principal element of the policy, the session has the permissions allowed by + * the policy. These permissions are granted in addition to the permissions that are granted + * by the session policies.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ * @public + */ + PolicyArns?: PolicyDescriptorType[]; + /** + *

The duration, in seconds, that the session should last. Acceptable durations for + * federation sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours), with + * 43,200 seconds (12 hours) as the default. Sessions obtained using root user + * credentials are restricted to a maximum of 3,600 seconds (one hour). If the specified + * duration is longer than one hour, the session obtained by using root user + * credentials defaults to one hour.

+ * @public + */ + DurationSeconds?: number; + /** + *

A list of session tags. Each session tag consists of a key name and an associated value. + * For more information about session tags, see Passing Session Tags in STS in the + * IAM User Guide.

+ *

This parameter is optional. You can pass up to 50 session tags. The plaintext session + * tag keys can’t exceed 128 characters and the values can’t exceed 256 characters. For these + * and additional limits, see IAM + * and STS Character Limits in the IAM User Guide.

+ * + *

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, + * and session tags into a packed binary format that has a separate limit. Your request can + * fail for this limit even if your plaintext meets the other requirements. The + * PackedPolicySize response element indicates by percentage how close the + * policies and tags for your request are to the upper size limit.

+ *
+ *

You can pass a session tag with the same key as a tag that is already attached to the + * user you are federating. When you do, session tags override a user tag with the same key.

+ *

Tag key–value pairs are not case sensitive, but case is preserved. This means that you + * cannot have separate Department and department tag keys. Assume + * that the role has the Department=Marketing tag and you pass the + * department=engineering session tag. Department + * and department are not saved as separate tags, and the session tag passed in + * the request takes precedence over the role tag.

+ * @public + */ + Tags?: Tag[]; +} +/** + *

Identifiers for the federated user that is associated with the credentials.

+ * @public + */ +export interface FederatedUser { + /** + *

The string that identifies the federated user associated with the credentials, similar + * to the unique ID of an IAM user.

+ * @public + */ + FederatedUserId: string | undefined; + /** + *

The ARN that specifies the federated user that is associated with the credentials. For + * more information about ARNs and how to use them in policies, see IAM + * Identifiers in the IAM User Guide.

+ * @public + */ + Arn: string | undefined; +} +/** + *

Contains the response to a successful GetFederationToken request, + * including temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests.

+ * @public + */ +export interface GetFederationTokenResponse { + /** + *

The temporary security credentials, which include an access key ID, a secret access key, + * and a security (or session) token.

+ * + *

The size of the security token that STS API operations return is not fixed. We + * strongly recommend that you make no assumptions about the maximum size.

+ *
+ * @public + */ + Credentials?: Credentials; + /** + *

Identifiers for the federated user associated with the credentials (such as + * arn:aws:sts::123456789012:federated-user/Bob or + * 123456789012:Bob). You can use the federated user's ARN in your + * resource-based policies, such as an Amazon S3 bucket policy.

+ * @public + */ + FederatedUser?: FederatedUser; + /** + *

A percentage value that indicates the packed size of the session policies and session + * tags combined passed in the request. The request fails if the packed size is greater than 100 percent, + * which means the policies and tags exceeded the allowed space.

+ * @public + */ + PackedPolicySize?: number; +} +/** + * @public + */ +export interface GetSessionTokenRequest { + /** + *

The duration, in seconds, that the credentials should remain valid. Acceptable durations + * for IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds + * (36 hours), with 43,200 seconds (12 hours) as the default. Sessions for Amazon Web Services account + * owners are restricted to a maximum of 3,600 seconds (one hour). If the duration is longer + * than one hour, the session for Amazon Web Services account owners defaults to one hour.

+ * @public + */ + DurationSeconds?: number; + /** + *

The identification number of the MFA device that is associated with the IAM user who is making the GetSessionToken call. Specify this value + * if the IAM user has a policy that requires MFA authentication. The value is + * either the serial number for a hardware device (such as GAHT12345678) or an + * Amazon Resource Name (ARN) for a virtual device (such as + * arn:aws:iam::123456789012:mfa/user). You can find the device for an IAM user by going to the Amazon Web Services Management Console and viewing the user's security credentials.

+ *

The regex used to validate this parameter is a string of + * characters consisting of upper- and lower-case alphanumeric characters with no spaces. + * You can also include underscores or any of the following characters: =,.@:/-

+ * @public + */ + SerialNumber?: string; + /** + *

The value provided by the MFA device, if MFA is required. If any policy requires the + * IAM user to submit an MFA code, specify this value. If MFA authentication + * is required, the user must provide a code when requesting a set of temporary security + * credentials. A user who fails to provide the code receives an "access denied" response when + * requesting resources that require MFA authentication.

+ *

The format for this parameter, as described by its regex pattern, is a sequence of six + * numeric digits.

+ * @public + */ + TokenCode?: string; +} +/** + *

Contains the response to a successful GetSessionToken request, + * including temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests.

+ * @public + */ +export interface GetSessionTokenResponse { + /** + *

The temporary security credentials, which include an access key ID, a secret access key, + * and a security (or session) token.

+ * + *

The size of the security token that STS API operations return is not fixed. We + * strongly recommend that you make no assumptions about the maximum size.

+ *
+ * @public + */ + Credentials?: Credentials; +} +/** + * @internal + */ +export declare const CredentialsFilterSensitiveLog: (obj: Credentials) => any; +/** + * @internal + */ +export declare const AssumeRoleResponseFilterSensitiveLog: (obj: AssumeRoleResponse) => any; +/** + * @internal + */ +export declare const AssumeRoleWithSAMLRequestFilterSensitiveLog: (obj: AssumeRoleWithSAMLRequest) => any; +/** + * @internal + */ +export declare const AssumeRoleWithSAMLResponseFilterSensitiveLog: (obj: AssumeRoleWithSAMLResponse) => any; +/** + * @internal + */ +export declare const AssumeRoleWithWebIdentityRequestFilterSensitiveLog: (obj: AssumeRoleWithWebIdentityRequest) => any; +/** + * @internal + */ +export declare const AssumeRoleWithWebIdentityResponseFilterSensitiveLog: (obj: AssumeRoleWithWebIdentityResponse) => any; +/** + * @internal + */ +export declare const GetFederationTokenResponseFilterSensitiveLog: (obj: GetFederationTokenResponse) => any; +/** + * @internal + */ +export declare const GetSessionTokenResponseFilterSensitiveLog: (obj: GetSessionTokenResponse) => any; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/protocols/Aws_query.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/protocols/Aws_query.d.ts new file mode 100644 index 0000000..0bdc58a --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/protocols/Aws_query.d.ts @@ -0,0 +1,74 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; +import { AssumeRoleCommandInput, AssumeRoleCommandOutput } from "../commands/AssumeRoleCommand"; +import { AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput } from "../commands/AssumeRoleWithSAMLCommand"; +import { AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput } from "../commands/AssumeRoleWithWebIdentityCommand"; +import { DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput } from "../commands/DecodeAuthorizationMessageCommand"; +import { GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput } from "../commands/GetAccessKeyInfoCommand"; +import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from "../commands/GetCallerIdentityCommand"; +import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "../commands/GetFederationTokenCommand"; +import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "../commands/GetSessionTokenCommand"; +/** + * serializeAws_queryAssumeRoleCommand + */ +export declare const se_AssumeRoleCommand: (input: AssumeRoleCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_queryAssumeRoleWithSAMLCommand + */ +export declare const se_AssumeRoleWithSAMLCommand: (input: AssumeRoleWithSAMLCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_queryAssumeRoleWithWebIdentityCommand + */ +export declare const se_AssumeRoleWithWebIdentityCommand: (input: AssumeRoleWithWebIdentityCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_queryDecodeAuthorizationMessageCommand + */ +export declare const se_DecodeAuthorizationMessageCommand: (input: DecodeAuthorizationMessageCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_queryGetAccessKeyInfoCommand + */ +export declare const se_GetAccessKeyInfoCommand: (input: GetAccessKeyInfoCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_queryGetCallerIdentityCommand + */ +export declare const se_GetCallerIdentityCommand: (input: GetCallerIdentityCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_queryGetFederationTokenCommand + */ +export declare const se_GetFederationTokenCommand: (input: GetFederationTokenCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * serializeAws_queryGetSessionTokenCommand + */ +export declare const se_GetSessionTokenCommand: (input: GetSessionTokenCommandInput, context: __SerdeContext) => Promise<__HttpRequest>; +/** + * deserializeAws_queryAssumeRoleCommand + */ +export declare const de_AssumeRoleCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_queryAssumeRoleWithSAMLCommand + */ +export declare const de_AssumeRoleWithSAMLCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_queryAssumeRoleWithWebIdentityCommand + */ +export declare const de_AssumeRoleWithWebIdentityCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_queryDecodeAuthorizationMessageCommand + */ +export declare const de_DecodeAuthorizationMessageCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_queryGetAccessKeyInfoCommand + */ +export declare const de_GetAccessKeyInfoCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_queryGetCallerIdentityCommand + */ +export declare const de_GetCallerIdentityCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_queryGetFederationTokenCommand + */ +export declare const de_GetFederationTokenCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; +/** + * deserializeAws_queryGetSessionTokenCommand + */ +export declare const de_GetSessionTokenCommand: (output: __HttpResponse, context: __SerdeContext) => Promise; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts new file mode 100644 index 0000000..d64c65e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts @@ -0,0 +1,54 @@ +import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler"; +import { STSClientConfig } from "./STSClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: STSClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider; + defaultUserAgentProvider: import("@smithy/types").Provider; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: import("@smithy/protocol-http").HttpHandler | RequestHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider) & (string | import("@smithy/types").Provider | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider)) | undefined; + endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + } | undefined) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + })[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; + useGlobalEndpoint?: boolean | import("@smithy/types").Provider | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts new file mode 100644 index 0000000..0e63b83 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts @@ -0,0 +1,57 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler"; +import { IdentityProviderConfig } from "@smithy/types"; +import { STSClientConfig } from "./STSClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: STSClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: any; + defaultUserAgentProvider: import("@smithy/types").Provider; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider | ((idProps: Record | undefined) => Promise); + signer: AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: NoAuthSigner; + })[]; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: RequestHandler | import("@smithy/protocol-http").HttpHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider) & (string | import("@smithy/types").Provider | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider)) | undefined; + endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + } | undefined) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; + useGlobalEndpoint?: boolean | import("@smithy/types").Provider | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts new file mode 100644 index 0000000..fbc1c85 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts @@ -0,0 +1,53 @@ +import { STSClientConfig } from "./STSClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: STSClientConfig) => { + runtime: string; + sha256: import("@smithy/types").HashConstructor; + requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record | import("@smithy/protocol-http").HttpHandler | import("@smithy/fetch-http-handler").FetchHttpHandler; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + streamCollector: import("@smithy/types").StreamCollector; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + defaultUserAgentProvider: import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider; + maxAttempts: number | import("@smithy/types").Provider; + retryMode: string | import("@smithy/types").Provider; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider; + endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider | undefined; + endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + } | undefined) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + })[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider; + credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined; + signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise) | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined; + useGlobalEndpoint?: boolean | import("@smithy/types").Provider | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.shared.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.shared.d.ts new file mode 100644 index 0000000..5b99276 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.shared.d.ts @@ -0,0 +1,32 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { IdentityProviderConfig } from "@smithy/types"; +import { STSClientConfig } from "./STSClient"; +/** + * @internal + */ +export declare const getRuntimeConfig: (config: STSClientConfig) => { + apiVersion: string; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + disableHostPrefix: boolean; + endpointProvider: (params: import("./endpoint/EndpointParameters").EndpointParameters, context?: { + logger?: import("@smithy/types").Logger | undefined; + } | undefined) => import("@smithy/types").EndpointV2; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider; + httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({ + schemeId: string; + identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider | undefined; + signer: AwsSdkSigV4Signer; + } | { + schemeId: string; + identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider | (() => Promise<{}>); + signer: NoAuthSigner; + })[]; + logger: import("@smithy/types").Logger; + serviceId: string; + urlParser: import("@smithy/types").UrlParser; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/runtimeExtensions.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/runtimeExtensions.d.ts new file mode 100644 index 0000000..ebd8567 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/runtimeExtensions.d.ts @@ -0,0 +1,17 @@ +import { STSExtensionConfiguration } from "./extensionConfiguration"; +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: STSExtensionConfiguration): void; +} +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} +/** + * @internal + */ +export declare const resolveRuntimeExtensions: (runtimeConfig: any, extensions: RuntimeExtension[]) => any; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STS.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STS.d.ts new file mode 100644 index 0000000..a90dbc6 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STS.d.ts @@ -0,0 +1,143 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; +import { + AssumeRoleCommandInput, + AssumeRoleCommandOutput, +} from "./commands/AssumeRoleCommand"; +import { + AssumeRoleWithSAMLCommandInput, + AssumeRoleWithSAMLCommandOutput, +} from "./commands/AssumeRoleWithSAMLCommand"; +import { + AssumeRoleWithWebIdentityCommandInput, + AssumeRoleWithWebIdentityCommandOutput, +} from "./commands/AssumeRoleWithWebIdentityCommand"; +import { + DecodeAuthorizationMessageCommandInput, + DecodeAuthorizationMessageCommandOutput, +} from "./commands/DecodeAuthorizationMessageCommand"; +import { + GetAccessKeyInfoCommandInput, + GetAccessKeyInfoCommandOutput, +} from "./commands/GetAccessKeyInfoCommand"; +import { + GetCallerIdentityCommandInput, + GetCallerIdentityCommandOutput, +} from "./commands/GetCallerIdentityCommand"; +import { + GetFederationTokenCommandInput, + GetFederationTokenCommandOutput, +} from "./commands/GetFederationTokenCommand"; +import { + GetSessionTokenCommandInput, + GetSessionTokenCommandOutput, +} from "./commands/GetSessionTokenCommand"; +import { STSClient } from "./STSClient"; +export interface STS { + assumeRole( + args: AssumeRoleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + assumeRole( + args: AssumeRoleCommandInput, + cb: (err: any, data?: AssumeRoleCommandOutput) => void + ): void; + assumeRole( + args: AssumeRoleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssumeRoleCommandOutput) => void + ): void; + assumeRoleWithSAML( + args: AssumeRoleWithSAMLCommandInput, + options?: __HttpHandlerOptions + ): Promise; + assumeRoleWithSAML( + args: AssumeRoleWithSAMLCommandInput, + cb: (err: any, data?: AssumeRoleWithSAMLCommandOutput) => void + ): void; + assumeRoleWithSAML( + args: AssumeRoleWithSAMLCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssumeRoleWithSAMLCommandOutput) => void + ): void; + assumeRoleWithWebIdentity( + args: AssumeRoleWithWebIdentityCommandInput, + options?: __HttpHandlerOptions + ): Promise; + assumeRoleWithWebIdentity( + args: AssumeRoleWithWebIdentityCommandInput, + cb: (err: any, data?: AssumeRoleWithWebIdentityCommandOutput) => void + ): void; + assumeRoleWithWebIdentity( + args: AssumeRoleWithWebIdentityCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssumeRoleWithWebIdentityCommandOutput) => void + ): void; + decodeAuthorizationMessage( + args: DecodeAuthorizationMessageCommandInput, + options?: __HttpHandlerOptions + ): Promise; + decodeAuthorizationMessage( + args: DecodeAuthorizationMessageCommandInput, + cb: (err: any, data?: DecodeAuthorizationMessageCommandOutput) => void + ): void; + decodeAuthorizationMessage( + args: DecodeAuthorizationMessageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DecodeAuthorizationMessageCommandOutput) => void + ): void; + getAccessKeyInfo( + args: GetAccessKeyInfoCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getAccessKeyInfo( + args: GetAccessKeyInfoCommandInput, + cb: (err: any, data?: GetAccessKeyInfoCommandOutput) => void + ): void; + getAccessKeyInfo( + args: GetAccessKeyInfoCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAccessKeyInfoCommandOutput) => void + ): void; + getCallerIdentity(): Promise; + getCallerIdentity( + args: GetCallerIdentityCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getCallerIdentity( + args: GetCallerIdentityCommandInput, + cb: (err: any, data?: GetCallerIdentityCommandOutput) => void + ): void; + getCallerIdentity( + args: GetCallerIdentityCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetCallerIdentityCommandOutput) => void + ): void; + getFederationToken( + args: GetFederationTokenCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getFederationToken( + args: GetFederationTokenCommandInput, + cb: (err: any, data?: GetFederationTokenCommandOutput) => void + ): void; + getFederationToken( + args: GetFederationTokenCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetFederationTokenCommandOutput) => void + ): void; + getSessionToken(): Promise; + getSessionToken( + args: GetSessionTokenCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getSessionToken( + args: GetSessionTokenCommandInput, + cb: (err: any, data?: GetSessionTokenCommandOutput) => void + ): void; + getSessionToken( + args: GetSessionTokenCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSessionTokenCommandOutput) => void + ): void; +} +export declare class STS extends STSClient implements STS {} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts new file mode 100644 index 0000000..71f2b71 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts @@ -0,0 +1,165 @@ +import { + HostHeaderInputConfig, + HostHeaderResolvedConfig, +} from "@aws-sdk/middleware-host-header"; +import { + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { + RegionInputConfig, + RegionResolvedConfig, +} from "@smithy/config-resolver"; +import { + EndpointInputConfig, + EndpointResolvedConfig, +} from "@smithy/middleware-endpoint"; +import { + RetryInputConfig, + RetryResolvedConfig, +} from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + AwsCredentialIdentityProvider, + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; +import { + HttpAuthSchemeInputConfig, + HttpAuthSchemeResolvedConfig, +} from "./auth/httpAuthSchemeProvider"; +import { + AssumeRoleCommandInput, + AssumeRoleCommandOutput, +} from "./commands/AssumeRoleCommand"; +import { + AssumeRoleWithSAMLCommandInput, + AssumeRoleWithSAMLCommandOutput, +} from "./commands/AssumeRoleWithSAMLCommand"; +import { + AssumeRoleWithWebIdentityCommandInput, + AssumeRoleWithWebIdentityCommandOutput, +} from "./commands/AssumeRoleWithWebIdentityCommand"; +import { + DecodeAuthorizationMessageCommandInput, + DecodeAuthorizationMessageCommandOutput, +} from "./commands/DecodeAuthorizationMessageCommand"; +import { + GetAccessKeyInfoCommandInput, + GetAccessKeyInfoCommandOutput, +} from "./commands/GetAccessKeyInfoCommand"; +import { + GetCallerIdentityCommandInput, + GetCallerIdentityCommandOutput, +} from "./commands/GetCallerIdentityCommand"; +import { + GetFederationTokenCommandInput, + GetFederationTokenCommandOutput, +} from "./commands/GetFederationTokenCommand"; +import { + GetSessionTokenCommandInput, + GetSessionTokenCommandOutput, +} from "./commands/GetSessionTokenCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, +} from "./endpoint/EndpointParameters"; +import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; +export { __Client }; +export type ServiceInputTypes = + | AssumeRoleCommandInput + | AssumeRoleWithSAMLCommandInput + | AssumeRoleWithWebIdentityCommandInput + | DecodeAuthorizationMessageCommandInput + | GetAccessKeyInfoCommandInput + | GetCallerIdentityCommandInput + | GetFederationTokenCommandInput + | GetSessionTokenCommandInput; +export type ServiceOutputTypes = + | AssumeRoleCommandOutput + | AssumeRoleWithSAMLCommandOutput + | AssumeRoleWithWebIdentityCommandOutput + | DecodeAuthorizationMessageCommandOutput + | GetAccessKeyInfoCommandOutput + | GetCallerIdentityCommandOutput + | GetFederationTokenCommandOutput + | GetSessionTokenCommandOutput; +export interface ClientDefaults + extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + requestHandler?: __HttpHandlerUserInput; + sha256?: __ChecksumConstructor | __HashConstructor; + urlParser?: __UrlParser; + bodyLengthChecker?: __BodyLengthCalculator; + streamCollector?: __StreamCollector; + base64Decoder?: __Decoder; + base64Encoder?: __Encoder; + utf8Decoder?: __Decoder; + utf8Encoder?: __Encoder; + runtime?: string; + disableHostPrefix?: boolean; + serviceId?: string; + useDualstackEndpoint?: boolean | __Provider; + useFipsEndpoint?: boolean | __Provider; + defaultUserAgentProvider?: Provider<__UserAgent>; + region?: string | __Provider; + credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider; + maxAttempts?: number | __Provider; + retryMode?: string | __Provider; + logger?: __Logger; + extensions?: RuntimeExtension[]; + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} +export type STSClientConfigType = Partial< + __SmithyConfiguration<__HttpHandlerOptions> +> & + ClientDefaults & + RegionInputConfig & + EndpointInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + UserAgentInputConfig & + HttpAuthSchemeInputConfig & + ClientInputEndpointParameters; +export interface STSClientConfig extends STSClientConfigType {} +export type STSClientResolvedConfigType = + __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + RegionResolvedConfig & + EndpointResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + UserAgentResolvedConfig & + HttpAuthSchemeResolvedConfig & + ClientResolvedEndpointParameters; +export interface STSClientResolvedConfig extends STSClientResolvedConfigType {} +export declare class STSClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + STSClientResolvedConfig +> { + readonly config: STSClientResolvedConfig; + constructor(...[configuration]: __CheckOptionalClientConfig); + destroy(): void; + private getDefaultHttpAuthSchemeParametersProvider; + private getIdentityProviderConfigProvider; +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts new file mode 100644 index 0000000..ef83018 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts @@ -0,0 +1,32 @@ +import { + AwsCredentialIdentity, + AwsCredentialIdentityProvider, + HttpAuthScheme, +} from "@smithy/types"; +import { STSHttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider( + httpAuthSchemeProvider: STSHttpAuthSchemeProvider + ): void; + httpAuthSchemeProvider(): STSHttpAuthSchemeProvider; + setCredentials( + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider + ): void; + credentials(): + | AwsCredentialIdentity + | AwsCredentialIdentityProvider + | undefined; +} +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: STSHttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; +export declare const getHttpAuthExtensionConfiguration: ( + runtimeConfig: HttpAuthRuntimeConfig +) => HttpAuthExtensionConfiguration; +export declare const resolveHttpAuthRuntimeConfig: ( + config: HttpAuthExtensionConfiguration +) => HttpAuthRuntimeConfig; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts new file mode 100644 index 0000000..88b1947 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts @@ -0,0 +1,54 @@ +import { + AwsSdkSigV4AuthInputConfig, + AwsSdkSigV4AuthResolvedConfig, + AwsSdkSigV4PreviouslyResolved, +} from "@aws-sdk/core"; +import { + Client, + HandlerExecutionContext, + HttpAuthScheme, + HttpAuthSchemeParameters, + HttpAuthSchemeParametersProvider, + HttpAuthSchemeProvider, +} from "@smithy/types"; +import { STSClientResolvedConfig } from "../STSClient"; +export interface STSHttpAuthSchemeParameters extends HttpAuthSchemeParameters { + region?: string; +} +export interface STSHttpAuthSchemeParametersProvider + extends HttpAuthSchemeParametersProvider< + STSClientResolvedConfig, + HandlerExecutionContext, + STSHttpAuthSchemeParameters, + object + > {} +export declare const defaultSTSHttpAuthSchemeParametersProvider: ( + config: STSClientResolvedConfig, + context: HandlerExecutionContext, + input: object +) => Promise; +export interface STSHttpAuthSchemeProvider + extends HttpAuthSchemeProvider {} +export declare const defaultSTSHttpAuthSchemeProvider: STSHttpAuthSchemeProvider; +export interface StsAuthInputConfig {} +export interface StsAuthResolvedConfig { + stsClientCtor: new (clientConfig: any) => Client; +} +export declare const resolveStsAuthConfig: ( + input: T & StsAuthInputConfig +) => T & StsAuthResolvedConfig; +export interface HttpAuthSchemeInputConfig + extends StsAuthInputConfig, + AwsSdkSigV4AuthInputConfig { + httpAuthSchemes?: HttpAuthScheme[]; + httpAuthSchemeProvider?: STSHttpAuthSchemeProvider; +} +export interface HttpAuthSchemeResolvedConfig + extends StsAuthResolvedConfig, + AwsSdkSigV4AuthResolvedConfig { + readonly httpAuthSchemes: HttpAuthScheme[]; + readonly httpAuthSchemeProvider: STSHttpAuthSchemeProvider; +} +export declare const resolveHttpAuthSchemeConfig: ( + config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved +) => T & HttpAuthSchemeResolvedConfig; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts new file mode 100644 index 0000000..4c4b924 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts @@ -0,0 +1,35 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { AssumeRoleRequest, AssumeRoleResponse } from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + STSClientResolvedConfig, +} from "../STSClient"; +export { __MetadataBearer, $Command }; +export interface AssumeRoleCommandInput extends AssumeRoleRequest {} +export interface AssumeRoleCommandOutput + extends AssumeRoleResponse, + __MetadataBearer {} +declare const AssumeRoleCommand_base: { + new ( + input: AssumeRoleCommandInput + ): import("@smithy/smithy-client").CommandImpl< + AssumeRoleCommandInput, + AssumeRoleCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: AssumeRoleCommandInput + ): import("@smithy/smithy-client").CommandImpl< + AssumeRoleCommandInput, + AssumeRoleCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class AssumeRoleCommand extends AssumeRoleCommand_base {} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts new file mode 100644 index 0000000..2bbe920 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + AssumeRoleWithSAMLRequest, + AssumeRoleWithSAMLResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + STSClientResolvedConfig, +} from "../STSClient"; +export { __MetadataBearer, $Command }; +export interface AssumeRoleWithSAMLCommandInput + extends AssumeRoleWithSAMLRequest {} +export interface AssumeRoleWithSAMLCommandOutput + extends AssumeRoleWithSAMLResponse, + __MetadataBearer {} +declare const AssumeRoleWithSAMLCommand_base: { + new ( + input: AssumeRoleWithSAMLCommandInput + ): import("@smithy/smithy-client").CommandImpl< + AssumeRoleWithSAMLCommandInput, + AssumeRoleWithSAMLCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: AssumeRoleWithSAMLCommandInput + ): import("@smithy/smithy-client").CommandImpl< + AssumeRoleWithSAMLCommandInput, + AssumeRoleWithSAMLCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class AssumeRoleWithSAMLCommand extends AssumeRoleWithSAMLCommand_base {} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts new file mode 100644 index 0000000..974c65f --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + AssumeRoleWithWebIdentityRequest, + AssumeRoleWithWebIdentityResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + STSClientResolvedConfig, +} from "../STSClient"; +export { __MetadataBearer, $Command }; +export interface AssumeRoleWithWebIdentityCommandInput + extends AssumeRoleWithWebIdentityRequest {} +export interface AssumeRoleWithWebIdentityCommandOutput + extends AssumeRoleWithWebIdentityResponse, + __MetadataBearer {} +declare const AssumeRoleWithWebIdentityCommand_base: { + new ( + input: AssumeRoleWithWebIdentityCommandInput + ): import("@smithy/smithy-client").CommandImpl< + AssumeRoleWithWebIdentityCommandInput, + AssumeRoleWithWebIdentityCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: AssumeRoleWithWebIdentityCommandInput + ): import("@smithy/smithy-client").CommandImpl< + AssumeRoleWithWebIdentityCommandInput, + AssumeRoleWithWebIdentityCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class AssumeRoleWithWebIdentityCommand extends AssumeRoleWithWebIdentityCommand_base {} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts new file mode 100644 index 0000000..3b15d1e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + DecodeAuthorizationMessageRequest, + DecodeAuthorizationMessageResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + STSClientResolvedConfig, +} from "../STSClient"; +export { __MetadataBearer, $Command }; +export interface DecodeAuthorizationMessageCommandInput + extends DecodeAuthorizationMessageRequest {} +export interface DecodeAuthorizationMessageCommandOutput + extends DecodeAuthorizationMessageResponse, + __MetadataBearer {} +declare const DecodeAuthorizationMessageCommand_base: { + new ( + input: DecodeAuthorizationMessageCommandInput + ): import("@smithy/smithy-client").CommandImpl< + DecodeAuthorizationMessageCommandInput, + DecodeAuthorizationMessageCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: DecodeAuthorizationMessageCommandInput + ): import("@smithy/smithy-client").CommandImpl< + DecodeAuthorizationMessageCommandInput, + DecodeAuthorizationMessageCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class DecodeAuthorizationMessageCommand extends DecodeAuthorizationMessageCommand_base {} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts new file mode 100644 index 0000000..a18c4d6 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts @@ -0,0 +1,38 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + GetAccessKeyInfoRequest, + GetAccessKeyInfoResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + STSClientResolvedConfig, +} from "../STSClient"; +export { __MetadataBearer, $Command }; +export interface GetAccessKeyInfoCommandInput extends GetAccessKeyInfoRequest {} +export interface GetAccessKeyInfoCommandOutput + extends GetAccessKeyInfoResponse, + __MetadataBearer {} +declare const GetAccessKeyInfoCommand_base: { + new ( + input: GetAccessKeyInfoCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetAccessKeyInfoCommandInput, + GetAccessKeyInfoCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: GetAccessKeyInfoCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetAccessKeyInfoCommandInput, + GetAccessKeyInfoCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class GetAccessKeyInfoCommand extends GetAccessKeyInfoCommand_base {} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts new file mode 100644 index 0000000..c92cd6a --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + GetCallerIdentityRequest, + GetCallerIdentityResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + STSClientResolvedConfig, +} from "../STSClient"; +export { __MetadataBearer, $Command }; +export interface GetCallerIdentityCommandInput + extends GetCallerIdentityRequest {} +export interface GetCallerIdentityCommandOutput + extends GetCallerIdentityResponse, + __MetadataBearer {} +declare const GetCallerIdentityCommand_base: { + new ( + input: GetCallerIdentityCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetCallerIdentityCommandInput, + GetCallerIdentityCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + ...[input]: [] | [GetCallerIdentityCommandInput] + ): import("@smithy/smithy-client").CommandImpl< + GetCallerIdentityCommandInput, + GetCallerIdentityCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class GetCallerIdentityCommand extends GetCallerIdentityCommand_base {} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts new file mode 100644 index 0000000..7d5384e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts @@ -0,0 +1,39 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + GetFederationTokenRequest, + GetFederationTokenResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + STSClientResolvedConfig, +} from "../STSClient"; +export { __MetadataBearer, $Command }; +export interface GetFederationTokenCommandInput + extends GetFederationTokenRequest {} +export interface GetFederationTokenCommandOutput + extends GetFederationTokenResponse, + __MetadataBearer {} +declare const GetFederationTokenCommand_base: { + new ( + input: GetFederationTokenCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetFederationTokenCommandInput, + GetFederationTokenCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + __0_0: GetFederationTokenCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetFederationTokenCommandInput, + GetFederationTokenCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class GetFederationTokenCommand extends GetFederationTokenCommand_base {} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts new file mode 100644 index 0000000..5da2178 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts @@ -0,0 +1,38 @@ +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; +import { + GetSessionTokenRequest, + GetSessionTokenResponse, +} from "../models/models_0"; +import { + ServiceInputTypes, + ServiceOutputTypes, + STSClientResolvedConfig, +} from "../STSClient"; +export { __MetadataBearer, $Command }; +export interface GetSessionTokenCommandInput extends GetSessionTokenRequest {} +export interface GetSessionTokenCommandOutput + extends GetSessionTokenResponse, + __MetadataBearer {} +declare const GetSessionTokenCommand_base: { + new ( + input: GetSessionTokenCommandInput + ): import("@smithy/smithy-client").CommandImpl< + GetSessionTokenCommandInput, + GetSessionTokenCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + new ( + ...[input]: [] | [GetSessionTokenCommandInput] + ): import("@smithy/smithy-client").CommandImpl< + GetSessionTokenCommandInput, + GetSessionTokenCommandOutput, + STSClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >; + getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; +}; +export declare class GetSessionTokenCommand extends GetSessionTokenCommand_base {} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/index.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/index.d.ts new file mode 100644 index 0000000..802202f --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/commands/index.d.ts @@ -0,0 +1,8 @@ +export * from "./AssumeRoleCommand"; +export * from "./AssumeRoleWithSAMLCommand"; +export * from "./AssumeRoleWithWebIdentityCommand"; +export * from "./DecodeAuthorizationMessageCommand"; +export * from "./GetAccessKeyInfoCommand"; +export * from "./GetCallerIdentityCommand"; +export * from "./GetFederationTokenCommand"; +export * from "./GetSessionTokenCommand"; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/credentialDefaultProvider.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/credentialDefaultProvider.d.ts new file mode 100644 index 0000000..bf579d6 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/credentialDefaultProvider.d.ts @@ -0,0 +1 @@ +export declare const defaultProvider: any; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultRoleAssumers.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultRoleAssumers.d.ts new file mode 100644 index 0000000..b6f22cc --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultRoleAssumers.d.ts @@ -0,0 +1,19 @@ +import { Pluggable } from "@smithy/types"; +import { + DefaultCredentialProvider, + RoleAssumer, + RoleAssumerWithWebIdentity, + STSRoleAssumerOptions, +} from "./defaultStsRoleAssumers"; +import { ServiceInputTypes, ServiceOutputTypes } from "./STSClient"; +export declare const getDefaultRoleAssumer: ( + stsOptions?: STSRoleAssumerOptions, + stsPlugins?: Pluggable[] +) => RoleAssumer; +export declare const getDefaultRoleAssumerWithWebIdentity: ( + stsOptions?: STSRoleAssumerOptions, + stsPlugins?: Pluggable[] +) => RoleAssumerWithWebIdentity; +export declare const decorateDefaultCredentialProvider: ( + provider: DefaultCredentialProvider +) => DefaultCredentialProvider; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultStsRoleAssumers.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultStsRoleAssumers.d.ts new file mode 100644 index 0000000..b20d24a --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultStsRoleAssumers.d.ts @@ -0,0 +1,33 @@ +import { CredentialProviderOptions } from "@aws-sdk/types"; +import { AwsCredentialIdentity, Logger, Provider } from "@smithy/types"; +import { AssumeRoleCommandInput } from "./commands/AssumeRoleCommand"; +import { AssumeRoleWithWebIdentityCommandInput } from "./commands/AssumeRoleWithWebIdentityCommand"; +import { STSClient, STSClientConfig } from "./STSClient"; +export type STSRoleAssumerOptions = Pick< + STSClientConfig, + "logger" | "region" | "requestHandler" +> & { + credentialProviderLogger?: Logger; + parentClientConfig?: CredentialProviderOptions["parentClientConfig"]; +}; +export type RoleAssumer = ( + sourceCreds: AwsCredentialIdentity, + params: AssumeRoleCommandInput +) => Promise; +export declare const getDefaultRoleAssumer: ( + stsOptions: STSRoleAssumerOptions, + stsClientCtor: new (options: STSClientConfig) => STSClient +) => RoleAssumer; +export type RoleAssumerWithWebIdentity = ( + params: AssumeRoleWithWebIdentityCommandInput +) => Promise; +export declare const getDefaultRoleAssumerWithWebIdentity: ( + stsOptions: STSRoleAssumerOptions, + stsClientCtor: new (options: STSClientConfig) => STSClient +) => RoleAssumerWithWebIdentity; +export type DefaultCredentialProvider = ( + input: any +) => Provider; +export declare const decorateDefaultCredentialProvider: ( + provider: DefaultCredentialProvider +) => DefaultCredentialProvider; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/EndpointParameters.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/EndpointParameters.d.ts new file mode 100644 index 0000000..33567fd --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/EndpointParameters.d.ts @@ -0,0 +1,57 @@ +import { + Endpoint, + EndpointParameters as __EndpointParameters, + EndpointV2, + Provider, +} from "@smithy/types"; +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: + | string + | Provider + | Endpoint + | Provider + | EndpointV2 + | Provider; + useGlobalEndpoint?: boolean | Provider; +} +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; +export declare const resolveClientEndpointParameters: ( + options: T & ClientInputEndpointParameters +) => T & + ClientInputEndpointParameters & { + defaultSigningName: string; + }; +export declare const commonParams: { + readonly UseGlobalEndpoint: { + readonly type: "builtInParams"; + readonly name: "useGlobalEndpoint"; + }; + readonly UseFIPS: { + readonly type: "builtInParams"; + readonly name: "useFipsEndpoint"; + }; + readonly Endpoint: { + readonly type: "builtInParams"; + readonly name: "endpoint"; + }; + readonly Region: { + readonly type: "builtInParams"; + readonly name: "region"; + }; + readonly UseDualStack: { + readonly type: "builtInParams"; + readonly name: "useDualstackEndpoint"; + }; +}; +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; + UseGlobalEndpoint?: boolean; +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/endpointResolver.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/endpointResolver.d.ts new file mode 100644 index 0000000..5909925 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/endpointResolver.d.ts @@ -0,0 +1,8 @@ +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParameters } from "./EndpointParameters"; +export declare const defaultEndpointResolver: ( + endpointParams: EndpointParameters, + context?: { + logger?: Logger; + } +) => EndpointV2; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/ruleset.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/ruleset.d.ts new file mode 100644 index 0000000..4b23899 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/ruleset.d.ts @@ -0,0 +1,2 @@ +import { RuleSetObject } from "@smithy/types"; +export declare const ruleSet: RuleSetObject; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/extensionConfiguration.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/extensionConfiguration.d.ts new file mode 100644 index 0000000..14b124b --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/extensionConfiguration.d.ts @@ -0,0 +1,9 @@ +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; +export interface STSExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration, + HttpAuthExtensionConfiguration {} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..9f561d3 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/index.d.ts @@ -0,0 +1,10 @@ +export * from "./STSClient"; +export * from "./STS"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { STSExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./models"; +import "@aws-sdk/util-endpoints"; +export * from "./defaultRoleAssumers"; +export { STSServiceException } from "./models/STSServiceException"; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/STSServiceException.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/STSServiceException.d.ts new file mode 100644 index 0000000..50ec07e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/STSServiceException.d.ts @@ -0,0 +1,8 @@ +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; +export { __ServiceException, __ServiceExceptionOptions }; +export declare class STSServiceException extends __ServiceException { + constructor(options: __ServiceExceptionOptions); +} diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/index.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/index.d.ts new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/index.d.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/models_0.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/models_0.d.ts new file mode 100644 index 0000000..14ce0c5 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/models_0.d.ts @@ -0,0 +1,206 @@ +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { STSServiceException as __BaseException } from "./STSServiceException"; +export interface AssumedRoleUser { + AssumedRoleId: string | undefined; + Arn: string | undefined; +} +export interface PolicyDescriptorType { + arn?: string; +} +export interface ProvidedContext { + ProviderArn?: string; + ContextAssertion?: string; +} +export interface Tag { + Key: string | undefined; + Value: string | undefined; +} +export interface AssumeRoleRequest { + RoleArn: string | undefined; + RoleSessionName: string | undefined; + PolicyArns?: PolicyDescriptorType[]; + Policy?: string; + DurationSeconds?: number; + Tags?: Tag[]; + TransitiveTagKeys?: string[]; + ExternalId?: string; + SerialNumber?: string; + TokenCode?: string; + SourceIdentity?: string; + ProvidedContexts?: ProvidedContext[]; +} +export interface Credentials { + AccessKeyId: string | undefined; + SecretAccessKey: string | undefined; + SessionToken: string | undefined; + Expiration: Date | undefined; +} +export interface AssumeRoleResponse { + Credentials?: Credentials; + AssumedRoleUser?: AssumedRoleUser; + PackedPolicySize?: number; + SourceIdentity?: string; +} +export declare class ExpiredTokenException extends __BaseException { + readonly name: "ExpiredTokenException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class MalformedPolicyDocumentException extends __BaseException { + readonly name: "MalformedPolicyDocumentException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType< + MalformedPolicyDocumentException, + __BaseException + > + ); +} +export declare class PackedPolicyTooLargeException extends __BaseException { + readonly name: "PackedPolicyTooLargeException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class RegionDisabledException extends __BaseException { + readonly name: "RegionDisabledException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType + ); +} +export interface AssumeRoleWithSAMLRequest { + RoleArn: string | undefined; + PrincipalArn: string | undefined; + SAMLAssertion: string | undefined; + PolicyArns?: PolicyDescriptorType[]; + Policy?: string; + DurationSeconds?: number; +} +export interface AssumeRoleWithSAMLResponse { + Credentials?: Credentials; + AssumedRoleUser?: AssumedRoleUser; + PackedPolicySize?: number; + Subject?: string; + SubjectType?: string; + Issuer?: string; + Audience?: string; + NameQualifier?: string; + SourceIdentity?: string; +} +export declare class IDPRejectedClaimException extends __BaseException { + readonly name: "IDPRejectedClaimException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType + ); +} +export declare class InvalidIdentityTokenException extends __BaseException { + readonly name: "InvalidIdentityTokenException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType + ); +} +export interface AssumeRoleWithWebIdentityRequest { + RoleArn: string | undefined; + RoleSessionName: string | undefined; + WebIdentityToken: string | undefined; + ProviderId?: string; + PolicyArns?: PolicyDescriptorType[]; + Policy?: string; + DurationSeconds?: number; +} +export interface AssumeRoleWithWebIdentityResponse { + Credentials?: Credentials; + SubjectFromWebIdentityToken?: string; + AssumedRoleUser?: AssumedRoleUser; + PackedPolicySize?: number; + Provider?: string; + Audience?: string; + SourceIdentity?: string; +} +export declare class IDPCommunicationErrorException extends __BaseException { + readonly name: "IDPCommunicationErrorException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType + ); +} +export interface DecodeAuthorizationMessageRequest { + EncodedMessage: string | undefined; +} +export interface DecodeAuthorizationMessageResponse { + DecodedMessage?: string; +} +export declare class InvalidAuthorizationMessageException extends __BaseException { + readonly name: "InvalidAuthorizationMessageException"; + readonly $fault: "client"; + constructor( + opts: __ExceptionOptionType< + InvalidAuthorizationMessageException, + __BaseException + > + ); +} +export interface GetAccessKeyInfoRequest { + AccessKeyId: string | undefined; +} +export interface GetAccessKeyInfoResponse { + Account?: string; +} +export interface GetCallerIdentityRequest {} +export interface GetCallerIdentityResponse { + UserId?: string; + Account?: string; + Arn?: string; +} +export interface GetFederationTokenRequest { + Name: string | undefined; + Policy?: string; + PolicyArns?: PolicyDescriptorType[]; + DurationSeconds?: number; + Tags?: Tag[]; +} +export interface FederatedUser { + FederatedUserId: string | undefined; + Arn: string | undefined; +} +export interface GetFederationTokenResponse { + Credentials?: Credentials; + FederatedUser?: FederatedUser; + PackedPolicySize?: number; +} +export interface GetSessionTokenRequest { + DurationSeconds?: number; + SerialNumber?: string; + TokenCode?: string; +} +export interface GetSessionTokenResponse { + Credentials?: Credentials; +} +export declare const CredentialsFilterSensitiveLog: (obj: Credentials) => any; +export declare const AssumeRoleResponseFilterSensitiveLog: ( + obj: AssumeRoleResponse +) => any; +export declare const AssumeRoleWithSAMLRequestFilterSensitiveLog: ( + obj: AssumeRoleWithSAMLRequest +) => any; +export declare const AssumeRoleWithSAMLResponseFilterSensitiveLog: ( + obj: AssumeRoleWithSAMLResponse +) => any; +export declare const AssumeRoleWithWebIdentityRequestFilterSensitiveLog: ( + obj: AssumeRoleWithWebIdentityRequest +) => any; +export declare const AssumeRoleWithWebIdentityResponseFilterSensitiveLog: ( + obj: AssumeRoleWithWebIdentityResponse +) => any; +export declare const GetFederationTokenResponseFilterSensitiveLog: ( + obj: GetFederationTokenResponse +) => any; +export declare const GetSessionTokenResponseFilterSensitiveLog: ( + obj: GetSessionTokenResponse +) => any; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/protocols/Aws_query.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/protocols/Aws_query.d.ts new file mode 100644 index 0000000..29e38ea --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/protocols/Aws_query.d.ts @@ -0,0 +1,101 @@ +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, +} from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; +import { + AssumeRoleCommandInput, + AssumeRoleCommandOutput, +} from "../commands/AssumeRoleCommand"; +import { + AssumeRoleWithSAMLCommandInput, + AssumeRoleWithSAMLCommandOutput, +} from "../commands/AssumeRoleWithSAMLCommand"; +import { + AssumeRoleWithWebIdentityCommandInput, + AssumeRoleWithWebIdentityCommandOutput, +} from "../commands/AssumeRoleWithWebIdentityCommand"; +import { + DecodeAuthorizationMessageCommandInput, + DecodeAuthorizationMessageCommandOutput, +} from "../commands/DecodeAuthorizationMessageCommand"; +import { + GetAccessKeyInfoCommandInput, + GetAccessKeyInfoCommandOutput, +} from "../commands/GetAccessKeyInfoCommand"; +import { + GetCallerIdentityCommandInput, + GetCallerIdentityCommandOutput, +} from "../commands/GetCallerIdentityCommand"; +import { + GetFederationTokenCommandInput, + GetFederationTokenCommandOutput, +} from "../commands/GetFederationTokenCommand"; +import { + GetSessionTokenCommandInput, + GetSessionTokenCommandOutput, +} from "../commands/GetSessionTokenCommand"; +export declare const se_AssumeRoleCommand: ( + input: AssumeRoleCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_AssumeRoleWithSAMLCommand: ( + input: AssumeRoleWithSAMLCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_AssumeRoleWithWebIdentityCommand: ( + input: AssumeRoleWithWebIdentityCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_DecodeAuthorizationMessageCommand: ( + input: DecodeAuthorizationMessageCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_GetAccessKeyInfoCommand: ( + input: GetAccessKeyInfoCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_GetCallerIdentityCommand: ( + input: GetCallerIdentityCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_GetFederationTokenCommand: ( + input: GetFederationTokenCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const se_GetSessionTokenCommand: ( + input: GetSessionTokenCommandInput, + context: __SerdeContext +) => Promise<__HttpRequest>; +export declare const de_AssumeRoleCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_AssumeRoleWithSAMLCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_AssumeRoleWithWebIdentityCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_DecodeAuthorizationMessageCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_GetAccessKeyInfoCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_GetCallerIdentityCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_GetFederationTokenCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; +export declare const de_GetSessionTokenCommand: ( + output: __HttpResponse, + context: __SerdeContext +) => Promise; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts new file mode 100644 index 0000000..13d1c6a --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts @@ -0,0 +1,116 @@ +import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler"; +import { STSClientConfig } from "./STSClient"; +export declare const getRuntimeConfig: (config: STSClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider< + import("@smithy/smithy-client").ResolvedDefaultsMode + >; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: ( + input: any + ) => import("@smithy/types").AwsCredentialIdentityProvider; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: + | import("@smithy/protocol-http").HttpHandler + | RequestHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: + | (( + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + ) & + ( + | string + | import("@smithy/types").Provider + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + )) + | undefined; + endpointProvider: ( + params: import("./endpoint/EndpointParameters").EndpointParameters, + context?: + | { + logger?: import("@smithy/types").Logger | undefined; + } + | undefined + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + } + )[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; + useGlobalEndpoint?: + | boolean + | import("@smithy/types").Provider + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts new file mode 100644 index 0000000..1c716ef --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts @@ -0,0 +1,117 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler"; +import { IdentityProviderConfig } from "@smithy/types"; +import { STSClientConfig } from "./STSClient"; +export declare const getRuntimeConfig: (config: STSClientConfig) => { + runtime: string; + defaultsMode: import("@smithy/types").Provider< + import("@smithy/smithy-client").ResolvedDefaultsMode + >; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + credentialDefaultProvider: any; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | ((idProps: Record | undefined) => Promise); + signer: AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: NoAuthSigner; + } + )[]; + maxAttempts: number | import("@smithy/types").Provider; + region: string | import("@smithy/types").Provider; + requestHandler: + | RequestHandler + | import("@smithy/protocol-http").HttpHandler; + retryMode: string | import("@smithy/types").Provider; + sha256: import("@smithy/types").HashConstructor; + streamCollector: import("@smithy/types").StreamCollector; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + endpoint?: + | (( + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + ) & + ( + | string + | import("@smithy/types").Provider + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + )) + | undefined; + endpointProvider: ( + params: import("./endpoint/EndpointParameters").EndpointParameters, + context?: + | { + logger?: import("@smithy/types").Logger | undefined; + } + | undefined + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; + useGlobalEndpoint?: + | boolean + | import("@smithy/types").Provider + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts new file mode 100644 index 0000000..4cb0c32 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts @@ -0,0 +1,110 @@ +import { STSClientConfig } from "./STSClient"; +export declare const getRuntimeConfig: (config: STSClientConfig) => { + runtime: string; + sha256: import("@smithy/types").HashConstructor; + requestHandler: + | import("@smithy/types").NodeHttpHandlerOptions + | import("@smithy/types").FetchHttpHandlerOptions + | Record + | import("@smithy/protocol-http").HttpHandler + | import("@smithy/fetch-http-handler").FetchHttpHandler; + apiVersion: string; + urlParser: import("@smithy/types").UrlParser; + bodyLengthChecker: import("@smithy/types").BodyLengthCalculator; + streamCollector: import("@smithy/types").StreamCollector; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; + disableHostPrefix: boolean; + serviceId: string; + useDualstackEndpoint: boolean | import("@smithy/types").Provider; + useFipsEndpoint: boolean | import("@smithy/types").Provider; + defaultUserAgentProvider: import("@smithy/types").Provider< + import("@smithy/types").UserAgent + >; + region: string | import("@smithy/types").Provider; + credentialDefaultProvider: ( + input: any + ) => import("@smithy/types").AwsCredentialIdentityProvider; + maxAttempts: number | import("@smithy/types").Provider; + retryMode: string | import("@smithy/types").Provider; + logger: import("@smithy/types").Logger; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + defaultsMode: + | import("@smithy/smithy-client").DefaultsMode + | import("@smithy/types").Provider< + import("@smithy/smithy-client").DefaultsMode + >; + endpoint?: + | string + | import("@smithy/types").Endpoint + | import("@smithy/types").Provider + | import("@smithy/types").EndpointV2 + | import("@smithy/types").Provider + | undefined; + endpointProvider: ( + params: import("./endpoint/EndpointParameters").EndpointParameters, + context?: + | { + logger?: import("@smithy/types").Logger | undefined; + } + | undefined + ) => import("@smithy/types").EndpointV2; + tls?: boolean | undefined; + retryStrategy?: + | import("@smithy/types").RetryStrategy + | import("@smithy/types").RetryStrategyV2 + | undefined; + customUserAgent?: string | import("@smithy/types").UserAgent | undefined; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: import("@aws-sdk/core").AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: import("@smithy/types").IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: import("@smithy/core").NoAuthSigner; + } + )[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider; + credentials?: + | import("@smithy/types").AwsCredentialIdentity + | import("@smithy/types").AwsCredentialIdentityProvider + | undefined; + signer?: + | import("@smithy/types").RequestSigner + | (( + authScheme?: import("@smithy/types").AuthScheme | undefined + ) => Promise) + | undefined; + signingEscapePath?: boolean | undefined; + systemClockOffset?: number | undefined; + signingRegion?: string | undefined; + signerConstructor?: + | (new ( + options: import("@smithy/signature-v4").SignatureV4Init & + import("@smithy/signature-v4").SignatureV4CryptoInit + ) => import("@smithy/types").RequestSigner) + | undefined; + useGlobalEndpoint?: + | boolean + | import("@smithy/types").Provider + | undefined; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.shared.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.shared.d.ts new file mode 100644 index 0000000..860b0c8 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.shared.d.ts @@ -0,0 +1,51 @@ +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoAuthSigner } from "@smithy/core"; +import { IdentityProviderConfig } from "@smithy/types"; +import { STSClientConfig } from "./STSClient"; +export declare const getRuntimeConfig: (config: STSClientConfig) => { + apiVersion: string; + base64Decoder: import("@smithy/types").Decoder; + base64Encoder: (_input: string | Uint8Array) => string; + disableHostPrefix: boolean; + endpointProvider: ( + params: import("./endpoint/EndpointParameters").EndpointParameters, + context?: + | { + logger?: import("@smithy/types").Logger | undefined; + } + | undefined + ) => import("@smithy/types").EndpointV2; + extensions: import("./runtimeExtensions").RuntimeExtension[]; + httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").STSHttpAuthSchemeProvider; + httpAuthSchemes: + | import("@smithy/types").HttpAuthScheme[] + | ( + | { + schemeId: string; + identityProvider: ( + ipc: IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | undefined; + signer: AwsSdkSigV4Signer; + } + | { + schemeId: string; + identityProvider: ( + ipc: IdentityProviderConfig + ) => + | import("@smithy/types").IdentityProvider< + import("@smithy/types").Identity + > + | (() => Promise<{}>); + signer: NoAuthSigner; + } + )[]; + logger: import("@smithy/types").Logger; + serviceId: string; + urlParser: import("@smithy/types").UrlParser; + utf8Decoder: import("@smithy/types").Decoder; + utf8Encoder: (input: string | Uint8Array) => string; +}; diff --git a/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeExtensions.d.ts b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeExtensions.d.ts new file mode 100644 index 0000000..d3cd411 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeExtensions.d.ts @@ -0,0 +1,11 @@ +import { STSExtensionConfiguration } from "./extensionConfiguration"; +export interface RuntimeExtension { + configure(extensionConfiguration: STSExtensionConfiguration): void; +} +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} +export declare const resolveRuntimeExtensions: ( + runtimeConfig: any, + extensions: RuntimeExtension[] +) => any; diff --git a/node_modules/@aws-sdk/client-sts/package.json b/node_modules/@aws-sdk/client-sts/package.json new file mode 100644 index 0000000..0b8e970 --- /dev/null +++ b/node_modules/@aws-sdk/client-sts/package.json @@ -0,0 +1,104 @@ +{ + "name": "@aws-sdk/client-sts", + "description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native", + "version": "3.535.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 test:unit", + "test:unit": "jest" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.535.0", + "@aws-sdk/middleware-host-header": "3.535.0", + "@aws-sdk/middleware-logger": "3.535.0", + "@aws-sdk/middleware-recursion-detection": "3.535.0", + "@aws-sdk/middleware-user-agent": "3.535.0", + "@aws-sdk/region-config-resolver": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@aws-sdk/util-endpoints": "3.535.0", + "@aws-sdk/util-user-agent-browser": "3.535.0", + "@aws-sdk/util-user-agent-node": "3.535.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-retry": "^2.2.0", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.0", + "@smithy/util-defaults-mode-node": "^2.3.0", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@smithy/service-client-documentation-generator": "^2.2.0", + "@tsconfig/node14": "1.0.3", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.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", + "peerDependencies": { + "@aws-sdk/credential-provider-node": "^3.535.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" + } +} diff --git a/node_modules/@aws-sdk/core/CHANGELOG.md b/node_modules/@aws-sdk/core/CHANGELOG.md new file mode 100644 index 0000000..b9eca71 --- /dev/null +++ b/node_modules/@aws-sdk/core/CHANGELOG.md @@ -0,0 +1,261 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [3.535.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.534.0...v3.535.0) (2024-03-15) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +# [3.533.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.532.0...v3.533.0) (2024-03-13) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +## [3.529.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.529.0...v3.529.1) (2024-03-08) + + +### Bug Fixes + +* **core:** add missing fast-xml-parser dependency ([#5869](https://github.com/aws/aws-sdk-js-v3/issues/5869)) ([96c375c](https://github.com/aws/aws-sdk-js-v3/commit/96c375cb36c838c76b5384f96d79ad47d9091ee7)) + + + + + +# [3.529.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.528.0...v3.529.0) (2024-03-07) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +# [3.525.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.524.0...v3.525.0) (2024-02-29) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +# [3.523.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.522.0...v3.523.0) (2024-02-27) + + +### Bug Fixes + +* **core:** add error metadata indicating clock skew correction ([#5830](https://github.com/aws/aws-sdk-js-v3/issues/5830)) ([46e5e8d](https://github.com/aws/aws-sdk-js-v3/commit/46e5e8daa0b13208f149bbd0b54857498558e152)) + + + + + +# [3.521.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.520.0...v3.521.0) (2024-02-23) + + +### Features + +* requestHandler ctor param pass-through ([#5820](https://github.com/aws/aws-sdk-js-v3/issues/5820)) ([9fec71d](https://github.com/aws/aws-sdk-js-v3/commit/9fec71d1933cd8e3db118c164bca16edc2305532)) + + + + + +# [3.513.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.512.0...v3.513.0) (2024-02-13) + + +### Features + +* **experimentalIdentityAndAuth:** release phase for services without customizations ([#5787](https://github.com/aws/aws-sdk-js-v3/issues/5787)) ([4004ff6](https://github.com/aws/aws-sdk-js-v3/commit/4004ff68a8ad20f6e60e8fab1f8952928f92f4b7)) + + + + + +# [3.511.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.510.0...v3.511.0) (2024-02-09) + + +### Bug Fixes + +* **credential-provider-node:** pass client region to inner credential client region ([#5758](https://github.com/aws/aws-sdk-js-v3/issues/5758)) ([8c0b29e](https://github.com/aws/aws-sdk-js-v3/commit/8c0b29eabfe0ce8dbd2cbdcfb8b0a31b003bc3f2)) + + + + + +# [3.496.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.495.0...v3.496.0) (2024-01-19) + + +### Bug Fixes + +* get full list of exports for esm compat in dist-cjs ([#5694](https://github.com/aws/aws-sdk-js-v3/issues/5694)) ([5d26da6](https://github.com/aws/aws-sdk-js-v3/commit/5d26da6d07b593ae286ca674fb3cbff7c833cbb0)) + + + + + +# [3.495.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.494.0...v3.495.0) (2024-01-18) + + +### Features + +* use bundled dist-cjs build ([#5687](https://github.com/aws/aws-sdk-js-v3/issues/5687)) ([5f79e22](https://github.com/aws/aws-sdk-js-v3/commit/5f79e225e32f0b2ed5b432ae4e4108663eb0acfb)) + + + + + +# [3.490.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.489.0...v3.490.0) (2024-01-11) + + +### Bug Fixes + +* **experimentalIdentityAndAuth:** rename `AWSSDKSigV4` to `AwsSdkSigV4` ([#5667](https://github.com/aws/aws-sdk-js-v3/issues/5667)) ([9c3e91a](https://github.com/aws/aws-sdk-js-v3/commit/9c3e91aeb155cad42ce56cc116aa71bc8f2457c9)) + + + + + +# [3.485.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.484.0...v3.485.0) (2024-01-03) + + +### Features + +* **credential-providers:** add credentialScope field ([#5606](https://github.com/aws/aws-sdk-js-v3/issues/5606)) ([04c1459](https://github.com/aws/aws-sdk-js-v3/commit/04c14592898ac63ed87d47f2a53320ccaa991083)) + + + + + +# [3.481.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.480.0...v3.481.0) (2023-12-26) + + +### Features + +* codegen for command class builder ([#5604](https://github.com/aws/aws-sdk-js-v3/issues/5604)) ([4835de4](https://github.com/aws/aws-sdk-js-v3/commit/4835de4ebb8f302ae1e838ac1efaf5f12384910d)) + + + + + +# [3.477.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.476.0...v3.477.0) (2023-12-19) + + +### Features + +* xml codegen reduction ([#5566](https://github.com/aws/aws-sdk-js-v3/issues/5566)) ([3ed7c81](https://github.com/aws/aws-sdk-js-v3/commit/3ed7c81f9191182826de7645078cc6ed1d2ee959)) + + + + + +# [3.476.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.475.0...v3.476.0) (2023-12-18) + + +### Bug Fixes + +* **core:** wrap `credentialDefaultProvider` with `normalizeProvider` ([#5592](https://github.com/aws/aws-sdk-js-v3/issues/5592)) ([9faa8ad](https://github.com/aws/aws-sdk-js-v3/commit/9faa8ad8dfd3eeb642c7a237a72c8be745ab5ba4)) + + + + + +# [3.474.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.473.0...v3.474.0) (2023-12-14) + + +### Features + +* **core:** add `experimentalIdentityAndAuth` AWS SDK SigV4 support ([#5586](https://github.com/aws/aws-sdk-js-v3/issues/5586)) ([9a97df5](https://github.com/aws/aws-sdk-js-v3/commit/9a97df5953e722ed4887bcb65a41c019f08a5cbb)) + + + + + +# [3.468.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.467.0...v3.468.0) (2023-12-06) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +# [3.465.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.464.0...v3.465.0) (2023-12-01) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +# [3.451.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.450.0...v3.451.0) (2023-11-14) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +# [3.445.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.444.0...v3.445.0) (2023-11-07) + + +### Bug Fixes + +* **core:** add tslib ([#5459](https://github.com/aws/aws-sdk-js-v3/issues/5459)) ([35a1aed](https://github.com/aws/aws-sdk-js-v3/commit/35a1aed1f0d2d6fb33c24232cb24268a1f8c1b05)) + + + + + +# [3.441.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.440.0...v3.441.0) (2023-11-01) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +# [3.436.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.435.0...v3.436.0) (2023-10-25) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +# [3.433.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.432.0...v3.433.0) (2023-10-20) + + +### Bug Fixes + +* **codegen:** use partial record for enum keyed types ([#5391](https://github.com/aws/aws-sdk-js-v3/issues/5391)) ([70c2107](https://github.com/aws/aws-sdk-js-v3/commit/70c2107b970d035bfedb211278c88fdbfc2e5334)) + + + + + +# [3.431.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.430.0...v3.431.0) (2023-10-18) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +# [3.430.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.429.0...v3.430.0) (2023-10-17) + +**Note:** Version bump only for package @aws-sdk/core + + + + + +# [3.429.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.428.0...v3.429.0) (2023-10-16) + +**Note:** Version bump only for package @aws-sdk/core diff --git a/node_modules/@aws-sdk/core/README.md b/node_modules/@aws-sdk/core/README.md new file mode 100644 index 0000000..0bbfa21 --- /dev/null +++ b/node_modules/@aws-sdk/core/README.md @@ -0,0 +1,5 @@ +# @aws-sdk/core + +This package provides common or core functionality to the AWS SDK for JavaScript (v3). + +You do not need to explicitly install this package, since it will be transitively installed by AWS SDK clients. diff --git a/node_modules/@aws-sdk/core/api-extractor.json b/node_modules/@aws-sdk/core/api-extractor.json new file mode 100644 index 0000000..b03e22a --- /dev/null +++ b/node_modules/@aws-sdk/core/api-extractor.json @@ -0,0 +1,4 @@ +{ + "extends": "../../api-extractor.packages.json", + "mainEntryPointFilePath": "./dist-types/index.d.ts" +} diff --git a/node_modules/@aws-sdk/core/dist-cjs/client/emitWarningIfUnsupportedVersion.js b/node_modules/@aws-sdk/core/dist-cjs/client/emitWarningIfUnsupportedVersion.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/client/emitWarningIfUnsupportedVersion.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/client/index.js b/node_modules/@aws-sdk/core/dist-cjs/client/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/client/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/index.js b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/index.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/index.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/index.js b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getDateHeader.js b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getDateHeader.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getDateHeader.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getSkewCorrectedDate.js b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getSkewCorrectedDate.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getSkewCorrectedDate.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/index.js b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/index.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/index.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/isClockSkewed.js b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/isClockSkewed.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/httpAuthSchemes/utils/isClockSkewed.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/index.js b/node_modules/@aws-sdk/core/dist-cjs/index.js new file mode 100644 index 0000000..3280634 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/index.js @@ -0,0 +1,446 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, + AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, + _toBool: () => _toBool, + _toNum: () => _toNum, + _toStr: () => _toStr, + awsExpectUnion: () => awsExpectUnion, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + loadRestJsonErrorCode: () => loadRestJsonErrorCode, + loadRestXmlErrorCode: () => loadRestXmlErrorCode, + parseJsonBody: () => parseJsonBody, + parseJsonErrorBody: () => parseJsonErrorBody, + parseXmlBody: () => parseXmlBody, + parseXmlErrorBody: () => parseXmlErrorBody, + resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, + resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config +}); +module.exports = __toCommonJS(src_exports); + +// src/client/emitWarningIfUnsupportedVersion.ts +var warningEmitted = false; +var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + process.emitWarning( + `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 14.x on May 1, 2024. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to an active Node.js LTS version. + +More information can be found at: https://a.co/dzr2AJd` + ); + } +}, "emitWarningIfUnsupportedVersion"); + +// src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts + + +// src/httpAuthSchemes/utils/getDateHeader.ts +var import_protocol_http = require("@smithy/protocol-http"); +var getDateHeader = /* @__PURE__ */ __name((response) => { + var _a, _b; + return import_protocol_http.HttpResponse.isInstance(response) ? ((_a = response.headers) == null ? void 0 : _a.date) ?? ((_b = response.headers) == null ? void 0 : _b.Date) : void 0; +}, "getDateHeader"); + +// src/httpAuthSchemes/utils/getSkewCorrectedDate.ts +var getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate"); + +// src/httpAuthSchemes/utils/isClockSkewed.ts +var isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, "isClockSkewed"); + +// src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts +var getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; +}, "getUpdatedSystemClockOffset"); + +// src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts +var throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; +}, "throwSigningPropertyError"); +var validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => { + var _a, _b, _c; + const context = throwSigningPropertyError( + "context", + signingProperties.context + ); + const config = throwSigningPropertyError("config", signingProperties.config); + const authScheme = (_c = (_b = (_a = context.endpointV2) == null ? void 0 : _a.properties) == null ? void 0 : _b.authSchemes) == null ? void 0 : _c[0]; + const signerFunction = throwSigningPropertyError( + "signer", + config.signer + ); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties == null ? void 0 : signingProperties.signingRegion; + const signingName = signingProperties == null ? void 0 : signingProperties.signingName; + return { + config, + signer, + signingRegion, + signingName + }; +}, "validateSigningProperties"); +var _AwsSdkSigV4Signer = class _AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!import_protocol_http.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties); + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion, + signingService: signingName + }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error) => { + const serverTime = error.ServerTime ?? getDateHeader(error.$response); + if (serverTime) { + const config = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config.systemClockOffset; + config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); + const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error.$metadata) { + error.$metadata.clockSkewCorrected = true; + } + } + throw error; + }; + } + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config = throwSigningPropertyError("config", signingProperties.config); + config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); + } + } +}; +__name(_AwsSdkSigV4Signer, "AwsSdkSigV4Signer"); +var AwsSdkSigV4Signer = _AwsSdkSigV4Signer; +var AWSSDKSigV4Signer = AwsSdkSigV4Signer; + +// src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts +var import_core = require("@smithy/core"); +var import_signature_v4 = require("@smithy/signature-v4"); +var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => { + let normalizedCreds; + if (config.credentials) { + normalizedCreds = (0, import_core.memoizeIdentityProvider)(config.credentials, import_core.isIdentityExpired, import_core.doesIdentityRequireRefresh); + } + if (!normalizedCreds) { + if (config.credentialDefaultProvider) { + normalizedCreds = (0, import_core.normalizeProvider)( + config.credentialDefaultProvider( + Object.assign({}, config, { + parentClientConfig: config + }) + ) + ); + } else { + normalizedCreds = /* @__PURE__ */ __name(async () => { + throw new Error("`credentials` is missing"); + }, "normalizedCreds"); + } + } + const { + // Default for signingEscapePath + signingEscapePath = true, + // Default for systemClockOffset + systemClockOffset = config.systemClockOffset || 0, + // No default for sha256 since it is platform dependent + sha256 + } = config; + let signer; + if (config.signer) { + signer = (0, import_core.normalizeProvider)(config.signer); + } else if (config.regionInfoProvider) { + signer = /* @__PURE__ */ __name(() => (0, import_core.normalizeProvider)(config.region)().then( + async (region) => [ + await config.regionInfoProvider(region, { + useFipsEndpoint: await config.useFipsEndpoint(), + useDualstackEndpoint: await config.useDualstackEndpoint() + }) || {}, + region + ] + ).then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config.signingRegion = config.signingRegion || signingRegion || region; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }), "signer"); + } else { + signer = /* @__PURE__ */ __name(async (authScheme) => { + authScheme = Object.assign( + {}, + { + name: "sigv4", + signingName: config.signingName || config.defaultSigningName, + signingRegion: await (0, import_core.normalizeProvider)(config.region)(), + properties: {} + }, + authScheme + ); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config.signingRegion = config.signingRegion || signingRegion; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }, "signer"); + } + return { + ...config, + systemClockOffset, + signingEscapePath, + credentials: normalizedCreds, + signer + }; +}, "resolveAwsSdkSigV4Config"); +var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; + +// src/protocols/coercing-serializers.ts +var _toStr = /* @__PURE__ */ __name((val) => { + if (val == null) { + return val; + } + if (typeof val === "number" || typeof val === "bigint") { + const warning = new Error(`Received number ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + if (typeof val === "boolean") { + const warning = new Error(`Received boolean ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + return val; +}, "_toStr"); +var _toBool = /* @__PURE__ */ __name((val) => { + if (val == null) { + return val; + } + if (typeof val === "number") { + } + if (typeof val === "string") { + const lowercase = val.toLowerCase(); + if (val !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); + } + return val !== "" && lowercase !== "false"; + } + return val; +}, "_toBool"); +var _toNum = /* @__PURE__ */ __name((val) => { + if (val == null) { + return val; + } + if (typeof val === "boolean") { + } + if (typeof val === "string") { + const num = Number(val); + if (num.toString() !== val) { + const warning = new Error(`Received string "${val}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val; + } + return num; + } + return val; +}, "_toNum"); + +// src/protocols/json/awsExpectUnion.ts +var import_smithy_client = require("@smithy/smithy-client"); +var awsExpectUnion = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; + } + if (typeof value === "object" && "__type" in value) { + delete value.__type; + } + return (0, import_smithy_client.expectUnion)(value); +}, "awsExpectUnion"); + +// src/protocols/common.ts + +var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString"); + +// src/protocols/json/parseJsonBody.ts +var parseJsonBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + try { + return JSON.parse(encoded); + } catch (e) { + if ((e == null ? void 0 : e.name) === "SyntaxError") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded + }); + } + throw e; + } + } + return {}; +}), "parseJsonBody"); +var parseJsonErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { + const value = await parseJsonBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}, "parseJsonErrorBody"); +var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => { + const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey"); + const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }, "sanitizeErrorCode"); + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== void 0) { + return sanitizeErrorCode(output.headers[headerKey]); + } + if (data.code !== void 0) { + return sanitizeErrorCode(data.code); + } + if (data["__type"] !== void 0) { + return sanitizeErrorCode(data["__type"]); + } +}, "loadRestJsonErrorCode"); + +// src/protocols/xml/parseXmlBody.ts + +var import_fast_xml_parser = require("fast-xml-parser"); +var parseXmlBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + const parser = new import_fast_xml_parser.XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0 + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + let parsedObj; + try { + parsedObj = parser.parse(encoded); + } catch (e) { + if (e && typeof e === "object") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded + }); + } + throw e; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return (0, import_smithy_client.getValueFromTextNode)(parsedObjToReturn); + } + return {}; +}), "parseXmlBody"); +var parseXmlErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { + const value = await parseXmlBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; + } + return value; +}, "parseXmlErrorBody"); +var loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => { + var _a; + if (((_a = data == null ? void 0 : data.Error) == null ? void 0 : _a.Code) !== void 0) { + return data.Error.Code; + } + if ((data == null ? void 0 : data.Code) !== void 0) { + return data.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } +}, "loadRestXmlErrorCode"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + emitWarningIfUnsupportedVersion, + AwsSdkSigV4Signer, + AWSSDKSigV4Signer, + resolveAwsSdkSigV4Config, + resolveAWSSDKSigV4Config, + _toStr, + _toBool, + _toNum, + awsExpectUnion, + parseJsonBody, + parseJsonErrorBody, + loadRestJsonErrorCode, + parseXmlBody, + parseXmlErrorBody, + loadRestXmlErrorCode +}); + diff --git a/node_modules/@aws-sdk/core/dist-cjs/protocols/coercing-serializers.js b/node_modules/@aws-sdk/core/dist-cjs/protocols/coercing-serializers.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/protocols/coercing-serializers.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/protocols/common.js b/node_modules/@aws-sdk/core/dist-cjs/protocols/common.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/protocols/common.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/protocols/index.js b/node_modules/@aws-sdk/core/dist-cjs/protocols/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/protocols/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/protocols/json/awsExpectUnion.js b/node_modules/@aws-sdk/core/dist-cjs/protocols/json/awsExpectUnion.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/protocols/json/awsExpectUnion.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/protocols/json/parseJsonBody.js b/node_modules/@aws-sdk/core/dist-cjs/protocols/json/parseJsonBody.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/protocols/json/parseJsonBody.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-cjs/protocols/xml/parseXmlBody.js b/node_modules/@aws-sdk/core/dist-cjs/protocols/xml/parseXmlBody.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-cjs/protocols/xml/parseXmlBody.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/dist-es/client/emitWarningIfUnsupportedVersion.js b/node_modules/@aws-sdk/core/dist-es/client/emitWarningIfUnsupportedVersion.js new file mode 100644 index 0000000..a6822d1 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/client/emitWarningIfUnsupportedVersion.js @@ -0,0 +1,13 @@ +let warningEmitted = false; +export const emitWarningIfUnsupportedVersion = (version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 14.x on May 1, 2024. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to an active Node.js LTS version. + +More information can be found at: https://a.co/dzr2AJd`); + } +}; diff --git a/node_modules/@aws-sdk/core/dist-es/client/index.js b/node_modules/@aws-sdk/core/dist-es/client/index.js new file mode 100644 index 0000000..ed9af92 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/client/index.js @@ -0,0 +1 @@ +export * from "./emitWarningIfUnsupportedVersion"; diff --git a/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js new file mode 100644 index 0000000..06b1854 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js @@ -0,0 +1,60 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import { getDateHeader, getSkewCorrectedDate, getUpdatedSystemClockOffset } from "../utils"; +const throwSigningPropertyError = (name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; +}; +const validateSigningProperties = async (signingProperties) => { + const context = throwSigningPropertyError("context", signingProperties.context); + const config = throwSigningPropertyError("config", signingProperties.config); + const authScheme = context.endpointV2?.properties?.authSchemes?.[0]; + const signerFunction = throwSigningPropertyError("signer", config.signer); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties?.signingRegion; + const signingName = signingProperties?.signingName; + return { + config, + signer, + signingRegion, + signingName, + }; +}; +export class AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties); + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion: signingRegion, + signingService: signingName, + }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error) => { + const serverTime = error.ServerTime ?? getDateHeader(error.$response); + if (serverTime) { + const config = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config.systemClockOffset; + config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); + const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error.$metadata) { + error.$metadata.clockSkewCorrected = true; + } + } + throw error; + }; + } + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config = throwSigningPropertyError("config", signingProperties.config); + config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); + } + } +} +export const AWSSDKSigV4Signer = AwsSdkSigV4Signer; diff --git a/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/index.js b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/index.js new file mode 100644 index 0000000..6d17c70 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/index.js @@ -0,0 +1,2 @@ +export * from "./AwsSdkSigV4Signer"; +export * from "./resolveAwsSdkSigV4Config"; diff --git a/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js new file mode 100644 index 0000000..f5f0f2e --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js @@ -0,0 +1,82 @@ +import { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider, normalizeProvider, } from "@smithy/core"; +import { SignatureV4 } from "@smithy/signature-v4"; +export const resolveAwsSdkSigV4Config = (config) => { + let normalizedCreds; + if (config.credentials) { + normalizedCreds = memoizeIdentityProvider(config.credentials, isIdentityExpired, doesIdentityRequireRefresh); + } + if (!normalizedCreds) { + if (config.credentialDefaultProvider) { + normalizedCreds = normalizeProvider(config.credentialDefaultProvider(Object.assign({}, config, { + parentClientConfig: config, + }))); + } + else { + normalizedCreds = async () => { + throw new Error("`credentials` is missing"); + }; + } + } + const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config; + let signer; + if (config.signer) { + signer = normalizeProvider(config.signer); + } + else if (config.regionInfoProvider) { + signer = () => normalizeProvider(config.region)() + .then(async (region) => [ + (await config.regionInfoProvider(region, { + useFipsEndpoint: await config.useFipsEndpoint(), + useDualstackEndpoint: await config.useDualstackEndpoint(), + })) || {}, + region, + ]) + .then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config.signingRegion = config.signingRegion || signingRegion || region; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath, + }; + const SignerCtor = config.signerConstructor || SignatureV4; + return new SignerCtor(params); + }); + } + else { + signer = async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config.signingName || config.defaultSigningName, + signingRegion: await normalizeProvider(config.region)(), + properties: {}, + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config.signingRegion = config.signingRegion || signingRegion; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath, + }; + const SignerCtor = config.signerConstructor || SignatureV4; + return new SignerCtor(params); + }; + } + return { + ...config, + systemClockOffset, + signingEscapePath, + credentials: normalizedCreds, + signer, + }; +}; +export const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; diff --git a/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/index.js b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/index.js new file mode 100644 index 0000000..29d0c3b --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/index.js @@ -0,0 +1 @@ +export * from "./aws_sdk"; diff --git a/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getDateHeader.js b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getDateHeader.js new file mode 100644 index 0000000..449c182 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getDateHeader.js @@ -0,0 +1,2 @@ +import { HttpResponse } from "@smithy/protocol-http"; +export const getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined; diff --git a/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getSkewCorrectedDate.js b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getSkewCorrectedDate.js new file mode 100644 index 0000000..6ee8036 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getSkewCorrectedDate.js @@ -0,0 +1 @@ +export const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); diff --git a/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js new file mode 100644 index 0000000..859c41a --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js @@ -0,0 +1,8 @@ +import { isClockSkewed } from "./isClockSkewed"; +export const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; +}; diff --git a/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/index.js b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/index.js new file mode 100644 index 0000000..07c2195 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/index.js @@ -0,0 +1,3 @@ +export * from "./getDateHeader"; +export * from "./getSkewCorrectedDate"; +export * from "./getUpdatedSystemClockOffset"; diff --git a/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/isClockSkewed.js b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/isClockSkewed.js new file mode 100644 index 0000000..086d7a8 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/utils/isClockSkewed.js @@ -0,0 +1,2 @@ +import { getSkewCorrectedDate } from "./getSkewCorrectedDate"; +export const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000; diff --git a/node_modules/@aws-sdk/core/dist-es/index.js b/node_modules/@aws-sdk/core/dist-es/index.js new file mode 100644 index 0000000..532feb9 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/index.js @@ -0,0 +1,3 @@ +export * from "./client/index"; +export * from "./httpAuthSchemes/index"; +export * from "./protocols/index"; diff --git a/node_modules/@aws-sdk/core/dist-es/protocols/coercing-serializers.js b/node_modules/@aws-sdk/core/dist-es/protocols/coercing-serializers.js new file mode 100644 index 0000000..fce893b --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/protocols/coercing-serializers.js @@ -0,0 +1,53 @@ +export const _toStr = (val) => { + if (val == null) { + return val; + } + if (typeof val === "number" || typeof val === "bigint") { + const warning = new Error(`Received number ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + if (typeof val === "boolean") { + const warning = new Error(`Received boolean ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + return val; +}; +export const _toBool = (val) => { + if (val == null) { + return val; + } + if (typeof val === "number") { + } + if (typeof val === "string") { + const lowercase = val.toLowerCase(); + if (val !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); + } + return val !== "" && lowercase !== "false"; + } + return val; +}; +export const _toNum = (val) => { + if (val == null) { + return val; + } + if (typeof val === "boolean") { + } + if (typeof val === "string") { + const num = Number(val); + if (num.toString() !== val) { + const warning = new Error(`Received string "${val}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val; + } + return num; + } + return val; +}; diff --git a/node_modules/@aws-sdk/core/dist-es/protocols/common.js b/node_modules/@aws-sdk/core/dist-es/protocols/common.js new file mode 100644 index 0000000..4348b08 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/protocols/common.js @@ -0,0 +1,2 @@ +import { collectBody } from "@smithy/smithy-client"; +export const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); diff --git a/node_modules/@aws-sdk/core/dist-es/protocols/index.js b/node_modules/@aws-sdk/core/dist-es/protocols/index.js new file mode 100644 index 0000000..09a6ac2 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/protocols/index.js @@ -0,0 +1,4 @@ +export * from "./coercing-serializers"; +export * from "./json/awsExpectUnion"; +export * from "./json/parseJsonBody"; +export * from "./xml/parseXmlBody"; diff --git a/node_modules/@aws-sdk/core/dist-es/protocols/json/awsExpectUnion.js b/node_modules/@aws-sdk/core/dist-es/protocols/json/awsExpectUnion.js new file mode 100644 index 0000000..1c6cc32 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/protocols/json/awsExpectUnion.js @@ -0,0 +1,10 @@ +import { expectUnion } from "@smithy/smithy-client"; +export const awsExpectUnion = (value) => { + if (value == null) { + return undefined; + } + if (typeof value === "object" && "__type" in value) { + delete value.__type; + } + return expectUnion(value); +}; diff --git a/node_modules/@aws-sdk/core/dist-es/protocols/json/parseJsonBody.js b/node_modules/@aws-sdk/core/dist-es/protocols/json/parseJsonBody.js new file mode 100644 index 0000000..d9c1564 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/protocols/json/parseJsonBody.js @@ -0,0 +1,51 @@ +import { collectBodyString } from "../common"; +export const parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + try { + return JSON.parse(encoded); + } + catch (e) { + if (e?.name === "SyntaxError") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded, + }); + } + throw e; + } + } + return {}; +}); +export const parseJsonErrorBody = async (errorBody, context) => { + const value = await parseJsonBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; +export const loadRestJsonErrorCode = (output, data) => { + const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } +}; diff --git a/node_modules/@aws-sdk/core/dist-es/protocols/xml/parseXmlBody.js b/node_modules/@aws-sdk/core/dist-es/protocols/xml/parseXmlBody.js new file mode 100644 index 0000000..166b53e --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-es/protocols/xml/parseXmlBody.js @@ -0,0 +1,57 @@ +import { getValueFromTextNode } from "@smithy/smithy-client"; +import { XMLParser } from "fast-xml-parser"; +import { collectBodyString } from "../common"; +export const parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + const parser = new XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined), + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + let parsedObj; + try { + parsedObj = parser.parse(encoded); + } + catch (e) { + if (e && typeof e === "object") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded, + }); + } + throw e; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return getValueFromTextNode(parsedObjToReturn); + } + return {}; +}); +export const parseXmlErrorBody = async (errorBody, context) => { + const value = await parseXmlBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; + } + return value; +}; +export const loadRestXmlErrorCode = (output, data) => { + if (data?.Error?.Code !== undefined) { + return data.Error.Code; + } + if (data?.Code !== undefined) { + return data.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } +}; diff --git a/node_modules/@aws-sdk/core/dist-types/client/emitWarningIfUnsupportedVersion.d.ts b/node_modules/@aws-sdk/core/dist-types/client/emitWarningIfUnsupportedVersion.d.ts new file mode 100644 index 0000000..0b82cf0 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/client/emitWarningIfUnsupportedVersion.d.ts @@ -0,0 +1,9 @@ +/** + * @internal + * + * Emits warning if the provided Node.js version string is + * pending deprecation by AWS SDK JSv3. + * + * @param version - The Node.js version string. + */ +export declare const emitWarningIfUnsupportedVersion: (version: string) => void; diff --git a/node_modules/@aws-sdk/core/dist-types/client/index.d.ts b/node_modules/@aws-sdk/core/dist-types/client/index.d.ts new file mode 100644 index 0000000..ed9af92 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/client/index.d.ts @@ -0,0 +1 @@ +export * from "./emitWarningIfUnsupportedVersion"; diff --git a/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts new file mode 100644 index 0000000..5d7ce3d --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts @@ -0,0 +1,17 @@ +import { AwsCredentialIdentity, HttpRequest as IHttpRequest, HttpResponse, HttpSigner } from "@smithy/types"; +/** + * @internal + */ +export declare class AwsSdkSigV4Signer implements HttpSigner { + sign(httpRequest: IHttpRequest, + /** + * `identity` is bound in {@link resolveAWSSDKSigV4Config} + */ + identity: AwsCredentialIdentity, signingProperties: Record): Promise; + errorHandler(signingProperties: Record): (error: Error) => never; + successHandler(httpResponse: HttpResponse | unknown, signingProperties: Record): void; +} +/** + * @deprecated renamed to {@link AwsSdkSigV4Signer} + */ +export declare const AWSSDKSigV4Signer: typeof AwsSdkSigV4Signer; diff --git a/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/index.d.ts b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/index.d.ts new file mode 100644 index 0000000..6d17c70 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/index.d.ts @@ -0,0 +1,2 @@ +export * from "./AwsSdkSigV4Signer"; +export * from "./resolveAwsSdkSigV4Config"; diff --git a/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts new file mode 100644 index 0000000..441ff6d --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts @@ -0,0 +1,95 @@ +import { SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4"; +import { AuthScheme, AwsCredentialIdentity, AwsCredentialIdentityProvider, ChecksumConstructor, HashConstructor, MemoizedProvider, Provider, RegionInfoProvider, RequestSigner } from "@smithy/types"; +/** + * @internal + */ +export interface AwsSdkSigV4AuthInputConfig { + /** + * The credentials used to sign requests. + */ + credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider; + /** + * The signer to use when signing requests. + */ + signer?: RequestSigner | ((authScheme?: AuthScheme) => Promise); + /** + * Whether to escape request path when signing the request. + */ + signingEscapePath?: boolean; + /** + * An offset value in milliseconds to apply to all signing times. + */ + systemClockOffset?: number; + /** + * The region where you want to sign your request against. This + * can be different to the region in the endpoint. + */ + signingRegion?: string; + /** + * The injectable SigV4-compatible signer class constructor. If not supplied, + * regular SignatureV4 constructor will be used. + * + * @internal + */ + signerConstructor?: new (options: SignatureV4Init & SignatureV4CryptoInit) => RequestSigner; +} +/** + * @internal + */ +export interface AwsSdkSigV4PreviouslyResolved { + credentialDefaultProvider?: (input: any) => MemoizedProvider; + region: string | Provider; + sha256: ChecksumConstructor | HashConstructor; + signingName?: string; + regionInfoProvider?: RegionInfoProvider; + defaultSigningName?: string; + serviceId: string; + useFipsEndpoint: Provider; + useDualstackEndpoint: Provider; +} +/** + * @internal + */ +export interface AwsSdkSigV4AuthResolvedConfig { + /** + * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.credentials} + * This provider MAY memoize the loaded credentials for certain period. + * See {@link MemoizedProvider} for more information. + */ + credentials: AwsCredentialIdentityProvider; + /** + * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.signer} + */ + signer: (authScheme?: AuthScheme) => Promise; + /** + * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.signingEscapePath} + */ + signingEscapePath: boolean; + /** + * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.systemClockOffset} + */ + systemClockOffset: number; +} +/** + * @internal + */ +export declare const resolveAwsSdkSigV4Config: (config: T & AwsSdkSigV4AuthInputConfig & AwsSdkSigV4PreviouslyResolved) => T & AwsSdkSigV4AuthResolvedConfig; +/** + * @deprecated renamed to {@link AwsSdkSigV4AuthInputConfig} + */ +export interface AWSSDKSigV4AuthInputConfig extends AwsSdkSigV4AuthInputConfig { +} +/** + * @deprecated renamed to {@link AwsSdkSigV4PreviouslyResolved} + */ +export interface AWSSDKSigV4PreviouslyResolved extends AwsSdkSigV4PreviouslyResolved { +} +/** + * @deprecated renamed to {@link AwsSdkSigV4AuthResolvedConfig} + */ +export interface AWSSDKSigV4AuthResolvedConfig extends AwsSdkSigV4AuthResolvedConfig { +} +/** + * @deprecated renamed to {@link resolveAwsSdkSigV4Config} + */ +export declare const resolveAWSSDKSigV4Config: (config: T & AwsSdkSigV4AuthInputConfig & AwsSdkSigV4PreviouslyResolved) => T & AwsSdkSigV4AuthResolvedConfig; diff --git a/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/index.d.ts b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/index.d.ts new file mode 100644 index 0000000..29d0c3b --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/index.d.ts @@ -0,0 +1 @@ +export * from "./aws_sdk"; diff --git a/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getDateHeader.d.ts b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getDateHeader.d.ts new file mode 100644 index 0000000..2c9157b --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getDateHeader.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const getDateHeader: (response: unknown) => string | undefined; diff --git a/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts new file mode 100644 index 0000000..4b72690 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + * + * Returns a date that is corrected for clock skew. + * + * @param systemClockOffset The offset of the system clock in milliseconds. + */ +export declare const getSkewCorrectedDate: (systemClockOffset: number) => Date; diff --git a/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts new file mode 100644 index 0000000..2d554b8 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts @@ -0,0 +1,10 @@ +/** + * @internal + * + * If clock is skewed, it returns the difference between serverTime and current time. + * If clock is not skewed, it returns currentSystemClockOffset. + * + * @param clockTime The string value of the server time. + * @param currentSystemClockOffset The current system clock offset. + */ +export declare const getUpdatedSystemClockOffset: (clockTime: string, currentSystemClockOffset: number) => number; diff --git a/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/index.d.ts b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/index.d.ts new file mode 100644 index 0000000..07c2195 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/index.d.ts @@ -0,0 +1,3 @@ +export * from "./getDateHeader"; +export * from "./getSkewCorrectedDate"; +export * from "./getUpdatedSystemClockOffset"; diff --git a/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/isClockSkewed.d.ts b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/isClockSkewed.d.ts new file mode 100644 index 0000000..970fa15 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/httpAuthSchemes/utils/isClockSkewed.d.ts @@ -0,0 +1,9 @@ +/** + * @internal + * + * Checks if the provided date is within the skew window of 300000ms. + * + * @param clockTime - The time to check for skew in milliseconds. + * @param systemClockOffset - The offset of the system clock in milliseconds. + */ +export declare const isClockSkewed: (clockTime: number, systemClockOffset: number) => boolean; diff --git a/node_modules/@aws-sdk/core/dist-types/index.d.ts b/node_modules/@aws-sdk/core/dist-types/index.d.ts new file mode 100644 index 0000000..532feb9 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/index.d.ts @@ -0,0 +1,3 @@ +export * from "./client/index"; +export * from "./httpAuthSchemes/index"; +export * from "./protocols/index"; diff --git a/node_modules/@aws-sdk/core/dist-types/protocols/coercing-serializers.d.ts b/node_modules/@aws-sdk/core/dist-types/protocols/coercing-serializers.d.ts new file mode 100644 index 0000000..10d9d39 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/protocols/coercing-serializers.d.ts @@ -0,0 +1,18 @@ +/** + * @internal + * + * Used for awsQueryCompatibility trait. + */ +export declare const _toStr: (val: unknown) => string | undefined; +/** + * @internal + * + * Used for awsQueryCompatibility trait. + */ +export declare const _toBool: (val: unknown) => boolean | undefined; +/** + * @internal + * + * Used for awsQueryCompatibility trait. + */ +export declare const _toNum: (val: unknown) => number | undefined; diff --git a/node_modules/@aws-sdk/core/dist-types/protocols/common.d.ts b/node_modules/@aws-sdk/core/dist-types/protocols/common.d.ts new file mode 100644 index 0000000..ec78fb2 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/protocols/common.d.ts @@ -0,0 +1,2 @@ +import type { SerdeContext } from "@smithy/types"; +export declare const collectBodyString: (streamBody: any, context: SerdeContext) => Promise; diff --git a/node_modules/@aws-sdk/core/dist-types/protocols/index.d.ts b/node_modules/@aws-sdk/core/dist-types/protocols/index.d.ts new file mode 100644 index 0000000..09a6ac2 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/protocols/index.d.ts @@ -0,0 +1,4 @@ +export * from "./coercing-serializers"; +export * from "./json/awsExpectUnion"; +export * from "./json/parseJsonBody"; +export * from "./xml/parseXmlBody"; diff --git a/node_modules/@aws-sdk/core/dist-types/protocols/json/awsExpectUnion.d.ts b/node_modules/@aws-sdk/core/dist-types/protocols/json/awsExpectUnion.d.ts new file mode 100644 index 0000000..98607ea --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/protocols/json/awsExpectUnion.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + * + * Forwards to Smithy's expectUnion function, but also ignores + * the `__type` field if it is present. + */ +export declare const awsExpectUnion: (value: unknown) => Record | undefined; diff --git a/node_modules/@aws-sdk/core/dist-types/protocols/json/parseJsonBody.d.ts b/node_modules/@aws-sdk/core/dist-types/protocols/json/parseJsonBody.d.ts new file mode 100644 index 0000000..0ac6655 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/protocols/json/parseJsonBody.d.ts @@ -0,0 +1,4 @@ +import type { HttpResponse, SerdeContext } from "@smithy/types"; +export declare const parseJsonBody: (streamBody: any, context: SerdeContext) => any; +export declare const parseJsonErrorBody: (errorBody: any, context: SerdeContext) => Promise; +export declare const loadRestJsonErrorCode: (output: HttpResponse, data: any) => string | undefined; diff --git a/node_modules/@aws-sdk/core/dist-types/protocols/xml/parseXmlBody.d.ts b/node_modules/@aws-sdk/core/dist-types/protocols/xml/parseXmlBody.d.ts new file mode 100644 index 0000000..1496edc --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/protocols/xml/parseXmlBody.d.ts @@ -0,0 +1,4 @@ +import type { HttpResponse, SerdeContext } from "@smithy/types"; +export declare const parseXmlBody: (streamBody: any, context: SerdeContext) => any; +export declare const parseXmlErrorBody: (errorBody: any, context: SerdeContext) => Promise; +export declare const loadRestXmlErrorCode: (output: HttpResponse, data: any) => string | undefined; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/client/emitWarningIfUnsupportedVersion.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/client/emitWarningIfUnsupportedVersion.d.ts new file mode 100644 index 0000000..b9cb3ac --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/client/emitWarningIfUnsupportedVersion.d.ts @@ -0,0 +1 @@ +export declare const emitWarningIfUnsupportedVersion: (version: string) => void; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/client/index.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/client/index.d.ts new file mode 100644 index 0000000..ed9af92 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/client/index.d.ts @@ -0,0 +1 @@ +export * from "./emitWarningIfUnsupportedVersion"; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts new file mode 100644 index 0000000..ae4aa07 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts @@ -0,0 +1,21 @@ +import { + AwsCredentialIdentity, + HttpRequest as IHttpRequest, + HttpResponse, + HttpSigner, +} from "@smithy/types"; +export declare class AwsSdkSigV4Signer implements HttpSigner { + sign( + httpRequest: IHttpRequest, + identity: AwsCredentialIdentity, + signingProperties: Record + ): Promise; + errorHandler( + signingProperties: Record + ): (error: Error) => never; + successHandler( + httpResponse: HttpResponse | unknown, + signingProperties: Record + ): void; +} +export declare const AWSSDKSigV4Signer: typeof AwsSdkSigV4Signer; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/index.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/index.d.ts new file mode 100644 index 0000000..6d17c70 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/index.d.ts @@ -0,0 +1,2 @@ +export * from "./AwsSdkSigV4Signer"; +export * from "./resolveAwsSdkSigV4Config"; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts new file mode 100644 index 0000000..a2c6df4 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts @@ -0,0 +1,55 @@ +import { SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4"; +import { + AuthScheme, + AwsCredentialIdentity, + AwsCredentialIdentityProvider, + ChecksumConstructor, + HashConstructor, + MemoizedProvider, + Provider, + RegionInfoProvider, + RequestSigner, +} from "@smithy/types"; +export interface AwsSdkSigV4AuthInputConfig { + credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider; + signer?: + | RequestSigner + | ((authScheme?: AuthScheme) => Promise); + signingEscapePath?: boolean; + systemClockOffset?: number; + signingRegion?: string; + signerConstructor?: new ( + options: SignatureV4Init & SignatureV4CryptoInit + ) => RequestSigner; +} +export interface AwsSdkSigV4PreviouslyResolved { + credentialDefaultProvider?: ( + input: any + ) => MemoizedProvider; + region: string | Provider; + sha256: ChecksumConstructor | HashConstructor; + signingName?: string; + regionInfoProvider?: RegionInfoProvider; + defaultSigningName?: string; + serviceId: string; + useFipsEndpoint: Provider; + useDualstackEndpoint: Provider; +} +export interface AwsSdkSigV4AuthResolvedConfig { + credentials: AwsCredentialIdentityProvider; + signer: (authScheme?: AuthScheme) => Promise; + signingEscapePath: boolean; + systemClockOffset: number; +} +export declare const resolveAwsSdkSigV4Config: ( + config: T & AwsSdkSigV4AuthInputConfig & AwsSdkSigV4PreviouslyResolved +) => T & AwsSdkSigV4AuthResolvedConfig; +export interface AWSSDKSigV4AuthInputConfig + extends AwsSdkSigV4AuthInputConfig {} +export interface AWSSDKSigV4PreviouslyResolved + extends AwsSdkSigV4PreviouslyResolved {} +export interface AWSSDKSigV4AuthResolvedConfig + extends AwsSdkSigV4AuthResolvedConfig {} +export declare const resolveAWSSDKSigV4Config: ( + config: T & AwsSdkSigV4AuthInputConfig & AwsSdkSigV4PreviouslyResolved +) => T & AwsSdkSigV4AuthResolvedConfig; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/index.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/index.d.ts new file mode 100644 index 0000000..29d0c3b --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/index.d.ts @@ -0,0 +1 @@ +export * from "./aws_sdk"; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getDateHeader.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getDateHeader.d.ts new file mode 100644 index 0000000..73fc529 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getDateHeader.d.ts @@ -0,0 +1 @@ +export declare const getDateHeader: (response: unknown) => string | undefined; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts new file mode 100644 index 0000000..741c5ea --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts @@ -0,0 +1 @@ +export declare const getSkewCorrectedDate: (systemClockOffset: number) => Date; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts new file mode 100644 index 0000000..eae3311 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts @@ -0,0 +1,4 @@ +export declare const getUpdatedSystemClockOffset: ( + clockTime: string, + currentSystemClockOffset: number +) => number; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/index.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/index.d.ts new file mode 100644 index 0000000..07c2195 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/index.d.ts @@ -0,0 +1,3 @@ +export * from "./getDateHeader"; +export * from "./getSkewCorrectedDate"; +export * from "./getUpdatedSystemClockOffset"; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/isClockSkewed.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/isClockSkewed.d.ts new file mode 100644 index 0000000..9f994f8 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/httpAuthSchemes/utils/isClockSkewed.d.ts @@ -0,0 +1,4 @@ +export declare const isClockSkewed: ( + clockTime: number, + systemClockOffset: number +) => boolean; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..532feb9 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts @@ -0,0 +1,3 @@ +export * from "./client/index"; +export * from "./httpAuthSchemes/index"; +export * from "./protocols/index"; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/coercing-serializers.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/coercing-serializers.d.ts new file mode 100644 index 0000000..7657ceb --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/coercing-serializers.d.ts @@ -0,0 +1,3 @@ +export declare const _toStr: (val: unknown) => string | undefined; +export declare const _toBool: (val: unknown) => boolean | undefined; +export declare const _toNum: (val: unknown) => number | undefined; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/common.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/common.d.ts new file mode 100644 index 0000000..73486db --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/common.d.ts @@ -0,0 +1,5 @@ +import { SerdeContext } from "@smithy/types"; +export declare const collectBodyString: ( + streamBody: any, + context: SerdeContext +) => Promise; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/index.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/index.d.ts new file mode 100644 index 0000000..09a6ac2 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/index.d.ts @@ -0,0 +1,4 @@ +export * from "./coercing-serializers"; +export * from "./json/awsExpectUnion"; +export * from "./json/parseJsonBody"; +export * from "./xml/parseXmlBody"; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/json/awsExpectUnion.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/json/awsExpectUnion.d.ts new file mode 100644 index 0000000..fdc331e --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/json/awsExpectUnion.d.ts @@ -0,0 +1,3 @@ +export declare const awsExpectUnion: ( + value: unknown +) => Record | undefined; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/json/parseJsonBody.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/json/parseJsonBody.d.ts new file mode 100644 index 0000000..b400419 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/json/parseJsonBody.d.ts @@ -0,0 +1,13 @@ +import { HttpResponse, SerdeContext } from "@smithy/types"; +export declare const parseJsonBody: ( + streamBody: any, + context: SerdeContext +) => any; +export declare const parseJsonErrorBody: ( + errorBody: any, + context: SerdeContext +) => Promise; +export declare const loadRestJsonErrorCode: ( + output: HttpResponse, + data: any +) => string | undefined; diff --git a/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/xml/parseXmlBody.d.ts b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/xml/parseXmlBody.d.ts new file mode 100644 index 0000000..f151834 --- /dev/null +++ b/node_modules/@aws-sdk/core/dist-types/ts3.4/protocols/xml/parseXmlBody.d.ts @@ -0,0 +1,13 @@ +import { HttpResponse, SerdeContext } from "@smithy/types"; +export declare const parseXmlBody: ( + streamBody: any, + context: SerdeContext +) => any; +export declare const parseXmlErrorBody: ( + errorBody: any, + context: SerdeContext +) => Promise; +export declare const loadRestXmlErrorCode: ( + output: HttpResponse, + data: any +) => string | undefined; diff --git a/node_modules/@aws-sdk/core/integ/request-handlers/request-handlers.integ.spec.ts b/node_modules/@aws-sdk/core/integ/request-handlers/request-handlers.integ.spec.ts new file mode 100644 index 0000000..3c5f4b2 --- /dev/null +++ b/node_modules/@aws-sdk/core/integ/request-handlers/request-handlers.integ.spec.ts @@ -0,0 +1,158 @@ +import { Kinesis } from "@aws-sdk/client-kinesis"; +import { S3 } from "@aws-sdk/client-s3"; +import { TranscribeStreaming } from "@aws-sdk/client-transcribe-streaming"; +import { WebSocketFetchHandler } from "@aws-sdk/middleware-websocket"; +import { XhrHttpHandler } from "@aws-sdk/xhr-http-handler"; +import { FetchHttpHandler } from "@smithy/fetch-http-handler"; +import { NodeHttp2Handler, NodeHttpHandler } from "@smithy/node-http-handler"; +import { Agent } from "https"; + +describe("request handler initialization", () => { + describe("http", () => { + it("should init with instances", async () => { + let instance: NodeHttpHandler; + let agentInstance: Agent; + const client = new S3({ + requestHandler: (instance = new NodeHttpHandler({ + requestTimeout: 2_000, + httpsAgent: (agentInstance = new Agent({ maxSockets: 25 })), + })), + }); + expect(client.config.requestHandler).toBe(instance); + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.httpsAgent).toBe(agentInstance); + expect((instance as any).config.requestTimeout).toEqual(2_000); + expect(agentInstance.maxSockets).toEqual(25); + }); + it("should init with Agent pass-through", async () => { + let instance: NodeHttpHandler; + const client = new S3({ + requestHandler: (instance = new NodeHttpHandler({ + requestTimeout: 2_000, + httpsAgent: { maxSockets: 25 }, + })), + }); + expect(client.config.requestHandler).toBe(instance); + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.requestTimeout).toEqual(2_000); + expect((instance as any).config.httpsAgent.maxSockets).toEqual(25); + }); + it("should init with ctor pass-through with Agent instance", async () => { + let agentInstance: Agent; + const client = new S3({ + requestHandler: { + requestTimeout: 2_000, + httpsAgent: (agentInstance = new Agent({ maxSockets: 25 })), + }, + }); + expect(client.config.requestHandler).toBeInstanceOf(NodeHttpHandler); + const instance = client.config.requestHandler; + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.httpsAgent).toBe(agentInstance); + expect((instance as any).config.requestTimeout).toEqual(2_000); + expect(agentInstance.maxSockets).toEqual(25); + }); + it("should init with ctor and Agent pass-through", async () => { + const client = new S3({ + requestHandler: { + requestTimeout: 2_000, + httpsAgent: { + maxSockets: 25, + }, + }, + }); + expect(client.config.requestHandler).toBeInstanceOf(NodeHttpHandler); + const instance = client.config.requestHandler; + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.httpsAgent).toBeInstanceOf(Agent); + const agentInstance = (instance as any).config.httpsAgent; + expect((instance as any).config.requestTimeout).toEqual(2_000); + expect(agentInstance.maxSockets).toEqual(25); + }); + }); + + describe("http2", () => { + it("should init with instances", async () => { + let instance: NodeHttp2Handler; + const client = new Kinesis({ + requestHandler: (instance = new NodeHttp2Handler({ + requestTimeout: 2_000, + })), + }); + expect(client.config.requestHandler).toBe(instance); + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.requestTimeout).toEqual(2_000); + }); + it("should init with ctor pass-through", async () => { + const client = new Kinesis({ + requestHandler: { + requestTimeout: 2_000, + }, + }); + expect(client.config.requestHandler).toBeInstanceOf(NodeHttp2Handler); + const instance = client.config.requestHandler; + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.requestTimeout).toEqual(2_000); + }); + }); + + describe("fetch", () => { + it("should init with instances", async () => { + let instance: FetchHttpHandler; + const handler = FetchHttpHandler.create((instance = new FetchHttpHandler({ requestTimeout: 2_000 }))); + expect(handler).toBe(instance); + expect((instance as any).config.requestTimeout).toEqual(2_000); + }); + it("should init with ctor pass-through", async () => { + const handler = FetchHttpHandler.create({ requestTimeout: 2_000 }); + expect(handler).toBeInstanceOf(FetchHttpHandler); + expect((handler as any).config.requestTimeout).toEqual(2_000); + }); + }); + + describe("websocket", () => { + it("should init with instances", async () => { + let instance: WebSocketFetchHandler; + const handler = WebSocketFetchHandler.create( + (instance = new WebSocketFetchHandler({ connectionTimeout: 2_000 })) + ); + const client = new TranscribeStreaming({ + requestHandler: handler, + }); + expect(client.config.requestHandler).toBe(instance); + expect(handler).toBe(instance); + expect((await (handler as any).configPromise).connectionTimeout).toEqual(2_000); + }); + it("should init with ctor pass-through", async () => { + const handler = WebSocketFetchHandler.create({ connectionTimeout: 2_000 }); + const client = new TranscribeStreaming({ + requestHandler: handler, + }); + expect(client.config.requestHandler).toBe(handler); + expect(handler).toBeInstanceOf(WebSocketFetchHandler); + expect((await (handler as any).configPromise).connectionTimeout).toEqual(2_000); + }); + }); + + describe("xhr", () => { + it("should init with instances", async () => { + let instance: XhrHttpHandler; + const handler = XhrHttpHandler.create((instance = new XhrHttpHandler({ requestTimeout: 2_000 }))); + const client = new S3({ + requestHandler: instance, + }); + expect(client.config.requestHandler).toBe(handler); + expect(handler).toBe(instance); + expect((handler as any).config.requestTimeout).toEqual(2_000); + }); + it("should init with ctor pass-through", async () => { + const handler = XhrHttpHandler.create({ requestTimeout: 2_000 }); + const client = new S3({ + requestHandler: handler, + }); + expect(client.config.requestHandler).toBe(handler); + expect(handler).toBeInstanceOf(XhrHttpHandler); + expect((handler as any).config.requestTimeout).toEqual(2_000); + }); + }); +}); diff --git a/node_modules/@aws-sdk/core/jest.config.integ.js b/node_modules/@aws-sdk/core/jest.config.integ.js new file mode 100644 index 0000000..d09aba7 --- /dev/null +++ b/node_modules/@aws-sdk/core/jest.config.integ.js @@ -0,0 +1,4 @@ +module.exports = { + preset: "ts-jest", + testMatch: ["**/*.integ.spec.ts"], +}; diff --git a/node_modules/@aws-sdk/core/jest.config.js b/node_modules/@aws-sdk/core/jest.config.js new file mode 100644 index 0000000..f2c48a8 --- /dev/null +++ b/node_modules/@aws-sdk/core/jest.config.js @@ -0,0 +1,6 @@ +const base = require("../../jest.config.base.js"); + +module.exports = { + ...base, + testPathIgnorePatterns: ["/node_modules/"], +}; diff --git a/node_modules/@aws-sdk/core/node_modules/.bin/fxparser b/node_modules/@aws-sdk/core/node_modules/.bin/fxparser new file mode 120000 index 0000000..a51efd1 --- /dev/null +++ b/node_modules/@aws-sdk/core/node_modules/.bin/fxparser @@ -0,0 +1 @@ +../../../../fast-xml-parser/src/cli/cli.js \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/package.json b/node_modules/@aws-sdk/core/package.json new file mode 100644 index 0000000..f72084c --- /dev/null +++ b/node_modules/@aws-sdk/core/package.json @@ -0,0 +1,59 @@ +{ + "name": "@aws-sdk/core", + "version": "3.535.0", + "description": "Core functions & classes shared by multiple AWS SDK clients", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline core", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "lint": "node ./scripts/lint.js", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "test": "jest", + "test:integration": "jest -c jest.config.integ.js" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "sideEffects": false, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^1.4.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/signature-v4": "^2.2.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/master/packages/core", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/core" + } +} diff --git a/node_modules/@aws-sdk/core/scripts/lint.js b/node_modules/@aws-sdk/core/scripts/lint.js new file mode 100644 index 0000000..ffaa9c4 --- /dev/null +++ b/node_modules/@aws-sdk/core/scripts/lint.js @@ -0,0 +1,24 @@ +const fs = require("fs"); +const path = require("path"); +const assert = require("assert"); + +const root = path.join(__dirname, ".."); + +const pkgJson = require(path.join(root, "package.json")); +const srcFolders = fs.readdirSync(path.join(root, "src")); + +assert(pkgJson.exports === undefined, "We cannot support package.json exports yet."); + +/** + * We probably can't enable package.json exports until + * dropping support for Node.js 14.x and TypeScript 4.6. + */ +process.exit(0); + +for (const srcFolder of srcFolders) { + if (fs.lstatSync(path.join(root, "src", srcFolder)).isDirectory()) { + if (!pkgJson.exports["./" + srcFolder]) { + throw new Error(`${srcFolder} is missing exports statement in package.json`); + } + } +} diff --git a/node_modules/@aws-sdk/core/src/client/emitWarningIfUnsupportedVersion.spec.ts b/node_modules/@aws-sdk/core/src/client/emitWarningIfUnsupportedVersion.spec.ts new file mode 100644 index 0000000..7bb2f56 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/client/emitWarningIfUnsupportedVersion.spec.ts @@ -0,0 +1,70 @@ +describe("emitWarningIfUnsupportedVersion", () => { + let emitWarningIfUnsupportedVersion; + const emitWarning = process.emitWarning; + const supportedVersion = "16.0.0"; + + beforeEach(() => { + const module = require("./emitWarningIfUnsupportedVersion"); + emitWarningIfUnsupportedVersion = module.emitWarningIfUnsupportedVersion; + }); + + afterEach(() => { + jest.clearAllMocks(); + jest.resetModules(); + process.emitWarning = emitWarning; + }); + + describe(`emits warning for Node.js <${supportedVersion}`, () => { + const getPreviousMajorVersion = (major: number) => (major === 0 ? 0 : major - 1); + + const getPreviousMinorVersion = ([major, minor]: [number, number]) => + minor === 0 ? [getPreviousMajorVersion(major), 9] : [major, minor - 1]; + + const getPreviousPatchVersion = ([major, minor, patch]: [number, number, number]) => + patch === 0 ? [...getPreviousMinorVersion([major, minor]), 9] : [major, minor, patch - 1]; + + const [major, minor, patch] = supportedVersion.split(".").map(Number); + it.each( + [ + getPreviousPatchVersion([major, minor, patch]), + [...getPreviousMinorVersion([major, minor]), 0], + [getPreviousMajorVersion(major), 0, 0], + ].map((arr) => `v${arr.join(".")}`) + )(`%s`, async (unsupportedVersion) => { + process.emitWarning = jest.fn(); + emitWarningIfUnsupportedVersion(unsupportedVersion); + + // Verify that the warning was emitted. + expect(process.emitWarning).toHaveBeenCalledTimes(1); + expect(process.emitWarning).toHaveBeenCalledWith( + `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 14.x on May 1, 2024. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to an active Node.js LTS version. + +More information can be found at: https://a.co/dzr2AJd` + ); + + // Verify that the warning emits only once. + emitWarningIfUnsupportedVersion(unsupportedVersion); + expect(process.emitWarning).toHaveBeenCalledTimes(1); + }); + }); + + describe(`emits no warning for Node.js >=${supportedVersion}`, () => { + const [major, minor, patch] = supportedVersion.split(".").map(Number); + it.each( + [ + [major, minor, patch], + [major, minor, patch + 1], + [major, minor + 1, 0], + [major + 1, 0, 0], + ].map((arr) => `v${arr.join(".")}`) + )(`%s`, async (unsupportedVersion) => { + process.emitWarning = jest.fn(); + emitWarningIfUnsupportedVersion(unsupportedVersion); + expect(process.emitWarning).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/node_modules/@aws-sdk/core/src/client/emitWarningIfUnsupportedVersion.ts b/node_modules/@aws-sdk/core/src/client/emitWarningIfUnsupportedVersion.ts new file mode 100644 index 0000000..2f33ab1 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/client/emitWarningIfUnsupportedVersion.ts @@ -0,0 +1,25 @@ +// Stores whether the warning was already emitted. +let warningEmitted = false; + +/** + * @internal + * + * Emits warning if the provided Node.js version string is + * pending deprecation by AWS SDK JSv3. + * + * @param version - The Node.js version string. + */ +export const emitWarningIfUnsupportedVersion = (version: string) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + process.emitWarning( + `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 14.x on May 1, 2024. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to an active Node.js LTS version. + +More information can be found at: https://a.co/dzr2AJd` + ); + } +}; diff --git a/node_modules/@aws-sdk/core/src/client/index.ts b/node_modules/@aws-sdk/core/src/client/index.ts new file mode 100644 index 0000000..ed9af92 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/client/index.ts @@ -0,0 +1 @@ +export * from "./emitWarningIfUnsupportedVersion"; diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.spec.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.spec.ts new file mode 100644 index 0000000..386c706 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.spec.ts @@ -0,0 +1,30 @@ +import { AwsSdkSigV4Signer } from "./AwsSdkSigV4Signer"; + +describe(AwsSdkSigV4Signer.name, () => { + it("sets clockSkewCorrected metadata in error handler if systemClockOffset was updated", async () => { + const signer = new AwsSdkSigV4Signer(); + + let error: Error | any; + try { + signer.errorHandler({ + config: { + systemClockOffset: 30 * 60 * 1000, + }, + })( + Object.assign(new Error("uh oh"), { + $metadata: {}, + $response: { + headers: { + date: new Date().toISOString(), + }, + statusCode: 500, + }, + }) + ); + } catch (e) { + error = e as Error; + } + + expect((error as any).$metadata.clockSkewCorrected).toBe(true); + }); +}); diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts new file mode 100644 index 0000000..d8d1759 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts @@ -0,0 +1,134 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import { ServiceException } from "@smithy/smithy-client"; +import { + AuthScheme, + AwsCredentialIdentity, + HandlerExecutionContext, + HttpRequest as IHttpRequest, + HttpResponse, + HttpSigner, + RequestSigner, +} from "@smithy/types"; + +import { getDateHeader, getSkewCorrectedDate, getUpdatedSystemClockOffset } from "../utils"; + +/** + * @internal + */ +const throwSigningPropertyError = (name: string, property: T | undefined): T | never => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; +}; + +/** + * @internal + */ +interface AwsSdkSigV4Config { + systemClockOffset: number; + signer: (authScheme?: AuthScheme) => Promise; +} + +/** + * @internal + */ +interface AwsSdkSigV4AuthSigningProperties { + config: AwsSdkSigV4Config; + signer: RequestSigner; + signingRegion?: string; + signingName?: string; +} + +/** + * @internal + */ +interface AwsSdkSigV4Exception extends ServiceException { + ServerTime?: string; + $metadata: ServiceException["$metadata"] & { + clockSkewCorrected?: boolean; + }; +} + +/** + * @internal + */ +const validateSigningProperties = async ( + signingProperties: Record +): Promise => { + const context = throwSigningPropertyError( + "context", + signingProperties.context as HandlerExecutionContext | undefined + ); + const config = throwSigningPropertyError("config", signingProperties.config as AwsSdkSigV4Config | undefined); + const authScheme = context.endpointV2?.properties?.authSchemes?.[0]; + const signerFunction = throwSigningPropertyError( + "signer", + config.signer as ((authScheme?: AuthScheme) => Promise) | undefined + ); + const signer = await signerFunction(authScheme); + const signingRegion: string | undefined = signingProperties?.signingRegion as string | undefined; + const signingName = signingProperties?.signingName as string | undefined; + return { + config, + signer, + signingRegion, + signingName, + }; +}; + +/** + * @internal + */ +export class AwsSdkSigV4Signer implements HttpSigner { + async sign( + httpRequest: IHttpRequest, + /** + * `identity` is bound in {@link resolveAWSSDKSigV4Config} + */ + identity: AwsCredentialIdentity, + signingProperties: Record + ): Promise { + if (!HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties); + + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion: signingRegion, + signingService: signingName, + }); + return signedRequest; + } + + errorHandler(signingProperties: Record): (error: Error) => never { + return (error: Error) => { + const serverTime: string | undefined = + (error as AwsSdkSigV4Exception).ServerTime ?? getDateHeader((error as AwsSdkSigV4Exception).$response); + if (serverTime) { + const config = throwSigningPropertyError("config", signingProperties.config as AwsSdkSigV4Config | undefined); + const initialSystemClockOffset = config.systemClockOffset; + config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); + const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && (error as AwsSdkSigV4Exception).$metadata) { + (error as AwsSdkSigV4Exception).$metadata.clockSkewCorrected = true; + } + } + throw error; + }; + } + + successHandler(httpResponse: HttpResponse | unknown, signingProperties: Record): void { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config = throwSigningPropertyError("config", signingProperties.config as AwsSdkSigV4Config | undefined); + config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); + } + } +} + +/** + * @deprecated renamed to {@link AwsSdkSigV4Signer} + */ +export const AWSSDKSigV4Signer = AwsSdkSigV4Signer; diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/index.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/index.ts new file mode 100644 index 0000000..6d17c70 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/index.ts @@ -0,0 +1,2 @@ +export * from "./AwsSdkSigV4Signer"; +export * from "./resolveAwsSdkSigV4Config"; diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts new file mode 100644 index 0000000..c70d7a9 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts @@ -0,0 +1,244 @@ +import { + doesIdentityRequireRefresh, + isIdentityExpired, + memoizeIdentityProvider, + normalizeProvider, +} from "@smithy/core"; +import { SignatureV4, SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4"; +import { + AuthScheme, + AwsCredentialIdentity, + AwsCredentialIdentityProvider, + ChecksumConstructor, + HashConstructor, + MemoizedProvider, + Provider, + RegionInfo, + RegionInfoProvider, + RequestSigner, +} from "@smithy/types"; + +/** + * @internal + */ +export interface AwsSdkSigV4AuthInputConfig { + /** + * The credentials used to sign requests. + */ + credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider; + + /** + * The signer to use when signing requests. + */ + signer?: RequestSigner | ((authScheme?: AuthScheme) => Promise); + + /** + * Whether to escape request path when signing the request. + */ + signingEscapePath?: boolean; + + /** + * An offset value in milliseconds to apply to all signing times. + */ + systemClockOffset?: number; + + /** + * The region where you want to sign your request against. This + * can be different to the region in the endpoint. + */ + signingRegion?: string; + + /** + * The injectable SigV4-compatible signer class constructor. If not supplied, + * regular SignatureV4 constructor will be used. + * + * @internal + */ + signerConstructor?: new (options: SignatureV4Init & SignatureV4CryptoInit) => RequestSigner; +} + +/** + * @internal + */ +export interface AwsSdkSigV4PreviouslyResolved { + credentialDefaultProvider?: (input: any) => MemoizedProvider; + region: string | Provider; + sha256: ChecksumConstructor | HashConstructor; + signingName?: string; + regionInfoProvider?: RegionInfoProvider; + defaultSigningName?: string; + serviceId: string; + useFipsEndpoint: Provider; + useDualstackEndpoint: Provider; +} + +/** + * @internal + */ +export interface AwsSdkSigV4AuthResolvedConfig { + /** + * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.credentials} + * This provider MAY memoize the loaded credentials for certain period. + * See {@link MemoizedProvider} for more information. + */ + credentials: AwsCredentialIdentityProvider; + /** + * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.signer} + */ + signer: (authScheme?: AuthScheme) => Promise; + /** + * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.signingEscapePath} + */ + signingEscapePath: boolean; + /** + * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.systemClockOffset} + */ + systemClockOffset: number; +} + +/** + * @internal + */ +export const resolveAwsSdkSigV4Config = ( + config: T & AwsSdkSigV4AuthInputConfig & AwsSdkSigV4PreviouslyResolved +): T & AwsSdkSigV4AuthResolvedConfig => { + // Normalize credentials + let normalizedCreds: AwsCredentialIdentityProvider | undefined; + if (config.credentials) { + normalizedCreds = memoizeIdentityProvider(config.credentials, isIdentityExpired, doesIdentityRequireRefresh); + } + if (!normalizedCreds) { + // credentialDefaultProvider should always be populated, but in case + // it isn't, set a default identity provider that throws an error + if (config.credentialDefaultProvider) { + normalizedCreds = normalizeProvider( + config.credentialDefaultProvider( + Object.assign({}, config as any, { + parentClientConfig: config, + }) + ) + ); + } else { + normalizedCreds = async () => { + throw new Error("`credentials` is missing"); + }; + } + } + + // Populate sigv4 arguments + const { + // Default for signingEscapePath + signingEscapePath = true, + // Default for systemClockOffset + systemClockOffset = config.systemClockOffset || 0, + // No default for sha256 since it is platform dependent + sha256, + } = config; + + // Resolve signer + let signer: (authScheme?: AuthScheme) => Promise; + if (config.signer) { + // if signer is supplied by user, normalize it to a function returning a promise for signer. + signer = normalizeProvider(config.signer); + } else if (config.regionInfoProvider) { + // This branch is for endpoints V1. + // construct a provider inferring signing from region. + signer = () => + normalizeProvider(config.region)() + .then( + async (region) => + [ + (await config.regionInfoProvider!(region, { + useFipsEndpoint: await config.useFipsEndpoint(), + useDualstackEndpoint: await config.useDualstackEndpoint(), + })) || {}, + region, + ] as [RegionInfo, string] + ) + .then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + // update client's singing region and signing service config if they are resolved. + // signing region resolving order: user supplied signingRegion -> endpoints.json inferred region -> client region + config.signingRegion = config.signingRegion || signingRegion || region; + // signing name resolving order: + // user supplied signingName -> endpoints.json inferred (credential scope -> model arnNamespace) -> model service id + config.signingName = config.signingName || signingService || config.serviceId; + + const params: SignatureV4Init & SignatureV4CryptoInit = { + ...config, + credentials: normalizedCreds!, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath, + }; + const SignerCtor = config.signerConstructor || SignatureV4; + return new SignerCtor(params); + }); + } else { + // This branch is for endpoints V2. + // Handle endpoints v2 that resolved per-command + // TODO: need total refactor for reference auth architecture. + signer = async (authScheme?: AuthScheme) => { + authScheme = Object.assign( + {}, + { + name: "sigv4", + signingName: config.signingName || config.defaultSigningName!, + signingRegion: await normalizeProvider(config.region)(), + properties: {}, + }, + authScheme + ); + + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + // update client's singing region and signing service config if they are resolved. + // signing region resolving order: user supplied signingRegion -> endpoints.json inferred region -> client region + config.signingRegion = config.signingRegion || signingRegion; + // signing name resolving order: + // user supplied signingName -> endpoints.json inferred (credential scope -> model arnNamespace) -> model service id + config.signingName = config.signingName || signingService || config.serviceId; + + const params: SignatureV4Init & SignatureV4CryptoInit = { + ...config, + credentials: normalizedCreds!, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath, + }; + + const SignerCtor = config.signerConstructor || SignatureV4; + return new SignerCtor(params); + }; + } + + return { + ...config, + systemClockOffset, + signingEscapePath, + credentials: normalizedCreds!, + signer, + }; +}; + +/** + * @deprecated renamed to {@link AwsSdkSigV4AuthInputConfig} + */ +export interface AWSSDKSigV4AuthInputConfig extends AwsSdkSigV4AuthInputConfig {} + +/** + * @deprecated renamed to {@link AwsSdkSigV4PreviouslyResolved} + */ +export interface AWSSDKSigV4PreviouslyResolved extends AwsSdkSigV4PreviouslyResolved {} + +/** + * @deprecated renamed to {@link AwsSdkSigV4AuthResolvedConfig} + */ +export interface AWSSDKSigV4AuthResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {} + +/** + * @deprecated renamed to {@link resolveAwsSdkSigV4Config} + */ +export const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/index.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/index.ts new file mode 100644 index 0000000..29d0c3b --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/index.ts @@ -0,0 +1 @@ +export * from "./aws_sdk"; diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getDateHeader.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getDateHeader.ts new file mode 100644 index 0000000..11708ba --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getDateHeader.ts @@ -0,0 +1,7 @@ +import { HttpResponse } from "@smithy/protocol-http"; + +/** + * @internal + */ +export const getDateHeader = (response: unknown): string | undefined => + HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined; diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.spec.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.spec.ts new file mode 100644 index 0000000..8661f87 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.spec.ts @@ -0,0 +1,17 @@ +import { getSkewCorrectedDate } from "./getSkewCorrectedDate"; + +describe(getSkewCorrectedDate.name, () => { + const mockDateNow = Date.now(); + + beforeEach(() => { + jest.spyOn(Date, "now").mockReturnValue(mockDateNow); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + it.each([-100000, -100, 0, 100, 100000])("systemClockOffset: %d", (systemClockOffset) => { + expect(getSkewCorrectedDate(systemClockOffset)).toStrictEqual(new Date(mockDateNow + systemClockOffset)); + }); +}); diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.ts new file mode 100644 index 0000000..285ce18 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getSkewCorrectedDate.ts @@ -0,0 +1,8 @@ +/** + * @internal + * + * Returns a date that is corrected for clock skew. + * + * @param systemClockOffset The offset of the system clock in milliseconds. + */ +export const getSkewCorrectedDate = (systemClockOffset: number) => new Date(Date.now() + systemClockOffset); diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.spec.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.spec.ts new file mode 100644 index 0000000..a604f3c --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.spec.ts @@ -0,0 +1,37 @@ +import { getUpdatedSystemClockOffset } from "./getUpdatedSystemClockOffset"; +import { isClockSkewed } from "./isClockSkewed"; + +jest.mock("./isClockSkewed"); + +describe(getUpdatedSystemClockOffset.name, () => { + // Mock ServerTime is accurate to last second, to remove milliseconds information. + const mockClockTime = new Date(Math.floor(Date.now() / 1000) * 1000); + const mockSystemClockOffset = 100; + + afterEach(() => { + jest.clearAllMocks(); + }); + + it("returns passed systemClockOffset when clock is not skewed", () => { + (isClockSkewed as jest.Mock).mockReturnValue(false); + expect(getUpdatedSystemClockOffset(mockClockTime.toString(), mockSystemClockOffset)).toEqual(mockSystemClockOffset); + }); + + describe("returns difference between serverTime and current time when clock is skewed", () => { + const dateDotNowFn = Date.now; + + beforeEach(() => { + (isClockSkewed as jest.Mock).mockReturnValue(true); + jest.spyOn(Date, "now").mockReturnValueOnce(mockClockTime.getTime()); + }); + + afterEach(() => { + Date.now = dateDotNowFn; + }); + + it.each([1000, 100000])("difference: %d", (difference) => { + const updatedClockTime = new Date(mockClockTime.getTime() + difference); + expect(getUpdatedSystemClockOffset(updatedClockTime.toString(), mockSystemClockOffset)).toEqual(difference); + }); + }); +}); diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts new file mode 100644 index 0000000..715cd0a --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts @@ -0,0 +1,18 @@ +import { isClockSkewed } from "./isClockSkewed"; + +/** + * @internal + * + * If clock is skewed, it returns the difference between serverTime and current time. + * If clock is not skewed, it returns currentSystemClockOffset. + * + * @param clockTime The string value of the server time. + * @param currentSystemClockOffset The current system clock offset. + */ +export const getUpdatedSystemClockOffset = (clockTime: string, currentSystemClockOffset: number): number => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; +}; diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/index.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/index.ts new file mode 100644 index 0000000..07c2195 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/index.ts @@ -0,0 +1,3 @@ +export * from "./getDateHeader"; +export * from "./getSkewCorrectedDate"; +export * from "./getUpdatedSystemClockOffset"; diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.spec.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.spec.ts new file mode 100644 index 0000000..a07d481 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.spec.ts @@ -0,0 +1,32 @@ +import { getSkewCorrectedDate } from "./getSkewCorrectedDate"; +import { isClockSkewed } from "./isClockSkewed"; + +jest.mock("./getSkewCorrectedDate"); + +describe(isClockSkewed.name, () => { + const mockSystemClockOffset = 100; + const mockSkewCorrectedDate = new Date(); + + beforeEach(() => { + (getSkewCorrectedDate as jest.Mock).mockReturnValue(mockSkewCorrectedDate); + }); + + afterEach(() => { + expect(getSkewCorrectedDate).toHaveBeenCalledWith(mockSystemClockOffset); + jest.clearAllMocks(); + }); + + describe("returns true for time difference >=300000", () => { + it.each([300000, 500000])("difference: %d", (difference) => { + expect(isClockSkewed(mockSkewCorrectedDate.getTime() + difference, mockSystemClockOffset)).toBe(true); + expect(isClockSkewed(mockSkewCorrectedDate.getTime() - difference, mockSystemClockOffset)).toBe(true); + }); + }); + + describe("returns false for time difference <300000", () => { + it.each([299999, 100000, 0])("difference: %d", (difference) => { + expect(isClockSkewed(mockSkewCorrectedDate.getTime() + difference, mockSystemClockOffset)).toBe(false); + expect(isClockSkewed(mockSkewCorrectedDate.getTime() - difference, mockSystemClockOffset)).toBe(false); + }); + }); +}); diff --git a/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.ts b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.ts new file mode 100644 index 0000000..96436a6 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/httpAuthSchemes/utils/isClockSkewed.ts @@ -0,0 +1,12 @@ +import { getSkewCorrectedDate } from "./getSkewCorrectedDate"; + +/** + * @internal + * + * Checks if the provided date is within the skew window of 300000ms. + * + * @param clockTime - The time to check for skew in milliseconds. + * @param systemClockOffset - The offset of the system clock in milliseconds. + */ +export const isClockSkewed = (clockTime: number, systemClockOffset: number) => + Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000; diff --git a/node_modules/@aws-sdk/core/src/index.ts b/node_modules/@aws-sdk/core/src/index.ts new file mode 100644 index 0000000..532feb9 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/index.ts @@ -0,0 +1,3 @@ +export * from "./client/index"; +export * from "./httpAuthSchemes/index"; +export * from "./protocols/index"; diff --git a/node_modules/@aws-sdk/core/src/protocols/coercing-serializers.spec.ts b/node_modules/@aws-sdk/core/src/protocols/coercing-serializers.spec.ts new file mode 100644 index 0000000..05210d2 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/protocols/coercing-serializers.spec.ts @@ -0,0 +1,76 @@ +import { _toBool, _toNum, _toStr } from "./coercing-serializers"; + +const consoleWarn = console.warn; + +beforeAll(() => { + console.warn = () => {}; +}); + +afterAll(() => { + console.warn = consoleWarn; +}); + +describe(_toBool.name, () => { + it("ignores nullish", () => { + expect(_toBool(null)).toBe(null); + expect(_toBool(undefined)).toBe(undefined); + }); + + it("converts strings", () => { + expect(_toBool("false")).toEqual(false); + expect(_toBool("true")).toEqual(true); + + expect(_toBool("False")).toEqual(false); + expect(_toBool("True")).toEqual(true); + + expect(_toBool("")).toEqual(false); + expect(_toBool("a")).toEqual(true); // warns + }); + + it("does not convert numbers", () => { + expect(_toBool(0)).toEqual(0); + expect(_toBool(1)).toEqual(1); + }); +}); + +describe(_toStr.name, () => { + it("ignores nullish", () => { + expect(_toStr(null)).toBe(null); + expect(_toStr(undefined)).toBe(undefined); + }); + + it("converts numbers", () => { + expect(_toStr(0)).toEqual("0"); + expect(_toStr(1)).toEqual("1"); + }); + + it("converts booleans", () => { + expect(_toStr(false)).toEqual("false"); + expect(_toStr(true)).toEqual("true"); + }); +}); + +describe(_toNum.name, () => { + it("ignores nullish", () => { + expect(_toNum(null)).toBe(null); + expect(_toNum(undefined)).toBe(undefined); + }); + + it("converts numeric strings", () => { + expect(_toNum("1234")).toEqual(1234); + expect(_toNum("1234.56")).toEqual(1234.56); + }); + + it("does not convert prefix-numeric strings", () => { + expect(_toNum("1234abc")).toEqual("1234abc"); + expect(_toNum("1234.56abc")).toEqual("1234.56abc"); + }); + + it("does not convert non-numeric strings", () => { + expect(_toNum("abcdef")).toEqual("abcdef"); + }); + it("does not convert bools", () => { + expect(_toNum(false)).toEqual(false); + expect(_toNum(true)).toEqual(true); + }); +}); diff --git a/node_modules/@aws-sdk/core/src/protocols/coercing-serializers.ts b/node_modules/@aws-sdk/core/src/protocols/coercing-serializers.ts new file mode 100644 index 0000000..afed472 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/protocols/coercing-serializers.ts @@ -0,0 +1,72 @@ +/** + * @internal + * + * Used for awsQueryCompatibility trait. + */ +export const _toStr = (val: unknown): string | undefined => { + if (val == null) { + return val as undefined; + } + if (typeof val === "number" || typeof val === "bigint") { + const warning = new Error(`Received number ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + if (typeof val === "boolean") { + const warning = new Error(`Received boolean ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + return val as string; +}; + +/** + * @internal + * + * Used for awsQueryCompatibility trait. + */ +export const _toBool = (val: unknown): boolean | undefined => { + if (val == null) { + return val as undefined; + } + if (typeof val === "number") { + // transmit to service to be rejected. + } + if (typeof val === "string") { + const lowercase = val.toLowerCase(); + if (val !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); + } + return val !== "" && lowercase !== "false"; + } + return val as boolean; +}; + +/** + * @internal + * + * Used for awsQueryCompatibility trait. + */ +export const _toNum = (val: unknown): number | undefined => { + if (val == null) { + return val as undefined; + } + if (typeof val === "boolean") { + // transmit to service to be rejected. + } + if (typeof val === "string") { + const num = Number(val); + if (num.toString() !== val) { + const warning = new Error(`Received string "${val}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val as unknown as undefined; + } + return num; + } + return val as number; +}; diff --git a/node_modules/@aws-sdk/core/src/protocols/common.ts b/node_modules/@aws-sdk/core/src/protocols/common.ts new file mode 100644 index 0000000..d4efe45 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/protocols/common.ts @@ -0,0 +1,5 @@ +import { collectBody } from "@smithy/smithy-client"; +import type { HttpResponse, SerdeContext } from "@smithy/types"; + +export const collectBodyString = (streamBody: any, context: SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); diff --git a/node_modules/@aws-sdk/core/src/protocols/index.ts b/node_modules/@aws-sdk/core/src/protocols/index.ts new file mode 100644 index 0000000..09a6ac2 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/protocols/index.ts @@ -0,0 +1,4 @@ +export * from "./coercing-serializers"; +export * from "./json/awsExpectUnion"; +export * from "./json/parseJsonBody"; +export * from "./xml/parseXmlBody"; diff --git a/node_modules/@aws-sdk/core/src/protocols/json/awsExpectUnion.spec.ts b/node_modules/@aws-sdk/core/src/protocols/json/awsExpectUnion.spec.ts new file mode 100644 index 0000000..c267c68 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/protocols/json/awsExpectUnion.spec.ts @@ -0,0 +1,30 @@ +import { awsExpectUnion } from "./awsExpectUnion"; + +describe(awsExpectUnion.name, () => { + it("ignores the __type field", () => { + expect( + awsExpectUnion({ + K: "V", + __type: "X", + }) + ).toEqual({ + K: "V", + }); + }); + + it("throws when there are extra keys or no keys", () => { + expect(() => + awsExpectUnion({ + __type: "X", + }) + ).toThrowError(); + + expect(() => + awsExpectUnion({ + K: "V", + I: "S", + __type: "X", + }) + ).toThrowError(); + }); +}); diff --git a/node_modules/@aws-sdk/core/src/protocols/json/awsExpectUnion.ts b/node_modules/@aws-sdk/core/src/protocols/json/awsExpectUnion.ts new file mode 100644 index 0000000..dd9b38e --- /dev/null +++ b/node_modules/@aws-sdk/core/src/protocols/json/awsExpectUnion.ts @@ -0,0 +1,17 @@ +import { expectUnion } from "@smithy/smithy-client"; + +/** + * @internal + * + * Forwards to Smithy's expectUnion function, but also ignores + * the `__type` field if it is present. + */ +export const awsExpectUnion = (value: unknown): Record | undefined => { + if (value == null) { + return undefined; + } + if (typeof value === "object" && "__type" in value) { + delete value.__type; + } + return expectUnion(value); +}; diff --git a/node_modules/@aws-sdk/core/src/protocols/json/parseJsonBody.ts b/node_modules/@aws-sdk/core/src/protocols/json/parseJsonBody.ts new file mode 100644 index 0000000..555627c --- /dev/null +++ b/node_modules/@aws-sdk/core/src/protocols/json/parseJsonBody.ts @@ -0,0 +1,60 @@ +import type { HttpResponse, SerdeContext } from "@smithy/types"; + +import { collectBodyString } from "../common"; + +export const parseJsonBody = (streamBody: any, context: SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + try { + return JSON.parse(encoded); + } catch (e: any) { + if (e?.name === "SyntaxError") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded, + }); + } + throw e; + } + } + return {}; + }); + +export const parseJsonErrorBody = async (errorBody: any, context: SerdeContext) => { + const value = await parseJsonBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; + +export const loadRestJsonErrorCode = (output: HttpResponse, data: any): string | undefined => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string | number): string => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } +}; diff --git a/node_modules/@aws-sdk/core/src/protocols/xml/parseXmlBody.ts b/node_modules/@aws-sdk/core/src/protocols/xml/parseXmlBody.ts new file mode 100644 index 0000000..ab12589 --- /dev/null +++ b/node_modules/@aws-sdk/core/src/protocols/xml/parseXmlBody.ts @@ -0,0 +1,64 @@ +import { getValueFromTextNode } from "@smithy/smithy-client"; +import type { HttpResponse, SerdeContext } from "@smithy/types"; +import { XMLParser } from "fast-xml-parser"; + +import { collectBodyString } from "../common"; + +export const parseXmlBody = (streamBody: any, context: SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + const parser = new XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_: any, val: any) => (val.trim() === "" && val.includes("\n") ? "" : undefined), + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + + let parsedObj; + try { + parsedObj = parser.parse(encoded); + } catch (e: any) { + if (e && typeof e === "object") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded, + }); + } + throw e; + } + + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return getValueFromTextNode(parsedObjToReturn); + } + return {}; + }); + +export const parseXmlErrorBody = async (errorBody: any, context: SerdeContext) => { + const value = await parseXmlBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; + } + return value; +}; + +export const loadRestXmlErrorCode = (output: HttpResponse, data: any): string | undefined => { + if (data?.Error?.Code !== undefined) { + return data.Error.Code; + } + if (data?.Code !== undefined) { + return data.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } +}; diff --git a/node_modules/@aws-sdk/core/tsconfig.cjs.json b/node_modules/@aws-sdk/core/tsconfig.cjs.json new file mode 100644 index 0000000..8f8d634 --- /dev/null +++ b/node_modules/@aws-sdk/core/tsconfig.cjs.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist-cjs", + "baseUrl": "." + }, + "extends": "../../tsconfig.cjs.json", + "include": ["src/"] +} diff --git a/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo b/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo new file mode 100644 index 0000000..4ae873b --- /dev/null +++ b/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/tslib/tslib.d.ts","./src/client/emitWarningIfUnsupportedVersion.ts","./src/client/index.ts","../../node_modules/@smithy/types/dist-types/abort.d.ts","../../node_modules/@smithy/types/dist-types/auth/auth.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts","../../node_modules/@smithy/types/dist-types/identity/identity.d.ts","../../node_modules/@smithy/types/dist-types/endpoint.d.ts","../../node_modules/@smithy/types/dist-types/logger.d.ts","../../node_modules/@smithy/types/dist-types/uri.d.ts","../../node_modules/@smithy/types/dist-types/http.d.ts","../../node_modules/@smithy/types/dist-types/response.d.ts","../../node_modules/@smithy/types/dist-types/util.d.ts","../../node_modules/@smithy/types/dist-types/middleware.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts","../../node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts","../../node_modules/@smithy/types/dist-types/auth/index.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@smithy/types/dist-types/transform/exact.d.ts","../../node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts","../../node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts","../../node_modules/@smithy/types/dist-types/crypto.d.ts","../../node_modules/@smithy/types/dist-types/checksum.d.ts","../../node_modules/@smithy/types/dist-types/command.d.ts","../../node_modules/@smithy/types/dist-types/client.d.ts","../../node_modules/@smithy/types/dist-types/connection/config.d.ts","../../node_modules/@smithy/types/dist-types/transfer.d.ts","../../node_modules/@smithy/types/dist-types/connection/manager.d.ts","../../node_modules/@smithy/types/dist-types/connection/pool.d.ts","../../node_modules/@smithy/types/dist-types/connection/index.d.ts","../../node_modules/@smithy/types/dist-types/eventStream.d.ts","../../node_modules/@smithy/types/dist-types/encode.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/shared.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/index.d.ts","../../node_modules/@smithy/types/dist-types/extensions/checksum.d.ts","../../node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts","../../node_modules/@smithy/types/dist-types/shapes.d.ts","../../node_modules/@smithy/types/dist-types/retry.d.ts","../../node_modules/@smithy/types/dist-types/extensions/retry.d.ts","../../node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts","../../node_modules/@smithy/types/dist-types/extensions/index.d.ts","../../node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts","../../node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts","../../node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts","../../node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts","../../node_modules/@smithy/types/dist-types/identity/index.d.ts","../../node_modules/@smithy/types/dist-types/pagination.d.ts","../../node_modules/@smithy/types/dist-types/profile.d.ts","../../node_modules/@smithy/types/dist-types/serde.d.ts","../../node_modules/@smithy/types/dist-types/signature.d.ts","../../node_modules/@smithy/types/dist-types/stream.d.ts","../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts","../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts","../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts","../../node_modules/@smithy/types/dist-types/transform/type-transform.d.ts","../../node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts","../../node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts","../../node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts","../../node_modules/@smithy/types/dist-types/waiter.d.ts","../../node_modules/@smithy/types/dist-types/index.d.ts","../../node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts","../../node_modules/@smithy/protocol-http/dist-types/httpResponse.d.ts","../../node_modules/@smithy/protocol-http/dist-types/httpHandler.d.ts","../../node_modules/@smithy/protocol-http/dist-types/extensions/httpExtensionConfiguration.d.ts","../../node_modules/@smithy/protocol-http/dist-types/extensions/index.d.ts","../../node_modules/@smithy/protocol-http/dist-types/Field.d.ts","../../node_modules/@smithy/protocol-http/dist-types/Fields.d.ts","../../node_modules/@smithy/protocol-http/dist-types/isValidHostname.d.ts","../../node_modules/@smithy/protocol-http/dist-types/types.d.ts","../../node_modules/@smithy/protocol-http/dist-types/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/NoOpLogger.d.ts","../../node_modules/@smithy/smithy-client/dist-types/client.d.ts","../../node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts","../../node_modules/@smithy/util-stream/dist-types/getAwsChunkedEncodingStream.d.ts","../../node_modules/@smithy/util-stream/dist-types/sdk-stream-mixin.d.ts","../../node_modules/@smithy/util-stream/dist-types/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/collect-stream-body.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/resolveEndpointConfig.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/types.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromInstructions.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/adaptors/index.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/endpointMiddleware.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/getEndpointPlugin.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/command.d.ts","../../node_modules/@smithy/smithy-client/dist-types/constants.d.ts","../../node_modules/@smithy/smithy-client/dist-types/create-aggregated-client.d.ts","../../node_modules/@smithy/smithy-client/dist-types/date-utils.d.ts","../../node_modules/@smithy/smithy-client/dist-types/default-error-handler.d.ts","../../node_modules/@smithy/smithy-client/dist-types/defaults-mode.d.ts","../../node_modules/@smithy/smithy-client/dist-types/emitWarningIfUnsupportedVersion.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/checksum.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/retry.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/defaultExtensionConfiguration.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/exceptions.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extended-encode-uri-component.d.ts","../../node_modules/@smithy/smithy-client/dist-types/get-array-if-single-item.d.ts","../../node_modules/@smithy/smithy-client/dist-types/get-value-from-text-node.d.ts","../../node_modules/@smithy/smithy-client/dist-types/lazy-json.d.ts","../../node_modules/@smithy/smithy-client/dist-types/object-mapping.d.ts","../../node_modules/@smithy/smithy-client/dist-types/parse-utils.d.ts","../../node_modules/@smithy/smithy-client/dist-types/resolve-path.d.ts","../../node_modules/@smithy/smithy-client/dist-types/ser-utils.d.ts","../../node_modules/@smithy/smithy-client/dist-types/serde-json.d.ts","../../node_modules/@smithy/smithy-client/dist-types/split-every.d.ts","../../node_modules/@smithy/smithy-client/dist-types/index.d.ts","./src/httpAuthSchemes/utils/getDateHeader.ts","./src/httpAuthSchemes/utils/getSkewCorrectedDate.ts","./src/httpAuthSchemes/utils/isClockSkewed.ts","./src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts","./src/httpAuthSchemes/utils/index.ts","./src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/index.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-signing/httpSigningMiddleware.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-signing/getHttpSigningMiddleware.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-signing/index.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/index.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/index.d.ts","../../node_modules/@smithy/core/dist-types/getSmithyContext.d.ts","../../node_modules/@smithy/core/dist-types/normalizeProvider.d.ts","../../node_modules/@smithy/core/dist-types/protocols/requestBuilder.d.ts","../../node_modules/@smithy/core/dist-types/pagination/createPaginator.d.ts","../../node_modules/@smithy/core/dist-types/index.d.ts","../../node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts","../../node_modules/@smithy/signature-v4/dist-types/getCanonicalHeaders.d.ts","../../node_modules/@smithy/signature-v4/dist-types/getCanonicalQuery.d.ts","../../node_modules/@smithy/signature-v4/dist-types/getPayloadHash.d.ts","../../node_modules/@smithy/signature-v4/dist-types/moveHeadersToQuery.d.ts","../../node_modules/@smithy/signature-v4/dist-types/prepareRequest.d.ts","../../node_modules/@smithy/signature-v4/dist-types/credentialDerivation.d.ts","../../node_modules/@smithy/signature-v4/dist-types/index.d.ts","./src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts","./src/httpAuthSchemes/aws_sdk/index.ts","./src/httpAuthSchemes/index.ts","./src/protocols/coercing-serializers.ts","./src/protocols/json/awsExpectUnion.ts","./src/protocols/common.ts","./src/protocols/json/parseJsonBody.ts","../../node_modules/fast-xml-parser/src/fxp.d.ts","./src/protocols/xml/parseXmlBody.ts","./src/protocols/index.ts","./src/index.ts","../../node_modules/@types/argparse/index.d.ts","../../node_modules/@types/babel__generator/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/chai-as-promised/index.d.ts","../../node_modules/@types/chai-subset/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@types/jest/node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@types/jest/node_modules/@jest/schemas/build/index.d.ts","../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../node_modules/@types/jest/node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/@types/jest/node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/parse5/dist/common/html.d.ts","../../node_modules/parse5/dist/common/token.d.ts","../../node_modules/parse5/dist/common/error-codes.d.ts","../../node_modules/parse5/dist/tokenizer/preprocessor.d.ts","../../node_modules/parse5/dist/tokenizer/index.d.ts","../../node_modules/parse5/dist/tree-adapters/interface.d.ts","../../node_modules/parse5/dist/parser/open-element-stack.d.ts","../../node_modules/parse5/dist/parser/formatting-element-list.d.ts","../../node_modules/parse5/dist/parser/index.d.ts","../../node_modules/parse5/dist/tree-adapters/default.d.ts","../../node_modules/parse5/dist/serializer/index.d.ts","../../node_modules/parse5/dist/common/foreign-content.d.ts","../../node_modules/parse5/dist/index.d.ts","../../node_modules/@types/tough-cookie/index.d.ts","../../node_modules/@types/jsdom/base.d.ts","../../node_modules/@types/jsdom/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/prettier/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","8c7a59a58fb16c668f3a836ecb58afd0d8764478e1c3744870c0c039f286dd91","38f6da5b6f318c33e18dd7c983cab3fe52f510c9a2573948fb13f012e01b1ba6","c55ae709f94155174ff63647edd2a7e3acbd02a2909aa2541569e8b8bac9fc40","530e5c7e4f74267b7800f1702cf0c576282296a960acbdb2960389b2b1d0875b","1c483cc60a58a0d4c9a068bdaa8d95933263e6017fbea33c9f99790cf870f0a8","07863eea4f350458f803714350e43947f7f73d1d67a9ddf747017065d36b073a","d5f1bbd44ba4f63d8a01fff5e1edc1c1fb50e9caa48a4fa48298a4485d6ff75c","4d2b263907b8c03c5b2df90e6c1f166e9da85bd87bf439683f150afc91fce7e7","c70e38e0f30b7c0542af9aa7e0324a23dd2b0c1a64e078296653d1d3b36fa248","d12680e217215b37094868d491d00196e80f270ce47e5a4bc50269945ae5554d","396c2c14fa408707235d761a965bd84ce3d4fc3117c3b9f1404d6987d98a30d6","b7b881ced4ed4dee13d6e0ccdb2296f66663ba6b1419767271090b3ff3478bb9","06289b9873760aac77aed4035ea6c60b1e0879b8afe47a4530bc8522b9b804b1","63c36aa73242aa745fae813c40585111ead225394b0a0ba985c2683baa6b0ef9","3e7ffc7dd797e5d44d387d0892bc288480493e73dcab9832812907d1389e4a98","db011ec9589fd51995cbd0765673838e38e6485a6559163cc53dcf508b480909","e1a4253f0cca15c14516f52a2ad36c3520b140b5dfb3b3880a368cd75d45d6d9","159af954f2633a12fdee68605009e7e5b150dbeb6d70c46672fd41059c154d53","4c2c4f53e8eedd970f8afa369d7371544fb6231bf95e659f8602e09abe74d5a5",{"version":"cb5a780979155e80a2184eb987cc411a95c9a1686019ade06918c312a0b7c9b2","affectsGlobalScope":true},"c2b5085f47e41d6940bbc5b0d3bd7cc0037c752efb18aecd243c9cf83ad0c0b7","3143a5add0467b83150961ecd33773b561a1207aec727002aa1d70333068eb1b","f87191b7fafe7a0edad375710d99f900e49cef560b66bf309cf3f8e1b7177126","586af7d2abe2f9d59c5e757c370087d6c6baea81b033250f43b8df808d6dfb33",{"version":"1a048ff164b8d9609f5de3139d4e37f6e8a82af82087ac414b9208f52ef8aac7","affectsGlobalScope":true},"3111079f3cb5f2b9c812ca3f46161562bce5bfb355e915f46ed46c41714dc1c3","e7bee4a6d9bb78afa390b25e0ce97a2f94787a1eb17f0a16e732dcbebba3f3ee","b32b6b16cb0bda68199582ad6f22242d07ee75fac9b1f28a98cd838afc5eea45","4441ee4119824bfaebc49308559edd7545978f9cb41a40f115074e1031dde75f",{"version":"60693a88462d0e97900123b5bf7c73e146ce0cc94da46a61fe6775b430d2ff05","affectsGlobalScope":true},{"version":"588c69eda58b9202676ec7ca11a72c3762819b46a0ed72462c769846153c447c","affectsGlobalScope":true},"ae064ed4f855716b7ff348639ddcd6a6d354a72fae82f506608a7dc9266aa24c","92f019c55b21c939616f6a48f678e714ac7b109444cbbf23ad69310ce66ecbdc","bba259efdf9ab95e0c7d3cc8e99250f56bb6b31d6129efdf733ca4eb1d01feea","499b7544062cf44fab253daeaea8ba28877d9e7ff4149246b1f0154d1c9ed535","139fd681eff7771a38d0c025d13c7a11c5474f6aab61e01c41511d71496df173","f614c3f61e46ccc2cb58702d5a158338ea57ee09099fde5db4cfc63ed0ce4d74","44e42ed6ec9c4451ebe89524e80ac8564e9dd0988c56e6c58f393c810730595d","a504c109b872b0e653549bd258eb06584c148c98d79406c7516995865a6d5089","155865f5f76db0996cd5e20cc5760613ea170ee5ad594c1f3d76fcaa05382161","e92852d673c836fc64e10c38640abcd67c463456e5df55723ac699b8e6ab3a8a","4455c78d226d061b1203c7614c6c6eb5f4f9db5f00d44ff47d0112de8766fbc4",{"version":"ec369bb9d97c4dc09dd2a4093b7ca3ba69ad284831fccac8a1977785e9e38ce5","affectsGlobalScope":true},"4465a636f5f6e9665a90e30691862c9e0a3ac2edc0e66296704f10865e924f2a","9af781f03d44f5635ed7844be0ce370d9d595d4b4ec67cad88f0fac03255257e","f9fd4c3ef6de27fa0e256f4e75b61711c4be05a3399f7714621d3edc832e36b0","e49290b7a927995c0d7e6b2b9c8296284b68a9036d9966531de65185269258d7","aa95cc73ea5315e4f6fc8c6db43d49e3b7de3780cae20a4f1319032809013038","874ca809b79276460011480a2829f4c8d4db29416dd411f71efbf8f497f0ac09","6c903bceaf3f3bc04f2d4c7dcd89ce9fb148b3ba0a5f5408d8f6de2b7eecc7ea","504d049d9e550a65466b73ca39da6469ab41786074ea1d16d37c8853f9f6ab2e","23a28f834a078986bbf58f4e3705956983ff81c3c2493f3db3e5f0e8a9507779","4febdf7f3ec92706c58e0b4e8159cd6de718284ef384260b07c9641c13fc70ce",{"version":"bf241ed073916ec9e21a3c138936edd444b6787d874844c0d05fc00a8f109d19","affectsGlobalScope":true},"7335933d9f30dcfd2c4b6080a8b78e81912a7fcefb1dafccb67ca4cb4b3ac23d","a6bfe9de9adef749010c118104b071d14943802ff0614732b47ce4f1c3e383cd","4c3d0e10396646db4a1e917fb852077ee77ae62e512913bef9cccc2bb0f8bd0e","3b220849d58140dcc6718f5b52dcd29fdb79c45bc28f561cbd29eb1cac6cce13","0ee22fce41f7417a24c808d266e91b850629113c104713a35854393d55994beb","22d1b1d965baba05766613e2e6c753bb005d4386c448cafd72c309ba689e8c24",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"c6c0bd221bb1e94768e94218f8298e47633495529d60cae7d8da9374247a1cf5","a1b36a1f91a54daf2e89e12b834fa41fb7338bc044d1f08a80817efc93c99ee5","8bb4a5b632dd5a868f3271750895cb61b0e20cff82032d87e89288faee8dd6e2","0c1aabfd9fb1818afb2e798f91f669edafce59cd7e3423d25b1cfccfaaf2c403","017de6fdabea79015d493bf71e56cbbff092525253c1d76003b3d58280cd82a0","ab9ea2596cb7800bd79d1526930c785606ec4f439c275adbca5adc1ddf87747d","aee8faa433dde04beedb779b3329456a286a966462d666c138c19113ce78c79e","d620ec36bfc6f8ed6fdecbe036d55cec81637f32fd34dc7bb7e60eba1764e910","4e693235d606287d6b5a4e7d572f190862b93ea4a28df8a63fc328aa8becdc9d","e58d1ea2fc84c9c03742b4f56449b7d4602c8c4deb4f0e57c619bab35bbbbf81","d82bc1f8fe8eef55aa741373da68b80a8503228c9aa0ec46bdd38fd7e0c02a18","d7c7f8a461326507d90d0888efff0c4011a5e69eb08ccb990232aa22334e4dd6","5af5ebe8c9b84f667cd047cfcf1942d53e3b369dbd63fbea2a189bbf381146c6","27deb39ac0921db739b503407dc9aa93a546b015c06738bc8b66bdf0ae593c7c","eff5b8bdfe94c0a174484a6de01e802fb66f99f8737a20e4fba4df05c2f24cea","52fa3a4f47e30ef266dbda3b69821fe5811be4faad2b266586090d8b4806342e","5cb6f9ea4a097094fe624c3513111292690e39e83167a412f8912807be71ca65","fa461c83b2adc6b33997a95335d19723bddd4d7aaff41cac6f9f817e3c3ae730","d9eed4a308aeb32babee0600d21c3a3ba8452c89e8a4916e5460b45da147c33c","fc9bdd9b3d8fb59c913cb3b8dea0d79b38dfe9331ef07e1c6dc6bf363f061ad6","e647d13de80e1b6b4e1d94363ea6f5f8f77dfb95d562748b488a7248af25aabf","0c3c4ce6a1884610c99306719f59174d81808c69393c30119f9c2aef0449a2cb","219a25474e58a8161b242776856ec5f6960839b63e74809445e51cadbfc18096","5a0d1534e9493ae44b08b3055172da38370e2afd2bc3d4bea11f7be78344036f","6309a45fc3c03d3c4d56228e995d51974f53009a842374695b34f3607877e5a3","bef94eba81ae2c09059c0d9abdb1ae1b7090314f70550f3c8cd5d7ead4a4f212","48b787ad458be9b524fa5fdfef34f68798074132d4b8cfe6a6fe9c2bf334c532","37280465f8f9b2ea21d490979952b18b7f4d1f0d8fab2d627618fb2cfa1828e3","7281550c523596fd0fd36c6e19aa89075dac93144437ce48490da319b1f4d318","3f3f85dc43cb93c5a797f1ff0fa948d0e17843a443ae11a20cc032ccdf1b9997","020507cb67b96b0830a8636db03ae004181eee323ba33565cfe8d45aaedc4d1d","869010bc679df668137cb3b78a3cb8196e97acf285208a57f6156ceac894a2f7","bcae62618c23047e36d373f0feac5b13f09689e4cd08e788af13271dbe73a139","29a99d2e57b3e08a997cbc2397bdb251441a545306a74b95ffedc5f03d9bc6b7","5ae003688265a1547bbcb344bf0e26cb994149ac2c032756718e9039302dfac8","09e811cc1088d9ea3a7ddd7290f6a13767f56c85daf8c3374a06a45a08d55647","9da2c58a27fdce871c2eac09d5172b04248bb86ada9b0d10e8b3dfa8470b8dd3","5c317403752871838140f70879b09509e37422e92e7364b4363c7b179310ee44","7b270dc53f35dd0b44bfa619ad4d351fffd512e14053c3688323ed007eda3f6d","6d4e928f232ade7221cffc6e4332ec935baa176415c9bf5d12111bb883a247d2","e86ad029224d4f2af3e188be8b5e9badf8c7083247572069bac7bd2193131fc7","057cac07c7bc5abdcfba44325fcea4906dff7919a3d7d82d4ec40f8b4c90cf2f","38aa389acf91d77db5a4f8e26e713ed53dc832ed5573def9cd20acd9ba97c1fe","e56784be93954f1f86d4dd3ac61b4c9727e75864baf123a1b584b970baed4ba0","f878779620c5178d45413b33c214419bb3df2945e703c35e1191188321e3633d","b9115605f72b65a662723020b2a1eb696c375a5803d6b401dc01fcbfe49ece90","151659e152d71986b8943b9943cd7fbe27a65874655081602de7ea24a0f66e9b","79cbed8c779049fdbdd856f1597f2e79be137b6ed44e66ead16ee8bf035d17da","1a8e6a4f31a5196144f35d0434e16369881d828c849d6a1c9290b6bde8807449","42a9ac86df0fa58634ea8a5f7f07b9b9c3243d82e306fb22d8a41639935a6c87","5766c26941ae00aa889335bcccc1ecb28271b774be92aede801354c9797074bb","3a19286bcc9303c9352c03d68bb4b63cecbf5c9b7848465847bb6c9ceafa1484","c573fef34c2e5cc5269fd9c95fe73a1eb9db17142f5d8f36ffe4a686378b8660","d97e30dd93590392fed422f2b27325d10ab007d034faaaf61e28e9ddc9d3825b","d1f8a829c5e90734bb47a1d1941b8819aeee6e81a2a772c3c0f70b30e3693fa9","be1dfacee25a14d79724ba21f1fde67f966b46e2128c68fed2e48c6e1e9822c5","19b3d0c212d241c237f79009b4cd0051e54971747fd89dc70a74f874d1192534","4d250e905299144850c6f8e74dad1ee892d847643bacf637e89adcce013f0700","5fca180ba7514e439b225ee5eb47e5cf9254a591095f93cf7ca298ce6264159b","ed3e176bc769725ebc1d93f1d6890fc3d977b9155ae5d03be96ec2d49b303370","7933769d84f5ae16546aef06537ca578f1c8d7cca0708452a00613050ac1f265","cc5c913c4716a0d1563b2a63a7c4dc2fa81b7d7bc58489c79896d69b27e978cd","f194cdeb1caaf80e625f4fad340a9434b2b83786028dcc5ea6f3c459cc7789a0","f8ce447bbda4f75da74cecd866cc1ff9bdde62189ac9d8dc14a16c48b3d702fa","236247fb33a56e1d43b097c000aaafcac8fea1e8bf38d1a64f13889b32c372d0","c7d30b164562b7ce99fcb53ab78f937cc845e003f6089d648351331921379994","fe2d1251f167d801a27f0dfb4e2c14f4f08bf2214d9784a1b8c310fdfdcdaaea","2a1182578228dc1faad14627859042d59ea5ab7e3ac69cb2a3453329aaaa3b83","dfa99386b9a1c1803eb20df3f6d3adc9e44effc84fa7c2ab6537ed1cb5cc8cfb","79b0d5635af72fb87a2a4b62334b0ab996ff7a1a14cfdb895702e74051917718","5f00b052713bfe8e9405df03a1bbe406006b30ec6b0c2ce57d207e70b48cf4e9","7abcae770f21794b5ffbc3186483c3dbcf8b0c8e37d3ef3ed6277ece5c5dd4be","3e642f39da9ad0a4cd16ccbd7f363b6b5ad5fa16a5c6d44753f98fc1e3be9d96","7f5a6eac3d3d334e2f2eba41f659e9618c06361958762869055e22219f341554","6f996f44113b76a9960d3fad280f4f671115c5e971356d1dbb4d1b000af8b3b3","67f2cd6e208e68fdfa366967d1949575df6ccf90c104fc9747b3f1bdb69ad55a","f99ab9dffe6281c9b6df9ae9d8584d18eabf2107572bbd8fa5c83c8afe531af8","4fc9939c86a7d80ab6a361264e5666336d37e080a00d831d9358ad83575267da","f4ba385eedea4d7be1feeeac05aaa05d6741d931251a85ab48e0610271d001ce","fc79932b9aa710f025b89bf8d8329d99080286e5e079a7d5a529236e9f5dd69e","6646d9075e3e0eedb02c9d03bffef54c8bbeb601d27eed46f143aba435bac37d","0dec72b4c5c4bb149750fef4fc26bdae8f410de941ee766c953f5ac77381d690","8f2644578a3273f43fd700803b89b842d2cd09c1fba2421db45737357e50f5b1","f5405fb679a467cb979f8744940b22b7bc3a0bcbe648c3910d98de3188d42a78","68969a0efd9030866f60c027aedbd600f66ea09e1c9290853cc24c2dcc92000f","639f94fe145a72ce520d3d7b9b3b6c9049624d90cbf85cff46fb47fb28d1d8fe","8327a51d574987a2b0f61ea40df4adddf959f67bc48c303d4b33d47ba3be114a","991fd5ebf9f30ffa17cae6faeae6a838d3d91bdcdd419bce358dc99b8e5b0ad0","51b4ab145645785c8ced29238192f870dbb98f1968a7c7ef2580cd40663b2940","589713fefe7282fd008a2672c5fbacc4a94f31138bae6a03db2c7b5453dc8788","786691c952fe3feac79aca8f0e7e580d95c19afc8a4c6f8765e99fb756d8d9d7","4c348f139d006057ce9384e60b4ee1ce06bee5c16e19ff70f293ad88d5893386","e9d33b2549b5779b6cad92cb6a370c6c106cc12dc80da1cc199e2cb3a715bf38","62b753ed351fba7e0f6b57103529ce90f2e11b949b8fc69c39464fe958535c25","21e1fa3e5c95c61161a1ea2d819972e3b7e916a58571f8f9828b8a6c32e641ea","abfee88c6ea2d6000b88d589004a260a07546c0f5743b74a8da87c69ca12017f","f99699abe83bfe68c0aa3aaf91bee6d4a917eba999b7e82e1d8bcd23c9af4ed6","53a296cb2f1036d813a8ae54b9c078653cda3d2f1aa3c6c5d23ea2a233b81981","37f9777cfd8fc41f20daa186b29f2f4b875d52157be892929c80b55c10d8cf89","845b98bae0b14d348bb65501feb713158f3e2d58f41d8fcc38a3413b9f11a993","998050e13e3daf9d22f6207163324002e83d40484232e3b5beb3f814c8a61d98","189150e785626242df43edde2e537ae48b8d8ba0c93e78c2478c9ce738a14cfe","b377fa259d15c6e3c0fc2804530f1c7448906df2b6afdf6ddeff61a75016cb28","a26bb2e2693f921f4aa3f6e8c04a18d07c6ab6c3162c426299e0d0a904d76d82","42e7c31cdce8294ad4852d465b2dd91307efecfd7a9889f2a0aa49ffca73e83b","7922bdca92b1a6f586e9403b2b7972200aae00f926a300e79bf2d62eb410714f","d3abaca0cd59f25b4e056681217d1f8674612071706e6825517ec9e264063e55","76a7145b39ac6cc3633e2ccb545e9db3e5a02c7e0bceddbb5abbd3b2e1fba32e","a3cf3aa8ec934a46e5d10922af944c14e1b73acb81c4ba90348bee40a829b26c","8f95f6784090939eb0cb0c648a03bce2208e595730afc14be4969d90b334b541","535b6a88c08e138b1b72003f482bceaca78311cd19836bdde0a80a131f457f43","cf72ba3ad6ed1f342e8ddbdbfdf425238cbc7a75cc7a318fa994cb3866a68804","f213a7dafb0a946c1134a64151cbb7f2301d23f93920356d730cf0ed767e9985","c305868de2a4ea029bd4b9593ebb33b602b54cdbb3a09231486f611a414d0f5f","cf42fcfc0f9e976054d921a0f5bf898f9127751cf5dd9f1b4820069fd78f2280","e35526a0977b9cd80f799aef3314cb2bfe66aeb40879c888f7a993bd3437fc42","81d92e5c4d618ba0660121ed30c603e8111ad605e7562948f7430d87038daee0","757f7967151a9b1f043aba090f09c1bdb0abe54f229efd3b7a656eb6da616bf4","2da74b28ea53cb34b516fd6dbda3ca93495648cf431e59d24ba3ab5d7ec59ba4","928ebc4436abadcd3680338883b7e26189beb7532ae4b3d1c1727598607e53fa","2ec607f96bdcd7dfc06b24bf5c05ff93c6859a0c0e77d9e1b098a20aa3c77fb1","7634eca84d60522b68ac679813fd9247a4260f7412890e924c7779758f8d6391","b4ff74f0589487410168be50e3231caf687c5e1302266709742382e8d004fe1e","406f227eebfe8be216d7a4b215ed09198b0c2f6599f2273b69ee5b75824c5435","a67d719563c9919592cc1acaa197b35deb92cc20801d33ba75214dd33988c49e","4f4dcc8af3798205431971473b0e6808e5415f5c3963d8aabc094808e0223880","8a90f97fdb10d83c6842a699c3df474246755f4fbf3ee2d35e69d6599fe9092c","88aacf6e2493633490812c70595b517c8e4299f054d28a51687b10f0968276c3","84a56bb3995633ffa667c5eb28a18be95572911ba9609b598cee69357aa6e666","21fab2a256a70911bc1fac0d7afe46cbca4a3b7ded92f0da89505d9f9a21b699","d037b771e89ef6dd81c71de92cc644d68b1b5d1ce25dbce9c2cfe407dd0b5796","e61062cf47b67f1a1968f7d150da3aea7b77a9fd5ebce90301c3e0180ca30ab4","b63519c0b5db6d56337c5245fa458b3d3017c204ca7be0c220a2fb967526ea79","6ee84215d79fb023f94eaa8bdfac1a8009f584da1bf9250d59d2517965055610","31ea3302aeafa0e67133aa9bb383d853d9aeb2b2a3b12a9ed9560596b0313b1f","d9c0e696b3b43dd0e6cbbe51f42dad1193df7be1035d4ab1f972c45ff41232e0","840703025c44ca3abde36a35cdede65d8c5ab6a4c6b06dccaeecf44a2fa06be2","cf6dc8f18bc5ee063dc1a37bccd3031dc0769f11622399018c375aacfcbda7c9","b2203ff075f24f24b31de677f806e9966bff89c655d24c15a9f47b914e1bcb99","dc3b172ee27054dbcedcf5007b78c256021db936f6313a9ce9a3ecbb503fd646","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","a2e86df4db576d80704e25293cec6f20fc6101a11f4747440e2eef58fb3c860c","a2e86df4db576d80704e25293cec6f20fc6101a11f4747440e2eef58fb3c860c","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","6704f0b54df85640baaeebd86c9d4a1dbb661d5a4d57a75bc84162f562f6531d","9d255af1b09c6697089d3c9bf438292a298d8b7a95c68793c9aae80afc9e5ca7",{"version":"c3bc5d095c3c22fd20b5a6550b9c9a6d56c3ffbb87ef057ccce7764b6bed4428","affectsGlobalScope":true},{"version":"63e2182615c513e89bb8a3e749d08f7c379e86490fcdbf6d35f2c14b3507a6e8","affectsGlobalScope":true},{"version":"f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71","affectsGlobalScope":true},"6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"bee89e1eb6425eb49894f3f25e4562dc2564e84e5aa7610b7e13d8ecddf8f5db","dca41e86e89dfb2e85e6935260250f02eb6683b86c2fa16bec729ddd1bcd9b4b","6670e71d65610bd7b64aac5fdf58c21c545f7fa31e060f02a0dcd91763831eb8","e050a0afcdbb269720a900c85076d18e0c1ab73e580202a2bf6964978181222a","6de408de17cb0e3fa3a5e3d0f79bd104848d98dbfa72e92fddfa1a4aa3d8393c","bf88ef4208a770ca39a844b182b3695df536326ea566893fdc5b8418702a331e","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","6c1e688f95fcaf53b1e41c0fdadf2c1cfc96fa924eaf7f9fdb60f96deb0a4986","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","6d969939c4a63f70f2aa49e88da6f64b655c8e6799612807bef41ccff6ea0da9",{"version":"46894b2a21a60f8449ca6b2b7223b7179bba846a61b1434bed77b34b2902c306","affectsGlobalScope":true},"ba600bf38b5c1a5dffa1b99dd7a783549082bbba3b4fe9497eaaf5e4c1764b20","ae8cd6af37275eac75f5369cdb5f01063bcf1f48d74cb434303ee50ec446acfe","2518830a2fda9c272ba48798d0e7b857037443b06594db8e42c87e86944ee9e4","95c1cf650d16b197525b5bfdf8dd7abba0a49d99ddb12a4ba66466a8a6903e49","1fe0aabe758d56ad72495d6e6c7b6ae75619faaeaaf03f0ddf1948eea4cfac84","bbc57966c8c48ee78fd58aadb893784025be056ae538ae22d1e83c502a987e68","5e5d6f6697e378b0660b567866bf67d099d0ea754f8810c0dabe737805f5cf03","99ab49d4732fdc98cf5c495925e65e796544cb4086fe42afc235dfc02bcf2351","af8339d509c40da075088e544c28ed37b519876e5c4d36a48644ebfb3c6ae6c8","d393adc32e520d4274bb4c3dfdcdb342b806a230b66ef0f82b35bffbc4aa2590","c26af7eaedb4f710984634e419ab15e54e5bb99a0b3cae71188c2fff572276de","38b58ef018d0aeee42ef74c42978bb5805503233fdeeb82cd2aed2199fb0d013","3b6040253231d44e6778eb6861cc86c1758562e77783d21b7ecbc73322ded539","cc256fd958b33576ed32c7338c64adb0d08fc0c2c6525010202fab83f32745da","fd0589ca571ad090b531d8c095e26caa53d4825c64d3ff2b2b1ab95d72294175",{"version":"669843ecafb89ae1e944df06360e8966219e4c1c34c0d28aa2503272cdd444a7","affectsGlobalScope":true},"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","19c816167e076e7c24f074389c6cf3ed87bdbb917d1ea439ca281f9d26db2439","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","98f9d826db9cd99d27a01a59ee5f22863df00ccf1aaf43e1d7db80ebf716f7c3","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","dcd91d3b697cb650b95db5471189b99815af5db2a1cd28760f91e0b12ede8ed5","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3cf0d343c2276842a5b617f22ba82af6322c7cfe8bb52238ffc0c491a3c21019","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","30abc554c7ad13063a02ddd06757929b34357aea1f6fcf4ca39114cb0fc19384","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","d88a5e779faf033be3d52142a04fbe1cb96009868e3bbdd296b2bc6c59e06c0e","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","b9f96255e1048ed2ea33ec553122716f0e57fc1c3ad778e9aa15f5b46547bd23","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","a1a261624efb3a00ff346b13580f70f3463b8cdcc58b60f5793ff11785d52cab","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","f875e913ef24873eb2a469605402595f1c783070b52a98e53686b32c0f827f7f","bc81aff061c53a7140270555f4b22da4ecfe8601e8027cf5aa175fbdc7927c31","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","e9eb1b173aa166892f3eddab182e49cfe59aa2e14d33aedb6b49d175ed6a3750"],"options":{"downlevelIteration":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"jsx":2,"module":1,"noEmitHelpers":false,"noFallthroughCasesInSwitch":true,"outDir":"./dist-cjs","preserveConstEnums":true,"removeComments":true,"rootDir":"./src","strict":true,"target":5,"useUnknownInCatchVariables":false},"fileIdsList":[[139],[197,200,207,208,209,210,211],[139,194],[194,195,196],[198,199],[139,149],[202,203,204],[201,205,206],[139,157,158],[159,160],[157,158,161,162,163],[139,145],[142],[143],[139,140,141],[140,141,142,144,145,146,147,148],[213,214,215,216,217,218,219],[139,155],[139,164],[151],[139,172,173],[174],[139,150,151,156,165,166,167,168,169,170,171,175,176,177,178,179,180,181,182,183,184,185,186],[37,44,45,46],[44,47],[37,41],[37,47],[35,36,45,46,47,48],[79,93,95],[97],[42,43,44,99],[42,44],[101,103,104],[101,102],[106],[35],[38,108],[108],[111],[108,109,110],[108,109,110,111,112],[39],[41,42,44],[97,98],[114],[114,118],[114,115,118,119],[43,117],[94],[34,40],[65,67,93],[37],[37,122,123,124],[34,38,39,40,41,42,43,44,49,96,97,98,99,100,102,105,106,107,113,116,117,120,121,125,126,127,128,129,130,131,132,133,134,136,137,138],[35,38,39,43],[100],[116],[41,43,102],[41,42],[41,106],[43,97,98],[65,79,93,95,128],[42,99,133,134],[41,65,66,93,100,128,132,134,135],[41],[34],[79,93,139],[152,153,154],[79,139],[233,234,236,239,241],[233],[233,236],[243],[65,93],[248,250],[247,248,249],[63,93],[254],[255],[261,264],[259],[52,93,257,263],[261],[258,262],[260],[62,88,93,278,279,281],[280],[283,285,286,287,288,289,290,291,292,293,294,295],[283,284,286,287,288,289,290,291,292,293,294,295],[284,285,286,287,288,289,290,291,292,293,294,295],[283,284,285,287,288,289,290,291,292,293,294,295],[283,284,285,286,288,289,290,291,292,293,294,295],[283,284,285,286,287,289,290,291,292,293,294,295],[283,284,285,286,287,288,290,291,292,293,294,295],[283,284,285,286,287,288,289,291,292,293,294,295],[283,284,285,286,287,288,289,290,292,293,294,295],[283,284,285,286,287,288,289,290,291,293,294,295],[283,284,285,286,287,288,289,290,291,292,294,295],[283,284,285,286,287,288,289,290,291,292,293,295],[283,284,285,286,287,288,289,290,291,292,293,294],[50],[52],[53,58],[54,62,63,70,79],[54,55,62,70],[56,86],[57,58,63,71],[58,79],[59,60,62,70],[60],[61,62],[62],[62,63,64,79,85],[63,64],[62,65,70,79,85],[62,63,65,66,70,79,82,85],[65,67,79,82,85],[50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92],[62,68],[69,85],[60,62,70,79],[71],[72],[52,73],[74,84],[75],[76],[62,77],[77,78,86,88],[62,79],[80],[81],[70,79,82],[83],[70,84],[65,76,85],[86],[79,87],[88],[89],[62,64,79,85,88,90],[79,91],[301,340],[301,325,340],[340],[301],[301,326,340],[301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339],[326,340],[62,65,67,70,79,82,85,91,93],[344],[267],[266,267],[266],[266,267,268,270,271,274,275,276,277],[267,271],[266,267,268,270,271,272,273],[266,271],[271,275],[267,268,269],[268],[266,267,271],[31],[31,32],[31,139,149,187,192],[31,193,221],[31,139,212,220],[31,222],[31,149],[31,190],[31,188,189,191],[31,189],[31,33,223,230],[31,139,187],[31,224,225,227,229],[31,187],[31,139,226],[31,139,187,226,228]],"referencedMap":[[208,1],[212,2],[195,3],[196,3],[194,1],[197,4],[199,1],[198,1],[200,5],[209,1],[211,1],[210,6],[201,1],[202,6],[203,6],[205,7],[204,1],[207,8],[206,1],[159,9],[161,10],[160,1],[162,9],[163,9],[164,11],[157,1],[145,1],[146,12],[143,13],[144,14],[142,15],[140,1],[141,1],[149,16],[148,1],[213,1],[219,1],[214,1],[215,1],[216,1],[220,17],[217,1],[218,1],[150,1],[151,1],[156,18],[165,19],[167,20],[176,1],[172,1],[174,21],[175,22],[173,1],[187,23],[47,24],[48,25],[45,26],[46,27],[49,28],[96,29],[98,30],[100,31],[99,32],[105,33],[103,34],[107,35],[38,36],[109,37],[110,38],[112,39],[111,40],[113,41],[108,42],[106,43],[114,44],[115,45],[119,46],[120,47],[118,48],[95,49],[41,50],[121,51],[122,52],[123,52],[125,53],[124,52],[139,54],[44,55],[126,56],[117,57],[128,58],[116,59],[129,60],[130,61],[131,29],[132,29],[133,62],[135,63],[136,64],[137,56],[40,65],[43,43],[138,66],[153,67],[155,68],[154,69],[242,70],[236,71],[234,71],[239,72],[237,71],[241,71],[244,73],[245,73],[246,74],[251,75],[250,76],[252,77],[253,77],[255,78],[256,79],[265,80],[260,81],[264,82],[262,83],[263,84],[261,85],[280,86],[281,87],[284,88],[285,89],[283,90],[286,91],[287,92],[288,93],[289,94],[290,95],[291,96],[292,97],[293,98],[294,99],[295,100],[50,101],[52,102],[53,103],[54,104],[55,105],[56,106],[57,107],[58,108],[59,109],[60,110],[61,111],[62,112],[63,113],[64,114],[65,115],[66,116],[67,117],[93,118],[68,119],[69,120],[70,121],[71,122],[72,123],[73,124],[74,125],[75,126],[76,127],[77,128],[78,129],[79,130],[80,131],[81,132],[82,133],[83,134],[84,135],[85,136],[86,137],[87,138],[88,139],[89,140],[90,141],[91,142],[325,143],[326,144],[301,145],[304,145],[323,143],[324,143],[314,143],[313,146],[311,143],[306,143],[319,143],[317,143],[321,143],[305,143],[318,143],[322,143],[307,143],[308,143],[320,143],[302,143],[309,143],[310,143],[312,143],[316,143],[327,147],[315,143],[303,143],[340,148],[334,147],[336,149],[335,147],[328,147],[329,147],[331,147],[333,147],[337,149],[338,149],[330,149],[332,149],[343,150],[345,151],[268,152],[277,153],[267,154],[278,155],[273,156],[274,157],[272,158],[276,159],[270,160],[269,161],[275,162],[271,153],[32,163],[33,164],[193,165],[222,166],[221,167],[223,168],[188,169],[189,163],[191,170],[192,171],[190,172],[231,173],[224,163],[226,174],[230,175],[225,176],[227,177],[229,178]],"exportedModulesMap":[[208,1],[212,2],[195,3],[196,3],[194,1],[197,4],[199,1],[198,1],[200,5],[209,1],[211,1],[210,6],[201,1],[202,6],[203,6],[205,7],[204,1],[207,8],[206,1],[159,9],[161,10],[160,1],[162,9],[163,9],[164,11],[157,1],[145,1],[146,12],[143,13],[144,14],[142,15],[140,1],[141,1],[149,16],[148,1],[213,1],[219,1],[214,1],[215,1],[216,1],[220,17],[217,1],[218,1],[150,1],[151,1],[156,18],[165,19],[167,20],[176,1],[172,1],[174,21],[175,22],[173,1],[187,23],[47,24],[48,25],[45,26],[46,27],[49,28],[96,29],[98,30],[100,31],[99,32],[105,33],[103,34],[107,35],[38,36],[109,37],[110,38],[112,39],[111,40],[113,41],[108,42],[106,43],[114,44],[115,45],[119,46],[120,47],[118,48],[95,49],[41,50],[121,51],[122,52],[123,52],[125,53],[124,52],[139,54],[44,55],[126,56],[117,57],[128,58],[116,59],[129,60],[130,61],[131,29],[132,29],[133,62],[135,63],[136,64],[137,56],[40,65],[43,43],[138,66],[153,67],[155,68],[154,69],[242,70],[236,71],[234,71],[239,72],[237,71],[241,71],[244,73],[245,73],[246,74],[251,75],[250,76],[252,77],[253,77],[255,78],[256,79],[265,80],[260,81],[264,82],[262,83],[263,84],[261,85],[280,86],[281,87],[284,88],[285,89],[283,90],[286,91],[287,92],[288,93],[289,94],[290,95],[291,96],[292,97],[293,98],[294,99],[295,100],[50,101],[52,102],[53,103],[54,104],[55,105],[56,106],[57,107],[58,108],[59,109],[60,110],[61,111],[62,112],[63,113],[64,114],[65,115],[66,116],[67,117],[93,118],[68,119],[69,120],[70,121],[71,122],[72,123],[73,124],[74,125],[75,126],[76,127],[77,128],[78,129],[79,130],[80,131],[81,132],[82,133],[83,134],[84,135],[85,136],[86,137],[87,138],[88,139],[89,140],[90,141],[91,142],[325,143],[326,144],[301,145],[304,145],[323,143],[324,143],[314,143],[313,146],[311,143],[306,143],[319,143],[317,143],[321,143],[305,143],[318,143],[322,143],[307,143],[308,143],[320,143],[302,143],[309,143],[310,143],[312,143],[316,143],[327,147],[315,143],[303,143],[340,148],[334,147],[336,149],[335,147],[328,147],[329,147],[331,147],[333,147],[337,149],[338,149],[330,149],[332,149],[343,150],[345,151],[268,152],[277,153],[267,154],[278,155],[273,156],[274,157],[272,158],[276,159],[270,160],[269,161],[275,162],[271,153],[32,163],[33,164],[193,165],[222,166],[221,167],[223,168],[188,169],[189,163],[191,170],[192,171],[190,172],[231,173],[224,163],[226,174],[230,175],[225,176],[227,177],[229,178]],"semanticDiagnosticsPerFile":[259,208,212,195,196,194,197,199,198,200,209,211,210,201,202,203,205,204,207,206,159,161,160,162,163,164,157,158,145,146,143,144,142,140,141,149,147,148,213,219,214,215,216,220,217,218,150,151,156,165,166,167,168,169,170,171,176,177,172,174,175,173,178,179,187,180,181,182,183,184,185,186,34,36,47,48,45,46,35,49,96,98,100,99,101,105,103,104,97,107,38,109,110,112,111,113,108,106,114,115,119,120,118,95,41,121,122,123,37,125,124,139,39,44,126,127,42,117,128,116,129,130,131,132,133,102,135,136,94,137,134,40,43,138,152,153,155,154,232,242,236,235,234,233,239,237,238,241,240,244,245,243,246,251,247,250,248,252,253,254,255,256,265,257,260,264,262,263,261,280,281,249,282,284,285,283,286,287,288,289,290,291,292,293,294,295,296,297,50,52,53,54,55,56,57,58,59,60,61,62,63,64,51,92,65,66,67,93,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,298,299,300,325,326,301,304,323,324,314,313,311,306,319,317,321,305,318,322,307,308,320,302,309,310,312,316,327,315,303,340,339,334,336,335,328,329,331,333,337,338,330,332,341,279,342,343,344,345,258,228,268,277,266,267,278,273,274,272,276,270,269,275,271,31,6,7,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,29,1,30,32,33,193,222,221,223,188,189,191,192,190,231,224,226,230,225,227,229]},"version":"4.9.5"} \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/tsconfig.es.json b/node_modules/@aws-sdk/core/tsconfig.es.json new file mode 100644 index 0000000..ce87108 --- /dev/null +++ b/node_modules/@aws-sdk/core/tsconfig.es.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist-es", + "baseUrl": "." + }, + "extends": "../../tsconfig.es.json", + "include": ["src/"] +} diff --git a/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo b/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo new file mode 100644 index 0000000..0d98a63 --- /dev/null +++ b/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/tslib/tslib.d.ts","./src/client/emitWarningIfUnsupportedVersion.ts","./src/client/index.ts","../../node_modules/@smithy/types/dist-types/abort.d.ts","../../node_modules/@smithy/types/dist-types/auth/auth.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts","../../node_modules/@smithy/types/dist-types/identity/identity.d.ts","../../node_modules/@smithy/types/dist-types/endpoint.d.ts","../../node_modules/@smithy/types/dist-types/logger.d.ts","../../node_modules/@smithy/types/dist-types/uri.d.ts","../../node_modules/@smithy/types/dist-types/http.d.ts","../../node_modules/@smithy/types/dist-types/response.d.ts","../../node_modules/@smithy/types/dist-types/util.d.ts","../../node_modules/@smithy/types/dist-types/middleware.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts","../../node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts","../../node_modules/@smithy/types/dist-types/auth/index.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@smithy/types/dist-types/transform/exact.d.ts","../../node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts","../../node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts","../../node_modules/@smithy/types/dist-types/crypto.d.ts","../../node_modules/@smithy/types/dist-types/checksum.d.ts","../../node_modules/@smithy/types/dist-types/command.d.ts","../../node_modules/@smithy/types/dist-types/client.d.ts","../../node_modules/@smithy/types/dist-types/connection/config.d.ts","../../node_modules/@smithy/types/dist-types/transfer.d.ts","../../node_modules/@smithy/types/dist-types/connection/manager.d.ts","../../node_modules/@smithy/types/dist-types/connection/pool.d.ts","../../node_modules/@smithy/types/dist-types/connection/index.d.ts","../../node_modules/@smithy/types/dist-types/eventStream.d.ts","../../node_modules/@smithy/types/dist-types/encode.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/shared.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/index.d.ts","../../node_modules/@smithy/types/dist-types/extensions/checksum.d.ts","../../node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts","../../node_modules/@smithy/types/dist-types/shapes.d.ts","../../node_modules/@smithy/types/dist-types/retry.d.ts","../../node_modules/@smithy/types/dist-types/extensions/retry.d.ts","../../node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts","../../node_modules/@smithy/types/dist-types/extensions/index.d.ts","../../node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts","../../node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts","../../node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts","../../node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts","../../node_modules/@smithy/types/dist-types/identity/index.d.ts","../../node_modules/@smithy/types/dist-types/pagination.d.ts","../../node_modules/@smithy/types/dist-types/profile.d.ts","../../node_modules/@smithy/types/dist-types/serde.d.ts","../../node_modules/@smithy/types/dist-types/signature.d.ts","../../node_modules/@smithy/types/dist-types/stream.d.ts","../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts","../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts","../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts","../../node_modules/@smithy/types/dist-types/transform/type-transform.d.ts","../../node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts","../../node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts","../../node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts","../../node_modules/@smithy/types/dist-types/waiter.d.ts","../../node_modules/@smithy/types/dist-types/index.d.ts","../../node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts","../../node_modules/@smithy/protocol-http/dist-types/httpResponse.d.ts","../../node_modules/@smithy/protocol-http/dist-types/httpHandler.d.ts","../../node_modules/@smithy/protocol-http/dist-types/extensions/httpExtensionConfiguration.d.ts","../../node_modules/@smithy/protocol-http/dist-types/extensions/index.d.ts","../../node_modules/@smithy/protocol-http/dist-types/Field.d.ts","../../node_modules/@smithy/protocol-http/dist-types/Fields.d.ts","../../node_modules/@smithy/protocol-http/dist-types/isValidHostname.d.ts","../../node_modules/@smithy/protocol-http/dist-types/types.d.ts","../../node_modules/@smithy/protocol-http/dist-types/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/NoOpLogger.d.ts","../../node_modules/@smithy/smithy-client/dist-types/client.d.ts","../../node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts","../../node_modules/@smithy/util-stream/dist-types/getAwsChunkedEncodingStream.d.ts","../../node_modules/@smithy/util-stream/dist-types/sdk-stream-mixin.d.ts","../../node_modules/@smithy/util-stream/dist-types/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/collect-stream-body.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/resolveEndpointConfig.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/types.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromInstructions.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/adaptors/index.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/endpointMiddleware.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/getEndpointPlugin.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/command.d.ts","../../node_modules/@smithy/smithy-client/dist-types/constants.d.ts","../../node_modules/@smithy/smithy-client/dist-types/create-aggregated-client.d.ts","../../node_modules/@smithy/smithy-client/dist-types/date-utils.d.ts","../../node_modules/@smithy/smithy-client/dist-types/default-error-handler.d.ts","../../node_modules/@smithy/smithy-client/dist-types/defaults-mode.d.ts","../../node_modules/@smithy/smithy-client/dist-types/emitWarningIfUnsupportedVersion.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/checksum.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/retry.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/defaultExtensionConfiguration.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/exceptions.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extended-encode-uri-component.d.ts","../../node_modules/@smithy/smithy-client/dist-types/get-array-if-single-item.d.ts","../../node_modules/@smithy/smithy-client/dist-types/get-value-from-text-node.d.ts","../../node_modules/@smithy/smithy-client/dist-types/lazy-json.d.ts","../../node_modules/@smithy/smithy-client/dist-types/object-mapping.d.ts","../../node_modules/@smithy/smithy-client/dist-types/parse-utils.d.ts","../../node_modules/@smithy/smithy-client/dist-types/resolve-path.d.ts","../../node_modules/@smithy/smithy-client/dist-types/ser-utils.d.ts","../../node_modules/@smithy/smithy-client/dist-types/serde-json.d.ts","../../node_modules/@smithy/smithy-client/dist-types/split-every.d.ts","../../node_modules/@smithy/smithy-client/dist-types/index.d.ts","./src/httpAuthSchemes/utils/getDateHeader.ts","./src/httpAuthSchemes/utils/getSkewCorrectedDate.ts","./src/httpAuthSchemes/utils/isClockSkewed.ts","./src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts","./src/httpAuthSchemes/utils/index.ts","./src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/index.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-signing/httpSigningMiddleware.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-signing/getHttpSigningMiddleware.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-signing/index.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/index.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/index.d.ts","../../node_modules/@smithy/core/dist-types/getSmithyContext.d.ts","../../node_modules/@smithy/core/dist-types/normalizeProvider.d.ts","../../node_modules/@smithy/core/dist-types/protocols/requestBuilder.d.ts","../../node_modules/@smithy/core/dist-types/pagination/createPaginator.d.ts","../../node_modules/@smithy/core/dist-types/index.d.ts","../../node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts","../../node_modules/@smithy/signature-v4/dist-types/getCanonicalHeaders.d.ts","../../node_modules/@smithy/signature-v4/dist-types/getCanonicalQuery.d.ts","../../node_modules/@smithy/signature-v4/dist-types/getPayloadHash.d.ts","../../node_modules/@smithy/signature-v4/dist-types/moveHeadersToQuery.d.ts","../../node_modules/@smithy/signature-v4/dist-types/prepareRequest.d.ts","../../node_modules/@smithy/signature-v4/dist-types/credentialDerivation.d.ts","../../node_modules/@smithy/signature-v4/dist-types/index.d.ts","./src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts","./src/httpAuthSchemes/aws_sdk/index.ts","./src/httpAuthSchemes/index.ts","./src/protocols/coercing-serializers.ts","./src/protocols/json/awsExpectUnion.ts","./src/protocols/common.ts","./src/protocols/json/parseJsonBody.ts","../../node_modules/fast-xml-parser/src/fxp.d.ts","./src/protocols/xml/parseXmlBody.ts","./src/protocols/index.ts","./src/index.ts","../../node_modules/@types/argparse/index.d.ts","../../node_modules/@types/babel__generator/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/chai-as-promised/index.d.ts","../../node_modules/@types/chai-subset/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@types/jest/node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@types/jest/node_modules/@jest/schemas/build/index.d.ts","../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../node_modules/@types/jest/node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/@types/jest/node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/parse5/dist/common/html.d.ts","../../node_modules/parse5/dist/common/token.d.ts","../../node_modules/parse5/dist/common/error-codes.d.ts","../../node_modules/parse5/dist/tokenizer/preprocessor.d.ts","../../node_modules/parse5/dist/tokenizer/index.d.ts","../../node_modules/parse5/dist/tree-adapters/interface.d.ts","../../node_modules/parse5/dist/parser/open-element-stack.d.ts","../../node_modules/parse5/dist/parser/formatting-element-list.d.ts","../../node_modules/parse5/dist/parser/index.d.ts","../../node_modules/parse5/dist/tree-adapters/default.d.ts","../../node_modules/parse5/dist/serializer/index.d.ts","../../node_modules/parse5/dist/common/foreign-content.d.ts","../../node_modules/parse5/dist/index.d.ts","../../node_modules/@types/tough-cookie/index.d.ts","../../node_modules/@types/jsdom/base.d.ts","../../node_modules/@types/jsdom/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/prettier/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","8c7a59a58fb16c668f3a836ecb58afd0d8764478e1c3744870c0c039f286dd91","38f6da5b6f318c33e18dd7c983cab3fe52f510c9a2573948fb13f012e01b1ba6","c55ae709f94155174ff63647edd2a7e3acbd02a2909aa2541569e8b8bac9fc40","530e5c7e4f74267b7800f1702cf0c576282296a960acbdb2960389b2b1d0875b","1c483cc60a58a0d4c9a068bdaa8d95933263e6017fbea33c9f99790cf870f0a8","07863eea4f350458f803714350e43947f7f73d1d67a9ddf747017065d36b073a","d5f1bbd44ba4f63d8a01fff5e1edc1c1fb50e9caa48a4fa48298a4485d6ff75c","4d2b263907b8c03c5b2df90e6c1f166e9da85bd87bf439683f150afc91fce7e7","c70e38e0f30b7c0542af9aa7e0324a23dd2b0c1a64e078296653d1d3b36fa248","d12680e217215b37094868d491d00196e80f270ce47e5a4bc50269945ae5554d","396c2c14fa408707235d761a965bd84ce3d4fc3117c3b9f1404d6987d98a30d6","b7b881ced4ed4dee13d6e0ccdb2296f66663ba6b1419767271090b3ff3478bb9","06289b9873760aac77aed4035ea6c60b1e0879b8afe47a4530bc8522b9b804b1","63c36aa73242aa745fae813c40585111ead225394b0a0ba985c2683baa6b0ef9","3e7ffc7dd797e5d44d387d0892bc288480493e73dcab9832812907d1389e4a98","db011ec9589fd51995cbd0765673838e38e6485a6559163cc53dcf508b480909","e1a4253f0cca15c14516f52a2ad36c3520b140b5dfb3b3880a368cd75d45d6d9","159af954f2633a12fdee68605009e7e5b150dbeb6d70c46672fd41059c154d53","4c2c4f53e8eedd970f8afa369d7371544fb6231bf95e659f8602e09abe74d5a5",{"version":"cb5a780979155e80a2184eb987cc411a95c9a1686019ade06918c312a0b7c9b2","affectsGlobalScope":true},"c2b5085f47e41d6940bbc5b0d3bd7cc0037c752efb18aecd243c9cf83ad0c0b7","3143a5add0467b83150961ecd33773b561a1207aec727002aa1d70333068eb1b","f87191b7fafe7a0edad375710d99f900e49cef560b66bf309cf3f8e1b7177126","586af7d2abe2f9d59c5e757c370087d6c6baea81b033250f43b8df808d6dfb33",{"version":"1a048ff164b8d9609f5de3139d4e37f6e8a82af82087ac414b9208f52ef8aac7","affectsGlobalScope":true},"3111079f3cb5f2b9c812ca3f46161562bce5bfb355e915f46ed46c41714dc1c3","e7bee4a6d9bb78afa390b25e0ce97a2f94787a1eb17f0a16e732dcbebba3f3ee","b32b6b16cb0bda68199582ad6f22242d07ee75fac9b1f28a98cd838afc5eea45","4441ee4119824bfaebc49308559edd7545978f9cb41a40f115074e1031dde75f",{"version":"60693a88462d0e97900123b5bf7c73e146ce0cc94da46a61fe6775b430d2ff05","affectsGlobalScope":true},{"version":"588c69eda58b9202676ec7ca11a72c3762819b46a0ed72462c769846153c447c","affectsGlobalScope":true},"ae064ed4f855716b7ff348639ddcd6a6d354a72fae82f506608a7dc9266aa24c","92f019c55b21c939616f6a48f678e714ac7b109444cbbf23ad69310ce66ecbdc","bba259efdf9ab95e0c7d3cc8e99250f56bb6b31d6129efdf733ca4eb1d01feea","499b7544062cf44fab253daeaea8ba28877d9e7ff4149246b1f0154d1c9ed535","139fd681eff7771a38d0c025d13c7a11c5474f6aab61e01c41511d71496df173","f614c3f61e46ccc2cb58702d5a158338ea57ee09099fde5db4cfc63ed0ce4d74","44e42ed6ec9c4451ebe89524e80ac8564e9dd0988c56e6c58f393c810730595d","a504c109b872b0e653549bd258eb06584c148c98d79406c7516995865a6d5089","155865f5f76db0996cd5e20cc5760613ea170ee5ad594c1f3d76fcaa05382161","e92852d673c836fc64e10c38640abcd67c463456e5df55723ac699b8e6ab3a8a","4455c78d226d061b1203c7614c6c6eb5f4f9db5f00d44ff47d0112de8766fbc4",{"version":"ec369bb9d97c4dc09dd2a4093b7ca3ba69ad284831fccac8a1977785e9e38ce5","affectsGlobalScope":true},"4465a636f5f6e9665a90e30691862c9e0a3ac2edc0e66296704f10865e924f2a","9af781f03d44f5635ed7844be0ce370d9d595d4b4ec67cad88f0fac03255257e","f9fd4c3ef6de27fa0e256f4e75b61711c4be05a3399f7714621d3edc832e36b0","e49290b7a927995c0d7e6b2b9c8296284b68a9036d9966531de65185269258d7","aa95cc73ea5315e4f6fc8c6db43d49e3b7de3780cae20a4f1319032809013038","874ca809b79276460011480a2829f4c8d4db29416dd411f71efbf8f497f0ac09","6c903bceaf3f3bc04f2d4c7dcd89ce9fb148b3ba0a5f5408d8f6de2b7eecc7ea","504d049d9e550a65466b73ca39da6469ab41786074ea1d16d37c8853f9f6ab2e","23a28f834a078986bbf58f4e3705956983ff81c3c2493f3db3e5f0e8a9507779","4febdf7f3ec92706c58e0b4e8159cd6de718284ef384260b07c9641c13fc70ce",{"version":"bf241ed073916ec9e21a3c138936edd444b6787d874844c0d05fc00a8f109d19","affectsGlobalScope":true},"7335933d9f30dcfd2c4b6080a8b78e81912a7fcefb1dafccb67ca4cb4b3ac23d","a6bfe9de9adef749010c118104b071d14943802ff0614732b47ce4f1c3e383cd","4c3d0e10396646db4a1e917fb852077ee77ae62e512913bef9cccc2bb0f8bd0e","3b220849d58140dcc6718f5b52dcd29fdb79c45bc28f561cbd29eb1cac6cce13","0ee22fce41f7417a24c808d266e91b850629113c104713a35854393d55994beb","22d1b1d965baba05766613e2e6c753bb005d4386c448cafd72c309ba689e8c24",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"c6c0bd221bb1e94768e94218f8298e47633495529d60cae7d8da9374247a1cf5","a1b36a1f91a54daf2e89e12b834fa41fb7338bc044d1f08a80817efc93c99ee5","8bb4a5b632dd5a868f3271750895cb61b0e20cff82032d87e89288faee8dd6e2","0c1aabfd9fb1818afb2e798f91f669edafce59cd7e3423d25b1cfccfaaf2c403","017de6fdabea79015d493bf71e56cbbff092525253c1d76003b3d58280cd82a0","ab9ea2596cb7800bd79d1526930c785606ec4f439c275adbca5adc1ddf87747d","aee8faa433dde04beedb779b3329456a286a966462d666c138c19113ce78c79e","d620ec36bfc6f8ed6fdecbe036d55cec81637f32fd34dc7bb7e60eba1764e910","4e693235d606287d6b5a4e7d572f190862b93ea4a28df8a63fc328aa8becdc9d","e58d1ea2fc84c9c03742b4f56449b7d4602c8c4deb4f0e57c619bab35bbbbf81","d82bc1f8fe8eef55aa741373da68b80a8503228c9aa0ec46bdd38fd7e0c02a18","d7c7f8a461326507d90d0888efff0c4011a5e69eb08ccb990232aa22334e4dd6","5af5ebe8c9b84f667cd047cfcf1942d53e3b369dbd63fbea2a189bbf381146c6","27deb39ac0921db739b503407dc9aa93a546b015c06738bc8b66bdf0ae593c7c","eff5b8bdfe94c0a174484a6de01e802fb66f99f8737a20e4fba4df05c2f24cea","52fa3a4f47e30ef266dbda3b69821fe5811be4faad2b266586090d8b4806342e","5cb6f9ea4a097094fe624c3513111292690e39e83167a412f8912807be71ca65","fa461c83b2adc6b33997a95335d19723bddd4d7aaff41cac6f9f817e3c3ae730","d9eed4a308aeb32babee0600d21c3a3ba8452c89e8a4916e5460b45da147c33c","fc9bdd9b3d8fb59c913cb3b8dea0d79b38dfe9331ef07e1c6dc6bf363f061ad6","e647d13de80e1b6b4e1d94363ea6f5f8f77dfb95d562748b488a7248af25aabf","0c3c4ce6a1884610c99306719f59174d81808c69393c30119f9c2aef0449a2cb","219a25474e58a8161b242776856ec5f6960839b63e74809445e51cadbfc18096","5a0d1534e9493ae44b08b3055172da38370e2afd2bc3d4bea11f7be78344036f","6309a45fc3c03d3c4d56228e995d51974f53009a842374695b34f3607877e5a3","bef94eba81ae2c09059c0d9abdb1ae1b7090314f70550f3c8cd5d7ead4a4f212","48b787ad458be9b524fa5fdfef34f68798074132d4b8cfe6a6fe9c2bf334c532","37280465f8f9b2ea21d490979952b18b7f4d1f0d8fab2d627618fb2cfa1828e3","7281550c523596fd0fd36c6e19aa89075dac93144437ce48490da319b1f4d318","3f3f85dc43cb93c5a797f1ff0fa948d0e17843a443ae11a20cc032ccdf1b9997","020507cb67b96b0830a8636db03ae004181eee323ba33565cfe8d45aaedc4d1d","869010bc679df668137cb3b78a3cb8196e97acf285208a57f6156ceac894a2f7","bcae62618c23047e36d373f0feac5b13f09689e4cd08e788af13271dbe73a139","29a99d2e57b3e08a997cbc2397bdb251441a545306a74b95ffedc5f03d9bc6b7","5ae003688265a1547bbcb344bf0e26cb994149ac2c032756718e9039302dfac8","09e811cc1088d9ea3a7ddd7290f6a13767f56c85daf8c3374a06a45a08d55647","9da2c58a27fdce871c2eac09d5172b04248bb86ada9b0d10e8b3dfa8470b8dd3","5c317403752871838140f70879b09509e37422e92e7364b4363c7b179310ee44","7b270dc53f35dd0b44bfa619ad4d351fffd512e14053c3688323ed007eda3f6d","6d4e928f232ade7221cffc6e4332ec935baa176415c9bf5d12111bb883a247d2","e86ad029224d4f2af3e188be8b5e9badf8c7083247572069bac7bd2193131fc7","057cac07c7bc5abdcfba44325fcea4906dff7919a3d7d82d4ec40f8b4c90cf2f","38aa389acf91d77db5a4f8e26e713ed53dc832ed5573def9cd20acd9ba97c1fe","e56784be93954f1f86d4dd3ac61b4c9727e75864baf123a1b584b970baed4ba0","f878779620c5178d45413b33c214419bb3df2945e703c35e1191188321e3633d","b9115605f72b65a662723020b2a1eb696c375a5803d6b401dc01fcbfe49ece90","151659e152d71986b8943b9943cd7fbe27a65874655081602de7ea24a0f66e9b","79cbed8c779049fdbdd856f1597f2e79be137b6ed44e66ead16ee8bf035d17da","1a8e6a4f31a5196144f35d0434e16369881d828c849d6a1c9290b6bde8807449","42a9ac86df0fa58634ea8a5f7f07b9b9c3243d82e306fb22d8a41639935a6c87","5766c26941ae00aa889335bcccc1ecb28271b774be92aede801354c9797074bb","3a19286bcc9303c9352c03d68bb4b63cecbf5c9b7848465847bb6c9ceafa1484","c573fef34c2e5cc5269fd9c95fe73a1eb9db17142f5d8f36ffe4a686378b8660","d97e30dd93590392fed422f2b27325d10ab007d034faaaf61e28e9ddc9d3825b","d1f8a829c5e90734bb47a1d1941b8819aeee6e81a2a772c3c0f70b30e3693fa9","be1dfacee25a14d79724ba21f1fde67f966b46e2128c68fed2e48c6e1e9822c5","19b3d0c212d241c237f79009b4cd0051e54971747fd89dc70a74f874d1192534","4d250e905299144850c6f8e74dad1ee892d847643bacf637e89adcce013f0700","5fca180ba7514e439b225ee5eb47e5cf9254a591095f93cf7ca298ce6264159b","ed3e176bc769725ebc1d93f1d6890fc3d977b9155ae5d03be96ec2d49b303370","7933769d84f5ae16546aef06537ca578f1c8d7cca0708452a00613050ac1f265","cc5c913c4716a0d1563b2a63a7c4dc2fa81b7d7bc58489c79896d69b27e978cd","f194cdeb1caaf80e625f4fad340a9434b2b83786028dcc5ea6f3c459cc7789a0","f8ce447bbda4f75da74cecd866cc1ff9bdde62189ac9d8dc14a16c48b3d702fa","236247fb33a56e1d43b097c000aaafcac8fea1e8bf38d1a64f13889b32c372d0","c7d30b164562b7ce99fcb53ab78f937cc845e003f6089d648351331921379994","fe2d1251f167d801a27f0dfb4e2c14f4f08bf2214d9784a1b8c310fdfdcdaaea","2a1182578228dc1faad14627859042d59ea5ab7e3ac69cb2a3453329aaaa3b83","dfa99386b9a1c1803eb20df3f6d3adc9e44effc84fa7c2ab6537ed1cb5cc8cfb","79b0d5635af72fb87a2a4b62334b0ab996ff7a1a14cfdb895702e74051917718","5f00b052713bfe8e9405df03a1bbe406006b30ec6b0c2ce57d207e70b48cf4e9","7abcae770f21794b5ffbc3186483c3dbcf8b0c8e37d3ef3ed6277ece5c5dd4be","3e642f39da9ad0a4cd16ccbd7f363b6b5ad5fa16a5c6d44753f98fc1e3be9d96","7f5a6eac3d3d334e2f2eba41f659e9618c06361958762869055e22219f341554","6f996f44113b76a9960d3fad280f4f671115c5e971356d1dbb4d1b000af8b3b3","67f2cd6e208e68fdfa366967d1949575df6ccf90c104fc9747b3f1bdb69ad55a","f99ab9dffe6281c9b6df9ae9d8584d18eabf2107572bbd8fa5c83c8afe531af8","4fc9939c86a7d80ab6a361264e5666336d37e080a00d831d9358ad83575267da","f4ba385eedea4d7be1feeeac05aaa05d6741d931251a85ab48e0610271d001ce","fc79932b9aa710f025b89bf8d8329d99080286e5e079a7d5a529236e9f5dd69e","6646d9075e3e0eedb02c9d03bffef54c8bbeb601d27eed46f143aba435bac37d","0dec72b4c5c4bb149750fef4fc26bdae8f410de941ee766c953f5ac77381d690","8f2644578a3273f43fd700803b89b842d2cd09c1fba2421db45737357e50f5b1","f5405fb679a467cb979f8744940b22b7bc3a0bcbe648c3910d98de3188d42a78","68969a0efd9030866f60c027aedbd600f66ea09e1c9290853cc24c2dcc92000f","639f94fe145a72ce520d3d7b9b3b6c9049624d90cbf85cff46fb47fb28d1d8fe","8327a51d574987a2b0f61ea40df4adddf959f67bc48c303d4b33d47ba3be114a","991fd5ebf9f30ffa17cae6faeae6a838d3d91bdcdd419bce358dc99b8e5b0ad0","51b4ab145645785c8ced29238192f870dbb98f1968a7c7ef2580cd40663b2940","589713fefe7282fd008a2672c5fbacc4a94f31138bae6a03db2c7b5453dc8788","786691c952fe3feac79aca8f0e7e580d95c19afc8a4c6f8765e99fb756d8d9d7","4c348f139d006057ce9384e60b4ee1ce06bee5c16e19ff70f293ad88d5893386","e9d33b2549b5779b6cad92cb6a370c6c106cc12dc80da1cc199e2cb3a715bf38","62b753ed351fba7e0f6b57103529ce90f2e11b949b8fc69c39464fe958535c25","21e1fa3e5c95c61161a1ea2d819972e3b7e916a58571f8f9828b8a6c32e641ea","abfee88c6ea2d6000b88d589004a260a07546c0f5743b74a8da87c69ca12017f","f99699abe83bfe68c0aa3aaf91bee6d4a917eba999b7e82e1d8bcd23c9af4ed6","53a296cb2f1036d813a8ae54b9c078653cda3d2f1aa3c6c5d23ea2a233b81981","37f9777cfd8fc41f20daa186b29f2f4b875d52157be892929c80b55c10d8cf89","845b98bae0b14d348bb65501feb713158f3e2d58f41d8fcc38a3413b9f11a993","998050e13e3daf9d22f6207163324002e83d40484232e3b5beb3f814c8a61d98","189150e785626242df43edde2e537ae48b8d8ba0c93e78c2478c9ce738a14cfe","b377fa259d15c6e3c0fc2804530f1c7448906df2b6afdf6ddeff61a75016cb28","a26bb2e2693f921f4aa3f6e8c04a18d07c6ab6c3162c426299e0d0a904d76d82","42e7c31cdce8294ad4852d465b2dd91307efecfd7a9889f2a0aa49ffca73e83b","7922bdca92b1a6f586e9403b2b7972200aae00f926a300e79bf2d62eb410714f","d3abaca0cd59f25b4e056681217d1f8674612071706e6825517ec9e264063e55","76a7145b39ac6cc3633e2ccb545e9db3e5a02c7e0bceddbb5abbd3b2e1fba32e","a3cf3aa8ec934a46e5d10922af944c14e1b73acb81c4ba90348bee40a829b26c","8f95f6784090939eb0cb0c648a03bce2208e595730afc14be4969d90b334b541","535b6a88c08e138b1b72003f482bceaca78311cd19836bdde0a80a131f457f43","cf72ba3ad6ed1f342e8ddbdbfdf425238cbc7a75cc7a318fa994cb3866a68804","f213a7dafb0a946c1134a64151cbb7f2301d23f93920356d730cf0ed767e9985","c305868de2a4ea029bd4b9593ebb33b602b54cdbb3a09231486f611a414d0f5f","cf42fcfc0f9e976054d921a0f5bf898f9127751cf5dd9f1b4820069fd78f2280","e35526a0977b9cd80f799aef3314cb2bfe66aeb40879c888f7a993bd3437fc42","81d92e5c4d618ba0660121ed30c603e8111ad605e7562948f7430d87038daee0","757f7967151a9b1f043aba090f09c1bdb0abe54f229efd3b7a656eb6da616bf4","2da74b28ea53cb34b516fd6dbda3ca93495648cf431e59d24ba3ab5d7ec59ba4","928ebc4436abadcd3680338883b7e26189beb7532ae4b3d1c1727598607e53fa","2ec607f96bdcd7dfc06b24bf5c05ff93c6859a0c0e77d9e1b098a20aa3c77fb1","7634eca84d60522b68ac679813fd9247a4260f7412890e924c7779758f8d6391","b4ff74f0589487410168be50e3231caf687c5e1302266709742382e8d004fe1e","406f227eebfe8be216d7a4b215ed09198b0c2f6599f2273b69ee5b75824c5435","a67d719563c9919592cc1acaa197b35deb92cc20801d33ba75214dd33988c49e","4f4dcc8af3798205431971473b0e6808e5415f5c3963d8aabc094808e0223880","8a90f97fdb10d83c6842a699c3df474246755f4fbf3ee2d35e69d6599fe9092c","88aacf6e2493633490812c70595b517c8e4299f054d28a51687b10f0968276c3","84a56bb3995633ffa667c5eb28a18be95572911ba9609b598cee69357aa6e666","21fab2a256a70911bc1fac0d7afe46cbca4a3b7ded92f0da89505d9f9a21b699","d037b771e89ef6dd81c71de92cc644d68b1b5d1ce25dbce9c2cfe407dd0b5796","e61062cf47b67f1a1968f7d150da3aea7b77a9fd5ebce90301c3e0180ca30ab4","b63519c0b5db6d56337c5245fa458b3d3017c204ca7be0c220a2fb967526ea79","6ee84215d79fb023f94eaa8bdfac1a8009f584da1bf9250d59d2517965055610","31ea3302aeafa0e67133aa9bb383d853d9aeb2b2a3b12a9ed9560596b0313b1f","d9c0e696b3b43dd0e6cbbe51f42dad1193df7be1035d4ab1f972c45ff41232e0","840703025c44ca3abde36a35cdede65d8c5ab6a4c6b06dccaeecf44a2fa06be2","cf6dc8f18bc5ee063dc1a37bccd3031dc0769f11622399018c375aacfcbda7c9","b2203ff075f24f24b31de677f806e9966bff89c655d24c15a9f47b914e1bcb99","dc3b172ee27054dbcedcf5007b78c256021db936f6313a9ce9a3ecbb503fd646","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","a2e86df4db576d80704e25293cec6f20fc6101a11f4747440e2eef58fb3c860c","a2e86df4db576d80704e25293cec6f20fc6101a11f4747440e2eef58fb3c860c","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","6704f0b54df85640baaeebd86c9d4a1dbb661d5a4d57a75bc84162f562f6531d","9d255af1b09c6697089d3c9bf438292a298d8b7a95c68793c9aae80afc9e5ca7",{"version":"c3bc5d095c3c22fd20b5a6550b9c9a6d56c3ffbb87ef057ccce7764b6bed4428","affectsGlobalScope":true},{"version":"63e2182615c513e89bb8a3e749d08f7c379e86490fcdbf6d35f2c14b3507a6e8","affectsGlobalScope":true},{"version":"f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71","affectsGlobalScope":true},"6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"bee89e1eb6425eb49894f3f25e4562dc2564e84e5aa7610b7e13d8ecddf8f5db","dca41e86e89dfb2e85e6935260250f02eb6683b86c2fa16bec729ddd1bcd9b4b","6670e71d65610bd7b64aac5fdf58c21c545f7fa31e060f02a0dcd91763831eb8","e050a0afcdbb269720a900c85076d18e0c1ab73e580202a2bf6964978181222a","6de408de17cb0e3fa3a5e3d0f79bd104848d98dbfa72e92fddfa1a4aa3d8393c","bf88ef4208a770ca39a844b182b3695df536326ea566893fdc5b8418702a331e","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","6c1e688f95fcaf53b1e41c0fdadf2c1cfc96fa924eaf7f9fdb60f96deb0a4986","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","6d969939c4a63f70f2aa49e88da6f64b655c8e6799612807bef41ccff6ea0da9",{"version":"46894b2a21a60f8449ca6b2b7223b7179bba846a61b1434bed77b34b2902c306","affectsGlobalScope":true},"ba600bf38b5c1a5dffa1b99dd7a783549082bbba3b4fe9497eaaf5e4c1764b20","ae8cd6af37275eac75f5369cdb5f01063bcf1f48d74cb434303ee50ec446acfe","2518830a2fda9c272ba48798d0e7b857037443b06594db8e42c87e86944ee9e4","95c1cf650d16b197525b5bfdf8dd7abba0a49d99ddb12a4ba66466a8a6903e49","1fe0aabe758d56ad72495d6e6c7b6ae75619faaeaaf03f0ddf1948eea4cfac84","bbc57966c8c48ee78fd58aadb893784025be056ae538ae22d1e83c502a987e68","5e5d6f6697e378b0660b567866bf67d099d0ea754f8810c0dabe737805f5cf03","99ab49d4732fdc98cf5c495925e65e796544cb4086fe42afc235dfc02bcf2351","af8339d509c40da075088e544c28ed37b519876e5c4d36a48644ebfb3c6ae6c8","d393adc32e520d4274bb4c3dfdcdb342b806a230b66ef0f82b35bffbc4aa2590","c26af7eaedb4f710984634e419ab15e54e5bb99a0b3cae71188c2fff572276de","38b58ef018d0aeee42ef74c42978bb5805503233fdeeb82cd2aed2199fb0d013","3b6040253231d44e6778eb6861cc86c1758562e77783d21b7ecbc73322ded539","cc256fd958b33576ed32c7338c64adb0d08fc0c2c6525010202fab83f32745da","fd0589ca571ad090b531d8c095e26caa53d4825c64d3ff2b2b1ab95d72294175",{"version":"669843ecafb89ae1e944df06360e8966219e4c1c34c0d28aa2503272cdd444a7","affectsGlobalScope":true},"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","19c816167e076e7c24f074389c6cf3ed87bdbb917d1ea439ca281f9d26db2439","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","98f9d826db9cd99d27a01a59ee5f22863df00ccf1aaf43e1d7db80ebf716f7c3","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","dcd91d3b697cb650b95db5471189b99815af5db2a1cd28760f91e0b12ede8ed5","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3cf0d343c2276842a5b617f22ba82af6322c7cfe8bb52238ffc0c491a3c21019","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","30abc554c7ad13063a02ddd06757929b34357aea1f6fcf4ca39114cb0fc19384","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","d88a5e779faf033be3d52142a04fbe1cb96009868e3bbdd296b2bc6c59e06c0e","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","b9f96255e1048ed2ea33ec553122716f0e57fc1c3ad778e9aa15f5b46547bd23","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","a1a261624efb3a00ff346b13580f70f3463b8cdcc58b60f5793ff11785d52cab","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","f875e913ef24873eb2a469605402595f1c783070b52a98e53686b32c0f827f7f","bc81aff061c53a7140270555f4b22da4ecfe8601e8027cf5aa175fbdc7927c31","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","e9eb1b173aa166892f3eddab182e49cfe59aa2e14d33aedb6b49d175ed6a3750"],"options":{"downlevelIteration":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"jsx":2,"module":99,"noEmitHelpers":false,"noFallthroughCasesInSwitch":true,"outDir":"./dist-es","preserveConstEnums":true,"removeComments":true,"rootDir":"./src","strict":true,"target":7,"useUnknownInCatchVariables":false},"fileIdsList":[[139],[197,200,207,208,209,210,211],[139,194],[194,195,196],[198,199],[139,149],[202,203,204],[201,205,206],[139,157,158],[159,160],[157,158,161,162,163],[139,145],[142],[143],[139,140,141],[140,141,142,144,145,146,147,148],[213,214,215,216,217,218,219],[139,155],[139,164],[151],[139,172,173],[174],[139,150,151,156,165,166,167,168,169,170,171,175,176,177,178,179,180,181,182,183,184,185,186],[37,44,45,46],[44,47],[37,41],[37,47],[35,36,45,46,47,48],[79,93,95],[97],[42,43,44,99],[42,44],[101,103,104],[101,102],[106],[35],[38,108],[108],[111],[108,109,110],[108,109,110,111,112],[39],[41,42,44],[97,98],[114],[114,118],[114,115,118,119],[43,117],[94],[34,40],[65,67,93],[37],[37,122,123,124],[34,38,39,40,41,42,43,44,49,96,97,98,99,100,102,105,106,107,113,116,117,120,121,125,126,127,128,129,130,131,132,133,134,136,137,138],[35,38,39,43],[100],[116],[41,43,102],[41,42],[41,106],[43,97,98],[65,79,93,95,128],[42,99,133,134],[41,65,66,93,100,128,132,134,135],[41],[34],[79,93,139],[152,153,154],[79,139],[233,234,236,239,241],[233],[233,236],[243],[65,93],[248,250],[247,248,249],[63,93],[254],[255],[261,264],[259],[52,93,257,263],[261],[258,262],[260],[62,88,93,278,279,281],[280],[283,285,286,287,288,289,290,291,292,293,294,295],[283,284,286,287,288,289,290,291,292,293,294,295],[284,285,286,287,288,289,290,291,292,293,294,295],[283,284,285,287,288,289,290,291,292,293,294,295],[283,284,285,286,288,289,290,291,292,293,294,295],[283,284,285,286,287,289,290,291,292,293,294,295],[283,284,285,286,287,288,290,291,292,293,294,295],[283,284,285,286,287,288,289,291,292,293,294,295],[283,284,285,286,287,288,289,290,292,293,294,295],[283,284,285,286,287,288,289,290,291,293,294,295],[283,284,285,286,287,288,289,290,291,292,294,295],[283,284,285,286,287,288,289,290,291,292,293,295],[283,284,285,286,287,288,289,290,291,292,293,294],[50],[52],[53,58],[54,62,63,70,79],[54,55,62,70],[56,86],[57,58,63,71],[58,79],[59,60,62,70],[60],[61,62],[62],[62,63,64,79,85],[63,64],[62,65,70,79,85],[62,63,65,66,70,79,82,85],[65,67,79,82,85],[50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92],[62,68],[69,85],[60,62,70,79],[71],[72],[52,73],[74,84],[75],[76],[62,77],[77,78,86,88],[62,79],[80],[81],[70,79,82],[83],[70,84],[65,76,85],[86],[79,87],[88],[89],[62,64,79,85,88,90],[79,91],[301,340],[301,325,340],[340],[301],[301,326,340],[301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339],[326,340],[62,65,67,70,79,82,85,91,93],[344],[267],[266,267],[266],[266,267,268,270,271,274,275,276,277],[267,271],[266,267,268,270,271,272,273],[266,271],[271,275],[267,268,269],[268],[266,267,271],[31],[31,32],[31,139,149,187,192],[31,193,221],[31,139,212,220],[31,222],[31,149],[31,190],[31,188,189,191],[31,189],[31,33,223,230],[31,139,187],[31,224,225,227,229],[31,187],[31,139,226],[31,139,187,226,228]],"referencedMap":[[208,1],[212,2],[195,3],[196,3],[194,1],[197,4],[199,1],[198,1],[200,5],[209,1],[211,1],[210,6],[201,1],[202,6],[203,6],[205,7],[204,1],[207,8],[206,1],[159,9],[161,10],[160,1],[162,9],[163,9],[164,11],[157,1],[145,1],[146,12],[143,13],[144,14],[142,15],[140,1],[141,1],[149,16],[148,1],[213,1],[219,1],[214,1],[215,1],[216,1],[220,17],[217,1],[218,1],[150,1],[151,1],[156,18],[165,19],[167,20],[176,1],[172,1],[174,21],[175,22],[173,1],[187,23],[47,24],[48,25],[45,26],[46,27],[49,28],[96,29],[98,30],[100,31],[99,32],[105,33],[103,34],[107,35],[38,36],[109,37],[110,38],[112,39],[111,40],[113,41],[108,42],[106,43],[114,44],[115,45],[119,46],[120,47],[118,48],[95,49],[41,50],[121,51],[122,52],[123,52],[125,53],[124,52],[139,54],[44,55],[126,56],[117,57],[128,58],[116,59],[129,60],[130,61],[131,29],[132,29],[133,62],[135,63],[136,64],[137,56],[40,65],[43,43],[138,66],[153,67],[155,68],[154,69],[242,70],[236,71],[234,71],[239,72],[237,71],[241,71],[244,73],[245,73],[246,74],[251,75],[250,76],[252,77],[253,77],[255,78],[256,79],[265,80],[260,81],[264,82],[262,83],[263,84],[261,85],[280,86],[281,87],[284,88],[285,89],[283,90],[286,91],[287,92],[288,93],[289,94],[290,95],[291,96],[292,97],[293,98],[294,99],[295,100],[50,101],[52,102],[53,103],[54,104],[55,105],[56,106],[57,107],[58,108],[59,109],[60,110],[61,111],[62,112],[63,113],[64,114],[65,115],[66,116],[67,117],[93,118],[68,119],[69,120],[70,121],[71,122],[72,123],[73,124],[74,125],[75,126],[76,127],[77,128],[78,129],[79,130],[80,131],[81,132],[82,133],[83,134],[84,135],[85,136],[86,137],[87,138],[88,139],[89,140],[90,141],[91,142],[325,143],[326,144],[301,145],[304,145],[323,143],[324,143],[314,143],[313,146],[311,143],[306,143],[319,143],[317,143],[321,143],[305,143],[318,143],[322,143],[307,143],[308,143],[320,143],[302,143],[309,143],[310,143],[312,143],[316,143],[327,147],[315,143],[303,143],[340,148],[334,147],[336,149],[335,147],[328,147],[329,147],[331,147],[333,147],[337,149],[338,149],[330,149],[332,149],[343,150],[345,151],[268,152],[277,153],[267,154],[278,155],[273,156],[274,157],[272,158],[276,159],[270,160],[269,161],[275,162],[271,153],[32,163],[33,164],[193,165],[222,166],[221,167],[223,168],[188,169],[189,163],[191,170],[192,171],[190,172],[231,173],[224,163],[226,174],[230,175],[225,176],[227,177],[229,178]],"exportedModulesMap":[[208,1],[212,2],[195,3],[196,3],[194,1],[197,4],[199,1],[198,1],[200,5],[209,1],[211,1],[210,6],[201,1],[202,6],[203,6],[205,7],[204,1],[207,8],[206,1],[159,9],[161,10],[160,1],[162,9],[163,9],[164,11],[157,1],[145,1],[146,12],[143,13],[144,14],[142,15],[140,1],[141,1],[149,16],[148,1],[213,1],[219,1],[214,1],[215,1],[216,1],[220,17],[217,1],[218,1],[150,1],[151,1],[156,18],[165,19],[167,20],[176,1],[172,1],[174,21],[175,22],[173,1],[187,23],[47,24],[48,25],[45,26],[46,27],[49,28],[96,29],[98,30],[100,31],[99,32],[105,33],[103,34],[107,35],[38,36],[109,37],[110,38],[112,39],[111,40],[113,41],[108,42],[106,43],[114,44],[115,45],[119,46],[120,47],[118,48],[95,49],[41,50],[121,51],[122,52],[123,52],[125,53],[124,52],[139,54],[44,55],[126,56],[117,57],[128,58],[116,59],[129,60],[130,61],[131,29],[132,29],[133,62],[135,63],[136,64],[137,56],[40,65],[43,43],[138,66],[153,67],[155,68],[154,69],[242,70],[236,71],[234,71],[239,72],[237,71],[241,71],[244,73],[245,73],[246,74],[251,75],[250,76],[252,77],[253,77],[255,78],[256,79],[265,80],[260,81],[264,82],[262,83],[263,84],[261,85],[280,86],[281,87],[284,88],[285,89],[283,90],[286,91],[287,92],[288,93],[289,94],[290,95],[291,96],[292,97],[293,98],[294,99],[295,100],[50,101],[52,102],[53,103],[54,104],[55,105],[56,106],[57,107],[58,108],[59,109],[60,110],[61,111],[62,112],[63,113],[64,114],[65,115],[66,116],[67,117],[93,118],[68,119],[69,120],[70,121],[71,122],[72,123],[73,124],[74,125],[75,126],[76,127],[77,128],[78,129],[79,130],[80,131],[81,132],[82,133],[83,134],[84,135],[85,136],[86,137],[87,138],[88,139],[89,140],[90,141],[91,142],[325,143],[326,144],[301,145],[304,145],[323,143],[324,143],[314,143],[313,146],[311,143],[306,143],[319,143],[317,143],[321,143],[305,143],[318,143],[322,143],[307,143],[308,143],[320,143],[302,143],[309,143],[310,143],[312,143],[316,143],[327,147],[315,143],[303,143],[340,148],[334,147],[336,149],[335,147],[328,147],[329,147],[331,147],[333,147],[337,149],[338,149],[330,149],[332,149],[343,150],[345,151],[268,152],[277,153],[267,154],[278,155],[273,156],[274,157],[272,158],[276,159],[270,160],[269,161],[275,162],[271,153],[32,163],[33,164],[193,165],[222,166],[221,167],[223,168],[188,169],[189,163],[191,170],[192,171],[190,172],[231,173],[224,163],[226,174],[230,175],[225,176],[227,177],[229,178]],"semanticDiagnosticsPerFile":[259,208,212,195,196,194,197,199,198,200,209,211,210,201,202,203,205,204,207,206,159,161,160,162,163,164,157,158,145,146,143,144,142,140,141,149,147,148,213,219,214,215,216,220,217,218,150,151,156,165,166,167,168,169,170,171,176,177,172,174,175,173,178,179,187,180,181,182,183,184,185,186,34,36,47,48,45,46,35,49,96,98,100,99,101,105,103,104,97,107,38,109,110,112,111,113,108,106,114,115,119,120,118,95,41,121,122,123,37,125,124,139,39,44,126,127,42,117,128,116,129,130,131,132,133,102,135,136,94,137,134,40,43,138,152,153,155,154,232,242,236,235,234,233,239,237,238,241,240,244,245,243,246,251,247,250,248,252,253,254,255,256,265,257,260,264,262,263,261,280,281,249,282,284,285,283,286,287,288,289,290,291,292,293,294,295,296,297,50,52,53,54,55,56,57,58,59,60,61,62,63,64,51,92,65,66,67,93,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,298,299,300,325,326,301,304,323,324,314,313,311,306,319,317,321,305,318,322,307,308,320,302,309,310,312,316,327,315,303,340,339,334,336,335,328,329,331,333,337,338,330,332,341,279,342,343,344,345,258,228,268,277,266,267,278,273,274,272,276,270,269,275,271,31,6,7,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,29,1,30,32,33,193,222,221,223,188,189,191,192,190,231,224,226,230,225,227,229]},"version":"4.9.5"} \ No newline at end of file diff --git a/node_modules/@aws-sdk/core/tsconfig.types.json b/node_modules/@aws-sdk/core/tsconfig.types.json new file mode 100644 index 0000000..6cdf9f5 --- /dev/null +++ b/node_modules/@aws-sdk/core/tsconfig.types.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "declarationDir": "dist-types", + "rootDir": "src" + }, + "extends": "../../tsconfig.types.json", + "include": ["src/"] +} diff --git a/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo b/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo new file mode 100644 index 0000000..3a1c6dd --- /dev/null +++ b/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./src/client/emitWarningIfUnsupportedVersion.ts","./src/client/index.ts","../../node_modules/@smithy/types/dist-types/abort.d.ts","../../node_modules/@smithy/types/dist-types/auth/auth.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts","../../node_modules/@smithy/types/dist-types/identity/identity.d.ts","../../node_modules/@smithy/types/dist-types/endpoint.d.ts","../../node_modules/@smithy/types/dist-types/logger.d.ts","../../node_modules/@smithy/types/dist-types/uri.d.ts","../../node_modules/@smithy/types/dist-types/http.d.ts","../../node_modules/@smithy/types/dist-types/response.d.ts","../../node_modules/@smithy/types/dist-types/util.d.ts","../../node_modules/@smithy/types/dist-types/middleware.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts","../../node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts","../../node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts","../../node_modules/@smithy/types/dist-types/auth/index.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@smithy/types/dist-types/transform/exact.d.ts","../../node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts","../../node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts","../../node_modules/@smithy/types/dist-types/crypto.d.ts","../../node_modules/@smithy/types/dist-types/checksum.d.ts","../../node_modules/@smithy/types/dist-types/command.d.ts","../../node_modules/@smithy/types/dist-types/client.d.ts","../../node_modules/@smithy/types/dist-types/connection/config.d.ts","../../node_modules/@smithy/types/dist-types/transfer.d.ts","../../node_modules/@smithy/types/dist-types/connection/manager.d.ts","../../node_modules/@smithy/types/dist-types/connection/pool.d.ts","../../node_modules/@smithy/types/dist-types/connection/index.d.ts","../../node_modules/@smithy/types/dist-types/eventStream.d.ts","../../node_modules/@smithy/types/dist-types/encode.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/shared.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts","../../node_modules/@smithy/types/dist-types/endpoints/index.d.ts","../../node_modules/@smithy/types/dist-types/extensions/checksum.d.ts","../../node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts","../../node_modules/@smithy/types/dist-types/shapes.d.ts","../../node_modules/@smithy/types/dist-types/retry.d.ts","../../node_modules/@smithy/types/dist-types/extensions/retry.d.ts","../../node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts","../../node_modules/@smithy/types/dist-types/extensions/index.d.ts","../../node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts","../../node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts","../../node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts","../../node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts","../../node_modules/@smithy/types/dist-types/identity/index.d.ts","../../node_modules/@smithy/types/dist-types/pagination.d.ts","../../node_modules/@smithy/types/dist-types/profile.d.ts","../../node_modules/@smithy/types/dist-types/serde.d.ts","../../node_modules/@smithy/types/dist-types/signature.d.ts","../../node_modules/@smithy/types/dist-types/stream.d.ts","../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts","../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts","../../node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts","../../node_modules/@smithy/types/dist-types/transform/type-transform.d.ts","../../node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts","../../node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts","../../node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts","../../node_modules/@smithy/types/dist-types/waiter.d.ts","../../node_modules/@smithy/types/dist-types/index.d.ts","../../node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts","../../node_modules/@smithy/protocol-http/dist-types/httpResponse.d.ts","../../node_modules/@smithy/protocol-http/dist-types/httpHandler.d.ts","../../node_modules/@smithy/protocol-http/dist-types/extensions/httpExtensionConfiguration.d.ts","../../node_modules/@smithy/protocol-http/dist-types/extensions/index.d.ts","../../node_modules/@smithy/protocol-http/dist-types/Field.d.ts","../../node_modules/@smithy/protocol-http/dist-types/Fields.d.ts","../../node_modules/@smithy/protocol-http/dist-types/isValidHostname.d.ts","../../node_modules/@smithy/protocol-http/dist-types/types.d.ts","../../node_modules/@smithy/protocol-http/dist-types/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/NoOpLogger.d.ts","../../node_modules/@smithy/smithy-client/dist-types/client.d.ts","../../node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts","../../node_modules/@smithy/util-stream/dist-types/getAwsChunkedEncodingStream.d.ts","../../node_modules/@smithy/util-stream/dist-types/sdk-stream-mixin.d.ts","../../node_modules/@smithy/util-stream/dist-types/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/collect-stream-body.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/resolveEndpointConfig.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/types.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromInstructions.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/adaptors/index.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/endpointMiddleware.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/getEndpointPlugin.d.ts","../../node_modules/@smithy/middleware-endpoint/dist-types/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/command.d.ts","../../node_modules/@smithy/smithy-client/dist-types/constants.d.ts","../../node_modules/@smithy/smithy-client/dist-types/create-aggregated-client.d.ts","../../node_modules/@smithy/smithy-client/dist-types/date-utils.d.ts","../../node_modules/@smithy/smithy-client/dist-types/default-error-handler.d.ts","../../node_modules/@smithy/smithy-client/dist-types/defaults-mode.d.ts","../../node_modules/@smithy/smithy-client/dist-types/emitWarningIfUnsupportedVersion.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/checksum.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/retry.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/defaultExtensionConfiguration.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extensions/index.d.ts","../../node_modules/@smithy/smithy-client/dist-types/exceptions.d.ts","../../node_modules/@smithy/smithy-client/dist-types/extended-encode-uri-component.d.ts","../../node_modules/@smithy/smithy-client/dist-types/get-array-if-single-item.d.ts","../../node_modules/@smithy/smithy-client/dist-types/get-value-from-text-node.d.ts","../../node_modules/@smithy/smithy-client/dist-types/lazy-json.d.ts","../../node_modules/@smithy/smithy-client/dist-types/object-mapping.d.ts","../../node_modules/@smithy/smithy-client/dist-types/parse-utils.d.ts","../../node_modules/@smithy/smithy-client/dist-types/resolve-path.d.ts","../../node_modules/@smithy/smithy-client/dist-types/ser-utils.d.ts","../../node_modules/@smithy/smithy-client/dist-types/serde-json.d.ts","../../node_modules/@smithy/smithy-client/dist-types/split-every.d.ts","../../node_modules/@smithy/smithy-client/dist-types/index.d.ts","./src/httpAuthSchemes/utils/getDateHeader.ts","./src/httpAuthSchemes/utils/getSkewCorrectedDate.ts","./src/httpAuthSchemes/utils/isClockSkewed.ts","./src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts","./src/httpAuthSchemes/utils/index.ts","./src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/index.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-signing/httpSigningMiddleware.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-signing/getHttpSigningMiddleware.d.ts","../../node_modules/@smithy/core/dist-types/middleware-http-signing/index.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/index.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts","../../node_modules/@smithy/core/dist-types/util-identity-and-auth/index.d.ts","../../node_modules/@smithy/core/dist-types/getSmithyContext.d.ts","../../node_modules/@smithy/core/dist-types/normalizeProvider.d.ts","../../node_modules/@smithy/core/dist-types/protocols/requestBuilder.d.ts","../../node_modules/@smithy/core/dist-types/pagination/createPaginator.d.ts","../../node_modules/@smithy/core/dist-types/index.d.ts","../../node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts","../../node_modules/@smithy/signature-v4/dist-types/getCanonicalHeaders.d.ts","../../node_modules/@smithy/signature-v4/dist-types/getCanonicalQuery.d.ts","../../node_modules/@smithy/signature-v4/dist-types/getPayloadHash.d.ts","../../node_modules/@smithy/signature-v4/dist-types/moveHeadersToQuery.d.ts","../../node_modules/@smithy/signature-v4/dist-types/prepareRequest.d.ts","../../node_modules/@smithy/signature-v4/dist-types/credentialDerivation.d.ts","../../node_modules/@smithy/signature-v4/dist-types/index.d.ts","./src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts","./src/httpAuthSchemes/aws_sdk/index.ts","./src/httpAuthSchemes/index.ts","./src/protocols/coercing-serializers.ts","./src/protocols/json/awsExpectUnion.ts","./src/protocols/common.ts","./src/protocols/json/parseJsonBody.ts","../../node_modules/fast-xml-parser/src/fxp.d.ts","./src/protocols/xml/parseXmlBody.ts","./src/protocols/index.ts","./src/index.ts","../../node_modules/@types/argparse/index.d.ts","../../node_modules/@types/babel__generator/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/chai-as-promised/index.d.ts","../../node_modules/@types/chai-subset/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@types/jest/node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@types/jest/node_modules/@jest/schemas/build/index.d.ts","../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../node_modules/@types/jest/node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/@types/jest/node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/parse5/dist/common/html.d.ts","../../node_modules/parse5/dist/common/token.d.ts","../../node_modules/parse5/dist/common/error-codes.d.ts","../../node_modules/parse5/dist/tokenizer/preprocessor.d.ts","../../node_modules/parse5/dist/tokenizer/index.d.ts","../../node_modules/parse5/dist/tree-adapters/interface.d.ts","../../node_modules/parse5/dist/parser/open-element-stack.d.ts","../../node_modules/parse5/dist/parser/formatting-element-list.d.ts","../../node_modules/parse5/dist/parser/index.d.ts","../../node_modules/parse5/dist/tree-adapters/default.d.ts","../../node_modules/parse5/dist/serializer/index.d.ts","../../node_modules/parse5/dist/common/foreign-content.d.ts","../../node_modules/parse5/dist/index.d.ts","../../node_modules/@types/tough-cookie/index.d.ts","../../node_modules/@types/jsdom/base.d.ts","../../node_modules/@types/jsdom/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/prettier/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"8c7a59a58fb16c668f3a836ecb58afd0d8764478e1c3744870c0c039f286dd91","signature":"02ec1ffcc0823cb9c9ba420c619d3af2c726e3a674b66a91941c07a3e7f65dba"},"38f6da5b6f318c33e18dd7c983cab3fe52f510c9a2573948fb13f012e01b1ba6","c55ae709f94155174ff63647edd2a7e3acbd02a2909aa2541569e8b8bac9fc40","530e5c7e4f74267b7800f1702cf0c576282296a960acbdb2960389b2b1d0875b","1c483cc60a58a0d4c9a068bdaa8d95933263e6017fbea33c9f99790cf870f0a8","07863eea4f350458f803714350e43947f7f73d1d67a9ddf747017065d36b073a","d5f1bbd44ba4f63d8a01fff5e1edc1c1fb50e9caa48a4fa48298a4485d6ff75c","4d2b263907b8c03c5b2df90e6c1f166e9da85bd87bf439683f150afc91fce7e7","c70e38e0f30b7c0542af9aa7e0324a23dd2b0c1a64e078296653d1d3b36fa248","d12680e217215b37094868d491d00196e80f270ce47e5a4bc50269945ae5554d","396c2c14fa408707235d761a965bd84ce3d4fc3117c3b9f1404d6987d98a30d6","b7b881ced4ed4dee13d6e0ccdb2296f66663ba6b1419767271090b3ff3478bb9","06289b9873760aac77aed4035ea6c60b1e0879b8afe47a4530bc8522b9b804b1","63c36aa73242aa745fae813c40585111ead225394b0a0ba985c2683baa6b0ef9","3e7ffc7dd797e5d44d387d0892bc288480493e73dcab9832812907d1389e4a98","db011ec9589fd51995cbd0765673838e38e6485a6559163cc53dcf508b480909","e1a4253f0cca15c14516f52a2ad36c3520b140b5dfb3b3880a368cd75d45d6d9","159af954f2633a12fdee68605009e7e5b150dbeb6d70c46672fd41059c154d53","4c2c4f53e8eedd970f8afa369d7371544fb6231bf95e659f8602e09abe74d5a5",{"version":"cb5a780979155e80a2184eb987cc411a95c9a1686019ade06918c312a0b7c9b2","affectsGlobalScope":true},"c2b5085f47e41d6940bbc5b0d3bd7cc0037c752efb18aecd243c9cf83ad0c0b7","3143a5add0467b83150961ecd33773b561a1207aec727002aa1d70333068eb1b","f87191b7fafe7a0edad375710d99f900e49cef560b66bf309cf3f8e1b7177126","586af7d2abe2f9d59c5e757c370087d6c6baea81b033250f43b8df808d6dfb33",{"version":"1a048ff164b8d9609f5de3139d4e37f6e8a82af82087ac414b9208f52ef8aac7","affectsGlobalScope":true},"3111079f3cb5f2b9c812ca3f46161562bce5bfb355e915f46ed46c41714dc1c3","e7bee4a6d9bb78afa390b25e0ce97a2f94787a1eb17f0a16e732dcbebba3f3ee","b32b6b16cb0bda68199582ad6f22242d07ee75fac9b1f28a98cd838afc5eea45","4441ee4119824bfaebc49308559edd7545978f9cb41a40f115074e1031dde75f",{"version":"60693a88462d0e97900123b5bf7c73e146ce0cc94da46a61fe6775b430d2ff05","affectsGlobalScope":true},{"version":"588c69eda58b9202676ec7ca11a72c3762819b46a0ed72462c769846153c447c","affectsGlobalScope":true},"ae064ed4f855716b7ff348639ddcd6a6d354a72fae82f506608a7dc9266aa24c","92f019c55b21c939616f6a48f678e714ac7b109444cbbf23ad69310ce66ecbdc","bba259efdf9ab95e0c7d3cc8e99250f56bb6b31d6129efdf733ca4eb1d01feea","499b7544062cf44fab253daeaea8ba28877d9e7ff4149246b1f0154d1c9ed535","139fd681eff7771a38d0c025d13c7a11c5474f6aab61e01c41511d71496df173","f614c3f61e46ccc2cb58702d5a158338ea57ee09099fde5db4cfc63ed0ce4d74","44e42ed6ec9c4451ebe89524e80ac8564e9dd0988c56e6c58f393c810730595d","a504c109b872b0e653549bd258eb06584c148c98d79406c7516995865a6d5089","155865f5f76db0996cd5e20cc5760613ea170ee5ad594c1f3d76fcaa05382161","e92852d673c836fc64e10c38640abcd67c463456e5df55723ac699b8e6ab3a8a","4455c78d226d061b1203c7614c6c6eb5f4f9db5f00d44ff47d0112de8766fbc4",{"version":"ec369bb9d97c4dc09dd2a4093b7ca3ba69ad284831fccac8a1977785e9e38ce5","affectsGlobalScope":true},"4465a636f5f6e9665a90e30691862c9e0a3ac2edc0e66296704f10865e924f2a","9af781f03d44f5635ed7844be0ce370d9d595d4b4ec67cad88f0fac03255257e","f9fd4c3ef6de27fa0e256f4e75b61711c4be05a3399f7714621d3edc832e36b0","e49290b7a927995c0d7e6b2b9c8296284b68a9036d9966531de65185269258d7","aa95cc73ea5315e4f6fc8c6db43d49e3b7de3780cae20a4f1319032809013038","874ca809b79276460011480a2829f4c8d4db29416dd411f71efbf8f497f0ac09","6c903bceaf3f3bc04f2d4c7dcd89ce9fb148b3ba0a5f5408d8f6de2b7eecc7ea","504d049d9e550a65466b73ca39da6469ab41786074ea1d16d37c8853f9f6ab2e","23a28f834a078986bbf58f4e3705956983ff81c3c2493f3db3e5f0e8a9507779","4febdf7f3ec92706c58e0b4e8159cd6de718284ef384260b07c9641c13fc70ce",{"version":"bf241ed073916ec9e21a3c138936edd444b6787d874844c0d05fc00a8f109d19","affectsGlobalScope":true},"7335933d9f30dcfd2c4b6080a8b78e81912a7fcefb1dafccb67ca4cb4b3ac23d","a6bfe9de9adef749010c118104b071d14943802ff0614732b47ce4f1c3e383cd","4c3d0e10396646db4a1e917fb852077ee77ae62e512913bef9cccc2bb0f8bd0e","3b220849d58140dcc6718f5b52dcd29fdb79c45bc28f561cbd29eb1cac6cce13","0ee22fce41f7417a24c808d266e91b850629113c104713a35854393d55994beb","22d1b1d965baba05766613e2e6c753bb005d4386c448cafd72c309ba689e8c24",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"c6c0bd221bb1e94768e94218f8298e47633495529d60cae7d8da9374247a1cf5","a1b36a1f91a54daf2e89e12b834fa41fb7338bc044d1f08a80817efc93c99ee5","8bb4a5b632dd5a868f3271750895cb61b0e20cff82032d87e89288faee8dd6e2","0c1aabfd9fb1818afb2e798f91f669edafce59cd7e3423d25b1cfccfaaf2c403","017de6fdabea79015d493bf71e56cbbff092525253c1d76003b3d58280cd82a0","ab9ea2596cb7800bd79d1526930c785606ec4f439c275adbca5adc1ddf87747d","aee8faa433dde04beedb779b3329456a286a966462d666c138c19113ce78c79e","d620ec36bfc6f8ed6fdecbe036d55cec81637f32fd34dc7bb7e60eba1764e910","4e693235d606287d6b5a4e7d572f190862b93ea4a28df8a63fc328aa8becdc9d","e58d1ea2fc84c9c03742b4f56449b7d4602c8c4deb4f0e57c619bab35bbbbf81","d82bc1f8fe8eef55aa741373da68b80a8503228c9aa0ec46bdd38fd7e0c02a18","d7c7f8a461326507d90d0888efff0c4011a5e69eb08ccb990232aa22334e4dd6","5af5ebe8c9b84f667cd047cfcf1942d53e3b369dbd63fbea2a189bbf381146c6","27deb39ac0921db739b503407dc9aa93a546b015c06738bc8b66bdf0ae593c7c","eff5b8bdfe94c0a174484a6de01e802fb66f99f8737a20e4fba4df05c2f24cea","52fa3a4f47e30ef266dbda3b69821fe5811be4faad2b266586090d8b4806342e","5cb6f9ea4a097094fe624c3513111292690e39e83167a412f8912807be71ca65","fa461c83b2adc6b33997a95335d19723bddd4d7aaff41cac6f9f817e3c3ae730","d9eed4a308aeb32babee0600d21c3a3ba8452c89e8a4916e5460b45da147c33c","fc9bdd9b3d8fb59c913cb3b8dea0d79b38dfe9331ef07e1c6dc6bf363f061ad6","e647d13de80e1b6b4e1d94363ea6f5f8f77dfb95d562748b488a7248af25aabf","0c3c4ce6a1884610c99306719f59174d81808c69393c30119f9c2aef0449a2cb","219a25474e58a8161b242776856ec5f6960839b63e74809445e51cadbfc18096","5a0d1534e9493ae44b08b3055172da38370e2afd2bc3d4bea11f7be78344036f","6309a45fc3c03d3c4d56228e995d51974f53009a842374695b34f3607877e5a3","bef94eba81ae2c09059c0d9abdb1ae1b7090314f70550f3c8cd5d7ead4a4f212","48b787ad458be9b524fa5fdfef34f68798074132d4b8cfe6a6fe9c2bf334c532","37280465f8f9b2ea21d490979952b18b7f4d1f0d8fab2d627618fb2cfa1828e3","7281550c523596fd0fd36c6e19aa89075dac93144437ce48490da319b1f4d318","3f3f85dc43cb93c5a797f1ff0fa948d0e17843a443ae11a20cc032ccdf1b9997","020507cb67b96b0830a8636db03ae004181eee323ba33565cfe8d45aaedc4d1d","869010bc679df668137cb3b78a3cb8196e97acf285208a57f6156ceac894a2f7","bcae62618c23047e36d373f0feac5b13f09689e4cd08e788af13271dbe73a139","29a99d2e57b3e08a997cbc2397bdb251441a545306a74b95ffedc5f03d9bc6b7","5ae003688265a1547bbcb344bf0e26cb994149ac2c032756718e9039302dfac8","09e811cc1088d9ea3a7ddd7290f6a13767f56c85daf8c3374a06a45a08d55647","9da2c58a27fdce871c2eac09d5172b04248bb86ada9b0d10e8b3dfa8470b8dd3","5c317403752871838140f70879b09509e37422e92e7364b4363c7b179310ee44","7b270dc53f35dd0b44bfa619ad4d351fffd512e14053c3688323ed007eda3f6d","6d4e928f232ade7221cffc6e4332ec935baa176415c9bf5d12111bb883a247d2","e86ad029224d4f2af3e188be8b5e9badf8c7083247572069bac7bd2193131fc7","057cac07c7bc5abdcfba44325fcea4906dff7919a3d7d82d4ec40f8b4c90cf2f","38aa389acf91d77db5a4f8e26e713ed53dc832ed5573def9cd20acd9ba97c1fe","e56784be93954f1f86d4dd3ac61b4c9727e75864baf123a1b584b970baed4ba0","f878779620c5178d45413b33c214419bb3df2945e703c35e1191188321e3633d","b9115605f72b65a662723020b2a1eb696c375a5803d6b401dc01fcbfe49ece90","151659e152d71986b8943b9943cd7fbe27a65874655081602de7ea24a0f66e9b","79cbed8c779049fdbdd856f1597f2e79be137b6ed44e66ead16ee8bf035d17da","1a8e6a4f31a5196144f35d0434e16369881d828c849d6a1c9290b6bde8807449","42a9ac86df0fa58634ea8a5f7f07b9b9c3243d82e306fb22d8a41639935a6c87","5766c26941ae00aa889335bcccc1ecb28271b774be92aede801354c9797074bb","3a19286bcc9303c9352c03d68bb4b63cecbf5c9b7848465847bb6c9ceafa1484","c573fef34c2e5cc5269fd9c95fe73a1eb9db17142f5d8f36ffe4a686378b8660","d97e30dd93590392fed422f2b27325d10ab007d034faaaf61e28e9ddc9d3825b","d1f8a829c5e90734bb47a1d1941b8819aeee6e81a2a772c3c0f70b30e3693fa9","be1dfacee25a14d79724ba21f1fde67f966b46e2128c68fed2e48c6e1e9822c5","19b3d0c212d241c237f79009b4cd0051e54971747fd89dc70a74f874d1192534","4d250e905299144850c6f8e74dad1ee892d847643bacf637e89adcce013f0700","5fca180ba7514e439b225ee5eb47e5cf9254a591095f93cf7ca298ce6264159b","ed3e176bc769725ebc1d93f1d6890fc3d977b9155ae5d03be96ec2d49b303370","7933769d84f5ae16546aef06537ca578f1c8d7cca0708452a00613050ac1f265","cc5c913c4716a0d1563b2a63a7c4dc2fa81b7d7bc58489c79896d69b27e978cd","f194cdeb1caaf80e625f4fad340a9434b2b83786028dcc5ea6f3c459cc7789a0","f8ce447bbda4f75da74cecd866cc1ff9bdde62189ac9d8dc14a16c48b3d702fa","236247fb33a56e1d43b097c000aaafcac8fea1e8bf38d1a64f13889b32c372d0","c7d30b164562b7ce99fcb53ab78f937cc845e003f6089d648351331921379994","fe2d1251f167d801a27f0dfb4e2c14f4f08bf2214d9784a1b8c310fdfdcdaaea","2a1182578228dc1faad14627859042d59ea5ab7e3ac69cb2a3453329aaaa3b83","dfa99386b9a1c1803eb20df3f6d3adc9e44effc84fa7c2ab6537ed1cb5cc8cfb","79b0d5635af72fb87a2a4b62334b0ab996ff7a1a14cfdb895702e74051917718","5f00b052713bfe8e9405df03a1bbe406006b30ec6b0c2ce57d207e70b48cf4e9","7abcae770f21794b5ffbc3186483c3dbcf8b0c8e37d3ef3ed6277ece5c5dd4be","3e642f39da9ad0a4cd16ccbd7f363b6b5ad5fa16a5c6d44753f98fc1e3be9d96","7f5a6eac3d3d334e2f2eba41f659e9618c06361958762869055e22219f341554","6f996f44113b76a9960d3fad280f4f671115c5e971356d1dbb4d1b000af8b3b3","67f2cd6e208e68fdfa366967d1949575df6ccf90c104fc9747b3f1bdb69ad55a","f99ab9dffe6281c9b6df9ae9d8584d18eabf2107572bbd8fa5c83c8afe531af8","4fc9939c86a7d80ab6a361264e5666336d37e080a00d831d9358ad83575267da","f4ba385eedea4d7be1feeeac05aaa05d6741d931251a85ab48e0610271d001ce","fc79932b9aa710f025b89bf8d8329d99080286e5e079a7d5a529236e9f5dd69e","6646d9075e3e0eedb02c9d03bffef54c8bbeb601d27eed46f143aba435bac37d","0dec72b4c5c4bb149750fef4fc26bdae8f410de941ee766c953f5ac77381d690","8f2644578a3273f43fd700803b89b842d2cd09c1fba2421db45737357e50f5b1","f5405fb679a467cb979f8744940b22b7bc3a0bcbe648c3910d98de3188d42a78","68969a0efd9030866f60c027aedbd600f66ea09e1c9290853cc24c2dcc92000f","639f94fe145a72ce520d3d7b9b3b6c9049624d90cbf85cff46fb47fb28d1d8fe","8327a51d574987a2b0f61ea40df4adddf959f67bc48c303d4b33d47ba3be114a","991fd5ebf9f30ffa17cae6faeae6a838d3d91bdcdd419bce358dc99b8e5b0ad0","51b4ab145645785c8ced29238192f870dbb98f1968a7c7ef2580cd40663b2940","589713fefe7282fd008a2672c5fbacc4a94f31138bae6a03db2c7b5453dc8788","786691c952fe3feac79aca8f0e7e580d95c19afc8a4c6f8765e99fb756d8d9d7","4c348f139d006057ce9384e60b4ee1ce06bee5c16e19ff70f293ad88d5893386","e9d33b2549b5779b6cad92cb6a370c6c106cc12dc80da1cc199e2cb3a715bf38","62b753ed351fba7e0f6b57103529ce90f2e11b949b8fc69c39464fe958535c25","21e1fa3e5c95c61161a1ea2d819972e3b7e916a58571f8f9828b8a6c32e641ea",{"version":"abfee88c6ea2d6000b88d589004a260a07546c0f5743b74a8da87c69ca12017f","signature":"8471f018f3b374d5e6f0941c07e1d82519bb2612c199340ec451bcbcb99aab14"},{"version":"f99699abe83bfe68c0aa3aaf91bee6d4a917eba999b7e82e1d8bcd23c9af4ed6","signature":"029a3ef4bc9a23c7a8b8f0dfe79383690d61d5e7d629c532c75979b5856adca6"},{"version":"53a296cb2f1036d813a8ae54b9c078653cda3d2f1aa3c6c5d23ea2a233b81981","signature":"668f3b2d370a46528565617cbdd78c84ea9a10a8705ad287b5b018f2420a7800"},{"version":"37f9777cfd8fc41f20daa186b29f2f4b875d52157be892929c80b55c10d8cf89","signature":"0710840c7868d2987b9c800b2bb9e6887b8c6a81d3bac55570b7deaf85df5173"},"845b98bae0b14d348bb65501feb713158f3e2d58f41d8fcc38a3413b9f11a993",{"version":"998050e13e3daf9d22f6207163324002e83d40484232e3b5beb3f814c8a61d98","signature":"e83a04e8af2261301931ebec4ab0f4ef10d1c0eb86ad835142b972cd6c506d32"},"189150e785626242df43edde2e537ae48b8d8ba0c93e78c2478c9ce738a14cfe","b377fa259d15c6e3c0fc2804530f1c7448906df2b6afdf6ddeff61a75016cb28","a26bb2e2693f921f4aa3f6e8c04a18d07c6ab6c3162c426299e0d0a904d76d82","42e7c31cdce8294ad4852d465b2dd91307efecfd7a9889f2a0aa49ffca73e83b","7922bdca92b1a6f586e9403b2b7972200aae00f926a300e79bf2d62eb410714f","d3abaca0cd59f25b4e056681217d1f8674612071706e6825517ec9e264063e55","76a7145b39ac6cc3633e2ccb545e9db3e5a02c7e0bceddbb5abbd3b2e1fba32e","a3cf3aa8ec934a46e5d10922af944c14e1b73acb81c4ba90348bee40a829b26c","8f95f6784090939eb0cb0c648a03bce2208e595730afc14be4969d90b334b541","535b6a88c08e138b1b72003f482bceaca78311cd19836bdde0a80a131f457f43","cf72ba3ad6ed1f342e8ddbdbfdf425238cbc7a75cc7a318fa994cb3866a68804","f213a7dafb0a946c1134a64151cbb7f2301d23f93920356d730cf0ed767e9985","c305868de2a4ea029bd4b9593ebb33b602b54cdbb3a09231486f611a414d0f5f","cf42fcfc0f9e976054d921a0f5bf898f9127751cf5dd9f1b4820069fd78f2280","e35526a0977b9cd80f799aef3314cb2bfe66aeb40879c888f7a993bd3437fc42","81d92e5c4d618ba0660121ed30c603e8111ad605e7562948f7430d87038daee0","757f7967151a9b1f043aba090f09c1bdb0abe54f229efd3b7a656eb6da616bf4","2da74b28ea53cb34b516fd6dbda3ca93495648cf431e59d24ba3ab5d7ec59ba4","928ebc4436abadcd3680338883b7e26189beb7532ae4b3d1c1727598607e53fa","2ec607f96bdcd7dfc06b24bf5c05ff93c6859a0c0e77d9e1b098a20aa3c77fb1","7634eca84d60522b68ac679813fd9247a4260f7412890e924c7779758f8d6391","b4ff74f0589487410168be50e3231caf687c5e1302266709742382e8d004fe1e","406f227eebfe8be216d7a4b215ed09198b0c2f6599f2273b69ee5b75824c5435","a67d719563c9919592cc1acaa197b35deb92cc20801d33ba75214dd33988c49e","4f4dcc8af3798205431971473b0e6808e5415f5c3963d8aabc094808e0223880","8a90f97fdb10d83c6842a699c3df474246755f4fbf3ee2d35e69d6599fe9092c","88aacf6e2493633490812c70595b517c8e4299f054d28a51687b10f0968276c3",{"version":"84a56bb3995633ffa667c5eb28a18be95572911ba9609b598cee69357aa6e666","signature":"f6cae2c0acda884c4b9dec4063d062252cf0625a04ebf711a84d7de576427c3e"},"21fab2a256a70911bc1fac0d7afe46cbca4a3b7ded92f0da89505d9f9a21b699","d037b771e89ef6dd81c71de92cc644d68b1b5d1ce25dbce9c2cfe407dd0b5796",{"version":"e61062cf47b67f1a1968f7d150da3aea7b77a9fd5ebce90301c3e0180ca30ab4","signature":"25091d25f74760301f1e094456e2e6af52ceb6ef1ece48910463528e499992d8"},{"version":"b63519c0b5db6d56337c5245fa458b3d3017c204ca7be0c220a2fb967526ea79","signature":"853d02f4f46ca9700fefd0d45062f5b82c9335ba2224ca4d7bd34d6ae4fc4a7f"},{"version":"6ee84215d79fb023f94eaa8bdfac1a8009f584da1bf9250d59d2517965055610","signature":"348ec022b1721e4b63f7590b662b2587fe66a6881e4d1bce2655f63b046cdf8d"},{"version":"31ea3302aeafa0e67133aa9bb383d853d9aeb2b2a3b12a9ed9560596b0313b1f","signature":"ab679e25dcb5d085ca42c33ffc8e2fc48411f81ad3108a3aa81eca79c104ef95"},"d9c0e696b3b43dd0e6cbbe51f42dad1193df7be1035d4ab1f972c45ff41232e0",{"version":"840703025c44ca3abde36a35cdede65d8c5ab6a4c6b06dccaeecf44a2fa06be2","signature":"b901209745b3cef4b803e42731c40f5c2c2c7101bbd5f481c0fd1c43f9f440f3"},"cf6dc8f18bc5ee063dc1a37bccd3031dc0769f11622399018c375aacfcbda7c9","b2203ff075f24f24b31de677f806e9966bff89c655d24c15a9f47b914e1bcb99","dc3b172ee27054dbcedcf5007b78c256021db936f6313a9ce9a3ecbb503fd646","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","a2e86df4db576d80704e25293cec6f20fc6101a11f4747440e2eef58fb3c860c","a2e86df4db576d80704e25293cec6f20fc6101a11f4747440e2eef58fb3c860c","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","6704f0b54df85640baaeebd86c9d4a1dbb661d5a4d57a75bc84162f562f6531d","9d255af1b09c6697089d3c9bf438292a298d8b7a95c68793c9aae80afc9e5ca7",{"version":"c3bc5d095c3c22fd20b5a6550b9c9a6d56c3ffbb87ef057ccce7764b6bed4428","affectsGlobalScope":true},{"version":"63e2182615c513e89bb8a3e749d08f7c379e86490fcdbf6d35f2c14b3507a6e8","affectsGlobalScope":true},{"version":"f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71","affectsGlobalScope":true},"6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"bee89e1eb6425eb49894f3f25e4562dc2564e84e5aa7610b7e13d8ecddf8f5db","dca41e86e89dfb2e85e6935260250f02eb6683b86c2fa16bec729ddd1bcd9b4b","6670e71d65610bd7b64aac5fdf58c21c545f7fa31e060f02a0dcd91763831eb8","e050a0afcdbb269720a900c85076d18e0c1ab73e580202a2bf6964978181222a","6de408de17cb0e3fa3a5e3d0f79bd104848d98dbfa72e92fddfa1a4aa3d8393c","bf88ef4208a770ca39a844b182b3695df536326ea566893fdc5b8418702a331e","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","6c1e688f95fcaf53b1e41c0fdadf2c1cfc96fa924eaf7f9fdb60f96deb0a4986","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","6d969939c4a63f70f2aa49e88da6f64b655c8e6799612807bef41ccff6ea0da9",{"version":"46894b2a21a60f8449ca6b2b7223b7179bba846a61b1434bed77b34b2902c306","affectsGlobalScope":true},"ba600bf38b5c1a5dffa1b99dd7a783549082bbba3b4fe9497eaaf5e4c1764b20","ae8cd6af37275eac75f5369cdb5f01063bcf1f48d74cb434303ee50ec446acfe","2518830a2fda9c272ba48798d0e7b857037443b06594db8e42c87e86944ee9e4","95c1cf650d16b197525b5bfdf8dd7abba0a49d99ddb12a4ba66466a8a6903e49","1fe0aabe758d56ad72495d6e6c7b6ae75619faaeaaf03f0ddf1948eea4cfac84","bbc57966c8c48ee78fd58aadb893784025be056ae538ae22d1e83c502a987e68","5e5d6f6697e378b0660b567866bf67d099d0ea754f8810c0dabe737805f5cf03","99ab49d4732fdc98cf5c495925e65e796544cb4086fe42afc235dfc02bcf2351","af8339d509c40da075088e544c28ed37b519876e5c4d36a48644ebfb3c6ae6c8","d393adc32e520d4274bb4c3dfdcdb342b806a230b66ef0f82b35bffbc4aa2590","c26af7eaedb4f710984634e419ab15e54e5bb99a0b3cae71188c2fff572276de","38b58ef018d0aeee42ef74c42978bb5805503233fdeeb82cd2aed2199fb0d013","3b6040253231d44e6778eb6861cc86c1758562e77783d21b7ecbc73322ded539","cc256fd958b33576ed32c7338c64adb0d08fc0c2c6525010202fab83f32745da","fd0589ca571ad090b531d8c095e26caa53d4825c64d3ff2b2b1ab95d72294175",{"version":"669843ecafb89ae1e944df06360e8966219e4c1c34c0d28aa2503272cdd444a7","affectsGlobalScope":true},"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","19c816167e076e7c24f074389c6cf3ed87bdbb917d1ea439ca281f9d26db2439","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","98f9d826db9cd99d27a01a59ee5f22863df00ccf1aaf43e1d7db80ebf716f7c3","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","dcd91d3b697cb650b95db5471189b99815af5db2a1cd28760f91e0b12ede8ed5","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3cf0d343c2276842a5b617f22ba82af6322c7cfe8bb52238ffc0c491a3c21019","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","30abc554c7ad13063a02ddd06757929b34357aea1f6fcf4ca39114cb0fc19384","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","d88a5e779faf033be3d52142a04fbe1cb96009868e3bbdd296b2bc6c59e06c0e","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","b9f96255e1048ed2ea33ec553122716f0e57fc1c3ad778e9aa15f5b46547bd23","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","a1a261624efb3a00ff346b13580f70f3463b8cdcc58b60f5793ff11785d52cab","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","f875e913ef24873eb2a469605402595f1c783070b52a98e53686b32c0f827f7f","bc81aff061c53a7140270555f4b22da4ecfe8601e8027cf5aa175fbdc7927c31","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","e9eb1b173aa166892f3eddab182e49cfe59aa2e14d33aedb6b49d175ed6a3750"],"options":{"declaration":true,"declarationDir":"./dist-types","downlevelIteration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":1,"noFallthroughCasesInSwitch":true,"preserveConstEnums":true,"removeComments":false,"rootDir":"./src","strict":true,"target":1,"useUnknownInCatchVariables":false},"fileIdsList":[[138],[196,199,206,207,208,209,210],[138,193],[193,194,195],[197,198],[138,148],[201,202,203],[200,204,205],[138,156,157],[158,159],[156,157,160,161,162],[138,144],[141],[142],[138,139,140],[139,140,141,143,144,145,146,147],[212,213,214,215,216,217,218],[138,154],[138,163],[150],[138,171,172],[173],[138,149,150,155,164,165,166,167,168,169,170,174,175,176,177,178,179,180,181,182,183,184,185],[36,43,44,45],[43,46],[36,40],[36,46],[34,35,44,45,46,47],[78,92,94],[96],[41,42,43,98],[41,43],[100,102,103],[100,101],[105],[34],[37,107],[107],[110],[107,108,109],[107,108,109,110,111],[38],[40,41,43],[96,97],[113],[113,117],[113,114,117,118],[42,116],[93],[33,39],[64,66,92],[36],[36,121,122,123],[33,37,38,39,40,41,42,43,48,95,96,97,98,99,101,104,105,106,112,115,116,119,120,124,125,126,127,128,129,130,131,132,133,135,136,137],[34,37,38,42],[99],[115],[40,42,101],[40,41],[40,105],[42,96,97],[64,78,92,94,127],[41,98,132,133],[40,64,65,92,99,127,131,133,134],[40],[33],[78,92,138],[151,152,153],[78,138],[232,233,235,238,240],[232],[232,235],[242],[64,92],[247,249],[246,247,248],[62,92],[253],[254],[260,263],[258],[51,92,256,262],[260],[257,261],[259],[61,87,92,277,278,280],[279],[282,284,285,286,287,288,289,290,291,292,293,294],[282,283,285,286,287,288,289,290,291,292,293,294],[283,284,285,286,287,288,289,290,291,292,293,294],[282,283,284,286,287,288,289,290,291,292,293,294],[282,283,284,285,287,288,289,290,291,292,293,294],[282,283,284,285,286,288,289,290,291,292,293,294],[282,283,284,285,286,287,289,290,291,292,293,294],[282,283,284,285,286,287,288,290,291,292,293,294],[282,283,284,285,286,287,288,289,291,292,293,294],[282,283,284,285,286,287,288,289,290,292,293,294],[282,283,284,285,286,287,288,289,290,291,293,294],[282,283,284,285,286,287,288,289,290,291,292,294],[282,283,284,285,286,287,288,289,290,291,292,293],[49],[51],[52,57],[53,61,62,69,78],[53,54,61,69],[55,85],[56,57,62,70],[57,78],[58,59,61,69],[59],[60,61],[61],[61,62,63,78,84],[62,63],[61,64,69,78,84],[61,62,64,65,69,78,81,84],[64,66,78,81,84],[49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91],[61,67],[68,84],[59,61,69,78],[70],[71],[51,72],[73,83],[74],[75],[61,76],[76,77,85,87],[61,78],[79],[80],[69,78,81],[82],[69,83],[64,75,84],[85],[78,86],[87],[88],[61,63,78,84,87,89],[78,90],[300,339],[300,324,339],[339],[300],[300,325,339],[300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338],[325,339],[61,64,66,69,78,81,84,90,92],[343],[266],[265,266],[265],[265,266,267,269,270,273,274,275,276],[266,270],[265,266,267,269,270,271,272],[265,270],[270,274],[266,267,268],[267],[265,266,270],[31],[138,148,186,191],[192,220],[138,211,219],[221],[148],[189],[187,188,190],[188],[32,222,229],[138,186],[223,224,226,228],[186],[138,225],[138,186,225,227],[138,219]],"referencedMap":[[207,1],[211,2],[194,3],[195,3],[193,1],[196,4],[198,1],[197,1],[199,5],[208,1],[210,1],[209,6],[200,1],[201,6],[202,6],[204,7],[203,1],[206,8],[205,1],[158,9],[160,10],[159,1],[161,9],[162,9],[163,11],[156,1],[144,1],[145,12],[142,13],[143,14],[141,15],[139,1],[140,1],[148,16],[147,1],[212,1],[218,1],[213,1],[214,1],[215,1],[219,17],[216,1],[217,1],[149,1],[150,1],[155,18],[164,19],[166,20],[175,1],[171,1],[173,21],[174,22],[172,1],[186,23],[46,24],[47,25],[44,26],[45,27],[48,28],[95,29],[97,30],[99,31],[98,32],[104,33],[102,34],[106,35],[37,36],[108,37],[109,38],[111,39],[110,40],[112,41],[107,42],[105,43],[113,44],[114,45],[118,46],[119,47],[117,48],[94,49],[40,50],[120,51],[121,52],[122,52],[124,53],[123,52],[138,54],[43,55],[125,56],[116,57],[127,58],[115,59],[128,60],[129,61],[130,29],[131,29],[132,62],[134,63],[135,64],[136,56],[39,65],[42,43],[137,66],[152,67],[154,68],[153,69],[241,70],[235,71],[233,71],[238,72],[236,71],[240,71],[243,73],[244,73],[245,74],[250,75],[249,76],[251,77],[252,77],[254,78],[255,79],[264,80],[259,81],[263,82],[261,83],[262,84],[260,85],[279,86],[280,87],[283,88],[284,89],[282,90],[285,91],[286,92],[287,93],[288,94],[289,95],[290,96],[291,97],[292,98],[293,99],[294,100],[49,101],[51,102],[52,103],[53,104],[54,105],[55,106],[56,107],[57,108],[58,109],[59,110],[60,111],[61,112],[62,113],[63,114],[64,115],[65,116],[66,117],[92,118],[67,119],[68,120],[69,121],[70,122],[71,123],[72,124],[73,125],[74,126],[75,127],[76,128],[77,129],[78,130],[79,131],[80,132],[81,133],[82,134],[83,135],[84,136],[85,137],[86,138],[87,139],[88,140],[89,141],[90,142],[324,143],[325,144],[300,145],[303,145],[322,143],[323,143],[313,143],[312,146],[310,143],[305,143],[318,143],[316,143],[320,143],[304,143],[317,143],[321,143],[306,143],[307,143],[319,143],[301,143],[308,143],[309,143],[311,143],[315,143],[326,147],[314,143],[302,143],[339,148],[333,147],[335,149],[334,147],[327,147],[328,147],[330,147],[332,147],[336,149],[337,149],[329,149],[331,149],[342,150],[344,151],[267,152],[276,153],[266,154],[277,155],[272,156],[273,157],[271,158],[275,159],[269,160],[268,161],[274,162],[270,153],[32,163],[192,164],[221,165],[220,166],[222,167],[187,168],[190,169],[191,170],[189,171],[230,172],[225,173],[229,174],[224,175],[226,176],[228,177]],"exportedModulesMap":[[207,1],[211,2],[194,3],[195,3],[193,1],[196,4],[198,1],[197,1],[199,5],[208,1],[210,1],[209,6],[200,1],[201,6],[202,6],[204,7],[203,1],[206,8],[205,1],[158,9],[160,10],[159,1],[161,9],[162,9],[163,11],[156,1],[144,1],[145,12],[142,13],[143,14],[141,15],[139,1],[140,1],[148,16],[147,1],[212,1],[218,1],[213,1],[214,1],[215,1],[219,17],[216,1],[217,1],[149,1],[150,1],[155,18],[164,19],[166,20],[175,1],[171,1],[173,21],[174,22],[172,1],[186,23],[46,24],[47,25],[44,26],[45,27],[48,28],[95,29],[97,30],[99,31],[98,32],[104,33],[102,34],[106,35],[37,36],[108,37],[109,38],[111,39],[110,40],[112,41],[107,42],[105,43],[113,44],[114,45],[118,46],[119,47],[117,48],[94,49],[40,50],[120,51],[121,52],[122,52],[124,53],[123,52],[138,54],[43,55],[125,56],[116,57],[127,58],[115,59],[128,60],[129,61],[130,29],[131,29],[132,62],[134,63],[135,64],[136,56],[39,65],[42,43],[137,66],[152,67],[154,68],[153,69],[241,70],[235,71],[233,71],[238,72],[236,71],[240,71],[243,73],[244,73],[245,74],[250,75],[249,76],[251,77],[252,77],[254,78],[255,79],[264,80],[259,81],[263,82],[261,83],[262,84],[260,85],[279,86],[280,87],[283,88],[284,89],[282,90],[285,91],[286,92],[287,93],[288,94],[289,95],[290,96],[291,97],[292,98],[293,99],[294,100],[49,101],[51,102],[52,103],[53,104],[54,105],[55,106],[56,107],[57,108],[58,109],[59,110],[60,111],[61,112],[62,113],[63,114],[64,115],[65,116],[66,117],[92,118],[67,119],[68,120],[69,121],[70,122],[71,123],[72,124],[73,125],[74,126],[75,127],[76,128],[77,129],[78,130],[79,131],[80,132],[81,133],[82,134],[83,135],[84,136],[85,137],[86,138],[87,139],[88,140],[89,141],[90,142],[324,143],[325,144],[300,145],[303,145],[322,143],[323,143],[313,143],[312,146],[310,143],[305,143],[318,143],[316,143],[320,143],[304,143],[317,143],[321,143],[306,143],[307,143],[319,143],[301,143],[308,143],[309,143],[311,143],[315,143],[326,147],[314,143],[302,143],[339,148],[333,147],[335,149],[334,147],[327,147],[328,147],[330,147],[332,147],[336,149],[337,149],[329,149],[331,149],[342,150],[344,151],[267,152],[276,153],[266,154],[277,155],[272,156],[273,157],[271,158],[275,159],[269,160],[268,161],[274,162],[270,153],[32,163],[192,1],[221,165],[220,178],[222,167],[191,170],[230,172],[225,1],[229,174],[226,1],[228,1]],"semanticDiagnosticsPerFile":[258,207,211,194,195,193,196,198,197,199,208,210,209,200,201,202,204,203,206,205,158,160,159,161,162,163,156,157,144,145,142,143,141,139,140,148,146,147,212,218,213,214,215,219,216,217,149,150,155,164,165,166,167,168,169,170,175,176,171,173,174,172,177,178,186,179,180,181,182,183,184,185,33,35,46,47,44,45,34,48,95,97,99,98,100,104,102,103,96,106,37,108,109,111,110,112,107,105,113,114,118,119,117,94,40,120,121,122,36,124,123,138,38,43,125,126,41,116,127,115,128,129,130,131,132,101,134,135,93,136,133,39,42,137,151,152,154,153,231,241,235,234,233,232,238,236,237,240,239,243,244,242,245,250,246,249,247,251,252,253,254,255,264,256,259,263,261,262,260,279,280,248,281,283,284,282,285,286,287,288,289,290,291,292,293,294,295,296,49,51,52,53,54,55,56,57,58,59,60,61,62,63,50,91,64,65,66,92,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,297,298,299,324,325,300,303,322,323,313,312,310,305,318,316,320,304,317,321,306,307,319,301,308,309,311,315,326,314,302,339,338,333,335,334,327,328,330,332,336,337,329,331,340,278,341,342,343,344,257,227,267,276,265,266,277,272,273,271,275,269,268,274,270,6,7,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,29,1,30,31,32,192,221,220,222,187,188,190,191,189,230,223,225,229,224,226,228]},"version":"4.9.5"} \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-env/LICENSE b/node_modules/@aws-sdk/credential-provider-env/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-env/README.md b/node_modules/@aws-sdk/credential-provider-env/README.md new file mode 100644 index 0000000..61a6436 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/README.md @@ -0,0 +1,11 @@ +# @aws-sdk/credential-provider-env + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-env/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-env) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-env.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-env) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers) +instead. diff --git a/node_modules/@aws-sdk/credential-provider-env/dist-cjs/fromEnv.js b/node_modules/@aws-sdk/credential-provider-env/dist-cjs/fromEnv.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/dist-cjs/fromEnv.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js b/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js new file mode 100644 index 0000000..7e48bab --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js @@ -0,0 +1,68 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, + ENV_EXPIRATION: () => ENV_EXPIRATION, + ENV_KEY: () => ENV_KEY, + ENV_SECRET: () => ENV_SECRET, + ENV_SESSION: () => ENV_SESSION, + fromEnv: () => fromEnv +}); +module.exports = __toCommonJS(src_exports); + +// src/fromEnv.ts +var import_property_provider = require("@smithy/property-provider"); +var ENV_KEY = "AWS_ACCESS_KEY_ID"; +var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; +var ENV_SESSION = "AWS_SESSION_TOKEN"; +var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; +var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; +var fromEnv = /* @__PURE__ */ __name((init) => async () => { + var _a; + (_a = init == null ? void 0 : init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-env", "fromEnv"); + const accessKeyId = process.env[ENV_KEY]; + const secretAccessKey = process.env[ENV_SECRET]; + const sessionToken = process.env[ENV_SESSION]; + const expiry = process.env[ENV_EXPIRATION]; + const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; + if (accessKeyId && secretAccessKey) { + return { + accessKeyId, + secretAccessKey, + ...sessionToken && { sessionToken }, + ...expiry && { expiration: new Date(expiry) }, + ...credentialScope && { credentialScope } + }; + } + throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials."); +}, "fromEnv"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + ENV_KEY, + ENV_SECRET, + ENV_SESSION, + ENV_EXPIRATION, + ENV_CREDENTIAL_SCOPE, + fromEnv +}); + diff --git a/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js b/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js new file mode 100644 index 0000000..a48a8c0 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js @@ -0,0 +1,24 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +export const ENV_KEY = "AWS_ACCESS_KEY_ID"; +export const ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; +export const ENV_SESSION = "AWS_SESSION_TOKEN"; +export const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; +export const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; +export const fromEnv = (init) => async () => { + init?.logger?.debug("@aws-sdk/credential-provider-env", "fromEnv"); + const accessKeyId = process.env[ENV_KEY]; + const secretAccessKey = process.env[ENV_SECRET]; + const sessionToken = process.env[ENV_SESSION]; + const expiry = process.env[ENV_EXPIRATION]; + const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; + if (accessKeyId && secretAccessKey) { + return { + accessKeyId, + secretAccessKey, + ...(sessionToken && { sessionToken }), + ...(expiry && { expiration: new Date(expiry) }), + ...(credentialScope && { credentialScope }), + }; + } + throw new CredentialsProviderError("Unable to find environment variable credentials."); +}; diff --git a/node_modules/@aws-sdk/credential-provider-env/dist-es/index.js b/node_modules/@aws-sdk/credential-provider-env/dist-es/index.js new file mode 100644 index 0000000..17bf6da --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/dist-es/index.js @@ -0,0 +1 @@ +export * from "./fromEnv"; diff --git a/node_modules/@aws-sdk/credential-provider-env/dist-types/fromEnv.d.ts b/node_modules/@aws-sdk/credential-provider-env/dist-types/fromEnv.d.ts new file mode 100644 index 0000000..4b059f3 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/dist-types/fromEnv.d.ts @@ -0,0 +1,32 @@ +import type { CredentialProviderOptions } from "@aws-sdk/types"; +import { AwsCredentialIdentityProvider } from "@smithy/types"; +export interface FromEnvInit extends CredentialProviderOptions { +} +/** + * @internal + */ +export declare const ENV_KEY = "AWS_ACCESS_KEY_ID"; +/** + * @internal + */ +export declare const ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; +/** + * @internal + */ +export declare const ENV_SESSION = "AWS_SESSION_TOKEN"; +/** + * @internal + */ +export declare const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; +/** + * @internal + */ +export declare const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; +/** + * @internal + * + * Source AWS credentials from known environment variables. If either the + * `AWS_ACCESS_KEY_ID` or `AWS_SECRET_ACCESS_KEY` environment variable is not + * set in this process, the provider will return a rejected promise. + */ +export declare const fromEnv: (init?: FromEnvInit) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-env/dist-types/index.d.ts b/node_modules/@aws-sdk/credential-provider-env/dist-types/index.d.ts new file mode 100644 index 0000000..fe76e31 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/dist-types/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./fromEnv"; diff --git a/node_modules/@aws-sdk/credential-provider-env/dist-types/ts3.4/fromEnv.d.ts b/node_modules/@aws-sdk/credential-provider-env/dist-types/ts3.4/fromEnv.d.ts new file mode 100644 index 0000000..24ba53f --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/dist-types/ts3.4/fromEnv.d.ts @@ -0,0 +1,11 @@ +import { CredentialProviderOptions } from "@aws-sdk/types"; +import { AwsCredentialIdentityProvider } from "@smithy/types"; +export interface FromEnvInit extends CredentialProviderOptions {} +export declare const ENV_KEY = "AWS_ACCESS_KEY_ID"; +export declare const ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; +export declare const ENV_SESSION = "AWS_SESSION_TOKEN"; +export declare const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; +export declare const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; +export declare const fromEnv: ( + init?: FromEnvInit +) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-env/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/credential-provider-env/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..17bf6da --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/dist-types/ts3.4/index.d.ts @@ -0,0 +1 @@ +export * from "./fromEnv"; diff --git a/node_modules/@aws-sdk/credential-provider-env/package.json b/node_modules/@aws-sdk/credential-provider-env/package.json new file mode 100644 index 0000000..4d292c2 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-env/package.json @@ -0,0 +1,60 @@ +{ + "name": "@aws-sdk/credential-provider-env", + "version": "3.535.0", + "description": "AWS credential provider that sources credentials from known environment variables", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline credential-provider-env", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest" + }, + "keywords": [ + "aws", + "credentials" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-provider-env", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/credential-provider-env" + } +} diff --git a/node_modules/@aws-sdk/credential-provider-http/README.md b/node_modules/@aws-sdk/credential-provider-http/README.md new file mode 100644 index 0000000..e8f19f8 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/README.md @@ -0,0 +1,10 @@ +# @aws-sdk/credential-provider-http + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-http/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-http) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-http.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-http) + +> An internal transitively required package. + +## Usage + +See https://www.npmjs.com/package/@aws-sdk/credential-providers diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js new file mode 100644 index 0000000..f1251e9 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkUrl = void 0; +const property_provider_1 = require("@smithy/property-provider"); +const LOOPBACK_CIDR_IPv4 = "127.0.0.0/8"; +const LOOPBACK_CIDR_IPv6 = "::1/128"; +const ECS_CONTAINER_HOST = "169.254.170.2"; +const EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; +const EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; +const checkUrl = (url) => { + if (url.protocol === "https:") { + return; + } + if (url.hostname === ECS_CONTAINER_HOST || + url.hostname === EKS_CONTAINER_HOST_IPv4 || + url.hostname === EKS_CONTAINER_HOST_IPv6) { + return; + } + if (url.hostname.includes("[")) { + if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { + return; + } + } + else { + if (url.hostname === "localhost") { + return; + } + const ipComponents = url.hostname.split("."); + const inRange = (component) => { + const num = parseInt(component, 10); + return 0 <= num && num <= 255; + }; + if (ipComponents[0] === "127" && + inRange(ipComponents[1]) && + inRange(ipComponents[2]) && + inRange(ipComponents[3]) && + ipComponents.length === 4) { + return; + } + } + throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: + - loopback CIDR 127.0.0.0/8 or [::1/128] + - ECS container host 169.254.170.2 + - EKS container host 169.254.170.23 or [fd00:ec2::23]`); +}; +exports.checkUrl = checkUrl; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js new file mode 100644 index 0000000..945b4b4 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromHttp = void 0; +const fetch_http_handler_1 = require("@smithy/fetch-http-handler"); +const property_provider_1 = require("@smithy/property-provider"); +const checkUrl_1 = require("./checkUrl"); +const requestHelpers_1 = require("./requestHelpers"); +const retry_wrapper_1 = require("./retry-wrapper"); +const fromHttp = (options) => { + var _a, _b, _c; + (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-http", "fromHttp"); + let host; + const full = options.credentialsFullUri; + if (full) { + host = full; + } + else { + throw new property_provider_1.CredentialsProviderError("No HTTP credential provider host provided."); + } + const url = new URL(host); + (0, checkUrl_1.checkUrl)(url); + const requestHandler = new fetch_http_handler_1.FetchHttpHandler(); + return (0, retry_wrapper_1.retryWrapper)(async () => { + const request = (0, requestHelpers_1.createGetRequest)(url); + if (options.authorizationToken) { + request.headers.Authorization = options.authorizationToken; + } + const result = await requestHandler.handle(request); + return (0, requestHelpers_1.getCredentials)(result.response); + }, (_b = options.maxRetries) !== null && _b !== void 0 ? _b : 3, (_c = options.timeout) !== null && _c !== void 0 ? _c : 1000); +}; +exports.fromHttp = fromHttp; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js new file mode 100644 index 0000000..4f745a5 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js @@ -0,0 +1,65 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromHttp = void 0; +const tslib_1 = require("tslib"); +const node_http_handler_1 = require("@smithy/node-http-handler"); +const property_provider_1 = require("@smithy/property-provider"); +const promises_1 = tslib_1.__importDefault(require("fs/promises")); +const checkUrl_1 = require("./checkUrl"); +const requestHelpers_1 = require("./requestHelpers"); +const retry_wrapper_1 = require("./retry-wrapper"); +const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; +const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +const AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; +const AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +const fromHttp = (options) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-http", "fromHttp"); + let host; + const relative = (_b = options.awsContainerCredentialsRelativeUri) !== null && _b !== void 0 ? _b : process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; + const full = (_c = options.awsContainerCredentialsFullUri) !== null && _c !== void 0 ? _c : process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; + const token = (_d = options.awsContainerAuthorizationToken) !== null && _d !== void 0 ? _d : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; + const tokenFile = (_e = options.awsContainerAuthorizationTokenFile) !== null && _e !== void 0 ? _e : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; + if (relative && full) { + console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); + console.warn("awsContainerCredentialsFullUri will take precedence."); + } + if (token && tokenFile) { + console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); + console.warn("awsContainerAuthorizationToken will take precedence."); + } + if (full) { + host = full; + } + else if (relative) { + host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; + } + else { + throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided. +Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`); + } + const url = new URL(host); + (0, checkUrl_1.checkUrl)(url); + const requestHandler = new node_http_handler_1.NodeHttpHandler({ + requestTimeout: (_f = options.timeout) !== null && _f !== void 0 ? _f : 1000, + connectionTimeout: (_g = options.timeout) !== null && _g !== void 0 ? _g : 1000, + }); + return (0, retry_wrapper_1.retryWrapper)(async () => { + const request = (0, requestHelpers_1.createGetRequest)(url); + if (token) { + request.headers.Authorization = token; + } + else if (tokenFile) { + request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); + } + try { + const result = await requestHandler.handle(request); + return (0, requestHelpers_1.getCredentials)(result.response); + } + catch (e) { + throw new property_provider_1.CredentialsProviderError(String(e)); + } + }, (_h = options.maxRetries) !== null && _h !== void 0 ? _h : 3, (_j = options.timeout) !== null && _j !== void 0 ? _j : 1000); +}; +exports.fromHttp = fromHttp; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttpTypes.js b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttpTypes.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttpTypes.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js new file mode 100644 index 0000000..cc514c9 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCredentials = exports.createGetRequest = void 0; +const property_provider_1 = require("@smithy/property-provider"); +const protocol_http_1 = require("@smithy/protocol-http"); +const smithy_client_1 = require("@smithy/smithy-client"); +const util_stream_1 = require("@smithy/util-stream"); +function createGetRequest(url) { + return new protocol_http_1.HttpRequest({ + protocol: url.protocol, + hostname: url.hostname, + port: Number(url.port), + path: url.pathname, + query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => { + acc[k] = v; + return acc; + }, {}), + fragment: url.hash, + }); +} +exports.createGetRequest = createGetRequest; +async function getCredentials(response) { + var _a, _b; + const contentType = (_b = (_a = response === null || response === void 0 ? void 0 : response.headers["content-type"]) !== null && _a !== void 0 ? _a : response === null || response === void 0 ? void 0 : response.headers["Content-Type"]) !== null && _b !== void 0 ? _b : ""; + if (!contentType.includes("json")) { + console.warn("HTTP credential provider response header content-type was not application/json. Observed: " + contentType + "."); + } + const stream = (0, util_stream_1.sdkStreamMixin)(response.body); + const str = await stream.transformToString(); + if (response.statusCode === 200) { + const parsed = JSON.parse(str); + if (typeof parsed.AccessKeyId !== "string" || + typeof parsed.SecretAccessKey !== "string" || + typeof parsed.Token !== "string" || + typeof parsed.Expiration !== "string") { + throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " + + "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }"); + } + return { + accessKeyId: parsed.AccessKeyId, + secretAccessKey: parsed.SecretAccessKey, + sessionToken: parsed.Token, + expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration), + }; + } + if (response.statusCode >= 400 && response.statusCode < 500) { + let parsedBody = {}; + try { + parsedBody = JSON.parse(str); + } + catch (e) { } + throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`), { + Code: parsedBody.Code, + Message: parsedBody.Message, + }); + } + throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`); +} +exports.getCredentials = getCredentials; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js new file mode 100644 index 0000000..b99b2ef --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.retryWrapper = void 0; +const retryWrapper = (toRetry, maxRetries, delayMs) => { + return async () => { + for (let i = 0; i < maxRetries; ++i) { + try { + return await toRetry(); + } + catch (e) { + await new Promise((resolve) => setTimeout(resolve, delayMs)); + } + } + return await toRetry(); + }; +}; +exports.retryWrapper = retryWrapper; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js new file mode 100644 index 0000000..9300747 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromHttp = void 0; +var fromHttp_browser_1 = require("./fromHttp/fromHttp.browser"); +Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function () { return fromHttp_browser_1.fromHttp; } }); diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js new file mode 100644 index 0000000..0286ea0 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromHttp = void 0; +var fromHttp_1 = require("./fromHttp/fromHttp"); +Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function () { return fromHttp_1.fromHttp; } }); diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js new file mode 100644 index 0000000..2df6f40 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js @@ -0,0 +1,42 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +const LOOPBACK_CIDR_IPv4 = "127.0.0.0/8"; +const LOOPBACK_CIDR_IPv6 = "::1/128"; +const ECS_CONTAINER_HOST = "169.254.170.2"; +const EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; +const EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; +export const checkUrl = (url) => { + if (url.protocol === "https:") { + return; + } + if (url.hostname === ECS_CONTAINER_HOST || + url.hostname === EKS_CONTAINER_HOST_IPv4 || + url.hostname === EKS_CONTAINER_HOST_IPv6) { + return; + } + if (url.hostname.includes("[")) { + if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { + return; + } + } + else { + if (url.hostname === "localhost") { + return; + } + const ipComponents = url.hostname.split("."); + const inRange = (component) => { + const num = parseInt(component, 10); + return 0 <= num && num <= 255; + }; + if (ipComponents[0] === "127" && + inRange(ipComponents[1]) && + inRange(ipComponents[2]) && + inRange(ipComponents[3]) && + ipComponents.length === 4) { + return; + } + } + throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: + - loopback CIDR 127.0.0.0/8 or [::1/128] + - ECS container host 169.254.170.2 + - EKS container host 169.254.170.23 or [fd00:ec2::23]`); +}; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.browser.js b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.browser.js new file mode 100644 index 0000000..1d24ff6 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.browser.js @@ -0,0 +1,27 @@ +import { FetchHttpHandler } from "@smithy/fetch-http-handler"; +import { CredentialsProviderError } from "@smithy/property-provider"; +import { checkUrl } from "./checkUrl"; +import { createGetRequest, getCredentials } from "./requestHelpers"; +import { retryWrapper } from "./retry-wrapper"; +export const fromHttp = (options) => { + options.logger?.debug("@aws-sdk/credential-provider-http", "fromHttp"); + let host; + const full = options.credentialsFullUri; + if (full) { + host = full; + } + else { + throw new CredentialsProviderError("No HTTP credential provider host provided."); + } + const url = new URL(host); + checkUrl(url); + const requestHandler = new FetchHttpHandler(); + return retryWrapper(async () => { + const request = createGetRequest(url); + if (options.authorizationToken) { + request.headers.Authorization = options.authorizationToken; + } + const result = await requestHandler.handle(request); + return getCredentials(result.response); + }, options.maxRetries ?? 3, options.timeout ?? 1000); +}; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js new file mode 100644 index 0000000..e43ae30 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js @@ -0,0 +1,59 @@ +import { NodeHttpHandler } from "@smithy/node-http-handler"; +import { CredentialsProviderError } from "@smithy/property-provider"; +import fs from "fs/promises"; +import { checkUrl } from "./checkUrl"; +import { createGetRequest, getCredentials } from "./requestHelpers"; +import { retryWrapper } from "./retry-wrapper"; +const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; +const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +const AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; +const AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +export const fromHttp = (options) => { + options.logger?.debug("@aws-sdk/credential-provider-http", "fromHttp"); + let host; + const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; + const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; + const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; + const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; + if (relative && full) { + console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); + console.warn("awsContainerCredentialsFullUri will take precedence."); + } + if (token && tokenFile) { + console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); + console.warn("awsContainerAuthorizationToken will take precedence."); + } + if (full) { + host = full; + } + else if (relative) { + host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; + } + else { + throw new CredentialsProviderError(`No HTTP credential provider host provided. +Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`); + } + const url = new URL(host); + checkUrl(url); + const requestHandler = new NodeHttpHandler({ + requestTimeout: options.timeout ?? 1000, + connectionTimeout: options.timeout ?? 1000, + }); + return retryWrapper(async () => { + const request = createGetRequest(url); + if (token) { + request.headers.Authorization = token; + } + else if (tokenFile) { + request.headers.Authorization = (await fs.readFile(tokenFile)).toString(); + } + try { + const result = await requestHandler.handle(request); + return getCredentials(result.response); + } + catch (e) { + throw new CredentialsProviderError(String(e)); + } + }, options.maxRetries ?? 3, options.timeout ?? 1000); +}; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttpTypes.js b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttpTypes.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttpTypes.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js new file mode 100644 index 0000000..d08e80d --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js @@ -0,0 +1,53 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +import { HttpRequest } from "@smithy/protocol-http"; +import { parseRfc3339DateTime } from "@smithy/smithy-client"; +import { sdkStreamMixin } from "@smithy/util-stream"; +export function createGetRequest(url) { + return new HttpRequest({ + protocol: url.protocol, + hostname: url.hostname, + port: Number(url.port), + path: url.pathname, + query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => { + acc[k] = v; + return acc; + }, {}), + fragment: url.hash, + }); +} +export async function getCredentials(response) { + const contentType = response?.headers["content-type"] ?? response?.headers["Content-Type"] ?? ""; + if (!contentType.includes("json")) { + console.warn("HTTP credential provider response header content-type was not application/json. Observed: " + contentType + "."); + } + const stream = sdkStreamMixin(response.body); + const str = await stream.transformToString(); + if (response.statusCode === 200) { + const parsed = JSON.parse(str); + if (typeof parsed.AccessKeyId !== "string" || + typeof parsed.SecretAccessKey !== "string" || + typeof parsed.Token !== "string" || + typeof parsed.Expiration !== "string") { + throw new CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " + + "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }"); + } + return { + accessKeyId: parsed.AccessKeyId, + secretAccessKey: parsed.SecretAccessKey, + sessionToken: parsed.Token, + expiration: parseRfc3339DateTime(parsed.Expiration), + }; + } + if (response.statusCode >= 400 && response.statusCode < 500) { + let parsedBody = {}; + try { + parsedBody = JSON.parse(str); + } + catch (e) { } + throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`), { + Code: parsedBody.Code, + Message: parsedBody.Message, + }); + } + throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`); +} diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js new file mode 100644 index 0000000..7006f3c --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js @@ -0,0 +1,13 @@ +export const retryWrapper = (toRetry, maxRetries, delayMs) => { + return async () => { + for (let i = 0; i < maxRetries; ++i) { + try { + return await toRetry(); + } + catch (e) { + await new Promise((resolve) => setTimeout(resolve, delayMs)); + } + } + return await toRetry(); + }; +}; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-es/index.browser.js b/node_modules/@aws-sdk/credential-provider-http/dist-es/index.browser.js new file mode 100644 index 0000000..98204c5 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-es/index.browser.js @@ -0,0 +1 @@ +export { fromHttp } from "./fromHttp/fromHttp.browser"; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-es/index.js b/node_modules/@aws-sdk/credential-provider-http/dist-es/index.js new file mode 100644 index 0000000..2911386 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-es/index.js @@ -0,0 +1 @@ +export { fromHttp } from "./fromHttp/fromHttp"; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/checkUrl.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/checkUrl.d.ts new file mode 100644 index 0000000..557b520 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/checkUrl.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + * + * @param url - to be validated. + * @throws if not acceptable to this provider. + */ +export declare const checkUrl: (url: URL) => void; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.browser.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.browser.d.ts new file mode 100644 index 0000000..0bac6d8 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.browser.d.ts @@ -0,0 +1,6 @@ +import { AwsCredentialIdentityProvider } from "@smithy/types"; +import type { FromHttpOptions } from "./fromHttpTypes"; +/** + * Creates a provider that gets credentials via HTTP request. + */ +export declare const fromHttp: (options: FromHttpOptions) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.d.ts new file mode 100644 index 0000000..0bac6d8 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.d.ts @@ -0,0 +1,6 @@ +import { AwsCredentialIdentityProvider } from "@smithy/types"; +import type { FromHttpOptions } from "./fromHttpTypes"; +/** + * Creates a provider that gets credentials via HTTP request. + */ +export declare const fromHttp: (options: FromHttpOptions) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttpTypes.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttpTypes.d.ts new file mode 100644 index 0000000..b751ded --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttpTypes.d.ts @@ -0,0 +1,69 @@ +import type { CredentialProviderOptions } from "@aws-sdk/types"; +/** + * @public + * + * Input for the fromHttp function in the HTTP Credentials Provider for Node.js. + */ +export interface FromHttpOptions extends CredentialProviderOptions { + /** + * If this value is provided, it will be used as-is. + * + * For browser environments, use instead {@link credentialsFullUri}. + */ + awsContainerCredentialsFullUri?: string; + /** + * If this value is provided instead of the full URI, it + * will be appended to the default link local host of 169.254.170.2. + * + * Not supported in browsers. + */ + awsContainerCredentialsRelativeUri?: string; + /** + * Will be read on each credentials request to + * add an Authorization request header value. + * + * Not supported in browsers. + */ + awsContainerAuthorizationTokenFile?: string; + /** + * An alternative to awsContainerAuthorizationTokenFile, + * this is the token value itself. + * + * For browser environments, use instead {@link authorizationToken}. + */ + awsContainerAuthorizationToken?: string; + /** + * BROWSER ONLY. + * + * In browsers, a relative URI is not allowed, and a full URI must be provided. + * HTTPS is required. + * + * This value is required for the browser environment. + */ + credentialsFullUri?: string; + /** + * BROWSER ONLY. + * + * Providing this value will set an "Authorization" request + * header value on the GET request. + */ + authorizationToken?: string; + /** + * Default is 3 retry attempts or 4 total attempts. + */ + maxRetries?: number; + /** + * Default is 1000ms. Time in milliseconds to spend waiting between retry attempts. + */ + timeout?: number; +} +/** + * @public + */ +export type HttpProviderCredentials = { + AccessKeyId: string; + SecretAccessKey: string; + Token: string; + AccountId?: string; + Expiration: string; +}; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/requestHelpers.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/requestHelpers.d.ts new file mode 100644 index 0000000..382edb3 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/requestHelpers.d.ts @@ -0,0 +1,11 @@ +import { AwsCredentialIdentity } from "@aws-sdk/types"; +import { HttpRequest } from "@smithy/protocol-http"; +import { HttpResponse } from "@smithy/types"; +/** + * @internal + */ +export declare function createGetRequest(url: URL): HttpRequest; +/** + * @internal + */ +export declare function getCredentials(response: HttpResponse): Promise; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/retry-wrapper.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/retry-wrapper.d.ts new file mode 100644 index 0000000..bf63add --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/retry-wrapper.d.ts @@ -0,0 +1,10 @@ +/** + * @internal + */ +export interface RetryableProvider { + (): Promise; +} +/** + * @internal + */ +export declare const retryWrapper: (toRetry: RetryableProvider, maxRetries: number, delayMs: number) => RetryableProvider; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/index.browser.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/index.browser.d.ts new file mode 100644 index 0000000..2a9e4ec --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/index.browser.d.ts @@ -0,0 +1,2 @@ +export { fromHttp } from "./fromHttp/fromHttp.browser"; +export type { FromHttpOptions, HttpProviderCredentials } from "./fromHttp/fromHttpTypes"; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/index.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/index.d.ts new file mode 100644 index 0000000..b1e9985 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/index.d.ts @@ -0,0 +1,2 @@ +export { fromHttp } from "./fromHttp/fromHttp"; +export type { FromHttpOptions, HttpProviderCredentials } from "./fromHttp/fromHttpTypes"; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/checkUrl.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/checkUrl.d.ts new file mode 100644 index 0000000..2fbcfe0 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/checkUrl.d.ts @@ -0,0 +1 @@ +export declare const checkUrl: (url: URL) => void; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.browser.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.browser.d.ts new file mode 100644 index 0000000..ed0c6d6 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.browser.d.ts @@ -0,0 +1,5 @@ +import { AwsCredentialIdentityProvider } from "@smithy/types"; +import { FromHttpOptions } from "./fromHttpTypes"; +export declare const fromHttp: ( + options: FromHttpOptions +) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.d.ts new file mode 100644 index 0000000..ed0c6d6 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttp.d.ts @@ -0,0 +1,5 @@ +import { AwsCredentialIdentityProvider } from "@smithy/types"; +import { FromHttpOptions } from "./fromHttpTypes"; +export declare const fromHttp: ( + options: FromHttpOptions +) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttpTypes.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttpTypes.d.ts new file mode 100644 index 0000000..767b6b0 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/fromHttpTypes.d.ts @@ -0,0 +1,18 @@ +import { CredentialProviderOptions } from "@aws-sdk/types"; +export interface FromHttpOptions extends CredentialProviderOptions { + awsContainerCredentialsFullUri?: string; + awsContainerCredentialsRelativeUri?: string; + awsContainerAuthorizationTokenFile?: string; + awsContainerAuthorizationToken?: string; + credentialsFullUri?: string; + authorizationToken?: string; + maxRetries?: number; + timeout?: number; +} +export type HttpProviderCredentials = { + AccessKeyId: string; + SecretAccessKey: string; + Token: string; + AccountId?: string; + Expiration: string; +}; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/requestHelpers.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/requestHelpers.d.ts new file mode 100644 index 0000000..b202762 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/requestHelpers.d.ts @@ -0,0 +1,7 @@ +import { AwsCredentialIdentity } from "@aws-sdk/types"; +import { HttpRequest } from "@smithy/protocol-http"; +import { HttpResponse } from "@smithy/types"; +export declare function createGetRequest(url: URL): HttpRequest; +export declare function getCredentials( + response: HttpResponse +): Promise; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/retry-wrapper.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/retry-wrapper.d.ts new file mode 100644 index 0000000..f992038 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/fromHttp/retry-wrapper.d.ts @@ -0,0 +1,8 @@ +export interface RetryableProvider { + (): Promise; +} +export declare const retryWrapper: ( + toRetry: RetryableProvider, + maxRetries: number, + delayMs: number +) => RetryableProvider; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/index.browser.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/index.browser.d.ts new file mode 100644 index 0000000..40696b9 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/index.browser.d.ts @@ -0,0 +1,5 @@ +export { fromHttp } from "./fromHttp/fromHttp.browser"; +export { + FromHttpOptions, + HttpProviderCredentials, +} from "./fromHttp/fromHttpTypes"; diff --git a/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..560256f --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/dist-types/ts3.4/index.d.ts @@ -0,0 +1,5 @@ +export { fromHttp } from "./fromHttp/fromHttp"; +export { + FromHttpOptions, + HttpProviderCredentials, +} from "./fromHttp/fromHttpTypes"; diff --git a/node_modules/@aws-sdk/credential-provider-http/package.json b/node_modules/@aws-sdk/credential-provider-http/package.json new file mode 100644 index 0000000..fbf8b21 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-http/package.json @@ -0,0 +1,67 @@ +{ + "name": "@aws-sdk/credential-provider-http", + "version": "3.535.0", + "description": "AWS credential provider for containers and HTTP sources", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "browser": "./dist-es/index.browser.js", + "react-native": "./dist-es/index.browser.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline credential-provider-http", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest" + }, + "keywords": [ + "aws", + "credentials" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/util-stream": "^2.2.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-provider-http", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/credential-provider-http" + } +} diff --git a/node_modules/@aws-sdk/credential-provider-ini/LICENSE b/node_modules/@aws-sdk/credential-provider-ini/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-ini/README.md b/node_modules/@aws-sdk/credential-provider-ini/README.md new file mode 100644 index 0000000..b4f3af1 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/README.md @@ -0,0 +1,11 @@ +# @aws-sdk/credential-provider-ini + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-ini/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-ini) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-ini.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-ini) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers) +instead. diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/fromIni.js b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/fromIni.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/fromIni.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js new file mode 100644 index 0000000..d97e9e8 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js @@ -0,0 +1,211 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/loadSts.ts +var loadSts_exports = {}; +__export(loadSts_exports, { + getDefaultRoleAssumer: () => import_client_sts.getDefaultRoleAssumer +}); +var import_client_sts; +var init_loadSts = __esm({ + "src/loadSts.ts"() { + import_client_sts = require("@aws-sdk/client-sts"); + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + fromIni: () => fromIni +}); +module.exports = __toCommonJS(src_exports); + +// src/fromIni.ts + + +// src/resolveProfileData.ts + + +// src/resolveAssumeRoleCredentials.ts + +var import_shared_ini_file_loader = require("@smithy/shared-ini-file-loader"); + +// src/resolveCredentialSource.ts +var import_property_provider = require("@smithy/property-provider"); +var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName) => { + const sourceProvidersMap = { + EcsContainer: (options) => Promise.resolve().then(() => __toESM(require("@smithy/credential-provider-imds"))).then(({ fromContainerMetadata }) => fromContainerMetadata(options)), + Ec2InstanceMetadata: (options) => Promise.resolve().then(() => __toESM(require("@smithy/credential-provider-imds"))).then(({ fromInstanceMetadata }) => fromInstanceMetadata(options)), + Environment: (options) => Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-env"))).then(({ fromEnv }) => fromEnv(options)) + }; + if (credentialSource in sourceProvidersMap) { + return sourceProvidersMap[credentialSource]; + } else { + throw new import_property_provider.CredentialsProviderError( + `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.` + ); + } +}, "resolveCredentialSource"); + +// src/resolveAssumeRoleCredentials.ts +var isAssumeRoleProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg) || isAssumeRoleWithProviderProfile(arg)), "isAssumeRoleProfile"); +var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg) => typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined", "isAssumeRoleWithSourceProfile"); +var isAssumeRoleWithProviderProfile = /* @__PURE__ */ __name((arg) => typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined", "isAssumeRoleWithProviderProfile"); +var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { + var _a; + (_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveAssumeRoleCredentials (STS)"); + const data = profiles[profileName]; + if (!options.roleAssumer) { + const { getDefaultRoleAssumer: getDefaultRoleAssumer2 } = await Promise.resolve().then(() => (init_loadSts(), loadSts_exports)); + options.roleAssumer = getDefaultRoleAssumer2( + { + ...options.clientConfig, + credentialProviderLogger: options.logger, + parentClientConfig: options == null ? void 0 : options.parentClientConfig + }, + options.clientPlugins + ); + } + const { source_profile } = data; + if (source_profile && source_profile in visitedProfiles) { + throw new import_property_provider.CredentialsProviderError( + `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), + false + ); + } + const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, { + ...visitedProfiles, + [source_profile]: true + }) : (await resolveCredentialSource(data.credential_source, profileName)(options))(); + const params = { + RoleArn: data.role_arn, + RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`, + ExternalId: data.external_id, + DurationSeconds: parseInt(data.duration_seconds || "3600", 10) + }; + const { mfa_serial } = data; + if (mfa_serial) { + if (!options.mfaCodeProvider) { + throw new import_property_provider.CredentialsProviderError( + `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, + false + ); + } + params.SerialNumber = mfa_serial; + params.TokenCode = await options.mfaCodeProvider(mfa_serial); + } + const sourceCreds = await sourceCredsProvider; + return options.roleAssumer(sourceCreds, params); +}, "resolveAssumeRoleCredentials"); + +// src/resolveProcessCredentials.ts +var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile"); +var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-process"))).then( + ({ fromProcess }) => fromProcess({ + ...options, + profile + })() +), "resolveProcessCredentials"); + +// src/resolveSsoCredentials.ts +var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => { + const { fromSSO } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso"))); + return fromSSO({ + profile, + logger: options.logger + })(); +}, "resolveSsoCredentials"); +var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); + +// src/resolveStaticCredentials.ts +var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1, "isStaticCredsProfile"); +var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => { + var _a; + (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveStaticCredentials"); + return Promise.resolve({ + accessKeyId: profile.aws_access_key_id, + secretAccessKey: profile.aws_secret_access_key, + sessionToken: profile.aws_session_token, + credentialScope: profile.aws_credential_scope + }); +}, "resolveStaticCredentials"); + +// src/resolveWebIdentityCredentials.ts +var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile"); +var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-web-identity"))).then( + ({ fromTokenFile }) => fromTokenFile({ + webIdentityTokenFile: profile.web_identity_token_file, + roleArn: profile.role_arn, + roleSessionName: profile.role_session_name, + roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, + logger: options.logger, + parentClientConfig: options.parentClientConfig + })() +), "resolveWebIdentityCredentials"); + +// src/resolveProfileData.ts +var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { + const data = profiles[profileName]; + if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isAssumeRoleProfile(data)) { + return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); + } + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isWebIdentityProfile(data)) { + return resolveWebIdentityCredentials(data, options); + } + if (isProcessProfile(data)) { + return resolveProcessCredentials(options, profileName); + } + if (isSsoProfile(data)) { + return await resolveSsoCredentials(profileName, options); + } + throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`); +}, "resolveProfileData"); + +// src/fromIni.ts +var fromIni = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "fromIni"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init); +}, "fromIni"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + fromIni +}); + diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/loadSts.js b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/loadSts.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/loadSts.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveAssumeRoleCredentials.js b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveAssumeRoleCredentials.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveAssumeRoleCredentials.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveCredentialSource.js b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveCredentialSource.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveCredentialSource.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProcessCredentials.js b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProcessCredentials.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProcessCredentials.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProfileData.js b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProfileData.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProfileData.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveSsoCredentials.js b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveSsoCredentials.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveSsoCredentials.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveStaticCredentials.js b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveStaticCredentials.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveStaticCredentials.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveWebIdentityCredentials.js b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveWebIdentityCredentials.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveWebIdentityCredentials.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js b/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js new file mode 100644 index 0000000..e8b8194 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js @@ -0,0 +1,7 @@ +import { getProfileName, parseKnownFiles } from "@smithy/shared-ini-file-loader"; +import { resolveProfileData } from "./resolveProfileData"; +export const fromIni = (init = {}) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-ini", "fromIni"); + const profiles = await parseKnownFiles(init); + return resolveProfileData(getProfileName(init), profiles, init); +}; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-es/index.js b/node_modules/@aws-sdk/credential-provider-ini/dist-es/index.js new file mode 100644 index 0000000..b019131 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-es/index.js @@ -0,0 +1 @@ +export * from "./fromIni"; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-es/loadSts.js b/node_modules/@aws-sdk/credential-provider-ini/dist-es/loadSts.js new file mode 100644 index 0000000..557bceb --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-es/loadSts.js @@ -0,0 +1,2 @@ +import { getDefaultRoleAssumer } from "@aws-sdk/client-sts"; +export { getDefaultRoleAssumer }; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js new file mode 100644 index 0000000..7e2e354 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js @@ -0,0 +1,53 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +import { getProfileName } from "@smithy/shared-ini-file-loader"; +import { resolveCredentialSource } from "./resolveCredentialSource"; +import { resolveProfileData } from "./resolveProfileData"; +export const isAssumeRoleProfile = (arg) => Boolean(arg) && + typeof arg === "object" && + typeof arg.role_arn === "string" && + ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && + ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && + ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && + (isAssumeRoleWithSourceProfile(arg) || isAssumeRoleWithProviderProfile(arg)); +const isAssumeRoleWithSourceProfile = (arg) => typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; +const isAssumeRoleWithProviderProfile = (arg) => typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; +export const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => { + options.logger?.debug("@aws-sdk/credential-provider-ini", "resolveAssumeRoleCredentials (STS)"); + const data = profiles[profileName]; + if (!options.roleAssumer) { + const { getDefaultRoleAssumer } = await import("./loadSts"); + options.roleAssumer = getDefaultRoleAssumer({ + ...options.clientConfig, + credentialProviderLogger: options.logger, + parentClientConfig: options?.parentClientConfig, + }, options.clientPlugins); + } + const { source_profile } = data; + if (source_profile && source_profile in visitedProfiles) { + throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` + + ` ${getProfileName(options)}. Profiles visited: ` + + Object.keys(visitedProfiles).join(", "), false); + } + const sourceCredsProvider = source_profile + ? resolveProfileData(source_profile, profiles, options, { + ...visitedProfiles, + [source_profile]: true, + }) + : (await resolveCredentialSource(data.credential_source, profileName)(options))(); + const params = { + RoleArn: data.role_arn, + RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`, + ExternalId: data.external_id, + DurationSeconds: parseInt(data.duration_seconds || "3600", 10), + }; + const { mfa_serial } = data; + if (mfa_serial) { + if (!options.mfaCodeProvider) { + throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, false); + } + params.SerialNumber = mfa_serial; + params.TokenCode = await options.mfaCodeProvider(mfa_serial); + } + const sourceCreds = await sourceCredsProvider; + return options.roleAssumer(sourceCreds, params); +}; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js new file mode 100644 index 0000000..13b0452 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js @@ -0,0 +1,15 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +export const resolveCredentialSource = (credentialSource, profileName) => { + const sourceProvidersMap = { + EcsContainer: (options) => import("@smithy/credential-provider-imds").then(({ fromContainerMetadata }) => fromContainerMetadata(options)), + Ec2InstanceMetadata: (options) => import("@smithy/credential-provider-imds").then(({ fromInstanceMetadata }) => fromInstanceMetadata(options)), + Environment: (options) => import("@aws-sdk/credential-provider-env").then(({ fromEnv }) => fromEnv(options)), + }; + if (credentialSource in sourceProvidersMap) { + return sourceProvidersMap[credentialSource]; + } + else { + throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` + + `expected EcsContainer or Ec2InstanceMetadata or Environment.`); + } +}; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js new file mode 100644 index 0000000..02738e7 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js @@ -0,0 +1,5 @@ +export const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string"; +export const resolveProcessCredentials = async (options, profile) => import("@aws-sdk/credential-provider-process").then(({ fromProcess }) => fromProcess({ + ...options, + profile, +})()); diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js new file mode 100644 index 0000000..cbed0cf --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js @@ -0,0 +1,28 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +import { isAssumeRoleProfile, resolveAssumeRoleCredentials } from "./resolveAssumeRoleCredentials"; +import { isProcessProfile, resolveProcessCredentials } from "./resolveProcessCredentials"; +import { isSsoProfile, resolveSsoCredentials } from "./resolveSsoCredentials"; +import { isStaticCredsProfile, resolveStaticCredentials } from "./resolveStaticCredentials"; +import { isWebIdentityProfile, resolveWebIdentityCredentials } from "./resolveWebIdentityCredentials"; +export const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}) => { + const data = profiles[profileName]; + if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isAssumeRoleProfile(data)) { + return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); + } + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isWebIdentityProfile(data)) { + return resolveWebIdentityCredentials(data, options); + } + if (isProcessProfile(data)) { + return resolveProcessCredentials(options, profileName); + } + if (isSsoProfile(data)) { + return await resolveSsoCredentials(profileName, options); + } + throw new CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`); +}; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js new file mode 100644 index 0000000..aae6a3e --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js @@ -0,0 +1,13 @@ +export const resolveSsoCredentials = async (profile, options = {}) => { + const { fromSSO } = await import("@aws-sdk/credential-provider-sso"); + return fromSSO({ + profile, + logger: options.logger, + })(); +}; +export const isSsoProfile = (arg) => arg && + (typeof arg.sso_start_url === "string" || + typeof arg.sso_account_id === "string" || + typeof arg.sso_session === "string" || + typeof arg.sso_region === "string" || + typeof arg.sso_role_name === "string"); diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js new file mode 100644 index 0000000..a611c49 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js @@ -0,0 +1,14 @@ +export const isStaticCredsProfile = (arg) => Boolean(arg) && + typeof arg === "object" && + typeof arg.aws_access_key_id === "string" && + typeof arg.aws_secret_access_key === "string" && + ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1; +export const resolveStaticCredentials = (profile, options) => { + options?.logger?.debug("@aws-sdk/credential-provider-ini", "resolveStaticCredentials"); + return Promise.resolve({ + accessKeyId: profile.aws_access_key_id, + secretAccessKey: profile.aws_secret_access_key, + sessionToken: profile.aws_session_token, + credentialScope: profile.aws_credential_scope, + }); +}; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js new file mode 100644 index 0000000..5c8e497 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js @@ -0,0 +1,13 @@ +export const isWebIdentityProfile = (arg) => Boolean(arg) && + typeof arg === "object" && + typeof arg.web_identity_token_file === "string" && + typeof arg.role_arn === "string" && + ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1; +export const resolveWebIdentityCredentials = async (profile, options) => import("@aws-sdk/credential-provider-web-identity").then(({ fromTokenFile }) => fromTokenFile({ + webIdentityTokenFile: profile.web_identity_token_file, + roleArn: profile.role_arn, + roleSessionName: profile.role_session_name, + roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, + logger: options.logger, + parentClientConfig: options.parentClientConfig, +})()); diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/fromIni.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/fromIni.d.ts new file mode 100644 index 0000000..8fa0ead --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/fromIni.d.ts @@ -0,0 +1,45 @@ +import type { AssumeRoleWithWebIdentityParams } from "@aws-sdk/credential-provider-web-identity"; +import type { CredentialProviderOptions } from "@aws-sdk/types"; +import { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +import type { AwsCredentialIdentity, AwsCredentialIdentityProvider, Pluggable } from "@smithy/types"; +import type { STSClientConfig } from "./loadSts"; +import { AssumeRoleParams } from "./resolveAssumeRoleCredentials"; +/** + * @public + */ +export interface FromIniInit extends SourceProfileInit, CredentialProviderOptions { + /** + * A function that returns a promise fulfilled with an MFA token code for + * the provided MFA Serial code. If a profile requires an MFA code and + * `mfaCodeProvider` is not a valid function, the credential provider + * promise will be rejected. + * + * @param mfaSerial The serial code of the MFA device specified. + */ + mfaCodeProvider?: (mfaSerial: string) => Promise; + /** + * A function that assumes a role and returns a promise fulfilled with + * credentials for the assumed role. + * + * @param sourceCreds The credentials with which to assume a role. + * @param params + */ + roleAssumer?: (sourceCreds: AwsCredentialIdentity, params: AssumeRoleParams) => Promise; + /** + * A function that assumes a role with web identity and returns a promise fulfilled with + * credentials for the assumed role. + * + * @param sourceCreds The credentials with which to assume a role. + * @param params + */ + roleAssumerWithWebIdentity?: (params: AssumeRoleWithWebIdentityParams) => Promise; + clientConfig?: STSClientConfig; + clientPlugins?: Pluggable[]; +} +/** + * @internal + * + * Creates a credential provider that will read from ini files and supports + * role assumption and multi-factor authentication. + */ +export declare const fromIni: (init?: FromIniInit) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/index.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/index.d.ts new file mode 100644 index 0000000..75680c0 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./fromIni"; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/loadSts.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/loadSts.d.ts new file mode 100644 index 0000000..c41f908 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/loadSts.d.ts @@ -0,0 +1,3 @@ +import { getDefaultRoleAssumer } from "@aws-sdk/client-sts"; +export { getDefaultRoleAssumer }; +export type { STSClientConfig } from "@aws-sdk/client-sts"; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts new file mode 100644 index 0000000..b07a1db --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts @@ -0,0 +1,44 @@ +import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types"; +import { FromIniInit } from "./fromIni"; +/** + * @internal + * + * @see http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#assumeRole-property + * TODO update the above to link to V3 docs + */ +export interface AssumeRoleParams { + /** + * The identifier of the role to be assumed. + */ + RoleArn: string; + /** + * A name for the assumed role session. + */ + RoleSessionName: string; + /** + * A unique identifier that is used by third parties when assuming roles in + * their customers' accounts. + */ + ExternalId?: string; + /** + * The identification number of the MFA device that is associated with the + * user who is making the `AssumeRole` call. + */ + SerialNumber?: string; + /** + * The value provided by the MFA device. + */ + TokenCode?: string; + /** + * The duration, in seconds, of the role session. + */ + DurationSeconds?: number; +} +/** + * @internal + */ +export declare const isAssumeRoleProfile: (arg: any) => boolean; +/** + * @internal + */ +export declare const resolveAssumeRoleCredentials: (profileName: string, profiles: ParsedIniData, options: FromIniInit, visitedProfiles?: Record) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveCredentialSource.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveCredentialSource.d.ts new file mode 100644 index 0000000..2209366 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveCredentialSource.d.ts @@ -0,0 +1,12 @@ +import type { CredentialProviderOptions } from "@aws-sdk/types"; +import { AwsCredentialIdentityProvider } from "@smithy/types"; +/** + * @internal + * + * Resolve the `credential_source` entry from the profile, and return the + * credential providers respectively. No memoization is needed for the + * credential source providers because memoization should be added outside the + * fromIni() provider. The source credential needs to be refreshed every time + * fromIni() is called. + */ +export declare const resolveCredentialSource: (credentialSource: string, profileName: string) => (options?: CredentialProviderOptions) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProcessCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProcessCredentials.d.ts new file mode 100644 index 0000000..7194518 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProcessCredentials.d.ts @@ -0,0 +1,16 @@ +import { Credentials, Profile } from "@aws-sdk/types"; +import { FromIniInit } from "./fromIni"; +/** + * @internal + */ +export interface ProcessProfile extends Profile { + credential_process: string; +} +/** + * @internal + */ +export declare const isProcessProfile: (arg: any) => arg is ProcessProfile; +/** + * @internal + */ +export declare const resolveProcessCredentials: (options: FromIniInit, profile: string) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProfileData.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProfileData.d.ts new file mode 100644 index 0000000..f41acbe --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProfileData.d.ts @@ -0,0 +1,6 @@ +import type { AwsCredentialIdentity, ParsedIniData } from "@smithy/types"; +import { FromIniInit } from "./fromIni"; +/** + * @internal + */ +export declare const resolveProfileData: (profileName: string, profiles: ParsedIniData, options: FromIniInit, visitedProfiles?: Record) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveSsoCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveSsoCredentials.d.ts new file mode 100644 index 0000000..3443ba7 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveSsoCredentials.d.ts @@ -0,0 +1,12 @@ +import type { SsoProfile } from "@aws-sdk/credential-provider-sso"; +import type { CredentialProviderOptions } from "@aws-sdk/types"; +import type { Profile } from "@smithy/types"; +/** + * @internal + */ +export declare const resolveSsoCredentials: (profile: string, options?: CredentialProviderOptions) => Promise; +/** + * @internal + * duplicated from \@aws-sdk/credential-provider-sso to defer import. + */ +export declare const isSsoProfile: (arg: Profile) => arg is Partial; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveStaticCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveStaticCredentials.d.ts new file mode 100644 index 0000000..36b1141 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveStaticCredentials.d.ts @@ -0,0 +1,19 @@ +import { AwsCredentialIdentity, Profile } from "@smithy/types"; +import { FromIniInit } from "./fromIni"; +/** + * @internal + */ +export interface StaticCredsProfile extends Profile { + aws_access_key_id: string; + aws_secret_access_key: string; + aws_session_token?: string; + aws_credential_scope?: string; +} +/** + * @internal + */ +export declare const isStaticCredsProfile: (arg: any) => arg is StaticCredsProfile; +/** + * @internal + */ +export declare const resolveStaticCredentials: (profile: StaticCredsProfile, options?: FromIniInit) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveWebIdentityCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveWebIdentityCredentials.d.ts new file mode 100644 index 0000000..acb1d45 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveWebIdentityCredentials.d.ts @@ -0,0 +1,18 @@ +import { AwsCredentialIdentity, Profile } from "@smithy/types"; +import { FromIniInit } from "./fromIni"; +/** + * @internal + */ +export interface WebIdentityProfile extends Profile { + web_identity_token_file: string; + role_arn: string; + role_session_name?: string; +} +/** + * @internal + */ +export declare const isWebIdentityProfile: (arg: any) => arg is WebIdentityProfile; +/** + * @internal + */ +export declare const resolveWebIdentityCredentials: (profile: WebIdentityProfile, options: FromIniInit) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/fromIni.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/fromIni.d.ts new file mode 100644 index 0000000..1191c97 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/fromIni.d.ts @@ -0,0 +1,27 @@ +import { AssumeRoleWithWebIdentityParams } from "@aws-sdk/credential-provider-web-identity"; +import { CredentialProviderOptions } from "@aws-sdk/types"; +import { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +import { + AwsCredentialIdentity, + AwsCredentialIdentityProvider, + Pluggable, +} from "@smithy/types"; +import { STSClientConfig } from "./loadSts"; +import { AssumeRoleParams } from "./resolveAssumeRoleCredentials"; +export interface FromIniInit + extends SourceProfileInit, + CredentialProviderOptions { + mfaCodeProvider?: (mfaSerial: string) => Promise; + roleAssumer?: ( + sourceCreds: AwsCredentialIdentity, + params: AssumeRoleParams + ) => Promise; + roleAssumerWithWebIdentity?: ( + params: AssumeRoleWithWebIdentityParams + ) => Promise; + clientConfig?: STSClientConfig; + clientPlugins?: Pluggable[]; +} +export declare const fromIni: ( + init?: FromIniInit +) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..b019131 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/index.d.ts @@ -0,0 +1 @@ +export * from "./fromIni"; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/loadSts.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/loadSts.d.ts new file mode 100644 index 0000000..57e2fc4 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/loadSts.d.ts @@ -0,0 +1,3 @@ +import { getDefaultRoleAssumer } from "@aws-sdk/client-sts"; +export { getDefaultRoleAssumer }; +export { STSClientConfig } from "@aws-sdk/client-sts"; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts new file mode 100644 index 0000000..48b246e --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts @@ -0,0 +1,17 @@ +import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types"; +import { FromIniInit } from "./fromIni"; +export interface AssumeRoleParams { + RoleArn: string; + RoleSessionName: string; + ExternalId?: string; + SerialNumber?: string; + TokenCode?: string; + DurationSeconds?: number; +} +export declare const isAssumeRoleProfile: (arg: any) => boolean; +export declare const resolveAssumeRoleCredentials: ( + profileName: string, + profiles: ParsedIniData, + options: FromIniInit, + visitedProfiles?: Record +) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveCredentialSource.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveCredentialSource.d.ts new file mode 100644 index 0000000..5b5afcb --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveCredentialSource.d.ts @@ -0,0 +1,8 @@ +import { CredentialProviderOptions } from "@aws-sdk/types"; +import { AwsCredentialIdentityProvider } from "@smithy/types"; +export declare const resolveCredentialSource: ( + credentialSource: string, + profileName: string +) => ( + options?: CredentialProviderOptions +) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProcessCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProcessCredentials.d.ts new file mode 100644 index 0000000..dbd5583 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProcessCredentials.d.ts @@ -0,0 +1,10 @@ +import { Credentials, Profile } from "@aws-sdk/types"; +import { FromIniInit } from "./fromIni"; +export interface ProcessProfile extends Profile { + credential_process: string; +} +export declare const isProcessProfile: (arg: any) => arg is ProcessProfile; +export declare const resolveProcessCredentials: ( + options: FromIniInit, + profile: string +) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProfileData.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProfileData.d.ts new file mode 100644 index 0000000..66b57b8 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProfileData.d.ts @@ -0,0 +1,8 @@ +import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types"; +import { FromIniInit } from "./fromIni"; +export declare const resolveProfileData: ( + profileName: string, + profiles: ParsedIniData, + options: FromIniInit, + visitedProfiles?: Record +) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts new file mode 100644 index 0000000..75beecb --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveSsoCredentials.d.ts @@ -0,0 +1,8 @@ +import { SsoProfile } from "@aws-sdk/credential-provider-sso"; +import { CredentialProviderOptions } from "@aws-sdk/types"; +import { Profile } from "@smithy/types"; +export declare const resolveSsoCredentials: ( + profile: string, + options?: CredentialProviderOptions +) => Promise; +export declare const isSsoProfile: (arg: Profile) => arg is Partial; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveStaticCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveStaticCredentials.d.ts new file mode 100644 index 0000000..cb5244b --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveStaticCredentials.d.ts @@ -0,0 +1,15 @@ +import { AwsCredentialIdentity, Profile } from "@smithy/types"; +import { FromIniInit } from "./fromIni"; +export interface StaticCredsProfile extends Profile { + aws_access_key_id: string; + aws_secret_access_key: string; + aws_session_token?: string; + aws_credential_scope?: string; +} +export declare const isStaticCredsProfile: ( + arg: any +) => arg is StaticCredsProfile; +export declare const resolveStaticCredentials: ( + profile: StaticCredsProfile, + options?: FromIniInit +) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveWebIdentityCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveWebIdentityCredentials.d.ts new file mode 100644 index 0000000..4179f94 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveWebIdentityCredentials.d.ts @@ -0,0 +1,14 @@ +import { AwsCredentialIdentity, Profile } from "@smithy/types"; +import { FromIniInit } from "./fromIni"; +export interface WebIdentityProfile extends Profile { + web_identity_token_file: string; + role_arn: string; + role_session_name?: string; +} +export declare const isWebIdentityProfile: ( + arg: any +) => arg is WebIdentityProfile; +export declare const resolveWebIdentityCredentials: ( + profile: WebIdentityProfile, + options: FromIniInit +) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-ini/package.json b/node_modules/@aws-sdk/credential-provider-ini/package.json new file mode 100644 index 0000000..0394f52 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-ini/package.json @@ -0,0 +1,67 @@ +{ + "name": "@aws-sdk/credential-provider-ini", + "version": "3.535.0", + "description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline credential-provider-ini", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest" + }, + "keywords": [ + "aws", + "credentials" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sts": "3.535.0", + "@aws-sdk/credential-provider-env": "3.535.0", + "@aws-sdk/credential-provider-process": "3.535.0", + "@aws-sdk/credential-provider-sso": "3.535.0", + "@aws-sdk/credential-provider-web-identity": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@smithy/credential-provider-imds": "^2.3.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-provider-ini", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/credential-provider-ini" + } +} diff --git a/node_modules/@aws-sdk/credential-provider-node/LICENSE b/node_modules/@aws-sdk/credential-provider-node/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-node/README.md b/node_modules/@aws-sdk/credential-provider-node/README.md new file mode 100644 index 0000000..6fd902d --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/README.md @@ -0,0 +1,104 @@ +# @aws-sdk/credential-provider-node + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-node/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-node) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-node.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-node) + +## AWS Credential Provider for Node.JS + +This module provides a factory function, `fromEnv`, that will attempt to source +AWS credentials from a Node.JS environment. It will attempt to find credentials +from the following sources (listed in order of precedence): + +- Environment variables exposed via `process.env` +- SSO credentials from token cache +- Web identity token credentials +- Shared credentials and config ini files +- The EC2/ECS Instance Metadata Service + +The default credential provider will invoke one provider at a time and only +continue to the next if no credentials have been located. For example, if the +process finds values defined via the `AWS_ACCESS_KEY_ID` and +`AWS_SECRET_ACCESS_KEY` environment variables, the files at `~/.aws/credentials` +and `~/.aws/config` will not be read, nor will any messages be sent to the +Instance Metadata Service. + +If invalid configuration is encountered (such as a profile in +`~/.aws/credentials` specifying as its `source_profile` the name of a profile +that does not exist), then the chained provider will be rejected with an error +and will not invoke the next provider in the list. + +_IMPORTANT_: if you intend to acquire credentials using EKS +[IAM Roles for Service Accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html) +then you must explicitly specify a value for `roleAssumerWithWebIdentity`. There is a +default function available in `@aws-sdk/client-sts` package. An example of using +this: + +```js +const { getDefaultRoleAssumerWithWebIdentity } = require("@aws-sdk/client-sts"); +const { defaultProvider } = require("@aws-sdk/credential-provider-node"); +const { S3Client, GetObjectCommand } = require("@aws-sdk/client-s3"); + +const provider = defaultProvider({ + roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity({ + // You must explicitly pass a region if you are not using us-east-1 + region: "eu-west-1" + }), +}); + +const client = new S3Client({ credentialDefaultProvider: provider }); +``` + +_IMPORTANT_: We provide a wrapper of this provider in `@aws-sdk/credential-providers` +package to save you from importing `getDefaultRoleAssumerWithWebIdentity()` or +`getDefaultRoleAssume()` from STS package. Similarly, you can do: + +```js +const { fromNodeProviderChain } = require("@aws-sdk/credential-providers"); + +const credentials = fromNodeProviderChain(); + +const client = new S3Client({ credentials }); +``` + +## Supported configuration + +You may customize how credentials are resolved by providing an options hash to +the `defaultProvider` factory function. The following options are +supported: + +- `profile` - The configuration profile to use. If not specified, the provider + will use the value in the `AWS_PROFILE` environment variable or a default of + `default`. +- `filepath` - The path to the shared credentials file. If not specified, the + provider will use the value in the `AWS_SHARED_CREDENTIALS_FILE` environment + variable or a default of `~/.aws/credentials`. +- `configFilepath` - The path to the shared config file. If not specified, the + provider will use the value in the `AWS_CONFIG_FILE` environment variable or a + default of `~/.aws/config`. +- `mfaCodeProvider` - A function that returns a a promise fulfilled with an + MFA token code for the provided MFA Serial code. If a profile requires an MFA + code and `mfaCodeProvider` is not a valid function, the credential provider + promise will be rejected. +- `roleAssumer` - A function that assumes a role and returns a promise + fulfilled with credentials for the assumed role. If not specified, no role + will be assumed, and an error will be thrown. +- `roleArn` - ARN to assume. If not specified, the provider will use the value + in the `AWS_ROLE_ARN` environment variable. +- `webIdentityTokenFile` - File location of where the `OIDC` token is stored. + If not specified, the provider will use the value in the `AWS_WEB_IDENTITY_TOKEN_FILE` + environment variable. +- `roleAssumerWithWebIdentity` - A function that assumes a role with web identity and + returns a promise fulfilled with credentials for the assumed role. +- `timeout` - The connection timeout (in milliseconds) to apply to any remote + requests. If not specified, a default value of `1000` (one second) is used. +- `maxRetries` - The maximum number of times any HTTP connections should be + retried. If not specified, a default value of `0` will be used. + +## Related packages: + +- [AWS Credential Provider for Node.JS - Environment Variables](../credential-provider-env) +- [AWS Credential Provider for Node.JS - SSO](../credential-provider-sso) +- [AWS Credential Provider for Node.JS - Web Identity](../credential-provider-web-identity) +- [AWS Credential Provider for Node.JS - Shared Configuration Files](../credential-provider-ini) +- [AWS Credential Provider for Node.JS - Instance and Container Metadata](../credential-provider-imds) +- [AWS Shared Configuration File Loader](../shared-ini-file-loader) diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-cjs/defaultProvider.js b/node_modules/@aws-sdk/credential-provider-node/dist-cjs/defaultProvider.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-cjs/defaultProvider.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js b/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js new file mode 100644 index 0000000..d4c970d --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js @@ -0,0 +1,125 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + credentialsTreatedAsExpired: () => credentialsTreatedAsExpired, + credentialsWillNeedRefresh: () => credentialsWillNeedRefresh, + defaultProvider: () => defaultProvider +}); +module.exports = __toCommonJS(src_exports); + +// src/defaultProvider.ts + +var import_shared_ini_file_loader = require("@smithy/shared-ini-file-loader"); + +// src/remoteProvider.ts +var import_property_provider = require("@smithy/property-provider"); +var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +var remoteProvider = /* @__PURE__ */ __name(async (init) => { + var _a, _b; + const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require("@smithy/credential-provider-imds"))); + if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromHttp/fromContainerMetadata"); + const { fromHttp } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-http"))); + return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init)); + } + if (process.env[ENV_IMDS_DISABLED]) { + return async () => { + throw new import_property_provider.CredentialsProviderError("EC2 Instance Metadata Service access disabled"); + }; + } + (_b = init.logger) == null ? void 0 : _b.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromInstanceMetadata"); + return fromInstanceMetadata(init); +}, "remoteProvider"); + +// src/defaultProvider.ts +var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)( + (0, import_property_provider.chain)( + ...init.profile || process.env[import_shared_ini_file_loader.ENV_PROFILE] ? [] : [ + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromEnv"); + const { fromEnv } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-env"))); + return fromEnv(init)(); + } + ], + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + throw new import_property_provider.CredentialsProviderError( + "Skipping SSO provider in default chain (inputs do not include SSO fields)." + ); + } + const { fromSSO } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso"))); + return fromSSO(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromIni"); + const { fromIni } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-ini"))); + return fromIni(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromProcess"); + const { fromProcess } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-process"))); + return fromProcess(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromTokenFile"); + const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-web-identity"))); + return fromTokenFile(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::remoteProvider"); + return (await remoteProvider(init))(); + }, + async () => { + throw new import_property_provider.CredentialsProviderError("Could not load credentials from any providers", false); + } + ), + credentialsTreatedAsExpired, + credentialsWillNeedRefresh +), "defaultProvider"); +var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0, "credentialsWillNeedRefresh"); +var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + defaultProvider, + credentialsWillNeedRefresh, + credentialsTreatedAsExpired +}); + diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-cjs/remoteProvider.js b/node_modules/@aws-sdk/credential-provider-node/dist-cjs/remoteProvider.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-cjs/remoteProvider.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js b/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js new file mode 100644 index 0000000..6b0bf5e --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js @@ -0,0 +1,39 @@ +import { chain, CredentialsProviderError, memoize } from "@smithy/property-provider"; +import { ENV_PROFILE } from "@smithy/shared-ini-file-loader"; +import { remoteProvider } from "./remoteProvider"; +export const defaultProvider = (init = {}) => memoize(chain(...(init.profile || process.env[ENV_PROFILE] + ? [] + : [ + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromEnv"); + const { fromEnv } = await import("@aws-sdk/credential-provider-env"); + return 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 CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields)."); + } + const { fromSSO } = await import("@aws-sdk/credential-provider-sso"); + return fromSSO(init)(); +}, async () => { + init.logger?.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromIni"); + const { fromIni } = await import("@aws-sdk/credential-provider-ini"); + return fromIni(init)(); +}, async () => { + init.logger?.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromProcess"); + const { fromProcess } = await import("@aws-sdk/credential-provider-process"); + return fromProcess(init)(); +}, async () => { + init.logger?.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromTokenFile"); + const { fromTokenFile } = await import("@aws-sdk/credential-provider-web-identity"); + return fromTokenFile(init)(); +}, async () => { + init.logger?.debug("@aws-sdk/credential-provider-node", "defaultProvider::remoteProvider"); + return (await remoteProvider(init))(); +}, async () => { + throw new CredentialsProviderError("Could not load credentials from any providers", false); +}), credentialsTreatedAsExpired, credentialsWillNeedRefresh); +export const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined; +export const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000; diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-es/index.js b/node_modules/@aws-sdk/credential-provider-node/dist-es/index.js new file mode 100644 index 0000000..c82818e --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-es/index.js @@ -0,0 +1 @@ +export * from "./defaultProvider"; diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js b/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js new file mode 100644 index 0000000..9a36224 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js @@ -0,0 +1,17 @@ +import { chain, CredentialsProviderError } from "@smithy/property-provider"; +export const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +export const remoteProvider = async (init) => { + const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import("@smithy/credential-provider-imds"); + if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { + init.logger?.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromHttp/fromContainerMetadata"); + const { fromHttp } = await import("@aws-sdk/credential-provider-http"); + return chain(fromHttp(init), fromContainerMetadata(init)); + } + if (process.env[ENV_IMDS_DISABLED]) { + return async () => { + throw new CredentialsProviderError("EC2 Instance Metadata Service access disabled"); + }; + } + init.logger?.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromInstanceMetadata"); + return fromInstanceMetadata(init); +}; diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-types/defaultProvider.d.ts b/node_modules/@aws-sdk/credential-provider-node/dist-types/defaultProvider.d.ts new file mode 100644 index 0000000..5204c44 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-types/defaultProvider.d.ts @@ -0,0 +1,57 @@ +import type { FromIniInit } from "@aws-sdk/credential-provider-ini"; +import type { FromProcessInit } from "@aws-sdk/credential-provider-process"; +import type { FromSSOInit, SsoCredentialsParameters } from "@aws-sdk/credential-provider-sso"; +import type { FromTokenFileInit } from "@aws-sdk/credential-provider-web-identity"; +import type { RemoteProviderInit } from "@smithy/credential-provider-imds"; +import { AwsCredentialIdentity, MemoizedProvider } from "@smithy/types"; +/** + * @public + */ +export type DefaultProviderInit = FromIniInit & RemoteProviderInit & FromProcessInit & (FromSSOInit & Partial) & FromTokenFileInit; +/** + * Creates a credential provider that will attempt to find credentials from the + * following sources (listed in order of precedence): + * * Environment variables exposed via `process.env` + * * SSO credentials from token cache + * * Web identity token credentials + * * Shared credentials and config ini files + * * The EC2/ECS Instance Metadata Service + * + * The default credential provider will invoke one provider at a time and only + * continue to the next if no credentials have been located. For example, if + * the process finds values defined via the `AWS_ACCESS_KEY_ID` and + * `AWS_SECRET_ACCESS_KEY` environment variables, the files at + * `~/.aws/credentials` and `~/.aws/config` will not be read, nor will any + * messages be sent to the Instance Metadata Service. + * + * @param init Configuration that is passed to each individual + * provider + * + * @see {@link fromEnv} The function used to source credentials from + * environment variables. + * @see {@link fromSSO} The function used to source credentials from + * resolved SSO token cache. + * @see {@link fromTokenFile} The function used to source credentials from + * token file. + * @see {@link fromIni} The function used to source credentials from INI + * files. + * @see {@link fromProcess} The function used to sources credentials from + * credential_process in INI files. + * @see {@link fromInstanceMetadata} The function used to source credentials from the + * EC2 Instance Metadata Service. + * @see {@link fromContainerMetadata} The function used to source credentials from the + * ECS Container Metadata Service. + */ +export declare const defaultProvider: (init?: DefaultProviderInit) => MemoizedProvider; +/** + * @internal + * + * @returns credentials have expiration. + */ +export declare const credentialsWillNeedRefresh: (credentials: AwsCredentialIdentity) => boolean; +/** + * @internal + * + * @returns credentials with less than 5 minutes left. + */ +export declare const credentialsTreatedAsExpired: (credentials: AwsCredentialIdentity) => boolean; diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-types/index.d.ts b/node_modules/@aws-sdk/credential-provider-node/dist-types/index.d.ts new file mode 100644 index 0000000..c82818e --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-types/index.d.ts @@ -0,0 +1 @@ +export * from "./defaultProvider"; diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-types/remoteProvider.d.ts b/node_modules/@aws-sdk/credential-provider-node/dist-types/remoteProvider.d.ts new file mode 100644 index 0000000..241c297 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-types/remoteProvider.d.ts @@ -0,0 +1,10 @@ +import type { RemoteProviderInit } from "@smithy/credential-provider-imds"; +import type { AwsCredentialIdentityProvider } from "@smithy/types"; +/** + * @internal + */ +export declare const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +/** + * @internal + */ +export declare const remoteProvider: (init: RemoteProviderInit) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/defaultProvider.d.ts b/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/defaultProvider.d.ts new file mode 100644 index 0000000..59048fc --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/defaultProvider.d.ts @@ -0,0 +1,23 @@ +import { FromIniInit } from "@aws-sdk/credential-provider-ini"; +import { FromProcessInit } from "@aws-sdk/credential-provider-process"; +import { + FromSSOInit, + SsoCredentialsParameters, +} from "@aws-sdk/credential-provider-sso"; +import { FromTokenFileInit } from "@aws-sdk/credential-provider-web-identity"; +import { RemoteProviderInit } from "@smithy/credential-provider-imds"; +import { AwsCredentialIdentity, MemoizedProvider } from "@smithy/types"; +export type DefaultProviderInit = FromIniInit & + RemoteProviderInit & + FromProcessInit & + (FromSSOInit & Partial) & + FromTokenFileInit; +export declare const defaultProvider: ( + init?: DefaultProviderInit +) => MemoizedProvider; +export declare const credentialsWillNeedRefresh: ( + credentials: AwsCredentialIdentity +) => boolean; +export declare const credentialsTreatedAsExpired: ( + credentials: AwsCredentialIdentity +) => boolean; diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..c82818e --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/index.d.ts @@ -0,0 +1 @@ +export * from "./defaultProvider"; diff --git a/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/remoteProvider.d.ts b/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/remoteProvider.d.ts new file mode 100644 index 0000000..9318823 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/remoteProvider.d.ts @@ -0,0 +1,6 @@ +import { RemoteProviderInit } from "@smithy/credential-provider-imds"; +import { AwsCredentialIdentityProvider } from "@smithy/types"; +export declare const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +export declare const remoteProvider: ( + init: RemoteProviderInit +) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-node/package.json b/node_modules/@aws-sdk/credential-provider-node/package.json new file mode 100644 index 0000000..51fd0b3 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-node/package.json @@ -0,0 +1,69 @@ +{ + "name": "@aws-sdk/credential-provider-node", + "version": "3.535.0", + "description": "AWS credential provider that sources credentials from a Node.JS environment. ", + "engines": { + "node": ">=14.0.0" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline credential-provider-node", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest", + "test:integration": "jest -c jest.config.integ.js" + }, + "keywords": [ + "aws", + "credentials" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.535.0", + "@aws-sdk/credential-provider-http": "3.535.0", + "@aws-sdk/credential-provider-ini": "3.535.0", + "@aws-sdk/credential-provider-process": "3.535.0", + "@aws-sdk/credential-provider-sso": "3.535.0", + "@aws-sdk/credential-provider-web-identity": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@smithy/credential-provider-imds": "^2.3.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "types": "./dist-types/index.d.ts", + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-provider-node", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/credential-provider-node" + } +} diff --git a/node_modules/@aws-sdk/credential-provider-process/LICENSE b/node_modules/@aws-sdk/credential-provider-process/LICENSE new file mode 100644 index 0000000..f9a6673 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-process/README.md b/node_modules/@aws-sdk/credential-provider-process/README.md new file mode 100644 index 0000000..4e9d9bd --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/README.md @@ -0,0 +1,11 @@ +# @aws-sdk/credential-provider-process + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-process/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-process) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-process.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-process) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers) +instead. diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-cjs/ProcessCredentials.js b/node_modules/@aws-sdk/credential-provider-process/dist-cjs/ProcessCredentials.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-cjs/ProcessCredentials.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-cjs/fromProcess.js b/node_modules/@aws-sdk/credential-provider-process/dist-cjs/fromProcess.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-cjs/fromProcess.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-cjs/getValidatedProcessCredentials.js b/node_modules/@aws-sdk/credential-provider-process/dist-cjs/getValidatedProcessCredentials.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-cjs/getValidatedProcessCredentials.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js b/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js new file mode 100644 index 0000000..f9b710b --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js @@ -0,0 +1,98 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + fromProcess: () => fromProcess +}); +module.exports = __toCommonJS(src_exports); + +// src/fromProcess.ts +var import_shared_ini_file_loader = require("@smithy/shared-ini-file-loader"); + +// src/resolveProcessCredentials.ts +var import_property_provider = require("@smithy/property-provider"); +var import_child_process = require("child_process"); +var import_util = require("util"); + +// src/getValidatedProcessCredentials.ts +var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => { + if (data.Version !== 1) { + throw Error(`Profile ${profileName} credential_process did not return Version 1.`); + } + if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) { + throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); + } + if (data.Expiration) { + const currentTime = /* @__PURE__ */ new Date(); + const expireTime = new Date(data.Expiration); + if (expireTime < currentTime) { + throw Error(`Profile ${profileName} credential_process returned expired credentials.`); + } + } + return { + accessKeyId: data.AccessKeyId, + secretAccessKey: data.SecretAccessKey, + ...data.SessionToken && { sessionToken: data.SessionToken }, + ...data.Expiration && { expiration: new Date(data.Expiration) }, + ...data.CredentialScope && { credentialScope: data.CredentialScope } + }; +}, "getValidatedProcessCredentials"); + +// src/resolveProcessCredentials.ts +var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles) => { + const profile = profiles[profileName]; + if (profiles[profileName]) { + const credentialProcess = profile["credential_process"]; + if (credentialProcess !== void 0) { + const execPromise = (0, import_util.promisify)(import_child_process.exec); + try { + const { stdout } = await execPromise(credentialProcess); + let data; + try { + data = JSON.parse(stdout.trim()); + } catch { + throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); + } + return getValidatedProcessCredentials(profileName, data); + } catch (error) { + throw new import_property_provider.CredentialsProviderError(error.message); + } + } else { + throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`); + } + } else { + throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`); + } +}, "resolveProcessCredentials"); + +// src/fromProcess.ts +var fromProcess = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process", "fromProcess"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles); +}, "fromProcess"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + fromProcess +}); + diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-cjs/resolveProcessCredentials.js b/node_modules/@aws-sdk/credential-provider-process/dist-cjs/resolveProcessCredentials.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-cjs/resolveProcessCredentials.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-es/ProcessCredentials.js b/node_modules/@aws-sdk/credential-provider-process/dist-es/ProcessCredentials.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-es/ProcessCredentials.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js b/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js new file mode 100644 index 0000000..af4ceb0 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js @@ -0,0 +1,7 @@ +import { getProfileName, parseKnownFiles } from "@smithy/shared-ini-file-loader"; +import { resolveProcessCredentials } from "./resolveProcessCredentials"; +export const fromProcess = (init = {}) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-process", "fromProcess"); + const profiles = await parseKnownFiles(init); + return resolveProcessCredentials(getProfileName(init), profiles); +}; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js b/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js new file mode 100644 index 0000000..3021371 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js @@ -0,0 +1,22 @@ +export const getValidatedProcessCredentials = (profileName, data) => { + if (data.Version !== 1) { + throw Error(`Profile ${profileName} credential_process did not return Version 1.`); + } + if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) { + throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); + } + if (data.Expiration) { + const currentTime = new Date(); + const expireTime = new Date(data.Expiration); + if (expireTime < currentTime) { + throw Error(`Profile ${profileName} credential_process returned expired credentials.`); + } + } + return { + accessKeyId: data.AccessKeyId, + secretAccessKey: data.SecretAccessKey, + ...(data.SessionToken && { sessionToken: data.SessionToken }), + ...(data.Expiration && { expiration: new Date(data.Expiration) }), + ...(data.CredentialScope && { credentialScope: data.CredentialScope }), + }; +}; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-es/index.js b/node_modules/@aws-sdk/credential-provider-process/dist-es/index.js new file mode 100644 index 0000000..b921d35 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-es/index.js @@ -0,0 +1 @@ +export * from "./fromProcess"; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js b/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js new file mode 100644 index 0000000..78ed8ab --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js @@ -0,0 +1,33 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +import { exec } from "child_process"; +import { promisify } from "util"; +import { getValidatedProcessCredentials } from "./getValidatedProcessCredentials"; +export const resolveProcessCredentials = async (profileName, profiles) => { + const profile = profiles[profileName]; + if (profiles[profileName]) { + const credentialProcess = profile["credential_process"]; + if (credentialProcess !== undefined) { + const execPromise = promisify(exec); + try { + const { stdout } = await execPromise(credentialProcess); + let data; + try { + data = JSON.parse(stdout.trim()); + } + catch { + throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); + } + return getValidatedProcessCredentials(profileName, data); + } + catch (error) { + throw new CredentialsProviderError(error.message); + } + } + else { + throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`); + } + } + else { + throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`); + } +}; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-types/ProcessCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-process/dist-types/ProcessCredentials.d.ts new file mode 100644 index 0000000..af0ca42 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-types/ProcessCredentials.d.ts @@ -0,0 +1,11 @@ +/** + * @internal + */ +export type ProcessCredentials = { + Version: number; + AccessKeyId: string; + SecretAccessKey: string; + SessionToken?: string; + Expiration?: number; + CredentialScope?: string; +}; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-types/fromProcess.d.ts b/node_modules/@aws-sdk/credential-provider-process/dist-types/fromProcess.d.ts new file mode 100644 index 0000000..7ba1159 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-types/fromProcess.d.ts @@ -0,0 +1,15 @@ +import type { CredentialProviderOptions } from "@aws-sdk/types"; +import { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +import { AwsCredentialIdentityProvider } from "@smithy/types"; +/** + * @internal + */ +export interface FromProcessInit extends SourceProfileInit, CredentialProviderOptions { +} +/** + * @internal + * + * Creates a credential provider that will read from a credential_process specified + * in ini files. + */ +export declare const fromProcess: (init?: FromProcessInit) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-types/getValidatedProcessCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-process/dist-types/getValidatedProcessCredentials.d.ts new file mode 100644 index 0000000..4864690 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-types/getValidatedProcessCredentials.d.ts @@ -0,0 +1,6 @@ +import { AwsCredentialIdentity } from "@smithy/types"; +import { ProcessCredentials } from "./ProcessCredentials"; +/** + * @internal + */ +export declare const getValidatedProcessCredentials: (profileName: string, data: ProcessCredentials) => AwsCredentialIdentity; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-types/index.d.ts b/node_modules/@aws-sdk/credential-provider-process/dist-types/index.d.ts new file mode 100644 index 0000000..adad939 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-types/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./fromProcess"; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-types/resolveProcessCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-process/dist-types/resolveProcessCredentials.d.ts new file mode 100644 index 0000000..be7881e --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-types/resolveProcessCredentials.d.ts @@ -0,0 +1,5 @@ +import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types"; +/** + * @internal + */ +export declare const resolveProcessCredentials: (profileName: string, profiles: ParsedIniData) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/ProcessCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/ProcessCredentials.d.ts new file mode 100644 index 0000000..3a8d739 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/ProcessCredentials.d.ts @@ -0,0 +1,8 @@ +export type ProcessCredentials = { + Version: number; + AccessKeyId: string; + SecretAccessKey: string; + SessionToken?: string; + Expiration?: number; + CredentialScope?: string; +}; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/fromProcess.d.ts b/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/fromProcess.d.ts new file mode 100644 index 0000000..4c2d65a --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/fromProcess.d.ts @@ -0,0 +1,9 @@ +import { CredentialProviderOptions } from "@aws-sdk/types"; +import { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +import { AwsCredentialIdentityProvider } from "@smithy/types"; +export interface FromProcessInit + extends SourceProfileInit, + CredentialProviderOptions {} +export declare const fromProcess: ( + init?: FromProcessInit +) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/getValidatedProcessCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/getValidatedProcessCredentials.d.ts new file mode 100644 index 0000000..a5cd7d9 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/getValidatedProcessCredentials.d.ts @@ -0,0 +1,6 @@ +import { AwsCredentialIdentity } from "@smithy/types"; +import { ProcessCredentials } from "./ProcessCredentials"; +export declare const getValidatedProcessCredentials: ( + profileName: string, + data: ProcessCredentials +) => AwsCredentialIdentity; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..b921d35 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/index.d.ts @@ -0,0 +1 @@ +export * from "./fromProcess"; diff --git a/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/resolveProcessCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/resolveProcessCredentials.d.ts new file mode 100644 index 0000000..0903a2f --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/resolveProcessCredentials.d.ts @@ -0,0 +1,5 @@ +import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types"; +export declare const resolveProcessCredentials: ( + profileName: string, + profiles: ParsedIniData +) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-process/package.json b/node_modules/@aws-sdk/credential-provider-process/package.json new file mode 100644 index 0000000..82bafb4 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-process/package.json @@ -0,0 +1,61 @@ +{ + "name": "@aws-sdk/credential-provider-process", + "version": "3.535.0", + "description": "AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline credential-provider-process", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest" + }, + "keywords": [ + "aws", + "credentials" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-provider-process", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/credential-provider-process" + } +} diff --git a/node_modules/@aws-sdk/credential-provider-sso/LICENSE b/node_modules/@aws-sdk/credential-provider-sso/LICENSE new file mode 100644 index 0000000..f9a6673 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-sso/README.md b/node_modules/@aws-sdk/credential-provider-sso/README.md new file mode 100644 index 0000000..aba3fa8 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/README.md @@ -0,0 +1,11 @@ +# @aws-sdk/credential-provider-sso + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-sso/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-sso) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-sso.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-sso) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers) +instead. diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/fromSSO.js b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/fromSSO.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/fromSSO.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js new file mode 100644 index 0000000..957aedc --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js @@ -0,0 +1,201 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/loadSso.ts +var loadSso_exports = {}; +__export(loadSso_exports, { + GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand, + SSOClient: () => import_client_sso.SSOClient +}); +var import_client_sso; +var init_loadSso = __esm({ + "src/loadSso.ts"() { + import_client_sso = require("@aws-sdk/client-sso"); + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + fromSSO: () => fromSSO, + isSsoProfile: () => isSsoProfile, + validateSsoProfile: () => validateSsoProfile +}); +module.exports = __toCommonJS(src_exports); + +// src/fromSSO.ts + + + +// src/isSsoProfile.ts +var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); + +// src/resolveSSOCredentials.ts +var import_token_providers = require("@aws-sdk/token-providers"); +var import_property_provider = require("@smithy/property-provider"); +var import_shared_ini_file_loader = require("@smithy/shared-ini-file-loader"); +var SHOULD_FAIL_CREDENTIAL_CHAIN = false; +var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig, + profile +}) => { + let token; + const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; + if (ssoSession) { + try { + const _token = await (0, import_token_providers.fromSso)({ profile })(); + token = { + accessToken: _token.token, + expiresAt: new Date(_token.expiration).toISOString() + }; + } catch (e) { + throw new import_property_provider.CredentialsProviderError(e.message, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + } else { + try { + token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl); + } catch (e) { + throw new import_property_provider.CredentialsProviderError( + `The SSO session associated with this profile is invalid. ${refreshMessage}`, + SHOULD_FAIL_CREDENTIAL_CHAIN + ); + } + } + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { + throw new import_property_provider.CredentialsProviderError( + `The SSO session associated with this profile has expired. ${refreshMessage}`, + SHOULD_FAIL_CREDENTIAL_CHAIN + ); + } + const { accessToken } = token; + const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports)); + const sso = ssoClient || new SSOClient2( + Object.assign({}, clientConfig ?? {}, { + region: (clientConfig == null ? void 0 : clientConfig.region) ?? ssoRegion + }) + ); + let ssoResp; + try { + ssoResp = await sso.send( + new GetRoleCredentialsCommand2({ + accountId: ssoAccountId, + roleName: ssoRoleName, + accessToken + }) + ); + } catch (e) { + throw import_property_provider.CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope } = {} } = ssoResp; + if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { + throw new import_property_provider.CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN); + } + return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope }; +}, "resolveSSOCredentials"); + +// src/validateSsoProfile.ts + +var validateSsoProfile = /* @__PURE__ */ __name((profile) => { + const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; + if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { + throw new import_property_provider.CredentialsProviderError( + `Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join( + ", " + )} +Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, + false + ); + } + return profile; +}, "validateSsoProfile"); + +// src/fromSSO.ts +var fromSSO = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-sso", "fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + const { ssoClient } = init; + const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`); + } + if (!isSsoProfile(profile)) { + throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`); + } + if (profile == null ? void 0 : profile.sso_session) { + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const session = ssoSessions[profile.sso_session]; + const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; + if (ssoRegion && ssoRegion !== session.sso_region) { + throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false); + } + if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { + throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false); + } + profile.sso_region = session.sso_region; + profile.sso_start_url = session.sso_start_url; + } + const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile); + return resolveSSOCredentials({ + ssoStartUrl: sso_start_url, + ssoSession: sso_session, + ssoAccountId: sso_account_id, + ssoRegion: sso_region, + ssoRoleName: sso_role_name, + ssoClient, + clientConfig: init.clientConfig, + profile: profileName + }); + } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { + throw new import_property_provider.CredentialsProviderError( + 'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"' + ); + } else { + return resolveSSOCredentials({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig: init.clientConfig, + profile: profileName + }); + } +}, "fromSSO"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + fromSSO, + isSsoProfile, + validateSsoProfile +}); + diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/isSsoProfile.js b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/isSsoProfile.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/isSsoProfile.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso.js b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/resolveSSOCredentials.js b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/resolveSSOCredentials.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/resolveSSOCredentials.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/types.js b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/types.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/types.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/validateSsoProfile.js b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/validateSsoProfile.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/validateSsoProfile.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js b/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js new file mode 100644 index 0000000..8008d74 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js @@ -0,0 +1,61 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +import { getProfileName, loadSsoSessionData, parseKnownFiles } from "@smithy/shared-ini-file-loader"; +import { isSsoProfile } from "./isSsoProfile"; +import { resolveSSOCredentials } from "./resolveSSOCredentials"; +import { validateSsoProfile } from "./validateSsoProfile"; +export const fromSSO = (init = {}) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-sso", "fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + const { ssoClient } = init; + const profileName = getProfileName(init); + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + const profiles = await parseKnownFiles(init); + const profile = profiles[profileName]; + if (!profile) { + throw new CredentialsProviderError(`Profile ${profileName} was not found.`); + } + if (!isSsoProfile(profile)) { + throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`); + } + if (profile?.sso_session) { + const ssoSessions = await loadSsoSessionData(init); + const session = ssoSessions[profile.sso_session]; + const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; + if (ssoRegion && ssoRegion !== session.sso_region) { + throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false); + } + if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { + throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false); + } + profile.sso_region = session.sso_region; + profile.sso_start_url = session.sso_start_url; + } + const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile); + return resolveSSOCredentials({ + ssoStartUrl: sso_start_url, + ssoSession: sso_session, + ssoAccountId: sso_account_id, + ssoRegion: sso_region, + ssoRoleName: sso_role_name, + ssoClient: ssoClient, + clientConfig: init.clientConfig, + profile: profileName, + }); + } + else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { + throw new CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " + + '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"'); + } + else { + return resolveSSOCredentials({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig: init.clientConfig, + profile: profileName, + }); + } +}; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-es/index.js b/node_modules/@aws-sdk/credential-provider-sso/dist-es/index.js new file mode 100644 index 0000000..7215fb6 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-es/index.js @@ -0,0 +1,4 @@ +export * from "./fromSSO"; +export * from "./isSsoProfile"; +export * from "./types"; +export * from "./validateSsoProfile"; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js b/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js new file mode 100644 index 0000000..e655438 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js @@ -0,0 +1,6 @@ +export const isSsoProfile = (arg) => arg && + (typeof arg.sso_start_url === "string" || + typeof arg.sso_account_id === "string" || + typeof arg.sso_session === "string" || + typeof arg.sso_region === "string" || + typeof arg.sso_role_name === "string"); diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-es/loadSso.js b/node_modules/@aws-sdk/credential-provider-sso/dist-es/loadSso.js new file mode 100644 index 0000000..6a4414f --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-es/loadSso.js @@ -0,0 +1,2 @@ +import { GetRoleCredentialsCommand, SSOClient } from "@aws-sdk/client-sso"; +export { GetRoleCredentialsCommand, SSOClient }; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js b/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js new file mode 100644 index 0000000..1daf3d2 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js @@ -0,0 +1,53 @@ +import { fromSso as getSsoTokenProvider } from "@aws-sdk/token-providers"; +import { CredentialsProviderError } from "@smithy/property-provider"; +import { getSSOTokenFromFile } from "@smithy/shared-ini-file-loader"; +const SHOULD_FAIL_CREDENTIAL_CHAIN = false; +export const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, profile, }) => { + let token; + const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; + if (ssoSession) { + try { + const _token = await getSsoTokenProvider({ profile })(); + token = { + accessToken: _token.token, + expiresAt: new Date(_token.expiration).toISOString(), + }; + } + catch (e) { + throw new CredentialsProviderError(e.message, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + } + else { + try { + token = await getSSOTokenFromFile(ssoStartUrl); + } + catch (e) { + throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + } + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { + throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + const { accessToken } = token; + const { SSOClient, GetRoleCredentialsCommand } = await import("./loadSso"); + const sso = ssoClient || + new SSOClient(Object.assign({}, clientConfig ?? {}, { + region: clientConfig?.region ?? ssoRegion, + })); + let ssoResp; + try { + ssoResp = await sso.send(new GetRoleCredentialsCommand({ + accountId: ssoAccountId, + roleName: ssoRoleName, + accessToken, + })); + } + catch (e) { + throw CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope } = {} } = ssoResp; + if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { + throw new CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN); + } + return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope }; +}; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-es/types.js b/node_modules/@aws-sdk/credential-provider-sso/dist-es/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-es/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js b/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js new file mode 100644 index 0000000..ba5aceb --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js @@ -0,0 +1,9 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +export const validateSsoProfile = (profile) => { + const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; + if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { + throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` + + `"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, false); + } + return profile; +}; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/fromSSO.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/fromSSO.d.ts new file mode 100644 index 0000000..1de9ddc --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/fromSSO.d.ts @@ -0,0 +1,69 @@ +import type { CredentialProviderOptions } from "@aws-sdk/types"; +import { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +import { AwsCredentialIdentityProvider } from "@smithy/types"; +import type { SSOClient, SSOClientConfig } from "./loadSso"; +/** + * @internal + */ +export interface SsoCredentialsParameters { + /** + * The URL to the AWS SSO service. + */ + ssoStartUrl: string; + /** + * SSO session identifier. + * Presence implies usage of the SSOTokenProvider. + */ + ssoSession?: string; + /** + * The ID of the AWS account to use for temporary credentials. + */ + ssoAccountId: string; + /** + * The AWS region to use for temporary credentials. + */ + ssoRegion: string; + /** + * The name of the AWS role to assume. + */ + ssoRoleName: string; +} +/** + * @internal + */ +export interface FromSSOInit extends SourceProfileInit, CredentialProviderOptions { + ssoClient?: SSOClient; + clientConfig?: SSOClientConfig; +} +/** + * @internal + * + * Creates a credential provider that will read from a credential_process specified + * in ini files. + * + * The SSO credential provider must support both + * + * 1. the legacy profile format, + * @example + * ``` + * [profile sample-profile] + * sso_account_id = 012345678901 + * sso_region = us-east-1 + * sso_role_name = SampleRole + * sso_start_url = https://www.....com/start + * ``` + * + * 2. and the profile format for SSO Token Providers. + * @example + * ``` + * [profile sso-profile] + * sso_session = dev + * sso_account_id = 012345678901 + * sso_role_name = SampleRole + * + * [sso-session dev] + * sso_region = us-east-1 + * sso_start_url = https://www.....com/start + * ``` + */ +export declare const fromSSO: (init?: FromSSOInit & Partial) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/index.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/index.d.ts new file mode 100644 index 0000000..d851c15 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/index.d.ts @@ -0,0 +1,16 @@ +/** + * @internal + */ +export * from "./fromSSO"; +/** + * @internal + */ +export * from "./isSsoProfile"; +/** + * @internal + */ +export * from "./types"; +/** + * @internal + */ +export * from "./validateSsoProfile"; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/isSsoProfile.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/isSsoProfile.d.ts new file mode 100644 index 0000000..77c1fb2 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/isSsoProfile.d.ts @@ -0,0 +1,6 @@ +import { Profile } from "@smithy/types"; +import { SsoProfile } from "./types"; +/** + * @internal + */ +export declare const isSsoProfile: (arg: Profile) => arg is Partial; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/loadSso.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/loadSso.d.ts new file mode 100644 index 0000000..f44232f --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/loadSso.d.ts @@ -0,0 +1,3 @@ +import { GetRoleCredentialsCommand, SSOClient } from "@aws-sdk/client-sso"; +export { GetRoleCredentialsCommand, SSOClient }; +export type { SSOClientConfig, GetRoleCredentialsCommandOutput } from "@aws-sdk/client-sso"; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/resolveSSOCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/resolveSSOCredentials.d.ts new file mode 100644 index 0000000..6464a30 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/resolveSSOCredentials.d.ts @@ -0,0 +1,6 @@ +import { AwsCredentialIdentity } from "@smithy/types"; +import { FromSSOInit, SsoCredentialsParameters } from "./fromSSO"; +/** + * @internal + */ +export declare const resolveSSOCredentials: ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, profile, }: FromSSOInit & SsoCredentialsParameters) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/fromSSO.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/fromSSO.d.ts new file mode 100644 index 0000000..6c9471a --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/fromSSO.d.ts @@ -0,0 +1,20 @@ +import { CredentialProviderOptions } from "@aws-sdk/types"; +import { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +import { AwsCredentialIdentityProvider } from "@smithy/types"; +import { SSOClient, SSOClientConfig } from "./loadSso"; +export interface SsoCredentialsParameters { + ssoStartUrl: string; + ssoSession?: string; + ssoAccountId: string; + ssoRegion: string; + ssoRoleName: string; +} +export interface FromSSOInit + extends SourceProfileInit, + CredentialProviderOptions { + ssoClient?: SSOClient; + clientConfig?: SSOClientConfig; +} +export declare const fromSSO: ( + init?: FromSSOInit & Partial +) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..7215fb6 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/index.d.ts @@ -0,0 +1,4 @@ +export * from "./fromSSO"; +export * from "./isSsoProfile"; +export * from "./types"; +export * from "./validateSsoProfile"; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/isSsoProfile.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/isSsoProfile.d.ts new file mode 100644 index 0000000..b4e8bdd --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/isSsoProfile.d.ts @@ -0,0 +1,3 @@ +import { Profile } from "@smithy/types"; +import { SsoProfile } from "./types"; +export declare const isSsoProfile: (arg: Profile) => arg is Partial; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/loadSso.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/loadSso.d.ts new file mode 100644 index 0000000..2d3249f --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/loadSso.d.ts @@ -0,0 +1,6 @@ +import { GetRoleCredentialsCommand, SSOClient } from "@aws-sdk/client-sso"; +export { GetRoleCredentialsCommand, SSOClient }; +export { + SSOClientConfig, + GetRoleCredentialsCommandOutput, +} from "@aws-sdk/client-sso"; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/resolveSSOCredentials.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/resolveSSOCredentials.d.ts new file mode 100644 index 0000000..7645301 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/resolveSSOCredentials.d.ts @@ -0,0 +1,12 @@ +import { AwsCredentialIdentity } from "@smithy/types"; +import { FromSSOInit, SsoCredentialsParameters } from "./fromSSO"; +export declare const resolveSSOCredentials: ({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig, + profile, +}: FromSSOInit & SsoCredentialsParameters) => Promise; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/types.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/types.d.ts new file mode 100644 index 0000000..4a3986b --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/types.d.ts @@ -0,0 +1,14 @@ +import { Profile } from "@smithy/types"; +export interface SSOToken { + accessToken: string; + expiresAt: string; + region?: string; + startUrl?: string; +} +export interface SsoProfile extends Profile { + sso_start_url: string; + sso_session?: string; + sso_account_id: string; + sso_region: string; + sso_role_name: string; +} diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/validateSsoProfile.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/validateSsoProfile.d.ts new file mode 100644 index 0000000..67fa863 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/validateSsoProfile.d.ts @@ -0,0 +1,4 @@ +import { SsoProfile } from "./types"; +export declare const validateSsoProfile: ( + profile: Partial +) => SsoProfile; diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/types.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/types.d.ts new file mode 100644 index 0000000..551d678 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/types.d.ts @@ -0,0 +1,22 @@ +import { Profile } from "@smithy/types"; +/** + * @internal + * + * Cached SSO token retrieved from SSO login flow. + */ +export interface SSOToken { + accessToken: string; + expiresAt: string; + region?: string; + startUrl?: string; +} +/** + * @internal + */ +export interface SsoProfile extends Profile { + sso_start_url: string; + sso_session?: string; + sso_account_id: string; + sso_region: string; + sso_role_name: string; +} diff --git a/node_modules/@aws-sdk/credential-provider-sso/dist-types/validateSsoProfile.d.ts b/node_modules/@aws-sdk/credential-provider-sso/dist-types/validateSsoProfile.d.ts new file mode 100644 index 0000000..eddea0c --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/dist-types/validateSsoProfile.d.ts @@ -0,0 +1,5 @@ +import { SsoProfile } from "./types"; +/** + * @internal + */ +export declare const validateSsoProfile: (profile: Partial) => SsoProfile; diff --git a/node_modules/@aws-sdk/credential-provider-sso/package.json b/node_modules/@aws-sdk/credential-provider-sso/package.json new file mode 100644 index 0000000..2820437 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-sso/package.json @@ -0,0 +1,63 @@ +{ + "name": "@aws-sdk/credential-provider-sso", + "version": "3.535.0", + "description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline credential-provider-sso", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest" + }, + "keywords": [ + "aws", + "credentials" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sso": "3.535.0", + "@aws-sdk/token-providers": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/master/packages/credential-provider-sso", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/credential-provider-sso" + } +} diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/LICENSE b/node_modules/@aws-sdk/credential-provider-web-identity/LICENSE new file mode 100644 index 0000000..f9a6673 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/README.md b/node_modules/@aws-sdk/credential-provider-web-identity/README.md new file mode 100644 index 0000000..e4858a4 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/README.md @@ -0,0 +1,11 @@ +# @aws-sdk/credential-provider-web-identity + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-web-identity/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-web-identity) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-web-identity.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-web-identity) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers) +instead. diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js b/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js new file mode 100644 index 0000000..3866f90 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromTokenFile = void 0; +const property_provider_1 = require("@smithy/property-provider"); +const fs_1 = require("fs"); +const fromWebToken_1 = require("./fromWebToken"); +const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; +const ENV_ROLE_ARN = "AWS_ROLE_ARN"; +const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; +const fromTokenFile = (init = {}) => async () => { + var _a, _b, _c, _d; + (_a = init.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromTokenFile"); + const webIdentityTokenFile = (_b = init === null || init === void 0 ? void 0 : init.webIdentityTokenFile) !== null && _b !== void 0 ? _b : process.env[ENV_TOKEN_FILE]; + const roleArn = (_c = init === null || init === void 0 ? void 0 : init.roleArn) !== null && _c !== void 0 ? _c : process.env[ENV_ROLE_ARN]; + const roleSessionName = (_d = init === null || init === void 0 ? void 0 : init.roleSessionName) !== null && _d !== void 0 ? _d : process.env[ENV_ROLE_SESSION_NAME]; + if (!webIdentityTokenFile || !roleArn) { + throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified"); + } + return (0, fromWebToken_1.fromWebToken)({ + ...init, + webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), + roleArn, + roleSessionName, + })(); +}; +exports.fromTokenFile = fromTokenFile; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js b/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js new file mode 100644 index 0000000..fc237de --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js @@ -0,0 +1,50 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromWebToken = void 0; +const fromWebToken = (init) => async () => { + var _a; + (_a = init.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromWebToken"); + const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; + let { roleAssumerWithWebIdentity } = init; + if (!roleAssumerWithWebIdentity) { + const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(require("./loadSts"))); + roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({ + ...init.clientConfig, + credentialProviderLogger: init.logger, + parentClientConfig: init.parentClientConfig, + }, init.clientPlugins); + } + return roleAssumerWithWebIdentity({ + RoleArn: roleArn, + RoleSessionName: roleSessionName !== null && roleSessionName !== void 0 ? roleSessionName : `aws-sdk-js-session-${Date.now()}`, + WebIdentityToken: webIdentityToken, + ProviderId: providerId, + PolicyArns: policyArns, + Policy: policy, + DurationSeconds: durationSeconds, + }); +}; +exports.fromWebToken = fromWebToken; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js b/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js new file mode 100644 index 0000000..46b3e90 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js @@ -0,0 +1,27 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +module.exports = __toCommonJS(src_exports); +__reExport(src_exports, require("././fromTokenFile"), module.exports); +__reExport(src_exports, require("././fromWebToken"), module.exports); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + fromTokenFile, + fromWebToken +}); + diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/loadSts.js b/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/loadSts.js new file mode 100644 index 0000000..64c105b --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/loadSts.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getDefaultRoleAssumerWithWebIdentity = void 0; +const client_sts_1 = require("@aws-sdk/client-sts"); +Object.defineProperty(exports, "getDefaultRoleAssumerWithWebIdentity", { enumerable: true, get: function () { return client_sts_1.getDefaultRoleAssumerWithWebIdentity; } }); diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js b/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js new file mode 100644 index 0000000..54bd339 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js @@ -0,0 +1,21 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +import { readFileSync } from "fs"; +import { fromWebToken } from "./fromWebToken"; +const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; +const ENV_ROLE_ARN = "AWS_ROLE_ARN"; +const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; +export const fromTokenFile = (init = {}) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity", "fromTokenFile"); + const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE]; + const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN]; + const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME]; + if (!webIdentityTokenFile || !roleArn) { + throw new CredentialsProviderError("Web identity configuration not specified"); + } + return fromWebToken({ + ...init, + webIdentityToken: readFileSync(webIdentityTokenFile, { encoding: "ascii" }), + roleArn, + roleSessionName, + })(); +}; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js b/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js new file mode 100644 index 0000000..b60b408 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js @@ -0,0 +1,22 @@ +export const fromWebToken = (init) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity", "fromWebToken"); + const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; + let { roleAssumerWithWebIdentity } = init; + if (!roleAssumerWithWebIdentity) { + const { getDefaultRoleAssumerWithWebIdentity } = await import("./loadSts"); + roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({ + ...init.clientConfig, + credentialProviderLogger: init.logger, + parentClientConfig: init.parentClientConfig, + }, init.clientPlugins); + } + return roleAssumerWithWebIdentity({ + RoleArn: roleArn, + RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`, + WebIdentityToken: webIdentityToken, + ProviderId: providerId, + PolicyArns: policyArns, + Policy: policy, + DurationSeconds: durationSeconds, + }); +}; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/index.js b/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/index.js new file mode 100644 index 0000000..0e900c0 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/index.js @@ -0,0 +1,2 @@ +export * from "./fromTokenFile"; +export * from "./fromWebToken"; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/loadSts.js b/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/loadSts.js new file mode 100644 index 0000000..ee87495 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/loadSts.js @@ -0,0 +1,2 @@ +import { getDefaultRoleAssumerWithWebIdentity } from "@aws-sdk/client-sts"; +export { getDefaultRoleAssumerWithWebIdentity }; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/fromTokenFile.d.ts b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/fromTokenFile.d.ts new file mode 100644 index 0000000..58f885f --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/fromTokenFile.d.ts @@ -0,0 +1,18 @@ +import { CredentialProviderOptions } from "@aws-sdk/types"; +import type { AwsCredentialIdentityProvider } from "@smithy/types"; +import { FromWebTokenInit } from "./fromWebToken"; +/** + * @public + */ +export interface FromTokenFileInit extends Partial>, CredentialProviderOptions { + /** + * File location of where the `OIDC` token is stored. + */ + webIdentityTokenFile?: string; +} +/** + * @internal + * + * Represents OIDC credentials from a file on disk. + */ +export declare const fromTokenFile: (init?: FromTokenFileInit) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/fromWebToken.d.ts b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/fromWebToken.d.ts new file mode 100644 index 0000000..0cd9a18 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/fromWebToken.d.ts @@ -0,0 +1,145 @@ +import type { CredentialProviderOptions } from "@aws-sdk/types"; +import type { AwsCredentialIdentity, AwsCredentialIdentityProvider, Pluggable } from "@smithy/types"; +import type { STSClientConfig } from "./loadSts"; +/** + * @public + */ +export interface AssumeRoleWithWebIdentityParams { + /** + *

The Amazon Resource Name (ARN) of the role that the caller is assuming.

+ */ + RoleArn: string; + /** + *

An identifier for the assumed role session. Typically, you pass the name or identifier + * that is associated with the user who is using your application. That way, the temporary + * security credentials that your application will use are associated with that user. This + * session name is included as part of the ARN and assumed role ID in the + * AssumedRoleUser response element.

+ *

The regex used to validate this parameter is a string of characters + * consisting of upper- and lower-case alphanumeric characters with no spaces. You can + * also include underscores or any of the following characters: =,.@-

+ */ + RoleSessionName: string; + /** + *

The OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity + * provider. Your application must get this token by authenticating the user who is using your + * application with a web identity provider before the application makes an + * AssumeRoleWithWebIdentity call.

+ */ + WebIdentityToken: string; + /** + *

The fully qualified host component of the domain name of the identity provider.

+ *

Specify this value only for OAuth 2.0 access tokens. Currently + * www.amazon.com and graph.facebook.com are the only supported + * identity providers for OAuth 2.0 access tokens. Do not include URL schemes and port + * numbers.

+ *

Do not specify this value for OpenID Connect ID tokens.

+ */ + ProviderId?: string; + /** + *

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as + * managed session policies. The policies must exist in the same account as the role.

+ *

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the + * plain text that you use for both inline and managed session policies can't exceed 2,048 + * characters. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS + * Service Namespaces in the AWS General Reference.

+ * + *

An AWS conversion compresses the passed session policies and session tags into a + * packed binary format that has a separate limit. Your request can fail for this limit + * even if your plain text meets the other requirements. The PackedPolicySize + * response element indicates by percentage how close the policies and tags for your + * request are to the upper size limit. + *

+ *
+ * + *

Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent AWS API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ */ + PolicyArns?: { + arn?: string; + }[]; + /** + *

An IAM policy in JSON format that you want to use as an inline session policy.

+ *

This parameter is optional. Passing policies to this operation returns new + * temporary credentials. The resulting session's permissions are the intersection of the + * role's identity-based policy and the session policies. You can use the role's temporary + * credentials in subsequent AWS API calls to access resources in the account that owns + * the role. You cannot use session policies to grant more permissions than those allowed + * by the identity-based policy of the role that is being assumed. For more information, see + * Session + * Policies in the IAM User Guide.

+ *

The plain text that you use for both inline and managed session policies can't exceed + * 2,048 characters. The JSON policy characters can be any ASCII character from the space + * character to the end of the valid character list (\u0020 through \u00FF). It can also + * include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) + * characters.

+ * + *

An AWS conversion compresses the passed session policies and session tags into a + * packed binary format that has a separate limit. Your request can fail for this limit + * even if your plain text meets the other requirements. The PackedPolicySize + * response element indicates by percentage how close the policies and tags for your + * request are to the upper size limit. + *

+ *
+ */ + Policy?: string; + /** + *

The duration, in seconds, of the role session. The value can range from 900 seconds (15 + * minutes) up to the maximum session duration setting for the role. This setting can have a + * value from 1 hour to 12 hours. If you specify a value higher than this setting, the + * operation fails. For example, if you specify a session duration of 12 hours, but your + * administrator set the maximum session duration to 6 hours, your operation fails. To learn + * how to view the maximum value for your role, see View the + * Maximum Session Duration Setting for a Role in the + * IAM User Guide.

+ *

By default, the value is set to 3600 seconds.

+ * + *

The DurationSeconds parameter is separate from the duration of a console + * session that you might request using the returned credentials. The request to the + * federation endpoint for a console sign-in token takes a SessionDuration + * parameter that specifies the maximum length of the console session. For more + * information, see Creating a URL + * that Enables Federated Users to Access the AWS Management Console in the + * IAM User Guide.

+ *
+ */ + DurationSeconds?: number; +} +type LowerCaseKey = { + [K in keyof T as `${Uncapitalize}`]: T[K]; +}; +/** + * @public + */ +export interface FromWebTokenInit extends Omit, "roleSessionName">, CredentialProviderOptions { + /** + * The IAM session name used to distinguish sessions. + */ + roleSessionName?: string; + /** + * A function that assumes a role with web identity and returns a promise fulfilled with + * credentials for the assumed role. + * + * @param params input parameter of sts:AssumeRoleWithWebIdentity API. + */ + roleAssumerWithWebIdentity?: (params: AssumeRoleWithWebIdentityParams) => Promise; + /** + * @internal + */ + clientConfig?: STSClientConfig; + /** + * @internal + */ + clientPlugins?: Pluggable[]; +} +/** + * @internal + */ +export declare const fromWebToken: (init: FromWebTokenInit) => AwsCredentialIdentityProvider; +export {}; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/index.d.ts b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/index.d.ts new file mode 100644 index 0000000..36c15dc --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./fromTokenFile"; +/** + * @internal + */ +export * from "./fromWebToken"; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/loadSts.d.ts b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/loadSts.d.ts new file mode 100644 index 0000000..cd7d807 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/loadSts.d.ts @@ -0,0 +1,3 @@ +import { getDefaultRoleAssumerWithWebIdentity } from "@aws-sdk/client-sts"; +export { getDefaultRoleAssumerWithWebIdentity }; +export type { STSClientConfig } from "@aws-sdk/client-sts"; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromTokenFile.d.ts b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromTokenFile.d.ts new file mode 100644 index 0000000..4f67356 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromTokenFile.d.ts @@ -0,0 +1,16 @@ +import { CredentialProviderOptions } from "@aws-sdk/types"; +import { AwsCredentialIdentityProvider } from "@smithy/types"; +import { FromWebTokenInit } from "./fromWebToken"; +export interface FromTokenFileInit + extends Partial< + Pick< + FromWebTokenInit, + Exclude + > + >, + CredentialProviderOptions { + webIdentityTokenFile?: string; +} +export declare const fromTokenFile: ( + init?: FromTokenFileInit +) => AwsCredentialIdentityProvider; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromWebToken.d.ts b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromWebToken.d.ts new file mode 100644 index 0000000..60dc062 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromWebToken.d.ts @@ -0,0 +1,41 @@ +import { CredentialProviderOptions } from "@aws-sdk/types"; +import { + AwsCredentialIdentity, + AwsCredentialIdentityProvider, + Pluggable, +} from "@smithy/types"; +import { STSClientConfig } from "./loadSts"; +export interface AssumeRoleWithWebIdentityParams { + RoleArn: string; + RoleSessionName: string; + WebIdentityToken: string; + ProviderId?: string; + PolicyArns?: { + arn?: string; + }[]; + Policy?: string; + DurationSeconds?: number; +} +type LowerCaseKey = { + [K in keyof T as `${Uncapitalize}`]: T[K]; +}; +export interface FromWebTokenInit + extends Pick< + LowerCaseKey, + Exclude< + keyof LowerCaseKey, + "roleSessionName" + > + >, + CredentialProviderOptions { + roleSessionName?: string; + roleAssumerWithWebIdentity?: ( + params: AssumeRoleWithWebIdentityParams + ) => Promise; + clientConfig?: STSClientConfig; + clientPlugins?: Pluggable[]; +} +export declare const fromWebToken: ( + init: FromWebTokenInit +) => AwsCredentialIdentityProvider; +export {}; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..0e900c0 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/index.d.ts @@ -0,0 +1,2 @@ +export * from "./fromTokenFile"; +export * from "./fromWebToken"; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/loadSts.d.ts b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/loadSts.d.ts new file mode 100644 index 0000000..8b9a071 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/loadSts.d.ts @@ -0,0 +1,3 @@ +import { getDefaultRoleAssumerWithWebIdentity } from "@aws-sdk/client-sts"; +export { getDefaultRoleAssumerWithWebIdentity }; +export { STSClientConfig } from "@aws-sdk/client-sts"; diff --git a/node_modules/@aws-sdk/credential-provider-web-identity/package.json b/node_modules/@aws-sdk/credential-provider-web-identity/package.json new file mode 100644 index 0000000..ff889e4 --- /dev/null +++ b/node_modules/@aws-sdk/credential-provider-web-identity/package.json @@ -0,0 +1,69 @@ +{ + "name": "@aws-sdk/credential-provider-web-identity", + "version": "3.535.0", + "description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline credential-provider-web-identity", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest" + }, + "browser": { + "./dist-es/fromTokenFile": false, + "./dist-cjs/fromTokenFile": false + }, + "react-native": { + "./dist-es/fromTokenFile": false, + "./dist-cjs/fromTokenFile": false + }, + "keywords": [ + "aws", + "credentials" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sts": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/master/packages/credential-provider-web-identity", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/credential-provider-web-identity" + } +} diff --git a/node_modules/@aws-sdk/middleware-host-header/LICENSE b/node_modules/@aws-sdk/middleware-host-header/LICENSE new file mode 100644 index 0000000..e907b58 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-host-header/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-sdk/middleware-host-header/README.md b/node_modules/@aws-sdk/middleware-host-header/README.md new file mode 100644 index 0000000..123940e --- /dev/null +++ b/node_modules/@aws-sdk/middleware-host-header/README.md @@ -0,0 +1,4 @@ +# @aws-sdk/middleware-host-header + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-host-header/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-host-header) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-host-header.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-host-header) diff --git a/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js b/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js new file mode 100644 index 0000000..799330a --- /dev/null +++ b/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js @@ -0,0 +1,70 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + getHostHeaderPlugin: () => getHostHeaderPlugin, + hostHeaderMiddleware: () => hostHeaderMiddleware, + hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, + resolveHostHeaderConfig: () => resolveHostHeaderConfig +}); +module.exports = __toCommonJS(src_exports); +var import_protocol_http = require("@smithy/protocol-http"); +function resolveHostHeaderConfig(input) { + return input; +} +__name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); +var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + if (!import_protocol_http.HttpRequest.isInstance(args.request)) + return next(args); + const { request } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); + } else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; + } + return next(args); +}, "hostHeaderMiddleware"); +var hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true +}; +var getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + } +}), "getHostHeaderPlugin"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + resolveHostHeaderConfig, + hostHeaderMiddleware, + hostHeaderMiddlewareOptions, + getHostHeaderPlugin +}); + diff --git a/node_modules/@aws-sdk/middleware-host-header/dist-es/index.js b/node_modules/@aws-sdk/middleware-host-header/dist-es/index.js new file mode 100644 index 0000000..2e2fb62 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-host-header/dist-es/index.js @@ -0,0 +1,33 @@ +import { HttpRequest } from "@smithy/protocol-http"; +export function resolveHostHeaderConfig(input) { + return input; +} +export const hostHeaderMiddleware = (options) => (next) => async (args) => { + if (!HttpRequest.isInstance(args.request)) + return next(args); + const { request } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); + } + else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; + } + return next(args); +}; +export const hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true, +}; +export const getHostHeaderPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + }, +}); diff --git a/node_modules/@aws-sdk/middleware-host-header/dist-types/index.d.ts b/node_modules/@aws-sdk/middleware-host-header/dist-types/index.d.ts new file mode 100644 index 0000000..4d8d2c4 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-host-header/dist-types/index.d.ts @@ -0,0 +1,20 @@ +import { AbsoluteLocation, BuildHandlerOptions, BuildMiddleware, Pluggable, RequestHandler } from "@smithy/types"; +/** + * @public + */ +export interface HostHeaderInputConfig { +} +interface PreviouslyResolved { + requestHandler: RequestHandler; +} +export interface HostHeaderResolvedConfig { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler: RequestHandler; +} +export declare function resolveHostHeaderConfig(input: T & PreviouslyResolved & HostHeaderInputConfig): T & HostHeaderResolvedConfig; +export declare const hostHeaderMiddleware: (options: HostHeaderResolvedConfig) => BuildMiddleware; +export declare const hostHeaderMiddlewareOptions: BuildHandlerOptions & AbsoluteLocation; +export declare const getHostHeaderPlugin: (options: HostHeaderResolvedConfig) => Pluggable; +export {}; diff --git a/node_modules/@aws-sdk/middleware-host-header/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/middleware-host-header/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..3ca5561 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-host-header/dist-types/ts3.4/index.d.ts @@ -0,0 +1,29 @@ +import { + AbsoluteLocation, + BuildHandlerOptions, + BuildMiddleware, + Pluggable, + RequestHandler, +} from "@smithy/types"; +export interface HostHeaderInputConfig {} +interface PreviouslyResolved { + requestHandler: RequestHandler; +} +export interface HostHeaderResolvedConfig { + requestHandler: RequestHandler; +} +export declare function resolveHostHeaderConfig( + input: T & PreviouslyResolved & HostHeaderInputConfig +): T & HostHeaderResolvedConfig; +export declare const hostHeaderMiddleware: < + Input extends object, + Output extends object +>( + options: HostHeaderResolvedConfig +) => BuildMiddleware; +export declare const hostHeaderMiddlewareOptions: BuildHandlerOptions & + AbsoluteLocation; +export declare const getHostHeaderPlugin: ( + options: HostHeaderResolvedConfig +) => Pluggable; +export {}; diff --git a/node_modules/@aws-sdk/middleware-host-header/package.json b/node_modules/@aws-sdk/middleware-host-header/package.json new file mode 100644 index 0000000..ada641c --- /dev/null +++ b/node_modules/@aws-sdk/middleware-host-header/package.json @@ -0,0 +1,55 @@ +{ + "name": "@aws-sdk/middleware-host-header", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline middleware-host-header", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest", + "test:integration": "jest -c jest.config.integ.js" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/middleware-host-header", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/middleware-host-header" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + } +} diff --git a/node_modules/@aws-sdk/middleware-logger/LICENSE b/node_modules/@aws-sdk/middleware-logger/LICENSE new file mode 100644 index 0000000..74d4e5c --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/middleware-logger/README.md b/node_modules/@aws-sdk/middleware-logger/README.md new file mode 100644 index 0000000..861fa43 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/README.md @@ -0,0 +1,4 @@ +# @aws-sdk/middleware-logger + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-logger/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-logger) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-logger.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-logger) diff --git a/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js b/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js new file mode 100644 index 0000000..b1b2f9c --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js @@ -0,0 +1,79 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + getLoggerPlugin: () => getLoggerPlugin, + loggerMiddleware: () => loggerMiddleware, + loggerMiddlewareOptions: () => loggerMiddlewareOptions +}); +module.exports = __toCommonJS(src_exports); + +// src/loggerMiddleware.ts +var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => { + var _a, _b; + try { + const response = await next(args); + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + (_a = logger == null ? void 0 : logger.info) == null ? void 0 : _a.call(logger, { + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata + }); + return response; + } catch (error) { + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + (_b = logger == null ? void 0 : logger.error) == null ? void 0 : _b.call(logger, { + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error, + metadata: error.$metadata + }); + throw error; + } +}, "loggerMiddleware"); +var loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true +}; +var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + } +}), "getLoggerPlugin"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + loggerMiddleware, + loggerMiddlewareOptions, + getLoggerPlugin +}); + diff --git a/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js b/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/middleware-logger/dist-es/index.js b/node_modules/@aws-sdk/middleware-logger/dist-es/index.js new file mode 100644 index 0000000..171e3bc --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/dist-es/index.js @@ -0,0 +1 @@ +export * from "./loggerMiddleware"; diff --git a/node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js b/node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js new file mode 100644 index 0000000..50da4cc --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js @@ -0,0 +1,42 @@ +export const loggerMiddleware = () => (next, context) => async (args) => { + try { + const response = await next(args); + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + logger?.info?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata, + }); + return response; + } + catch (error) { + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + logger?.error?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error, + metadata: error.$metadata, + }); + throw error; + } +}; +export const loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true, +}; +export const getLoggerPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + }, +}); diff --git a/node_modules/@aws-sdk/middleware-logger/dist-types/index.d.ts b/node_modules/@aws-sdk/middleware-logger/dist-types/index.d.ts new file mode 100644 index 0000000..171e3bc --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/dist-types/index.d.ts @@ -0,0 +1 @@ +export * from "./loggerMiddleware"; diff --git a/node_modules/@aws-sdk/middleware-logger/dist-types/loggerMiddleware.d.ts b/node_modules/@aws-sdk/middleware-logger/dist-types/loggerMiddleware.d.ts new file mode 100644 index 0000000..5712017 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/dist-types/loggerMiddleware.d.ts @@ -0,0 +1,4 @@ +import { AbsoluteLocation, HandlerExecutionContext, InitializeHandler, InitializeHandlerOptions, MetadataBearer, Pluggable } from "@smithy/types"; +export declare const loggerMiddleware: () => (next: InitializeHandler, context: HandlerExecutionContext) => InitializeHandler; +export declare const loggerMiddlewareOptions: InitializeHandlerOptions & AbsoluteLocation; +export declare const getLoggerPlugin: (options: any) => Pluggable; diff --git a/node_modules/@aws-sdk/middleware-logger/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/middleware-logger/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..171e3bc --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/dist-types/ts3.4/index.d.ts @@ -0,0 +1 @@ +export * from "./loggerMiddleware"; diff --git a/node_modules/@aws-sdk/middleware-logger/dist-types/ts3.4/loggerMiddleware.d.ts b/node_modules/@aws-sdk/middleware-logger/dist-types/ts3.4/loggerMiddleware.d.ts new file mode 100644 index 0000000..10ded9e --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/dist-types/ts3.4/loggerMiddleware.d.ts @@ -0,0 +1,17 @@ +import { + AbsoluteLocation, + HandlerExecutionContext, + InitializeHandler, + InitializeHandlerOptions, + MetadataBearer, + Pluggable, +} from "@smithy/types"; +export declare const loggerMiddleware: () => < + Output extends MetadataBearer = MetadataBearer +>( + next: InitializeHandler, + context: HandlerExecutionContext +) => InitializeHandler; +export declare const loggerMiddlewareOptions: InitializeHandlerOptions & + AbsoluteLocation; +export declare const getLoggerPlugin: (options: any) => Pluggable; diff --git a/node_modules/@aws-sdk/middleware-logger/package.json b/node_modules/@aws-sdk/middleware-logger/package.json new file mode 100644 index 0000000..dcc3ec6 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-logger/package.json @@ -0,0 +1,56 @@ +{ + "name": "@aws-sdk/middleware-logger", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline middleware-logger", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest --passWithNoTests", + "test:integration": "jest -c jest.config.integ.js" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "email": "", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/middleware-logger", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/middleware-logger" + } +} diff --git a/node_modules/@aws-sdk/middleware-recursion-detection/LICENSE b/node_modules/@aws-sdk/middleware-recursion-detection/LICENSE new file mode 100644 index 0000000..e907b58 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-recursion-detection/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-sdk/middleware-recursion-detection/README.md b/node_modules/@aws-sdk/middleware-recursion-detection/README.md new file mode 100644 index 0000000..2d5437e --- /dev/null +++ b/node_modules/@aws-sdk/middleware-recursion-detection/README.md @@ -0,0 +1,10 @@ +# @aws-sdk/middleware-recursion-detection + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-recursion-detection/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-recursion-detection) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-recursion-detection.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-recursion-detection) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js b/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js new file mode 100644 index 0000000..9c502a3 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js @@ -0,0 +1,67 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions, + getRecursionDetectionPlugin: () => getRecursionDetectionPlugin, + recursionDetectionMiddleware: () => recursionDetectionMiddleware +}); +module.exports = __toCommonJS(src_exports); +var import_protocol_http = require("@smithy/protocol-http"); +var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; +var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; +var ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; +var recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + const { request } = args; + if (!import_protocol_http.HttpRequest.isInstance(request) || options.runtime !== "node" || request.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) { + return next(args); + } + const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; + const traceId = process.env[ENV_TRACE_ID]; + const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === "string" && str.length > 0, "nonEmptyString"); + if (nonEmptyString(functionName) && nonEmptyString(traceId)) { + request.headers[TRACE_ID_HEADER_NAME] = traceId; + } + return next({ + ...args, + request + }); +}, "recursionDetectionMiddleware"); +var addRecursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low" +}; +var getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions); + } +}), "getRecursionDetectionPlugin"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + recursionDetectionMiddleware, + addRecursionDetectionMiddlewareOptions, + getRecursionDetectionPlugin +}); + diff --git a/node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js b/node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js new file mode 100644 index 0000000..5cd4afa --- /dev/null +++ b/node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js @@ -0,0 +1,34 @@ +import { HttpRequest } from "@smithy/protocol-http"; +const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; +const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; +const ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; +export const recursionDetectionMiddleware = (options) => (next) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request) || + options.runtime !== "node" || + request.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) { + return next(args); + } + const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; + const traceId = process.env[ENV_TRACE_ID]; + const nonEmptyString = (str) => typeof str === "string" && str.length > 0; + if (nonEmptyString(functionName) && nonEmptyString(traceId)) { + request.headers[TRACE_ID_HEADER_NAME] = traceId; + } + return next({ + ...args, + request, + }); +}; +export const addRecursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low", +}; +export const getRecursionDetectionPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions); + }, +}); diff --git a/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/index.d.ts b/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/index.d.ts new file mode 100644 index 0000000..9f92984 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/index.d.ts @@ -0,0 +1,18 @@ +import { AbsoluteLocation, BuildHandlerOptions, BuildMiddleware, Pluggable } from "@smithy/types"; +interface PreviouslyResolved { + runtime: string; +} +/** + * Inject to trace ID to request header to detect recursion invocation in Lambda. + * @internal + */ +export declare const recursionDetectionMiddleware: (options: PreviouslyResolved) => BuildMiddleware; +/** + * @internal + */ +export declare const addRecursionDetectionMiddlewareOptions: BuildHandlerOptions & AbsoluteLocation; +/** + * @internal + */ +export declare const getRecursionDetectionPlugin: (options: PreviouslyResolved) => Pluggable; +export {}; diff --git a/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..8d1658b --- /dev/null +++ b/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/ts3.4/index.d.ts @@ -0,0 +1,18 @@ +import { + AbsoluteLocation, + BuildHandlerOptions, + BuildMiddleware, + Pluggable, +} from "@smithy/types"; +interface PreviouslyResolved { + runtime: string; +} +export declare const recursionDetectionMiddleware: ( + options: PreviouslyResolved +) => BuildMiddleware; +export declare const addRecursionDetectionMiddlewareOptions: BuildHandlerOptions & + AbsoluteLocation; +export declare const getRecursionDetectionPlugin: ( + options: PreviouslyResolved +) => Pluggable; +export {}; diff --git a/node_modules/@aws-sdk/middleware-recursion-detection/package.json b/node_modules/@aws-sdk/middleware-recursion-detection/package.json new file mode 100644 index 0000000..370fc1a --- /dev/null +++ b/node_modules/@aws-sdk/middleware-recursion-detection/package.json @@ -0,0 +1,55 @@ +{ + "name": "@aws-sdk/middleware-recursion-detection", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline middleware-recursion-detection", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest", + "test:integration": "jest -c jest.config.integ.js" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/middleware-recursion-detection", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/middleware-recursion-detection" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + } +} diff --git a/node_modules/@aws-sdk/middleware-user-agent/LICENSE b/node_modules/@aws-sdk/middleware-user-agent/LICENSE new file mode 100644 index 0000000..e907b58 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-sdk/middleware-user-agent/README.md b/node_modules/@aws-sdk/middleware-user-agent/README.md new file mode 100644 index 0000000..a0bf1a9 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/README.md @@ -0,0 +1,4 @@ +# @aws-sdk/middleware-user-agent + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-user-agent/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-user-agent) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-user-agent.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-user-agent) diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/configurations.js b/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/configurations.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/configurations.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/constants.js b/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/constants.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/constants.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js b/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js new file mode 100644 index 0000000..2301b51 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js @@ -0,0 +1,122 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions, + getUserAgentPlugin: () => getUserAgentPlugin, + resolveUserAgentConfig: () => resolveUserAgentConfig, + userAgentMiddleware: () => userAgentMiddleware +}); +module.exports = __toCommonJS(src_exports); + +// src/configurations.ts +function resolveUserAgentConfig(input) { + return { + ...input, + customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent + }; +} +__name(resolveUserAgentConfig, "resolveUserAgentConfig"); + +// src/user-agent-middleware.ts +var import_util_endpoints = require("@aws-sdk/util-endpoints"); +var import_protocol_http = require("@smithy/protocol-http"); + +// src/constants.ts +var USER_AGENT = "user-agent"; +var X_AMZ_USER_AGENT = "x-amz-user-agent"; +var SPACE = " "; +var UA_NAME_SEPARATOR = "/"; +var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; +var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; +var UA_ESCAPE_CHAR = "-"; + +// src/user-agent-middleware.ts +var userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + var _a, _b; + const { request } = args; + if (!import_protocol_http.HttpRequest.isInstance(request)) + return next(args); + const { headers } = request; + const userAgent = ((_a = context == null ? void 0 : context.userAgent) == null ? void 0 : _a.map(escapeUserAgent)) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + const customUserAgent = ((_b = options == null ? void 0 : options.customUserAgent) == null ? void 0 : _b.map(escapeUserAgent)) || []; + const prefix = (0, import_util_endpoints.getUserAgentPrefix)(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent + ].join(SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; + } + headers[USER_AGENT] = sdkUserAgentValue; + } else { + headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; + } + return next({ + ...args, + request + }); +}, "userAgentMiddleware"); +var escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { + var _a; + const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); + const version = (_a = userAgentPair[1]) == null ? void 0 : _a.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); + const prefix = name.substring(0, prefixSeparatorIndex); + let uaName = name.substring(prefixSeparatorIndex + 1); + if (prefix === "api") { + uaName = uaName.toLowerCase(); + } + return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; + } + }, ""); +}, "escapeUserAgent"); +var getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true +}; +var getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({ + applyToStack: (clientStack) => { + clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); + } +}), "getUserAgentPlugin"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + resolveUserAgentConfig, + userAgentMiddleware, + getUserAgentMiddlewareOptions, + getUserAgentPlugin +}); + diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/user-agent-middleware.js b/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/user-agent-middleware.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/user-agent-middleware.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js b/node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js new file mode 100644 index 0000000..aaa099e --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js @@ -0,0 +1,6 @@ +export function resolveUserAgentConfig(input) { + return { + ...input, + customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent, + }; +} diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js b/node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js new file mode 100644 index 0000000..33e3391 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js @@ -0,0 +1,7 @@ +export const USER_AGENT = "user-agent"; +export const X_AMZ_USER_AGENT = "x-amz-user-agent"; +export const SPACE = " "; +export const UA_NAME_SEPARATOR = "/"; +export const UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; +export const UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; +export const UA_ESCAPE_CHAR = "-"; diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js b/node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js new file mode 100644 index 0000000..0456ec7 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js @@ -0,0 +1,2 @@ +export * from "./configurations"; +export * from "./user-agent-middleware"; diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js b/node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js new file mode 100644 index 0000000..30d84b4 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js @@ -0,0 +1,72 @@ +import { getUserAgentPrefix } from "@aws-sdk/util-endpoints"; +import { HttpRequest } from "@smithy/protocol-http"; +import { SPACE, UA_ESCAPE_CHAR, UA_NAME_ESCAPE_REGEX, UA_NAME_SEPARATOR, UA_VALUE_ESCAPE_REGEX, USER_AGENT, X_AMZ_USER_AGENT, } from "./constants"; +export const userAgentMiddleware = (options) => (next, context) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request)) + return next(args); + const { headers } = request; + const userAgent = context?.userAgent?.map(escapeUserAgent) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || []; + const prefix = getUserAgentPrefix(); + const sdkUserAgentValue = (prefix ? [prefix] : []) + .concat([...defaultUserAgent, ...userAgent, ...customUserAgent]) + .join(SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent, + ].join(SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] + ? `${headers[USER_AGENT]} ${normalUAValue}` + : normalUAValue; + } + headers[USER_AGENT] = sdkUserAgentValue; + } + else { + headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; + } + return next({ + ...args, + request, + }); +}; +const escapeUserAgent = (userAgentPair) => { + const name = userAgentPair[0] + .split(UA_NAME_SEPARATOR) + .map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)) + .join(UA_NAME_SEPARATOR); + const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); + const prefix = name.substring(0, prefixSeparatorIndex); + let uaName = name.substring(prefixSeparatorIndex + 1); + if (prefix === "api") { + uaName = uaName.toLowerCase(); + } + return [prefix, uaName, version] + .filter((item) => item && item.length > 0) + .reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; + } + }, ""); +}; +export const getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true, +}; +export const getUserAgentPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); + }, +}); diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-types/configurations.d.ts b/node_modules/@aws-sdk/middleware-user-agent/dist-types/configurations.d.ts new file mode 100644 index 0000000..8aa9a6f --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-types/configurations.d.ts @@ -0,0 +1,31 @@ +import { Provider, UserAgent } from "@smithy/types"; +/** + * @public + */ +export interface UserAgentInputConfig { + /** + * The custom user agent header that would be appended to default one + */ + customUserAgent?: string | UserAgent; +} +interface PreviouslyResolved { + defaultUserAgentProvider: Provider; + runtime: string; +} +export interface UserAgentResolvedConfig { + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header. + * @internal + */ + defaultUserAgentProvider: Provider; + /** + * The custom user agent header that would be appended to default one + */ + customUserAgent?: UserAgent; + /** + * The runtime environment + */ + runtime: string; +} +export declare function resolveUserAgentConfig(input: T & PreviouslyResolved & UserAgentInputConfig): T & UserAgentResolvedConfig; +export {}; diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-types/constants.d.ts b/node_modules/@aws-sdk/middleware-user-agent/dist-types/constants.d.ts new file mode 100644 index 0000000..8c0dfc9 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-types/constants.d.ts @@ -0,0 +1,7 @@ +export declare const USER_AGENT = "user-agent"; +export declare const X_AMZ_USER_AGENT = "x-amz-user-agent"; +export declare const SPACE = " "; +export declare const UA_NAME_SEPARATOR = "/"; +export declare const UA_NAME_ESCAPE_REGEX: RegExp; +export declare const UA_VALUE_ESCAPE_REGEX: RegExp; +export declare const UA_ESCAPE_CHAR = "-"; diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-types/index.d.ts b/node_modules/@aws-sdk/middleware-user-agent/dist-types/index.d.ts new file mode 100644 index 0000000..0456ec7 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-types/index.d.ts @@ -0,0 +1,2 @@ +export * from "./configurations"; +export * from "./user-agent-middleware"; diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/configurations.d.ts b/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/configurations.d.ts new file mode 100644 index 0000000..910d567 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/configurations.d.ts @@ -0,0 +1,17 @@ +import { Provider, UserAgent } from "@smithy/types"; +export interface UserAgentInputConfig { + customUserAgent?: string | UserAgent; +} +interface PreviouslyResolved { + defaultUserAgentProvider: Provider; + runtime: string; +} +export interface UserAgentResolvedConfig { + defaultUserAgentProvider: Provider; + customUserAgent?: UserAgent; + runtime: string; +} +export declare function resolveUserAgentConfig( + input: T & PreviouslyResolved & UserAgentInputConfig +): T & UserAgentResolvedConfig; +export {}; diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/constants.d.ts b/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/constants.d.ts new file mode 100644 index 0000000..8c0dfc9 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/constants.d.ts @@ -0,0 +1,7 @@ +export declare const USER_AGENT = "user-agent"; +export declare const X_AMZ_USER_AGENT = "x-amz-user-agent"; +export declare const SPACE = " "; +export declare const UA_NAME_SEPARATOR = "/"; +export declare const UA_NAME_ESCAPE_REGEX: RegExp; +export declare const UA_VALUE_ESCAPE_REGEX: RegExp; +export declare const UA_ESCAPE_CHAR = "-"; diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..0456ec7 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/index.d.ts @@ -0,0 +1,2 @@ +export * from "./configurations"; +export * from "./user-agent-middleware"; diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/user-agent-middleware.d.ts b/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/user-agent-middleware.d.ts new file mode 100644 index 0000000..f7461aa --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/user-agent-middleware.d.ts @@ -0,0 +1,20 @@ +import { + AbsoluteLocation, + BuildHandler, + BuildHandlerOptions, + HandlerExecutionContext, + MetadataBearer, + Pluggable, +} from "@smithy/types"; +import { UserAgentResolvedConfig } from "./configurations"; +export declare const userAgentMiddleware: ( + options: UserAgentResolvedConfig +) => ( + next: BuildHandler, + context: HandlerExecutionContext +) => BuildHandler; +export declare const getUserAgentMiddlewareOptions: BuildHandlerOptions & + AbsoluteLocation; +export declare const getUserAgentPlugin: ( + config: UserAgentResolvedConfig +) => Pluggable; diff --git a/node_modules/@aws-sdk/middleware-user-agent/dist-types/user-agent-middleware.d.ts b/node_modules/@aws-sdk/middleware-user-agent/dist-types/user-agent-middleware.d.ts new file mode 100644 index 0000000..30c5341 --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/dist-types/user-agent-middleware.d.ts @@ -0,0 +1,17 @@ +import { AbsoluteLocation, BuildHandler, BuildHandlerOptions, HandlerExecutionContext, MetadataBearer, Pluggable } from "@smithy/types"; +import { UserAgentResolvedConfig } from "./configurations"; +/** + * Build user agent header sections from: + * 1. runtime-specific default user agent provider; + * 2. custom user agent from `customUserAgent` client config; + * 3. handler execution context set by internal SDK components; + * The built user agent will be set to `x-amz-user-agent` header for ALL the + * runtimes. + * Please note that any override to the `user-agent` or `x-amz-user-agent` header + * in the HTTP request is discouraged. Please use `customUserAgent` client + * config or middleware setting the `userAgent` context to generate desired user + * agent. + */ +export declare const userAgentMiddleware: (options: UserAgentResolvedConfig) => (next: BuildHandler, context: HandlerExecutionContext) => BuildHandler; +export declare const getUserAgentMiddlewareOptions: BuildHandlerOptions & AbsoluteLocation; +export declare const getUserAgentPlugin: (config: UserAgentResolvedConfig) => Pluggable; diff --git a/node_modules/@aws-sdk/middleware-user-agent/package.json b/node_modules/@aws-sdk/middleware-user-agent/package.json new file mode 100644 index 0000000..9c7eaba --- /dev/null +++ b/node_modules/@aws-sdk/middleware-user-agent/package.json @@ -0,0 +1,57 @@ +{ + "name": "@aws-sdk/middleware-user-agent", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline middleware-user-agent", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest --passWithNoTests", + "test:integration": "jest -c jest.config.integ.js", + "extract:docs": "api-extractor run --local" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@aws-sdk/util-endpoints": "3.535.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/middleware-user-agent", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/middleware-user-agent" + } +} diff --git a/node_modules/@aws-sdk/region-config-resolver/LICENSE b/node_modules/@aws-sdk/region-config-resolver/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/region-config-resolver/README.md b/node_modules/@aws-sdk/region-config-resolver/README.md new file mode 100644 index 0000000..389b765 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/README.md @@ -0,0 +1,12 @@ +# @aws-sdk/region-config-resolver + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/region-config-resolver/latest.svg)](https://www.npmjs.com/package/@aws-sdk/region-config-resolver) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/region-config-resolver.svg)](https://www.npmjs.com/package/@aws-sdk/region-config-resolver) + +> An internal package + +This package provides utilities for AWS region config resolvers. + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-cjs/extensions/index.js b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/extensions/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/extensions/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js new file mode 100644 index 0000000..14d2e9e --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js @@ -0,0 +1,115 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration, + resolveRegionConfig: () => resolveRegionConfig +}); +module.exports = __toCommonJS(src_exports); + +// src/extensions/index.ts +var getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let runtimeConfigRegion = /* @__PURE__ */ __name(async () => { + if (runtimeConfig.region === void 0) { + throw new Error("Region is missing from runtimeConfig"); + } + const region = runtimeConfig.region; + if (typeof region === "string") { + return region; + } + return region(); + }, "runtimeConfigRegion"); + return { + setRegion(region) { + runtimeConfigRegion = region; + }, + region() { + return runtimeConfigRegion; + } + }; +}, "getAwsRegionExtensionConfiguration"); +var resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; +}, "resolveAwsRegionExtensionConfiguration"); + +// src/regionConfig/config.ts +var REGION_ENV_NAME = "AWS_REGION"; +var REGION_INI_NAME = "region"; +var NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + } +}; +var NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials" +}; + +// src/regionConfig/isFipsRegion.ts +var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + +// src/regionConfig/getRealRegion.ts +var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + +// src/regionConfig/resolveRegionConfig.ts +var resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return { + ...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(); + } + }; +}, "resolveRegionConfig"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration, + REGION_ENV_NAME, + REGION_INI_NAME, + NODE_REGION_CONFIG_OPTIONS, + NODE_REGION_CONFIG_FILE_OPTIONS, + resolveRegionConfig +}); + diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/config.js b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/config.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/config.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/getRealRegion.js b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/getRealRegion.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/getRealRegion.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/index.js b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/isFipsRegion.js b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/isFipsRegion.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/isFipsRegion.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js b/node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js new file mode 100644 index 0000000..26a7cdf --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js @@ -0,0 +1,25 @@ +export const getAwsRegionExtensionConfiguration = (runtimeConfig) => { + let runtimeConfigRegion = async () => { + if (runtimeConfig.region === undefined) { + throw new Error("Region is missing from runtimeConfig"); + } + const region = runtimeConfig.region; + if (typeof region === "string") { + return region; + } + return region(); + }; + return { + setRegion(region) { + runtimeConfigRegion = region; + }, + region() { + return runtimeConfigRegion; + }, + }; +}; +export const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region(), + }; +}; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-es/index.js b/node_modules/@aws-sdk/region-config-resolver/dist-es/index.js new file mode 100644 index 0000000..6f4e482 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-es/index.js @@ -0,0 +1,2 @@ +export * from "./extensions"; +export * from "./regionConfig"; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/config.js b/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/config.js new file mode 100644 index 0000000..7db9896 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/config.js @@ -0,0 +1,12 @@ +export const REGION_ENV_NAME = "AWS_REGION"; +export const REGION_INI_NAME = "region"; +export const NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + }, +}; +export const NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials", +}; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/getRealRegion.js b/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/getRealRegion.js new file mode 100644 index 0000000..8d1246b --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/getRealRegion.js @@ -0,0 +1,6 @@ +import { isFipsRegion } from "./isFipsRegion"; +export const getRealRegion = (region) => isFipsRegion(region) + ? ["fips-aws-global", "aws-fips"].includes(region) + ? "us-east-1" + : region.replace(/fips-(dkr-|prod-)?|-fips/, "") + : region; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/index.js b/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/index.js new file mode 100644 index 0000000..83675f7 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/index.js @@ -0,0 +1,2 @@ +export * from "./config"; +export * from "./resolveRegionConfig"; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/isFipsRegion.js b/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/isFipsRegion.js new file mode 100644 index 0000000..d758967 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/isFipsRegion.js @@ -0,0 +1 @@ +export const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/resolveRegionConfig.js b/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/resolveRegionConfig.js new file mode 100644 index 0000000..0028a55 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/resolveRegionConfig.js @@ -0,0 +1,25 @@ +import { getRealRegion } from "./getRealRegion"; +import { isFipsRegion } from "./isFipsRegion"; +export const resolveRegionConfig = (input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return { + ...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(); + }, + }; +}; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/extensions/index.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/extensions/index.d.ts new file mode 100644 index 0000000..7756bad --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/extensions/index.d.ts @@ -0,0 +1,16 @@ +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { Provider } from "@smithy/types"; +export type RegionExtensionRuntimeConfigType = Partial<{ + region: string | Provider; +}>; +/** + * @internal + */ +export declare const getAwsRegionExtensionConfiguration: (runtimeConfig: RegionExtensionRuntimeConfigType) => { + setRegion(region: Provider): void; + region(): Provider; +}; +/** + * @internal + */ +export declare const resolveAwsRegionExtensionConfiguration: (awsRegionExtensionConfiguration: AwsRegionExtensionConfiguration) => RegionExtensionRuntimeConfigType; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/index.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/index.d.ts new file mode 100644 index 0000000..6f4e482 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/index.d.ts @@ -0,0 +1,2 @@ +export * from "./extensions"; +export * from "./regionConfig"; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/config.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/config.d.ts new file mode 100644 index 0000000..d203bb0 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/config.d.ts @@ -0,0 +1,17 @@ +import { LoadedConfigSelectors, LocalConfigOptions } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const REGION_ENV_NAME = "AWS_REGION"; +/** + * @internal + */ +export declare const REGION_INI_NAME = "region"; +/** + * @internal + */ +export declare const NODE_REGION_CONFIG_OPTIONS: LoadedConfigSelectors; +/** + * @internal + */ +export declare const NODE_REGION_CONFIG_FILE_OPTIONS: LocalConfigOptions; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/getRealRegion.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/getRealRegion.d.ts new file mode 100644 index 0000000..c70fb5b --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/getRealRegion.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const getRealRegion: (region: string) => string; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/index.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/index.d.ts new file mode 100644 index 0000000..6dcf5e5 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./config"; +/** + * @internal + */ +export * from "./resolveRegionConfig"; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/isFipsRegion.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/isFipsRegion.d.ts new file mode 100644 index 0000000..b42cee7 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/isFipsRegion.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const isFipsRegion: (region: string) => boolean; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/resolveRegionConfig.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/resolveRegionConfig.d.ts new file mode 100644 index 0000000..84ed4d0 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/resolveRegionConfig.d.ts @@ -0,0 +1,37 @@ +import { Provider } from "@smithy/types"; +/** + * @public + */ +export interface RegionInputConfig { + /** + * The AWS region to which this client will send requests + */ + region?: string | Provider; + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | Provider; +} +/** + * @internal + */ +interface PreviouslyResolved { +} +/** + * @internal + */ +export interface RegionResolvedConfig { + /** + * Resolved value for input config {@link RegionInputConfig.region} + */ + region: Provider; + /** + * Resolved value for input {@link RegionInputConfig.useFipsEndpoint} + */ + useFipsEndpoint: Provider; +} +/** + * @internal + */ +export declare const resolveRegionConfig: (input: T & RegionInputConfig & PreviouslyResolved) => T & RegionResolvedConfig; +export {}; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/extensions/index.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/extensions/index.d.ts new file mode 100644 index 0000000..c1328e3 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/extensions/index.d.ts @@ -0,0 +1,14 @@ +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { Provider } from "@smithy/types"; +export type RegionExtensionRuntimeConfigType = Partial<{ + region: string | Provider; +}>; +export declare const getAwsRegionExtensionConfiguration: ( + runtimeConfig: RegionExtensionRuntimeConfigType +) => { + setRegion(region: Provider): void; + region(): Provider; +}; +export declare const resolveAwsRegionExtensionConfiguration: ( + awsRegionExtensionConfiguration: AwsRegionExtensionConfiguration +) => RegionExtensionRuntimeConfigType; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..6f4e482 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/index.d.ts @@ -0,0 +1,2 @@ +export * from "./extensions"; +export * from "./regionConfig"; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/config.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/config.d.ts new file mode 100644 index 0000000..ceb3e02 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/config.d.ts @@ -0,0 +1,8 @@ +import { + LoadedConfigSelectors, + LocalConfigOptions, +} from "@smithy/node-config-provider"; +export declare const REGION_ENV_NAME = "AWS_REGION"; +export declare const REGION_INI_NAME = "region"; +export declare const NODE_REGION_CONFIG_OPTIONS: LoadedConfigSelectors; +export declare const NODE_REGION_CONFIG_FILE_OPTIONS: LocalConfigOptions; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/getRealRegion.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/getRealRegion.d.ts new file mode 100644 index 0000000..f06119b --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/getRealRegion.d.ts @@ -0,0 +1 @@ +export declare const getRealRegion: (region: string) => string; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/index.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/index.d.ts new file mode 100644 index 0000000..83675f7 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/index.d.ts @@ -0,0 +1,2 @@ +export * from "./config"; +export * from "./resolveRegionConfig"; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/isFipsRegion.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/isFipsRegion.d.ts new file mode 100644 index 0000000..13d34f2 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/isFipsRegion.d.ts @@ -0,0 +1 @@ +export declare const isFipsRegion: (region: string) => boolean; diff --git a/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/resolveRegionConfig.d.ts b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/resolveRegionConfig.d.ts new file mode 100644 index 0000000..86b8364 --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/resolveRegionConfig.d.ts @@ -0,0 +1,14 @@ +import { Provider } from "@smithy/types"; +export interface RegionInputConfig { + region?: string | Provider; + useFipsEndpoint?: boolean | Provider; +} +interface PreviouslyResolved {} +export interface RegionResolvedConfig { + region: Provider; + useFipsEndpoint: Provider; +} +export declare const resolveRegionConfig: ( + input: T & RegionInputConfig & PreviouslyResolved +) => T & RegionResolvedConfig; +export {}; diff --git a/node_modules/@aws-sdk/region-config-resolver/package.json b/node_modules/@aws-sdk/region-config-resolver/package.json new file mode 100644 index 0000000..bdd6ffc --- /dev/null +++ b/node_modules/@aws-sdk/region-config-resolver/package.json @@ -0,0 +1,58 @@ +{ + "name": "@aws-sdk/region-config-resolver", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline region-config-resolver", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "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", + "test": "jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/types": "^2.12.0", + "@smithy/util-config-provider": "^2.3.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "jest": "28.1.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/region-config-resolver", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/region-config-resolver" + } +} diff --git a/node_modules/@aws-sdk/token-providers/LICENSE b/node_modules/@aws-sdk/token-providers/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/README.md b/node_modules/@aws-sdk/token-providers/README.md new file mode 100644 index 0000000..9078019 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/README.md @@ -0,0 +1,53 @@ +# @aws-sdk/token-providers + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/token-providers/latest.svg)](https://www.npmjs.com/package/@aws-sdk/token-providers) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/token-providers.svg)](https://www.npmjs.com/package/@aws-sdk/token-providers) + +A collection of all token providers. The token providers should be used when the authorization +type is going to be token based. For example, the `bearer` authorization type set using +[httpBearerAuth trait][http-bearer-auth-trait] in Smithy. + +## Static Token Provider + +```ts +import { fromStatic } from "@aws-sdk/token-providers"; + +const token = { token: "TOKEN" }; +const staticTokenProvider = fromStatic(token); + +const staticToken = await staticTokenProvider(); // returns { token: "TOKEN" } +``` + +## SSO Token Provider + +```ts +import { fromSso } from "@aws-sdk/token-providers"; + +// returns token from SSO token cache or ssoOidc.createToken() call. +const ssoToken = await fromSso(); +``` + +## Token Provider Chain + +```ts +import { nodeProvider } from "@aws-sdk/token-providers"; + +// returns token from default providers. +const token = await nodeProvider(); +``` + +[http-bearer-auth-trait]: https://smithy.io/2.0/spec/authentication-traits.html#smithy-api-httpbearerauth-trait + +--- + +### Development + +This package contains a minimal copy of the SSO OIDC client, instead of relying on the full client, which +would cause a circular dependency. + +When regenerating the bundled version of the SSO OIDC client, run the esbuild.js script and then make the following changes: + +- Remove any dependency of the generated client on the credential chain such that it would create + a circular dependency back to this package. Because we only need the `CreateTokenCommand`, the client, and this command's + associated `Exception`s, it is possible to remove auth dependencies. +- Ensure all required packages are declared in the `package.json` of token-providers. diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/constants.js b/node_modules/@aws-sdk/token-providers/dist-cjs/constants.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/constants.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/fromSso.js b/node_modules/@aws-sdk/token-providers/dist-cjs/fromSso.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/fromSso.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/fromStatic.js b/node_modules/@aws-sdk/token-providers/dist-cjs/fromStatic.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/fromStatic.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/getNewSsoOidcToken.js b/node_modules/@aws-sdk/token-providers/dist-cjs/getNewSsoOidcToken.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/getNewSsoOidcToken.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/getSsoOidcClient.js b/node_modules/@aws-sdk/token-providers/dist-cjs/getSsoOidcClient.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/getSsoOidcClient.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/index.js b/node_modules/@aws-sdk/token-providers/dist-cjs/index.js new file mode 100644 index 0000000..a318f17 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/index.js @@ -0,0 +1,214 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/loadSsoOidc.ts +var loadSsoOidc_exports = {}; +__export(loadSsoOidc_exports, { + CreateTokenCommand: () => import_client_sso_oidc.CreateTokenCommand, + SSOOIDCClient: () => import_client_sso_oidc.SSOOIDCClient +}); +var import_client_sso_oidc; +var init_loadSsoOidc = __esm({ + "src/loadSsoOidc.ts"() { + import_client_sso_oidc = require("@aws-sdk/client-sso-oidc"); + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + fromSso: () => fromSso, + fromStatic: () => fromStatic, + nodeProvider: () => nodeProvider +}); +module.exports = __toCommonJS(src_exports); + +// src/fromSso.ts + + + +// src/constants.ts +var EXPIRE_WINDOW_MS = 5 * 60 * 1e3; +var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; + +// src/getSsoOidcClient.ts +var ssoOidcClientsHash = {}; +var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion) => { + const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => (init_loadSsoOidc(), loadSsoOidc_exports)); + if (ssoOidcClientsHash[ssoRegion]) { + return ssoOidcClientsHash[ssoRegion]; + } + const ssoOidcClient = new SSOOIDCClient2({ region: ssoRegion }); + ssoOidcClientsHash[ssoRegion] = ssoOidcClient; + return ssoOidcClient; +}, "getSsoOidcClient"); + +// src/getNewSsoOidcToken.ts +var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion) => { + const { CreateTokenCommand: CreateTokenCommand2 } = await Promise.resolve().then(() => (init_loadSsoOidc(), loadSsoOidc_exports)); + const ssoOidcClient = await getSsoOidcClient(ssoRegion); + return ssoOidcClient.send( + new CreateTokenCommand2({ + clientId: ssoToken.clientId, + clientSecret: ssoToken.clientSecret, + refreshToken: ssoToken.refreshToken, + grantType: "refresh_token" + }) + ); +}, "getNewSsoOidcToken"); + +// src/validateTokenExpiry.ts +var import_property_provider = require("@smithy/property-provider"); +var validateTokenExpiry = /* @__PURE__ */ __name((token) => { + if (token.expiration && token.expiration.getTime() < Date.now()) { + throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); + } +}, "validateTokenExpiry"); + +// src/validateTokenKey.ts + +var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => { + if (typeof value === "undefined") { + throw new import_property_provider.TokenProviderError( + `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, + false + ); + } +}, "validateTokenKey"); + +// src/writeSSOTokenToFile.ts +var import_shared_ini_file_loader = require("@smithy/shared-ini-file-loader"); +var import_fs = require("fs"); +var { writeFile } = import_fs.promises; +var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => { + const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id); + const tokenString = JSON.stringify(ssoToken, null, 2); + return writeFile(tokenFilepath, tokenString); +}, "writeSSOTokenToFile"); + +// src/fromSso.ts +var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); +var fromSso = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/token-providers", "fromSso"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + } else if (!profile["sso_session"]) { + throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + } + const ssoSessionName = profile["sso_session"]; + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const ssoSession = ssoSessions[ssoSessionName]; + if (!ssoSession) { + throw new import_property_provider.TokenProviderError( + `Sso session '${ssoSessionName}' could not be found in shared credentials file.`, + false + ); + } + for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { + if (!ssoSession[ssoSessionRequiredKey]) { + throw new import_property_provider.TokenProviderError( + `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, + false + ); + } + } + const ssoStartUrl = ssoSession["sso_start_url"]; + const ssoRegion = ssoSession["sso_region"]; + let ssoToken; + try { + ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName); + } catch (e) { + throw new import_property_provider.TokenProviderError( + `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, + false + ); + } + validateTokenKey("accessToken", ssoToken.accessToken); + validateTokenKey("expiresAt", ssoToken.expiresAt); + const { accessToken, expiresAt } = ssoToken; + const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; + if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) { + return existingToken; + } + if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) { + validateTokenExpiry(existingToken); + return existingToken; + } + validateTokenKey("clientId", ssoToken.clientId, true); + validateTokenKey("clientSecret", ssoToken.clientSecret, true); + validateTokenKey("refreshToken", ssoToken.refreshToken, true); + try { + lastRefreshAttemptTime.setTime(Date.now()); + const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion); + validateTokenKey("accessToken", newSsoOidcToken.accessToken); + validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); + const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3); + try { + await writeSSOTokenToFile(ssoSessionName, { + ...ssoToken, + accessToken: newSsoOidcToken.accessToken, + expiresAt: newTokenExpiration.toISOString(), + refreshToken: newSsoOidcToken.refreshToken + }); + } catch (error) { + } + return { + token: newSsoOidcToken.accessToken, + expiration: newTokenExpiration + }; + } catch (error) { + validateTokenExpiry(existingToken); + return existingToken; + } +}, "fromSso"); + +// src/fromStatic.ts + +var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => { + logger == null ? void 0 : logger.debug("@aws-sdk/token-providers", "fromStatic"); + if (!token || !token.token) { + throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false); + } + return token; +}, "fromStatic"); + +// src/nodeProvider.ts + +var nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)( + (0, import_property_provider.chain)(fromSso(init), async () => { + throw new import_property_provider.TokenProviderError("Could not load token from any providers", false); + }), + (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, + (token) => token.expiration !== void 0 +), "nodeProvider"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + fromSso, + fromStatic, + nodeProvider +}); + diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/loadSsoOidc.js b/node_modules/@aws-sdk/token-providers/dist-cjs/loadSsoOidc.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/loadSsoOidc.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/nodeProvider.js b/node_modules/@aws-sdk/token-providers/dist-cjs/nodeProvider.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/nodeProvider.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/validateTokenExpiry.js b/node_modules/@aws-sdk/token-providers/dist-cjs/validateTokenExpiry.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/validateTokenExpiry.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/validateTokenKey.js b/node_modules/@aws-sdk/token-providers/dist-cjs/validateTokenKey.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/validateTokenKey.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/dist-cjs/writeSSOTokenToFile.js b/node_modules/@aws-sdk/token-providers/dist-cjs/writeSSOTokenToFile.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-cjs/writeSSOTokenToFile.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/token-providers/dist-es/constants.js b/node_modules/@aws-sdk/token-providers/dist-es/constants.js new file mode 100644 index 0000000..b84a126 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/constants.js @@ -0,0 +1,2 @@ +export const EXPIRE_WINDOW_MS = 5 * 60 * 1000; +export const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; diff --git a/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js b/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js new file mode 100644 index 0000000..d1f76ef --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js @@ -0,0 +1,79 @@ +import { TokenProviderError } from "@smithy/property-provider"; +import { getProfileName, getSSOTokenFromFile, loadSsoSessionData, parseKnownFiles, } from "@smithy/shared-ini-file-loader"; +import { EXPIRE_WINDOW_MS, REFRESH_MESSAGE } from "./constants"; +import { getNewSsoOidcToken } from "./getNewSsoOidcToken"; +import { validateTokenExpiry } from "./validateTokenExpiry"; +import { validateTokenKey } from "./validateTokenKey"; +import { writeSSOTokenToFile } from "./writeSSOTokenToFile"; +const lastRefreshAttemptTime = new Date(0); +export const fromSso = (init = {}) => async () => { + init.logger?.debug("@aws-sdk/token-providers", "fromSso"); + const profiles = await parseKnownFiles(init); + const profileName = getProfileName(init); + const profile = profiles[profileName]; + if (!profile) { + throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + } + else if (!profile["sso_session"]) { + throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + } + const ssoSessionName = profile["sso_session"]; + const ssoSessions = await loadSsoSessionData(init); + const ssoSession = ssoSessions[ssoSessionName]; + if (!ssoSession) { + throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false); + } + for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { + if (!ssoSession[ssoSessionRequiredKey]) { + throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false); + } + } + const ssoStartUrl = ssoSession["sso_start_url"]; + const ssoRegion = ssoSession["sso_region"]; + let ssoToken; + try { + ssoToken = await getSSOTokenFromFile(ssoSessionName); + } + catch (e) { + throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false); + } + validateTokenKey("accessToken", ssoToken.accessToken); + validateTokenKey("expiresAt", ssoToken.expiresAt); + const { accessToken, expiresAt } = ssoToken; + const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; + if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) { + return existingToken; + } + if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) { + validateTokenExpiry(existingToken); + return existingToken; + } + validateTokenKey("clientId", ssoToken.clientId, true); + validateTokenKey("clientSecret", ssoToken.clientSecret, true); + validateTokenKey("refreshToken", ssoToken.refreshToken, true); + try { + lastRefreshAttemptTime.setTime(Date.now()); + const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion); + validateTokenKey("accessToken", newSsoOidcToken.accessToken); + validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); + const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000); + try { + await writeSSOTokenToFile(ssoSessionName, { + ...ssoToken, + accessToken: newSsoOidcToken.accessToken, + expiresAt: newTokenExpiration.toISOString(), + refreshToken: newSsoOidcToken.refreshToken, + }); + } + catch (error) { + } + return { + token: newSsoOidcToken.accessToken, + expiration: newTokenExpiration, + }; + } + catch (error) { + validateTokenExpiry(existingToken); + return existingToken; + } +}; diff --git a/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js b/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js new file mode 100644 index 0000000..f77b82a --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js @@ -0,0 +1,8 @@ +import { TokenProviderError } from "@smithy/property-provider"; +export const fromStatic = ({ token, logger }) => async () => { + logger?.debug("@aws-sdk/token-providers", "fromStatic"); + if (!token || !token.token) { + throw new TokenProviderError(`Please pass a valid token to fromStatic`, false); + } + return token; +}; diff --git a/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js b/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js new file mode 100644 index 0000000..24c973d --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js @@ -0,0 +1,11 @@ +import { getSsoOidcClient } from "./getSsoOidcClient"; +export const getNewSsoOidcToken = async (ssoToken, ssoRegion) => { + const { CreateTokenCommand } = await import("./loadSsoOidc"); + const ssoOidcClient = await getSsoOidcClient(ssoRegion); + return ssoOidcClient.send(new CreateTokenCommand({ + clientId: ssoToken.clientId, + clientSecret: ssoToken.clientSecret, + refreshToken: ssoToken.refreshToken, + grantType: "refresh_token", + })); +}; diff --git a/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js b/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js new file mode 100644 index 0000000..8856b60 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js @@ -0,0 +1,10 @@ +const ssoOidcClientsHash = {}; +export const getSsoOidcClient = async (ssoRegion) => { + const { SSOOIDCClient } = await import("./loadSsoOidc"); + if (ssoOidcClientsHash[ssoRegion]) { + return ssoOidcClientsHash[ssoRegion]; + } + const ssoOidcClient = new SSOOIDCClient({ region: ssoRegion }); + ssoOidcClientsHash[ssoRegion] = ssoOidcClient; + return ssoOidcClient; +}; diff --git a/node_modules/@aws-sdk/token-providers/dist-es/index.js b/node_modules/@aws-sdk/token-providers/dist-es/index.js new file mode 100644 index 0000000..a0b176b --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/index.js @@ -0,0 +1,3 @@ +export * from "./fromSso"; +export * from "./fromStatic"; +export * from "./nodeProvider"; diff --git a/node_modules/@aws-sdk/token-providers/dist-es/loadSsoOidc.js b/node_modules/@aws-sdk/token-providers/dist-es/loadSsoOidc.js new file mode 100644 index 0000000..23c77d0 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/loadSsoOidc.js @@ -0,0 +1,2 @@ +import { CreateTokenCommand, SSOOIDCClient } from "@aws-sdk/client-sso-oidc"; +export { CreateTokenCommand, SSOOIDCClient }; diff --git a/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js b/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js new file mode 100644 index 0000000..a0c7b52 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js @@ -0,0 +1,5 @@ +import { chain, memoize, TokenProviderError } from "@smithy/property-provider"; +import { fromSso } from "./fromSso"; +export const nodeProvider = (init = {}) => memoize(chain(fromSso(init), async () => { + throw new TokenProviderError("Could not load token from any providers", false); +}), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined); diff --git a/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js b/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js new file mode 100644 index 0000000..8118d7c --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js @@ -0,0 +1,7 @@ +import { TokenProviderError } from "@smithy/property-provider"; +import { REFRESH_MESSAGE } from "./constants"; +export const validateTokenExpiry = (token) => { + if (token.expiration && token.expiration.getTime() < Date.now()) { + throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); + } +}; diff --git a/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js b/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js new file mode 100644 index 0000000..4979638 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js @@ -0,0 +1,7 @@ +import { TokenProviderError } from "@smithy/property-provider"; +import { REFRESH_MESSAGE } from "./constants"; +export const validateTokenKey = (key, value, forRefresh = false) => { + if (typeof value === "undefined") { + throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false); + } +}; diff --git a/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js b/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js new file mode 100644 index 0000000..6da2c9b --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js @@ -0,0 +1,8 @@ +import { getSSOTokenFilepath } from "@smithy/shared-ini-file-loader"; +import { promises as fsPromises } from "fs"; +const { writeFile } = fsPromises; +export const writeSSOTokenToFile = (id, ssoToken) => { + const tokenFilepath = getSSOTokenFilepath(id); + const tokenString = JSON.stringify(ssoToken, null, 2); + return writeFile(tokenFilepath, tokenString); +}; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts new file mode 100644 index 0000000..de28cde --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts @@ -0,0 +1,8 @@ +/** + * The time window (5 mins) that SDK will treat the SSO token expires in before the defined expiration date in token. + * This is needed because server side may have invalidated the token before the defined expiration date. + * + * @internal + */ +export declare const EXPIRE_WINDOW_MS: number; +export declare const REFRESH_MESSAGE = "To refresh this SSO session run 'aws sso login' with the corresponding profile."; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts new file mode 100644 index 0000000..fbcd2ac --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts @@ -0,0 +1,8 @@ +import { CredentialProviderOptions, TokenIdentityProvider } from "@aws-sdk/types"; +import { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +export interface FromSsoInit extends SourceProfileInit, CredentialProviderOptions { +} +/** + * Creates a token provider that will read from SSO token cache or ssoOidc.createToken() call. + */ +export declare const fromSso: (init?: FromSsoInit) => TokenIdentityProvider; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts new file mode 100644 index 0000000..e127ceb --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts @@ -0,0 +1,8 @@ +import { CredentialProviderOptions, TokenIdentity, TokenIdentityProvider } from "@aws-sdk/types"; +export interface FromStaticInit extends CredentialProviderOptions { + token?: TokenIdentity; +} +/** + * Creates a token provider that will read from static token. + */ +export declare const fromStatic: ({ token, logger }: FromStaticInit) => TokenIdentityProvider; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts new file mode 100644 index 0000000..30f04fa --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts @@ -0,0 +1,6 @@ +import { SSOToken } from "@smithy/shared-ini-file-loader"; +/** + * Returns a new SSO OIDC token from ssoOids.createToken() API call. + * @internal + */ +export declare const getNewSsoOidcToken: (ssoToken: SSOToken, ssoRegion: string) => Promise; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts new file mode 100644 index 0000000..cd3a291 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts @@ -0,0 +1,6 @@ +/** + * Returns a SSOOIDC client for the given region. If the client has already been created, + * it will be returned from the hash. + * @internal + */ +export declare const getSsoOidcClient: (ssoRegion: string) => Promise; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts new file mode 100644 index 0000000..a0b176b --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts @@ -0,0 +1,3 @@ +export * from "./fromSso"; +export * from "./fromStatic"; +export * from "./nodeProvider"; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/loadSsoOidc.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/loadSsoOidc.d.ts new file mode 100644 index 0000000..23c77d0 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/loadSsoOidc.d.ts @@ -0,0 +1,2 @@ +import { CreateTokenCommand, SSOOIDCClient } from "@aws-sdk/client-sso-oidc"; +export { CreateTokenCommand, SSOOIDCClient }; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts new file mode 100644 index 0000000..e4846ec --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts @@ -0,0 +1,18 @@ +import { TokenIdentityProvider } from "@aws-sdk/types"; +import { FromSsoInit } from "./fromSso"; +/** + * Creates a token provider that will attempt to find token from the + * following sources (listed in order of precedence): + * * SSO token from SSO cache or ssoOidc.createToken() call + * + * The default token provider is designed to invoke one provider at a time and only + * continue to the next if no token has been located. It currently has only SSO + * Token Provider in the chain. + * + * @param init Configuration that is passed to each individual + * provider + * + * @see fromSso The function used to source credentials from + * SSO cache or ssoOidc.createToken() call + */ +export declare const nodeProvider: (init?: FromSsoInit) => TokenIdentityProvider; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts new file mode 100644 index 0000000..d7e7577 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts @@ -0,0 +1,3 @@ +export declare const EXPIRE_WINDOW_MS: number; +export declare const REFRESH_MESSAGE = + "To refresh this SSO session run 'aws sso login' with the corresponding profile."; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts new file mode 100644 index 0000000..3fd8bc5 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts @@ -0,0 +1,9 @@ +import { + CredentialProviderOptions, + TokenIdentityProvider, +} from "@aws-sdk/types"; +import { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +export interface FromSsoInit + extends SourceProfileInit, + CredentialProviderOptions {} +export declare const fromSso: (init?: FromSsoInit) => TokenIdentityProvider; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts new file mode 100644 index 0000000..e680012 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts @@ -0,0 +1,12 @@ +import { + CredentialProviderOptions, + TokenIdentity, + TokenIdentityProvider, +} from "@aws-sdk/types"; +export interface FromStaticInit extends CredentialProviderOptions { + token?: TokenIdentity; +} +export declare const fromStatic: ({ + token, + logger, +}: FromStaticInit) => TokenIdentityProvider; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts new file mode 100644 index 0000000..56b668f --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts @@ -0,0 +1,5 @@ +import { SSOToken } from "@smithy/shared-ini-file-loader"; +export declare const getNewSsoOidcToken: ( + ssoToken: SSOToken, + ssoRegion: string +) => Promise; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts new file mode 100644 index 0000000..80378fc --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts @@ -0,0 +1 @@ +export declare const getSsoOidcClient: (ssoRegion: string) => Promise; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..a0b176b --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts @@ -0,0 +1,3 @@ +export * from "./fromSso"; +export * from "./fromStatic"; +export * from "./nodeProvider"; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/loadSsoOidc.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/loadSsoOidc.d.ts new file mode 100644 index 0000000..23c77d0 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/loadSsoOidc.d.ts @@ -0,0 +1,2 @@ +import { CreateTokenCommand, SSOOIDCClient } from "@aws-sdk/client-sso-oidc"; +export { CreateTokenCommand, SSOOIDCClient }; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts new file mode 100644 index 0000000..11a9bd4 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts @@ -0,0 +1,5 @@ +import { TokenIdentityProvider } from "@aws-sdk/types"; +import { FromSsoInit } from "./fromSso"; +export declare const nodeProvider: ( + init?: FromSsoInit +) => TokenIdentityProvider; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts new file mode 100644 index 0000000..9003605 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts @@ -0,0 +1,2 @@ +import { TokenIdentity } from "@aws-sdk/types"; +export declare const validateTokenExpiry: (token: TokenIdentity) => void; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts new file mode 100644 index 0000000..105b2b4 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts @@ -0,0 +1,5 @@ +export declare const validateTokenKey: ( + key: string, + value: unknown, + forRefresh?: boolean +) => void; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts new file mode 100644 index 0000000..a6d025f --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts @@ -0,0 +1,5 @@ +import { SSOToken } from "@smithy/shared-ini-file-loader"; +export declare const writeSSOTokenToFile: ( + id: string, + ssoToken: SSOToken +) => Promise; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts new file mode 100644 index 0000000..1253784 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts @@ -0,0 +1,5 @@ +import { TokenIdentity } from "@aws-sdk/types"; +/** + * Throws TokenProviderError is token is expired. + */ +export declare const validateTokenExpiry: (token: TokenIdentity) => void; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts new file mode 100644 index 0000000..a9618fd --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts @@ -0,0 +1,4 @@ +/** + * Throws TokenProviderError if value is undefined for key. + */ +export declare const validateTokenKey: (key: string, value: unknown, forRefresh?: boolean) => void; diff --git a/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts b/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts new file mode 100644 index 0000000..a1e17e8 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts @@ -0,0 +1,5 @@ +import { SSOToken } from "@smithy/shared-ini-file-loader"; +/** + * Writes SSO token to file based on filepath computed from ssoStartUrl or session name. + */ +export declare const writeSSOTokenToFile: (id: string, ssoToken: SSOToken) => Promise; diff --git a/node_modules/@aws-sdk/token-providers/package.json b/node_modules/@aws-sdk/token-providers/package.json new file mode 100644 index 0000000..fa8fe00 --- /dev/null +++ b/node_modules/@aws-sdk/token-providers/package.json @@ -0,0 +1,66 @@ +{ + "name": "@aws-sdk/token-providers", + "version": "3.535.0", + "description": "A collection of token providers", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "sideEffects": false, + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline token-providers", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "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", + "test": "jest" + }, + "keywords": [ + "aws", + "token" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sso-oidc": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "browser": {}, + "react-native": {}, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/token-providers", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/token-providers" + } +} diff --git a/node_modules/@aws-sdk/types/LICENSE b/node_modules/@aws-sdk/types/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@aws-sdk/types/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/README.md b/node_modules/@aws-sdk/types/README.md new file mode 100644 index 0000000..a5658db --- /dev/null +++ b/node_modules/@aws-sdk/types/README.md @@ -0,0 +1,4 @@ +# @aws-sdk/types + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/types/latest.svg)](https://www.npmjs.com/package/@aws-sdk/types) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/types.svg)](https://www.npmjs.com/package/@aws-sdk/types) diff --git a/node_modules/@aws-sdk/types/dist-cjs/abort.js b/node_modules/@aws-sdk/types/dist-cjs/abort.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/abort.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/auth.js b/node_modules/@aws-sdk/types/dist-cjs/auth.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/auth.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/blob/blob-types.js b/node_modules/@aws-sdk/types/dist-cjs/blob/blob-types.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/blob/blob-types.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/checksum.js b/node_modules/@aws-sdk/types/dist-cjs/checksum.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/checksum.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/client.js b/node_modules/@aws-sdk/types/dist-cjs/client.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/client.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/command.js b/node_modules/@aws-sdk/types/dist-cjs/command.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/command.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/connection.js b/node_modules/@aws-sdk/types/dist-cjs/connection.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/connection.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/credentials.js b/node_modules/@aws-sdk/types/dist-cjs/credentials.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/credentials.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/crypto.js b/node_modules/@aws-sdk/types/dist-cjs/crypto.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/crypto.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/dns.js b/node_modules/@aws-sdk/types/dist-cjs/dns.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/dns.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/encode.js b/node_modules/@aws-sdk/types/dist-cjs/encode.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/encode.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/endpoint.js b/node_modules/@aws-sdk/types/dist-cjs/endpoint.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/endpoint.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/eventStream.js b/node_modules/@aws-sdk/types/dist-cjs/eventStream.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/eventStream.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/extensions/index.js b/node_modules/@aws-sdk/types/dist-cjs/extensions/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/extensions/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/http.js b/node_modules/@aws-sdk/types/dist-cjs/http.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/http.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/identity/AnonymousIdentity.js b/node_modules/@aws-sdk/types/dist-cjs/identity/AnonymousIdentity.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/identity/AnonymousIdentity.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/identity/AwsCredentialIdentity.js b/node_modules/@aws-sdk/types/dist-cjs/identity/AwsCredentialIdentity.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/identity/AwsCredentialIdentity.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/identity/Identity.js b/node_modules/@aws-sdk/types/dist-cjs/identity/Identity.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/identity/Identity.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/identity/LoginIdentity.js b/node_modules/@aws-sdk/types/dist-cjs/identity/LoginIdentity.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/identity/LoginIdentity.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/identity/TokenIdentity.js b/node_modules/@aws-sdk/types/dist-cjs/identity/TokenIdentity.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/identity/TokenIdentity.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/identity/index.js b/node_modules/@aws-sdk/types/dist-cjs/identity/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/identity/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/index.js b/node_modules/@aws-sdk/types/dist-cjs/index.js new file mode 100644 index 0000000..341d1b8 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/index.js @@ -0,0 +1,298 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AbortController: () => import_types.AbortController, + AbortHandler: () => import_types.AbortHandler, + AbortSignal: () => import_types.AbortSignal, + AbsoluteLocation: () => import_types.AbsoluteLocation, + AuthScheme: () => import_types.AuthScheme, + AvailableMessage: () => import_types.AvailableMessage, + AvailableMessages: () => import_types.AvailableMessages, + AwsCredentialIdentity: () => import_types.AwsCredentialIdentity, + AwsCredentialIdentityProvider: () => import_types.AwsCredentialIdentityProvider, + BinaryHeaderValue: () => import_types.BinaryHeaderValue, + BlobTypes: () => import_types.BlobTypes, + BodyLengthCalculator: () => import_types.BodyLengthCalculator, + BooleanHeaderValue: () => import_types.BooleanHeaderValue, + BuildHandler: () => import_types.BuildHandler, + BuildHandlerArguments: () => import_types.BuildHandlerArguments, + BuildHandlerOptions: () => import_types.BuildHandlerOptions, + BuildHandlerOutput: () => import_types.BuildHandlerOutput, + BuildMiddleware: () => import_types.BuildMiddleware, + ByteHeaderValue: () => import_types.ByteHeaderValue, + Checksum: () => import_types.Checksum, + ChecksumConstructor: () => import_types.ChecksumConstructor, + Client: () => import_types.Client, + Command: () => import_types.Command, + ConnectConfiguration: () => import_types.ConnectConfiguration, + ConnectionManager: () => import_types.ConnectionManager, + ConnectionManagerConfiguration: () => import_types.ConnectionManagerConfiguration, + ConnectionPool: () => import_types.ConnectionPool, + DateInput: () => import_types.DateInput, + Decoder: () => import_types.Decoder, + DeserializeHandler: () => import_types.DeserializeHandler, + DeserializeHandlerArguments: () => import_types.DeserializeHandlerArguments, + DeserializeHandlerOptions: () => import_types.DeserializeHandlerOptions, + DeserializeHandlerOutput: () => import_types.DeserializeHandlerOutput, + DeserializeMiddleware: () => import_types.DeserializeMiddleware, + DocumentType: () => import_types.DocumentType, + Encoder: () => import_types.Encoder, + Endpoint: () => import_types.Endpoint, + EndpointARN: () => import_types.EndpointARN, + EndpointBearer: () => import_types.EndpointBearer, + EndpointObjectProperty: () => import_types.EndpointObjectProperty, + EndpointParameters: () => import_types.EndpointParameters, + EndpointPartition: () => import_types.EndpointPartition, + EndpointURL: () => import_types.EndpointURL, + EndpointURLScheme: () => import_types.EndpointURLScheme, + EndpointV2: () => import_types.EndpointV2, + EventSigner: () => import_types.EventSigner, + EventSigningArguments: () => import_types.EventSigningArguments, + EventStreamMarshaller: () => import_types.EventStreamMarshaller, + EventStreamMarshallerDeserFn: () => import_types.EventStreamMarshallerDeserFn, + EventStreamMarshallerSerFn: () => import_types.EventStreamMarshallerSerFn, + EventStreamPayloadHandler: () => import_types.EventStreamPayloadHandler, + EventStreamPayloadHandlerProvider: () => import_types.EventStreamPayloadHandlerProvider, + EventStreamRequestSigner: () => import_types.EventStreamRequestSigner, + EventStreamSerdeContext: () => import_types.EventStreamSerdeContext, + EventStreamSerdeProvider: () => import_types.EventStreamSerdeProvider, + EventStreamSignerProvider: () => import_types.EventStreamSignerProvider, + ExponentialBackoffJitterType: () => import_types.ExponentialBackoffJitterType, + ExponentialBackoffStrategyOptions: () => import_types.ExponentialBackoffStrategyOptions, + FinalizeHandler: () => import_types.FinalizeHandler, + FinalizeHandlerArguments: () => import_types.FinalizeHandlerArguments, + FinalizeHandlerOutput: () => import_types.FinalizeHandlerOutput, + FinalizeRequestHandlerOptions: () => import_types.FinalizeRequestHandlerOptions, + FinalizeRequestMiddleware: () => import_types.FinalizeRequestMiddleware, + FormattedEvent: () => import_types.FormattedEvent, + GetAwsChunkedEncodingStream: () => import_types.GetAwsChunkedEncodingStream, + GetAwsChunkedEncodingStreamOptions: () => import_types.GetAwsChunkedEncodingStreamOptions, + Handler: () => import_types.Handler, + HandlerExecutionContext: () => import_types.HandlerExecutionContext, + HandlerOptions: () => import_types.HandlerOptions, + Hash: () => import_types.Hash, + HashConstructor: () => import_types.HashConstructor, + HeaderBag: () => import_types.HeaderBag, + HostAddressType: () => HostAddressType, + HttpAuthDefinition: () => import_types.HttpAuthDefinition, + HttpAuthLocation: () => import_types.HttpAuthLocation, + HttpHandlerOptions: () => import_types.HttpHandlerOptions, + HttpMessage: () => import_types.HttpMessage, + HttpRequest: () => import_types.HttpRequest, + HttpResponse: () => import_types.HttpResponse, + Identity: () => import_types.Identity, + IdentityProvider: () => import_types.IdentityProvider, + IniSection: () => import_types.IniSection, + InitializeHandler: () => import_types.InitializeHandler, + InitializeHandlerArguments: () => import_types.InitializeHandlerArguments, + InitializeHandlerOptions: () => import_types.InitializeHandlerOptions, + InitializeHandlerOutput: () => import_types.InitializeHandlerOutput, + InitializeMiddleware: () => import_types.InitializeMiddleware, + Int64: () => import_types.Int64, + IntegerHeaderValue: () => import_types.IntegerHeaderValue, + Logger: () => import_types.Logger, + LongHeaderValue: () => import_types.LongHeaderValue, + MemoizedProvider: () => import_types.MemoizedProvider, + Message: () => import_types.Message, + MessageDecoder: () => import_types.MessageDecoder, + MessageEncoder: () => import_types.MessageEncoder, + MessageHeaderValue: () => import_types.MessageHeaderValue, + MessageHeaders: () => import_types.MessageHeaders, + MessageSigner: () => import_types.MessageSigner, + MetadataBearer: () => import_types.MetadataBearer, + MiddlewareStack: () => import_types.MiddlewareStack, + MiddlewareType: () => import_types.MiddlewareType, + PaginationConfiguration: () => import_types.PaginationConfiguration, + Paginator: () => import_types.Paginator, + ParsedIniData: () => import_types.ParsedIniData, + Pluggable: () => import_types.Pluggable, + Priority: () => import_types.Priority, + Profile: () => import_types.Profile, + Provider: () => import_types.Provider, + QueryParameterBag: () => import_types.QueryParameterBag, + RegionInfo: () => import_types.RegionInfo, + RegionInfoProvider: () => import_types.RegionInfoProvider, + RegionInfoProviderOptions: () => import_types.RegionInfoProviderOptions, + Relation: () => import_types.Relation, + RelativeLocation: () => import_types.RelativeLocation, + RelativeMiddlewareOptions: () => import_types.RelativeMiddlewareOptions, + RequestContext: () => import_types.RequestContext, + RequestHandler: () => import_types.RequestHandler, + RequestHandlerMetadata: () => import_types.RequestHandlerMetadata, + RequestHandlerOutput: () => import_types.RequestHandlerOutput, + RequestHandlerProtocol: () => import_types.RequestHandlerProtocol, + RequestPresigner: () => import_types.RequestPresigner, + RequestPresigningArguments: () => import_types.RequestPresigningArguments, + RequestSerializer: () => import_types.RequestSerializer, + RequestSigner: () => import_types.RequestSigner, + RequestSigningArguments: () => import_types.RequestSigningArguments, + ResponseDeserializer: () => import_types.ResponseDeserializer, + ResponseMetadata: () => import_types.ResponseMetadata, + RetryBackoffStrategy: () => import_types.RetryBackoffStrategy, + RetryErrorInfo: () => import_types.RetryErrorInfo, + RetryErrorType: () => import_types.RetryErrorType, + RetryStrategy: () => import_types.RetryStrategy, + RetryStrategyOptions: () => import_types.RetryStrategyOptions, + RetryStrategyV2: () => import_types.RetryStrategyV2, + RetryToken: () => import_types.RetryToken, + RetryableTrait: () => import_types.RetryableTrait, + SdkError: () => import_types.SdkError, + SdkStream: () => import_types.SdkStream, + SdkStreamMixin: () => import_types.SdkStreamMixin, + SdkStreamMixinInjector: () => import_types.SdkStreamMixinInjector, + SdkStreamSerdeContext: () => import_types.SdkStreamSerdeContext, + SerdeContext: () => import_types.SerdeContext, + SerializeHandler: () => import_types.SerializeHandler, + SerializeHandlerArguments: () => import_types.SerializeHandlerArguments, + SerializeHandlerOptions: () => import_types.SerializeHandlerOptions, + SerializeHandlerOutput: () => import_types.SerializeHandlerOutput, + SerializeMiddleware: () => import_types.SerializeMiddleware, + SharedConfigFiles: () => import_types.SharedConfigFiles, + ShortHeaderValue: () => import_types.ShortHeaderValue, + SignableMessage: () => import_types.SignableMessage, + SignedMessage: () => import_types.SignedMessage, + SigningArguments: () => import_types.SigningArguments, + SmithyException: () => import_types.SmithyException, + SourceData: () => import_types.SourceData, + StandardRetryBackoffStrategy: () => import_types.StandardRetryBackoffStrategy, + StandardRetryToken: () => import_types.StandardRetryToken, + Step: () => import_types.Step, + StreamCollector: () => import_types.StreamCollector, + StreamHasher: () => import_types.StreamHasher, + StringHeaderValue: () => import_types.StringHeaderValue, + StringSigner: () => import_types.StringSigner, + Terminalware: () => import_types.Terminalware, + TimestampHeaderValue: () => import_types.TimestampHeaderValue, + TokenIdentity: () => import_types.TokenIdentity, + TokenIdentityProvider: () => import_types.TokenIdentityProvider, + URI: () => import_types.URI, + UrlParser: () => import_types.UrlParser, + UserAgent: () => import_types.UserAgent, + UserAgentPair: () => import_types.UserAgentPair, + UuidHeaderValue: () => import_types.UuidHeaderValue, + WaiterConfiguration: () => import_types.WaiterConfiguration, + WithSdkStreamMixin: () => import_types.WithSdkStreamMixin, + randomValues: () => import_types.randomValues +}); +module.exports = __toCommonJS(src_exports); + +// src/abort.ts +var import_types = require("@smithy/types"); + +// src/auth.ts + + +// src/blob/blob-types.ts + + +// src/checksum.ts + + +// src/client.ts + + +// src/command.ts + + +// src/connection.ts + + +// src/crypto.ts + + +// src/dns.ts +var HostAddressType = /* @__PURE__ */ ((HostAddressType2) => { + HostAddressType2["AAAA"] = "AAAA"; + HostAddressType2["A"] = "A"; + return HostAddressType2; +})(HostAddressType || {}); + +// src/encode.ts + + +// src/endpoint.ts + + +// src/eventStream.ts + + +// src/http.ts + + +// src/identity/AwsCredentialIdentity.ts + + +// src/identity/Identity.ts + + +// src/identity/TokenIdentity.ts + + +// src/logger.ts + + +// src/middleware.ts + + +// src/pagination.ts + + +// src/profile.ts + + +// src/response.ts + + +// src/retry.ts + + +// src/serde.ts + + +// src/shapes.ts + + +// src/signature.ts + + +// src/stream.ts + + +// src/transfer.ts + + +// src/uri.ts + + +// src/util.ts + + +// src/waiter.ts + +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + HttpAuthLocation, + HostAddressType, + EndpointURLScheme, + RequestHandlerProtocol +}); + diff --git a/node_modules/@aws-sdk/types/dist-cjs/logger.js b/node_modules/@aws-sdk/types/dist-cjs/logger.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/logger.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/middleware.js b/node_modules/@aws-sdk/types/dist-cjs/middleware.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/middleware.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/pagination.js b/node_modules/@aws-sdk/types/dist-cjs/pagination.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/pagination.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/profile.js b/node_modules/@aws-sdk/types/dist-cjs/profile.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/profile.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/request.js b/node_modules/@aws-sdk/types/dist-cjs/request.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/request.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/response.js b/node_modules/@aws-sdk/types/dist-cjs/response.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/response.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/retry.js b/node_modules/@aws-sdk/types/dist-cjs/retry.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/retry.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/serde.js b/node_modules/@aws-sdk/types/dist-cjs/serde.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/serde.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/shapes.js b/node_modules/@aws-sdk/types/dist-cjs/shapes.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/shapes.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/signature.js b/node_modules/@aws-sdk/types/dist-cjs/signature.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/signature.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/stream.js b/node_modules/@aws-sdk/types/dist-cjs/stream.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/stream.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/token.js b/node_modules/@aws-sdk/types/dist-cjs/token.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/token.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/transfer.js b/node_modules/@aws-sdk/types/dist-cjs/transfer.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/transfer.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/uri.js b/node_modules/@aws-sdk/types/dist-cjs/uri.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/uri.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/util.js b/node_modules/@aws-sdk/types/dist-cjs/util.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/util.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-cjs/waiter.js b/node_modules/@aws-sdk/types/dist-cjs/waiter.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-cjs/waiter.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/types/dist-es/abort.js b/node_modules/@aws-sdk/types/dist-es/abort.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/abort.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/auth.js b/node_modules/@aws-sdk/types/dist-es/auth.js new file mode 100644 index 0000000..81f903b --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/auth.js @@ -0,0 +1 @@ +export { HttpAuthLocation } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-es/blob/blob-types.js b/node_modules/@aws-sdk/types/dist-es/blob/blob-types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/blob/blob-types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/checksum.js b/node_modules/@aws-sdk/types/dist-es/checksum.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/checksum.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/client.js b/node_modules/@aws-sdk/types/dist-es/client.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/client.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/command.js b/node_modules/@aws-sdk/types/dist-es/command.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/command.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/connection.js b/node_modules/@aws-sdk/types/dist-es/connection.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/connection.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/credentials.js b/node_modules/@aws-sdk/types/dist-es/credentials.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/credentials.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/crypto.js b/node_modules/@aws-sdk/types/dist-es/crypto.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/crypto.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/dns.js b/node_modules/@aws-sdk/types/dist-es/dns.js new file mode 100644 index 0000000..c6a2cd9 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/dns.js @@ -0,0 +1,5 @@ +export var HostAddressType; +(function (HostAddressType) { + HostAddressType["AAAA"] = "AAAA"; + HostAddressType["A"] = "A"; +})(HostAddressType || (HostAddressType = {})); diff --git a/node_modules/@aws-sdk/types/dist-es/encode.js b/node_modules/@aws-sdk/types/dist-es/encode.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/encode.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/endpoint.js b/node_modules/@aws-sdk/types/dist-es/endpoint.js new file mode 100644 index 0000000..ec53acc --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/endpoint.js @@ -0,0 +1 @@ +export { EndpointURLScheme, } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-es/eventStream.js b/node_modules/@aws-sdk/types/dist-es/eventStream.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/eventStream.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/extensions/index.js b/node_modules/@aws-sdk/types/dist-es/extensions/index.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/extensions/index.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/http.js b/node_modules/@aws-sdk/types/dist-es/http.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/http.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/identity/AnonymousIdentity.js b/node_modules/@aws-sdk/types/dist-es/identity/AnonymousIdentity.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/identity/AnonymousIdentity.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/identity/AwsCredentialIdentity.js b/node_modules/@aws-sdk/types/dist-es/identity/AwsCredentialIdentity.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/identity/AwsCredentialIdentity.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/identity/Identity.js b/node_modules/@aws-sdk/types/dist-es/identity/Identity.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/identity/Identity.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/identity/LoginIdentity.js b/node_modules/@aws-sdk/types/dist-es/identity/LoginIdentity.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/identity/LoginIdentity.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/identity/TokenIdentity.js b/node_modules/@aws-sdk/types/dist-es/identity/TokenIdentity.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/identity/TokenIdentity.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/identity/index.js b/node_modules/@aws-sdk/types/dist-es/identity/index.js new file mode 100644 index 0000000..863e78e --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/identity/index.js @@ -0,0 +1,5 @@ +export * from "./AnonymousIdentity"; +export * from "./AwsCredentialIdentity"; +export * from "./Identity"; +export * from "./LoginIdentity"; +export * from "./TokenIdentity"; diff --git a/node_modules/@aws-sdk/types/dist-es/index.js b/node_modules/@aws-sdk/types/dist-es/index.js new file mode 100644 index 0000000..ab64cd9 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/index.js @@ -0,0 +1,32 @@ +export * from "./abort"; +export * from "./auth"; +export * from "./blob/blob-types"; +export * from "./checksum"; +export * from "./client"; +export * from "./command"; +export * from "./connection"; +export * from "./credentials"; +export * from "./crypto"; +export * from "./dns"; +export * from "./encode"; +export * from "./endpoint"; +export * from "./eventStream"; +export * from "./extensions"; +export * from "./http"; +export * from "./identity"; +export * from "./logger"; +export * from "./middleware"; +export * from "./pagination"; +export * from "./profile"; +export * from "./request"; +export * from "./response"; +export * from "./retry"; +export * from "./serde"; +export * from "./shapes"; +export * from "./signature"; +export * from "./stream"; +export * from "./token"; +export * from "./transfer"; +export * from "./uri"; +export * from "./util"; +export * from "./waiter"; diff --git a/node_modules/@aws-sdk/types/dist-es/logger.js b/node_modules/@aws-sdk/types/dist-es/logger.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/logger.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/middleware.js b/node_modules/@aws-sdk/types/dist-es/middleware.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/middleware.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/pagination.js b/node_modules/@aws-sdk/types/dist-es/pagination.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/pagination.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/profile.js b/node_modules/@aws-sdk/types/dist-es/profile.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/profile.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/request.js b/node_modules/@aws-sdk/types/dist-es/request.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/request.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/response.js b/node_modules/@aws-sdk/types/dist-es/response.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/response.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/retry.js b/node_modules/@aws-sdk/types/dist-es/retry.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/retry.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/serde.js b/node_modules/@aws-sdk/types/dist-es/serde.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/serde.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/shapes.js b/node_modules/@aws-sdk/types/dist-es/shapes.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/shapes.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/signature.js b/node_modules/@aws-sdk/types/dist-es/signature.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/signature.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/stream.js b/node_modules/@aws-sdk/types/dist-es/stream.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/stream.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/token.js b/node_modules/@aws-sdk/types/dist-es/token.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/token.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/transfer.js b/node_modules/@aws-sdk/types/dist-es/transfer.js new file mode 100644 index 0000000..ba57589 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/transfer.js @@ -0,0 +1 @@ +export { RequestHandlerProtocol, } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-es/uri.js b/node_modules/@aws-sdk/types/dist-es/uri.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/uri.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/util.js b/node_modules/@aws-sdk/types/dist-es/util.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/util.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-es/waiter.js b/node_modules/@aws-sdk/types/dist-es/waiter.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-es/waiter.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/types/dist-types/abort.d.ts b/node_modules/@aws-sdk/types/dist-types/abort.d.ts new file mode 100644 index 0000000..dad6079 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/abort.d.ts @@ -0,0 +1 @@ +export { AbortController, AbortHandler, AbortSignal } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/auth.d.ts b/node_modules/@aws-sdk/types/dist-types/auth.d.ts new file mode 100644 index 0000000..6626c16 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/auth.d.ts @@ -0,0 +1 @@ +export { AuthScheme, HttpAuthDefinition, HttpAuthLocation } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/blob/blob-types.d.ts b/node_modules/@aws-sdk/types/dist-types/blob/blob-types.d.ts new file mode 100644 index 0000000..fedb3d5 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/blob/blob-types.d.ts @@ -0,0 +1,2 @@ +import { BlobTypes } from '@smithy/types'; +export { BlobTypes }; diff --git a/node_modules/@aws-sdk/types/dist-types/checksum.d.ts b/node_modules/@aws-sdk/types/dist-types/checksum.d.ts new file mode 100644 index 0000000..f805d72 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/checksum.d.ts @@ -0,0 +1 @@ +export { Checksum, ChecksumConstructor } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/client.d.ts b/node_modules/@aws-sdk/types/dist-types/client.d.ts new file mode 100644 index 0000000..d6b3dcf --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/client.d.ts @@ -0,0 +1 @@ +export { Client } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/command.d.ts b/node_modules/@aws-sdk/types/dist-types/command.d.ts new file mode 100644 index 0000000..3887267 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/command.d.ts @@ -0,0 +1 @@ +export { Command } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/connection.d.ts b/node_modules/@aws-sdk/types/dist-types/connection.d.ts new file mode 100644 index 0000000..efcb4d7 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/connection.d.ts @@ -0,0 +1 @@ +export { ConnectConfiguration, ConnectionManager, ConnectionManagerConfiguration, ConnectionPool } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/credentials.d.ts b/node_modules/@aws-sdk/types/dist-types/credentials.d.ts new file mode 100644 index 0000000..be91b1b --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/credentials.d.ts @@ -0,0 +1,49 @@ +import { Logger } from "@smithy/types"; +import { AwsCredentialIdentity } from "./identity"; +import { Provider } from "./util"; +/** + * @public + * + * An object representing temporary or permanent AWS credentials. + * + * @deprecated Use {@link AwsCredentialIdentity} + */ +export interface Credentials extends AwsCredentialIdentity { +} +/** + * @public + * + * @deprecated Use {@link AwsCredentialIdentityProvider} + */ +export type CredentialProvider = Provider; +/** + * @public + * + * Common options for credential providers. + */ +export type CredentialProviderOptions = { + /** + * This logger is only used to provide information + * on what credential providers were used during resolution. + * + * It does not log credentials. + */ + logger?: Logger; + /** + * Present if the credential provider was created by calling + * the defaultCredentialProvider in a client's middleware, having + * access to the client's config. + * + * The region of that parent or outer client is important because + * an inner client used by the credential provider may need + * to match its default partition or region with that of + * the outer client. + * + * @internal + * @deprecated - not truly deprecated, marked as a warning to not use this. + */ + parentClientConfig?: { + region?: string | Provider; + [key: string]: unknown; + }; +}; diff --git a/node_modules/@aws-sdk/types/dist-types/crypto.d.ts b/node_modules/@aws-sdk/types/dist-types/crypto.d.ts new file mode 100644 index 0000000..aeeea50 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/crypto.d.ts @@ -0,0 +1 @@ +export { Hash, HashConstructor, StreamHasher, randomValues, SourceData } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/dns.d.ts b/node_modules/@aws-sdk/types/dist-types/dns.d.ts new file mode 100644 index 0000000..8348cc4 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/dns.d.ts @@ -0,0 +1,85 @@ +/** + * @public + * + * DNS record types + */ +export declare enum HostAddressType { + /** + * IPv6 + */ + AAAA = "AAAA", + /** + * IPv4 + */ + A = "A" +} +/** + * @public + */ +export interface HostAddress { + /** + * The {@link HostAddressType} of the host address. + */ + addressType: HostAddressType; + /** + * The resolved numerical address represented as a + * string. + */ + address: string; + /** + * The host name the {@link address} was resolved from. + */ + hostName: string; + /** + * The service record of {@link hostName}. + */ + service?: string; +} +/** + * @public + */ +export interface HostResolverArguments { + /** + * The host name to resolve. + */ + hostName: string; + /** + * The service record of {@link hostName}. + */ + service?: string; +} +/** + * @public + * + * Host Resolver interface for DNS queries + */ +export interface HostResolver { + /** + * Resolves the address(es) for {@link HostResolverArguments} and returns a + * list of addresses with (most likely) two addresses, one {@link HostAddressType.AAAA} + * and one {@link HostAddressType.A}. Calls to this function will likely alter + * the cache (if implemented) so that if there's multiple addresses, a different + * set will be returned on the next call. + * In the case of multi-answer, still only a maximum of two records should be + * returned. The resolver implementation is responsible for caching and rotation + * of the multiple addresses that get returned. + * Implementations don't have to explictly call getaddrinfo(), they can use + * high level abstractions provided in their language runtimes/libraries. + * @param args - arguments with host name query addresses for + * @returns promise with a list of {@link HostAddress} + */ + resolveAddress(args: HostResolverArguments): Promise; + /** + * Reports a failure on a {@link HostAddress} so that the cache (if implemented) + * can accomodate the failure and likely not return the address until it recovers. + * @param addr - host address to report a failure on + */ + reportFailureOnAddress(addr: HostAddress): void; + /** + * Empties the cache (if implemented) for a {@link HostResolverArguments.hostName}. + * If {@link HostResolverArguments.hostName} is not provided, the cache (if + * implemented) is emptied for all host names. + * @param args - optional arguments to empty the cache for + */ + purgeCache(args?: HostResolverArguments): void; +} diff --git a/node_modules/@aws-sdk/types/dist-types/encode.d.ts b/node_modules/@aws-sdk/types/dist-types/encode.d.ts new file mode 100644 index 0000000..128ee57 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/encode.d.ts @@ -0,0 +1 @@ +export { MessageDecoder, MessageEncoder, AvailableMessage, AvailableMessages } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/endpoint.d.ts b/node_modules/@aws-sdk/types/dist-types/endpoint.d.ts new file mode 100644 index 0000000..f2ffaf5 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/endpoint.d.ts @@ -0,0 +1 @@ +export { EndpointARN, EndpointPartition, EndpointURLScheme, EndpointURL, EndpointObjectProperty, EndpointV2, EndpointParameters, } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/eventStream.d.ts b/node_modules/@aws-sdk/types/dist-types/eventStream.d.ts new file mode 100644 index 0000000..cee02f7 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/eventStream.d.ts @@ -0,0 +1 @@ +export { Message, MessageHeaders, BooleanHeaderValue, ByteHeaderValue, ShortHeaderValue, IntegerHeaderValue, LongHeaderValue, BinaryHeaderValue, StringHeaderValue, TimestampHeaderValue, UuidHeaderValue, MessageHeaderValue, Int64, EventStreamSerdeContext, EventStreamMarshaller, EventStreamMarshallerDeserFn, EventStreamMarshallerSerFn, EventStreamPayloadHandler, EventStreamPayloadHandlerProvider, EventStreamRequestSigner, EventStreamSerdeProvider, EventStreamSignerProvider, } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/extensions/index.d.ts b/node_modules/@aws-sdk/types/dist-types/extensions/index.d.ts new file mode 100644 index 0000000..5a45bcb --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/extensions/index.d.ts @@ -0,0 +1,8 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + */ +export interface AwsRegionExtensionConfiguration { + setRegion(region: Provider): void; + region(): Provider; +} diff --git a/node_modules/@aws-sdk/types/dist-types/http.d.ts b/node_modules/@aws-sdk/types/dist-types/http.d.ts new file mode 100644 index 0000000..7594b5a --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/http.d.ts @@ -0,0 +1,33 @@ +import { HttpResponse } from "@smithy/types"; +export { Endpoint, HeaderBag, HttpHandlerOptions, HttpMessage, HttpRequest, HttpResponse, QueryParameterBag, } from "@smithy/types"; +/** + * @public + * + * A collection of key/value pairs with case-insensitive keys. + */ +export interface Headers extends Map { + /** + * Returns a new instance of Headers with the specified header set to the + * provided value. Does not modify the original Headers instance. + * + * @param headerName - The name of the header to add or overwrite + * @param headerValue - The value to which the header should be set + */ + withHeader(headerName: string, headerValue: string): Headers; + /** + * Returns a new instance of Headers without the specified header. Does not + * modify the original Headers instance. + * + * @param headerName - The name of the header to remove + */ + withoutHeader(headerName: string): Headers; +} +/** + * @public + * + * Represents HTTP message whose body has been resolved to a string. This is + * used in parsing http message. + */ +export interface ResolvedHttpResponse extends HttpResponse { + body: string; +} diff --git a/node_modules/@aws-sdk/types/dist-types/identity/AnonymousIdentity.d.ts b/node_modules/@aws-sdk/types/dist-types/identity/AnonymousIdentity.d.ts new file mode 100644 index 0000000..c7006e3 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/identity/AnonymousIdentity.d.ts @@ -0,0 +1,6 @@ +import { Identity } from "./Identity"; +/** + * @public + */ +export interface AnonymousIdentity extends Identity { +} diff --git a/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts b/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts new file mode 100644 index 0000000..1113d9c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts @@ -0,0 +1 @@ +export { AwsCredentialIdentity, AwsCredentialIdentityProvider } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/identity/Identity.d.ts b/node_modules/@aws-sdk/types/dist-types/identity/Identity.d.ts new file mode 100644 index 0000000..4175fd3 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/identity/Identity.d.ts @@ -0,0 +1 @@ +export { Identity, IdentityProvider } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/identity/LoginIdentity.d.ts b/node_modules/@aws-sdk/types/dist-types/identity/LoginIdentity.d.ts new file mode 100644 index 0000000..13793f9 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/identity/LoginIdentity.d.ts @@ -0,0 +1,18 @@ +import { Identity, IdentityProvider } from "./Identity"; +/** + * @public + */ +export interface LoginIdentity extends Identity { + /** + * Identity username + */ + readonly username: string; + /** + * Identity password + */ + readonly password: string; +} +/** + * @public + */ +export type LoginIdentityProvider = IdentityProvider; diff --git a/node_modules/@aws-sdk/types/dist-types/identity/TokenIdentity.d.ts b/node_modules/@aws-sdk/types/dist-types/identity/TokenIdentity.d.ts new file mode 100644 index 0000000..66301bc --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/identity/TokenIdentity.d.ts @@ -0,0 +1 @@ +export { TokenIdentity, TokenIdentityProvider } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/identity/index.d.ts b/node_modules/@aws-sdk/types/dist-types/identity/index.d.ts new file mode 100644 index 0000000..863e78e --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/identity/index.d.ts @@ -0,0 +1,5 @@ +export * from "./AnonymousIdentity"; +export * from "./AwsCredentialIdentity"; +export * from "./Identity"; +export * from "./LoginIdentity"; +export * from "./TokenIdentity"; diff --git a/node_modules/@aws-sdk/types/dist-types/index.d.ts b/node_modules/@aws-sdk/types/dist-types/index.d.ts new file mode 100644 index 0000000..ab64cd9 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/index.d.ts @@ -0,0 +1,32 @@ +export * from "./abort"; +export * from "./auth"; +export * from "./blob/blob-types"; +export * from "./checksum"; +export * from "./client"; +export * from "./command"; +export * from "./connection"; +export * from "./credentials"; +export * from "./crypto"; +export * from "./dns"; +export * from "./encode"; +export * from "./endpoint"; +export * from "./eventStream"; +export * from "./extensions"; +export * from "./http"; +export * from "./identity"; +export * from "./logger"; +export * from "./middleware"; +export * from "./pagination"; +export * from "./profile"; +export * from "./request"; +export * from "./response"; +export * from "./retry"; +export * from "./serde"; +export * from "./shapes"; +export * from "./signature"; +export * from "./stream"; +export * from "./token"; +export * from "./transfer"; +export * from "./uri"; +export * from "./util"; +export * from "./waiter"; diff --git a/node_modules/@aws-sdk/types/dist-types/logger.d.ts b/node_modules/@aws-sdk/types/dist-types/logger.d.ts new file mode 100644 index 0000000..c363a8e --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/logger.d.ts @@ -0,0 +1,22 @@ +import { Logger } from "@smithy/types"; +export { Logger } from "@smithy/types"; +/** + * @public + * + * A list of logger's log level. These levels are sorted in + * order of increasing severity. Each log level includes itself and all + * the levels behind itself. + * + * @example `new Logger({logLevel: 'warn'})` will print all the warn and error + * message. + */ +export type LogLevel = "all" | "trace" | "debug" | "log" | "info" | "warn" | "error" | "off"; +/** + * @public + * + * An object consumed by Logger constructor to initiate a logger object. + */ +export interface LoggerOptions { + logger?: Logger; + logLevel?: LogLevel; +} diff --git a/node_modules/@aws-sdk/types/dist-types/middleware.d.ts b/node_modules/@aws-sdk/types/dist-types/middleware.d.ts new file mode 100644 index 0000000..18966f7 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/middleware.d.ts @@ -0,0 +1 @@ +export { AbsoluteLocation, BuildHandler, BuildHandlerArguments, BuildHandlerOptions, BuildHandlerOutput, BuildMiddleware, DeserializeHandler, DeserializeHandlerArguments, DeserializeHandlerOptions, DeserializeHandlerOutput, DeserializeMiddleware, FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, FinalizeRequestHandlerOptions, FinalizeRequestMiddleware, Handler, HandlerExecutionContext, HandlerOptions, InitializeHandler, InitializeHandlerArguments, InitializeHandlerOptions, InitializeHandlerOutput, InitializeMiddleware, MiddlewareStack, MiddlewareType, Pluggable, Priority, Relation, RelativeLocation, RelativeMiddlewareOptions, SerializeHandler, SerializeHandlerArguments, SerializeHandlerOptions, SerializeHandlerOutput, SerializeMiddleware, Step, Terminalware, } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/pagination.d.ts b/node_modules/@aws-sdk/types/dist-types/pagination.d.ts new file mode 100644 index 0000000..af791b0 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/pagination.d.ts @@ -0,0 +1 @@ +export { PaginationConfiguration, Paginator } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/profile.d.ts b/node_modules/@aws-sdk/types/dist-types/profile.d.ts new file mode 100644 index 0000000..9916f3b --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/profile.d.ts @@ -0,0 +1 @@ +export { IniSection, Profile, ParsedIniData, SharedConfigFiles } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/request.d.ts b/node_modules/@aws-sdk/types/dist-types/request.d.ts new file mode 100644 index 0000000..95405d1 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/request.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + */ +export interface Request { + destination: URL; + body?: any; +} diff --git a/node_modules/@aws-sdk/types/dist-types/response.d.ts b/node_modules/@aws-sdk/types/dist-types/response.d.ts new file mode 100644 index 0000000..8d99350 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/response.d.ts @@ -0,0 +1,7 @@ +export { MetadataBearer, ResponseMetadata } from "@smithy/types"; +/** + * @internal + */ +export interface Response { + body: any; +} diff --git a/node_modules/@aws-sdk/types/dist-types/retry.d.ts b/node_modules/@aws-sdk/types/dist-types/retry.d.ts new file mode 100644 index 0000000..4b7eb98 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/retry.d.ts @@ -0,0 +1 @@ +export { ExponentialBackoffJitterType, ExponentialBackoffStrategyOptions, RetryBackoffStrategy, RetryErrorInfo, RetryErrorType, RetryStrategyOptions, RetryStrategyV2, RetryToken, StandardRetryBackoffStrategy, StandardRetryToken, } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/serde.d.ts b/node_modules/@aws-sdk/types/dist-types/serde.d.ts new file mode 100644 index 0000000..c4cab79 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/serde.d.ts @@ -0,0 +1,24 @@ +export { EndpointBearer, StreamCollector, SerdeContext, ResponseDeserializer, RequestSerializer, SdkStreamMixin, SdkStream, WithSdkStreamMixin, SdkStreamMixinInjector, SdkStreamSerdeContext, } from "@smithy/types"; +/** + * @public + * + * Declare DOM interfaces in case dom.d.ts is not added to the tsconfig lib, causing + * interfaces to not be defined. For developers with dom.d.ts added, the interfaces will + * be merged correctly. + * + * This is also required for any clients with streaming interfaces where the corresponding + * types are also referred. The type is only declared here once since this `@aws-sdk/types` + * is depended by all `@aws-sdk` packages. + */ +declare global { + /** + * @public + */ + export interface ReadableStream { + } + /** + * @public + */ + export interface Blob { + } +} diff --git a/node_modules/@aws-sdk/types/dist-types/shapes.d.ts b/node_modules/@aws-sdk/types/dist-types/shapes.d.ts new file mode 100644 index 0000000..bc19cc7 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/shapes.d.ts @@ -0,0 +1 @@ +export { DocumentType, RetryableTrait, SmithyException, SdkError } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/signature.d.ts b/node_modules/@aws-sdk/types/dist-types/signature.d.ts new file mode 100644 index 0000000..23cbe97 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/signature.d.ts @@ -0,0 +1 @@ +export { DateInput, EventSigner, EventSigningArguments, FormattedEvent, MessageSigner, RequestSigningArguments, RequestPresigner, RequestPresigningArguments, RequestSigner, SignableMessage, SignedMessage, SigningArguments, StringSigner, } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/stream.d.ts b/node_modules/@aws-sdk/types/dist-types/stream.d.ts new file mode 100644 index 0000000..9092844 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/stream.d.ts @@ -0,0 +1 @@ +export { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/token.d.ts b/node_modules/@aws-sdk/types/dist-types/token.d.ts new file mode 100644 index 0000000..a68d58f --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/token.d.ts @@ -0,0 +1,17 @@ +import { TokenIdentity } from "./identity"; +import { Provider } from "./util"; +/** + * @public + * + * An object representing temporary or permanent AWS token. + * + * @deprecated Use {@link TokenIdentity} + */ +export interface Token extends TokenIdentity { +} +/** + * @public + * + * @deprecated Use {@link TokenIdentityProvider} + */ +export type TokenProvider = Provider; diff --git a/node_modules/@aws-sdk/types/dist-types/transfer.d.ts b/node_modules/@aws-sdk/types/dist-types/transfer.d.ts new file mode 100644 index 0000000..ba78190 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/transfer.d.ts @@ -0,0 +1 @@ +export { RequestContext, RequestHandler, RequestHandlerMetadata, RequestHandlerOutput, RequestHandlerProtocol, } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/abort.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/abort.d.ts new file mode 100644 index 0000000..dad6079 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/abort.d.ts @@ -0,0 +1 @@ +export { AbortController, AbortHandler, AbortSignal } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/auth.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/auth.d.ts new file mode 100644 index 0000000..8a02dbc --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/auth.d.ts @@ -0,0 +1,5 @@ +export { + AuthScheme, + HttpAuthDefinition, + HttpAuthLocation, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/blob/blob-types.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/blob/blob-types.d.ts new file mode 100644 index 0000000..df39efe --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/blob/blob-types.d.ts @@ -0,0 +1,2 @@ +import { BlobTypes } from "@smithy/types"; +export { BlobTypes }; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/checksum.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/checksum.d.ts new file mode 100644 index 0000000..f805d72 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/checksum.d.ts @@ -0,0 +1 @@ +export { Checksum, ChecksumConstructor } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/client.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/client.d.ts new file mode 100644 index 0000000..d6b3dcf --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/client.d.ts @@ -0,0 +1 @@ +export { Client } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/command.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/command.d.ts new file mode 100644 index 0000000..3887267 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/command.d.ts @@ -0,0 +1 @@ +export { Command } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/connection.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/connection.d.ts new file mode 100644 index 0000000..36ebd00 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/connection.d.ts @@ -0,0 +1,6 @@ +export { + ConnectConfiguration, + ConnectionManager, + ConnectionManagerConfiguration, + ConnectionPool, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts new file mode 100644 index 0000000..3673a1f --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts @@ -0,0 +1,12 @@ +import { Logger } from "@smithy/types"; +import { AwsCredentialIdentity } from "./identity"; +import { Provider } from "./util"; +export interface Credentials extends AwsCredentialIdentity {} +export type CredentialProvider = Provider; +export type CredentialProviderOptions = { + logger?: Logger; + parentClientConfig?: { + region?: string | Provider; + [key: string]: unknown; + }; +}; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/crypto.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/crypto.d.ts new file mode 100644 index 0000000..dfe61bf --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/crypto.d.ts @@ -0,0 +1,7 @@ +export { + Hash, + HashConstructor, + StreamHasher, + randomValues, + SourceData, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/dns.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/dns.d.ts new file mode 100644 index 0000000..d899949 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/dns.d.ts @@ -0,0 +1,19 @@ +export declare enum HostAddressType { + AAAA = "AAAA", + A = "A", +} +export interface HostAddress { + addressType: HostAddressType; + address: string; + hostName: string; + service?: string; +} +export interface HostResolverArguments { + hostName: string; + service?: string; +} +export interface HostResolver { + resolveAddress(args: HostResolverArguments): Promise; + reportFailureOnAddress(addr: HostAddress): void; + purgeCache(args?: HostResolverArguments): void; +} diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/encode.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/encode.d.ts new file mode 100644 index 0000000..76966f9 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/encode.d.ts @@ -0,0 +1,6 @@ +export { + MessageDecoder, + MessageEncoder, + AvailableMessage, + AvailableMessages, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/endpoint.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/endpoint.d.ts new file mode 100644 index 0000000..ff3c7de --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/endpoint.d.ts @@ -0,0 +1,9 @@ +export { + EndpointARN, + EndpointPartition, + EndpointURLScheme, + EndpointURL, + EndpointObjectProperty, + EndpointV2, + EndpointParameters, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/eventStream.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/eventStream.d.ts new file mode 100644 index 0000000..e4c04a9 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/eventStream.d.ts @@ -0,0 +1,24 @@ +export { + Message, + MessageHeaders, + BooleanHeaderValue, + ByteHeaderValue, + ShortHeaderValue, + IntegerHeaderValue, + LongHeaderValue, + BinaryHeaderValue, + StringHeaderValue, + TimestampHeaderValue, + UuidHeaderValue, + MessageHeaderValue, + Int64, + EventStreamSerdeContext, + EventStreamMarshaller, + EventStreamMarshallerDeserFn, + EventStreamMarshallerSerFn, + EventStreamPayloadHandler, + EventStreamPayloadHandlerProvider, + EventStreamRequestSigner, + EventStreamSerdeProvider, + EventStreamSignerProvider, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/extensions/index.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/extensions/index.d.ts new file mode 100644 index 0000000..accf5ec --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/extensions/index.d.ts @@ -0,0 +1,5 @@ +import { Provider } from "@smithy/types"; +export interface AwsRegionExtensionConfiguration { + setRegion(region: Provider): void; + region(): Provider; +} diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/http.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/http.d.ts new file mode 100644 index 0000000..d8e0eab --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/http.d.ts @@ -0,0 +1,17 @@ +import { HttpResponse } from "@smithy/types"; +export { + Endpoint, + HeaderBag, + HttpHandlerOptions, + HttpMessage, + HttpRequest, + HttpResponse, + QueryParameterBag, +} from "@smithy/types"; +export interface Headers extends Map { + withHeader(headerName: string, headerValue: string): Headers; + withoutHeader(headerName: string): Headers; +} +export interface ResolvedHttpResponse extends HttpResponse { + body: string; +} diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AnonymousIdentity.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AnonymousIdentity.d.ts new file mode 100644 index 0000000..5b175f6 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AnonymousIdentity.d.ts @@ -0,0 +1,2 @@ +import { Identity } from "./Identity"; +export interface AnonymousIdentity extends Identity {} diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts new file mode 100644 index 0000000..3b7ce8c --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts @@ -0,0 +1,4 @@ +export { + AwsCredentialIdentity, + AwsCredentialIdentityProvider, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/Identity.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/Identity.d.ts new file mode 100644 index 0000000..4175fd3 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/Identity.d.ts @@ -0,0 +1 @@ +export { Identity, IdentityProvider } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/LoginIdentity.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/LoginIdentity.d.ts new file mode 100644 index 0000000..3258bbb --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/LoginIdentity.d.ts @@ -0,0 +1,6 @@ +import { Identity, IdentityProvider } from "./Identity"; +export interface LoginIdentity extends Identity { + readonly username: string; + readonly password: string; +} +export type LoginIdentityProvider = IdentityProvider; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/TokenIdentity.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/TokenIdentity.d.ts new file mode 100644 index 0000000..66301bc --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/TokenIdentity.d.ts @@ -0,0 +1 @@ +export { TokenIdentity, TokenIdentityProvider } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/index.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/index.d.ts new file mode 100644 index 0000000..863e78e --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/index.d.ts @@ -0,0 +1,5 @@ +export * from "./AnonymousIdentity"; +export * from "./AwsCredentialIdentity"; +export * from "./Identity"; +export * from "./LoginIdentity"; +export * from "./TokenIdentity"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..ab64cd9 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts @@ -0,0 +1,32 @@ +export * from "./abort"; +export * from "./auth"; +export * from "./blob/blob-types"; +export * from "./checksum"; +export * from "./client"; +export * from "./command"; +export * from "./connection"; +export * from "./credentials"; +export * from "./crypto"; +export * from "./dns"; +export * from "./encode"; +export * from "./endpoint"; +export * from "./eventStream"; +export * from "./extensions"; +export * from "./http"; +export * from "./identity"; +export * from "./logger"; +export * from "./middleware"; +export * from "./pagination"; +export * from "./profile"; +export * from "./request"; +export * from "./response"; +export * from "./retry"; +export * from "./serde"; +export * from "./shapes"; +export * from "./signature"; +export * from "./stream"; +export * from "./token"; +export * from "./transfer"; +export * from "./uri"; +export * from "./util"; +export * from "./waiter"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/logger.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/logger.d.ts new file mode 100644 index 0000000..c714915 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/logger.d.ts @@ -0,0 +1,15 @@ +import { Logger } from "@smithy/types"; +export { Logger } from "@smithy/types"; +export type LogLevel = + | "all" + | "trace" + | "debug" + | "log" + | "info" + | "warn" + | "error" + | "off"; +export interface LoggerOptions { + logger?: Logger; + logLevel?: LogLevel; +} diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/middleware.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/middleware.d.ts new file mode 100644 index 0000000..3ae51bd --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/middleware.d.ts @@ -0,0 +1,40 @@ +export { + AbsoluteLocation, + BuildHandler, + BuildHandlerArguments, + BuildHandlerOptions, + BuildHandlerOutput, + BuildMiddleware, + DeserializeHandler, + DeserializeHandlerArguments, + DeserializeHandlerOptions, + DeserializeHandlerOutput, + DeserializeMiddleware, + FinalizeHandler, + FinalizeHandlerArguments, + FinalizeHandlerOutput, + FinalizeRequestHandlerOptions, + FinalizeRequestMiddleware, + Handler, + HandlerExecutionContext, + HandlerOptions, + InitializeHandler, + InitializeHandlerArguments, + InitializeHandlerOptions, + InitializeHandlerOutput, + InitializeMiddleware, + MiddlewareStack, + MiddlewareType, + Pluggable, + Priority, + Relation, + RelativeLocation, + RelativeMiddlewareOptions, + SerializeHandler, + SerializeHandlerArguments, + SerializeHandlerOptions, + SerializeHandlerOutput, + SerializeMiddleware, + Step, + Terminalware, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/pagination.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/pagination.d.ts new file mode 100644 index 0000000..af791b0 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/pagination.d.ts @@ -0,0 +1 @@ +export { PaginationConfiguration, Paginator } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/profile.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/profile.d.ts new file mode 100644 index 0000000..b3813d8 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/profile.d.ts @@ -0,0 +1,6 @@ +export { + IniSection, + Profile, + ParsedIniData, + SharedConfigFiles, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/request.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/request.d.ts new file mode 100644 index 0000000..5c6e793 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/request.d.ts @@ -0,0 +1,4 @@ +export interface Request { + destination: URL; + body?: any; +} diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/response.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/response.d.ts new file mode 100644 index 0000000..4e5fcd0 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/response.d.ts @@ -0,0 +1,4 @@ +export { MetadataBearer, ResponseMetadata } from "@smithy/types"; +export interface Response { + body: any; +} diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/retry.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/retry.d.ts new file mode 100644 index 0000000..8fc946a --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/retry.d.ts @@ -0,0 +1,12 @@ +export { + ExponentialBackoffJitterType, + ExponentialBackoffStrategyOptions, + RetryBackoffStrategy, + RetryErrorInfo, + RetryErrorType, + RetryStrategyOptions, + RetryStrategyV2, + RetryToken, + StandardRetryBackoffStrategy, + StandardRetryToken, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/serde.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/serde.d.ts new file mode 100644 index 0000000..a7ed76f --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/serde.d.ts @@ -0,0 +1,16 @@ +export { + EndpointBearer, + StreamCollector, + SerdeContext, + ResponseDeserializer, + RequestSerializer, + SdkStreamMixin, + SdkStream, + WithSdkStreamMixin, + SdkStreamMixinInjector, + SdkStreamSerdeContext, +} from "@smithy/types"; +declare global { + export interface ReadableStream {} + export interface Blob {} +} diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/shapes.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/shapes.d.ts new file mode 100644 index 0000000..d1efa9a --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/shapes.d.ts @@ -0,0 +1,6 @@ +export { + DocumentType, + RetryableTrait, + SmithyException, + SdkError, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/signature.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/signature.d.ts new file mode 100644 index 0000000..cbabd75 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/signature.d.ts @@ -0,0 +1,15 @@ +export { + DateInput, + EventSigner, + EventSigningArguments, + FormattedEvent, + MessageSigner, + RequestSigningArguments, + RequestPresigner, + RequestPresigningArguments, + RequestSigner, + SignableMessage, + SignedMessage, + SigningArguments, + StringSigner, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/stream.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/stream.d.ts new file mode 100644 index 0000000..1b79413 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/stream.d.ts @@ -0,0 +1,4 @@ +export { + GetAwsChunkedEncodingStream, + GetAwsChunkedEncodingStreamOptions, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/token.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/token.d.ts new file mode 100644 index 0000000..c33e506 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/token.d.ts @@ -0,0 +1,4 @@ +import { TokenIdentity } from "./identity"; +import { Provider } from "./util"; +export interface Token extends TokenIdentity {} +export type TokenProvider = Provider; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/transfer.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/transfer.d.ts new file mode 100644 index 0000000..04a7f87 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/transfer.d.ts @@ -0,0 +1,7 @@ +export { + RequestContext, + RequestHandler, + RequestHandlerMetadata, + RequestHandlerOutput, + RequestHandlerProtocol, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/uri.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/uri.d.ts new file mode 100644 index 0000000..297dfe4 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/uri.d.ts @@ -0,0 +1 @@ +export { URI } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/util.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/util.d.ts new file mode 100644 index 0000000..e7e43e6 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/util.d.ts @@ -0,0 +1,14 @@ +export { + Encoder, + Decoder, + Provider, + UserAgentPair, + UserAgent, + UrlParser, + MemoizedProvider, + BodyLengthCalculator, + RegionInfo, + RegionInfoProviderOptions, + RegionInfoProvider, + RetryStrategy, +} from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/ts3.4/waiter.d.ts b/node_modules/@aws-sdk/types/dist-types/ts3.4/waiter.d.ts new file mode 100644 index 0000000..bb98020 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/ts3.4/waiter.d.ts @@ -0,0 +1 @@ +export { WaiterConfiguration } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/uri.d.ts b/node_modules/@aws-sdk/types/dist-types/uri.d.ts new file mode 100644 index 0000000..297dfe4 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/uri.d.ts @@ -0,0 +1 @@ +export { URI } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/util.d.ts b/node_modules/@aws-sdk/types/dist-types/util.d.ts new file mode 100644 index 0000000..fd059b6 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/util.d.ts @@ -0,0 +1 @@ +export { Encoder, Decoder, Provider, UserAgentPair, UserAgent, UrlParser, MemoizedProvider, BodyLengthCalculator, RegionInfo, RegionInfoProviderOptions, RegionInfoProvider, RetryStrategy, } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/dist-types/waiter.d.ts b/node_modules/@aws-sdk/types/dist-types/waiter.d.ts new file mode 100644 index 0000000..bb98020 --- /dev/null +++ b/node_modules/@aws-sdk/types/dist-types/waiter.d.ts @@ -0,0 +1 @@ +export { WaiterConfiguration } from "@smithy/types"; diff --git a/node_modules/@aws-sdk/types/package.json b/node_modules/@aws-sdk/types/package.json new file mode 100755 index 0000000..f9c211d --- /dev/null +++ b/node_modules/@aws-sdk/types/package.json @@ -0,0 +1,56 @@ +{ + "name": "@aws-sdk/types", + "version": "3.535.0", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "description": "Types for the AWS SDK", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline types", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "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", + "test": "tsc -p tsconfig.test.json" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/types", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/types" + }, + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "browser": {}, + "react-native": {} +} diff --git a/node_modules/@aws-sdk/util-endpoints/LICENSE b/node_modules/@aws-sdk/util-endpoints/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/README.md b/node_modules/@aws-sdk/util-endpoints/README.md new file mode 100644 index 0000000..641f54a --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/README.md @@ -0,0 +1,6 @@ +# @aws-sdk/util-endpoints + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-endpoints/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-endpoints) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-endpoints.svg)](https://www.npmjs.com/package/@aws-sdk/util-endpoints) + +> An internal package diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/aws.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/aws.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/aws.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js new file mode 100644 index 0000000..35bc215 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js @@ -0,0 +1,404 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + ConditionObject: () => import_util_endpoints.ConditionObject, + DeprecatedObject: () => import_util_endpoints.DeprecatedObject, + EndpointError: () => import_util_endpoints.EndpointError, + EndpointObject: () => import_util_endpoints.EndpointObject, + EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders, + EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties, + EndpointParams: () => import_util_endpoints.EndpointParams, + EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions, + EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject, + ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject, + EvaluateOptions: () => import_util_endpoints.EvaluateOptions, + Expression: () => import_util_endpoints.Expression, + FunctionArgv: () => import_util_endpoints.FunctionArgv, + FunctionObject: () => import_util_endpoints.FunctionObject, + FunctionReturn: () => import_util_endpoints.FunctionReturn, + ParameterObject: () => import_util_endpoints.ParameterObject, + ReferenceObject: () => import_util_endpoints.ReferenceObject, + ReferenceRecord: () => import_util_endpoints.ReferenceRecord, + RuleSetObject: () => import_util_endpoints.RuleSetObject, + RuleSetRules: () => import_util_endpoints.RuleSetRules, + TreeRuleObject: () => import_util_endpoints.TreeRuleObject, + getUserAgentPrefix: () => getUserAgentPrefix, + isIpAddress: () => import_util_endpoints.isIpAddress, + partition: () => partition, + resolveEndpoint: () => import_util_endpoints.resolveEndpoint, + setPartitionInfo: () => setPartitionInfo, + useDefaultPartitionInfo: () => useDefaultPartitionInfo +}); +module.exports = __toCommonJS(src_exports); + +// src/aws.ts + + +// src/lib/aws/isVirtualHostableS3Bucket.ts + + +// src/lib/isIpAddress.ts +var import_util_endpoints = require("@smithy/util-endpoints"); + +// src/lib/aws/isVirtualHostableS3Bucket.ts +var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!(0, import_util_endpoints.isValidHostLabel)(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if ((0, import_util_endpoints.isIpAddress)(value)) { + return false; + } + return true; +}, "isVirtualHostableS3Bucket"); + +// src/lib/aws/parseArn.ts +var parseArn = /* @__PURE__ */ __name((value) => { + const segments = value.split(":"); + if (segments.length < 6) + return null; + const [arn, partition2, service, region, accountId, ...resourceId] = segments; + if (arn !== "arn" || partition2 === "" || service === "" || resourceId[0] === "") + return null; + return { + partition: partition2, + service, + region, + accountId, + resourceId: resourceId[0].includes("/") ? resourceId[0].split("/") : resourceId + }; +}, "parseArn"); + +// src/lib/aws/partitions.json +var partitions_default = { + partitions: [{ + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "aws-global": { + description: "AWS Standard global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "AWS China global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "AWS GovCloud (US) global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + }, { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "c2s.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "AWS ISO (US) global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "sc2s.sgov.gov", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "AWS ISOB (US) global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + } + } + }, { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "cloud.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: {} + }, { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "csp.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: {} + }], + version: "1.1" +}; + +// src/lib/aws/partition.ts +var selectedPartitionsInfo = partitions_default; +var selectedUserAgentPrefix = ""; +var partition = /* @__PURE__ */ __name((value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition2 of partitions) { + const { regions, outputs } = partition2; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData + }; + } + } + } + for (const partition2 of partitions) { + const { regionRegex, outputs } = partition2; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error( + "Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist." + ); + } + return { + ...DEFAULT_PARTITION.outputs + }; +}, "partition"); +var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; +}, "setPartitionInfo"); +var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { + setPartitionInfo(partitions_default, ""); +}, "useDefaultPartitionInfo"); +var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); + +// src/aws.ts +var awsEndpointFunctions = { + isVirtualHostableS3Bucket, + parseArn, + partition +}; +import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions; + +// src/resolveEndpoint.ts + + +// src/types/EndpointError.ts + + +// src/types/EndpointRuleObject.ts + + +// src/types/ErrorRuleObject.ts + + +// src/types/RuleSetObject.ts + + +// src/types/TreeRuleObject.ts + + +// src/types/shared.ts + +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + partition, + setPartitionInfo, + useDefaultPartitionInfo, + getUserAgentPrefix, + isIpAddress, + resolveEndpoint, + EndpointError +}); + diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/index.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/index.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/index.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/isVirtualHostableS3Bucket.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/isVirtualHostableS3Bucket.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/isVirtualHostableS3Bucket.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/parseArn.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/parseArn.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/parseArn.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partition.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partition.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partition.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partitions.json b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partitions.json new file mode 100644 index 0000000..c6d22ba --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partitions.json @@ -0,0 +1,216 @@ +{ + "partitions": [{ + "id": "aws", + "outputs": { + "dnsSuffix": "amazonaws.com", + "dualStackDnsSuffix": "api.aws", + "implicitGlobalRegion": "us-east-1", + "name": "aws", + "supportsDualStack": true, + "supportsFIPS": true + }, + "regionRegex": "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", + "regions": { + "af-south-1": { + "description": "Africa (Cape Town)" + }, + "ap-east-1": { + "description": "Asia Pacific (Hong Kong)" + }, + "ap-northeast-1": { + "description": "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + "description": "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + "description": "Asia Pacific (Osaka)" + }, + "ap-south-1": { + "description": "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + "description": "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + "description": "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + "description": "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + "description": "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + "description": "Asia Pacific (Melbourne)" + }, + "aws-global": { + "description": "AWS Standard global region" + }, + "ca-central-1": { + "description": "Canada (Central)" + }, + "ca-west-1": { + "description": "Canada West (Calgary)" + }, + "eu-central-1": { + "description": "Europe (Frankfurt)" + }, + "eu-central-2": { + "description": "Europe (Zurich)" + }, + "eu-north-1": { + "description": "Europe (Stockholm)" + }, + "eu-south-1": { + "description": "Europe (Milan)" + }, + "eu-south-2": { + "description": "Europe (Spain)" + }, + "eu-west-1": { + "description": "Europe (Ireland)" + }, + "eu-west-2": { + "description": "Europe (London)" + }, + "eu-west-3": { + "description": "Europe (Paris)" + }, + "il-central-1": { + "description": "Israel (Tel Aviv)" + }, + "me-central-1": { + "description": "Middle East (UAE)" + }, + "me-south-1": { + "description": "Middle East (Bahrain)" + }, + "sa-east-1": { + "description": "South America (Sao Paulo)" + }, + "us-east-1": { + "description": "US East (N. Virginia)" + }, + "us-east-2": { + "description": "US East (Ohio)" + }, + "us-west-1": { + "description": "US West (N. California)" + }, + "us-west-2": { + "description": "US West (Oregon)" + } + } + }, { + "id": "aws-cn", + "outputs": { + "dnsSuffix": "amazonaws.com.cn", + "dualStackDnsSuffix": "api.amazonwebservices.com.cn", + "implicitGlobalRegion": "cn-northwest-1", + "name": "aws-cn", + "supportsDualStack": true, + "supportsFIPS": true + }, + "regionRegex": "^cn\\-\\w+\\-\\d+$", + "regions": { + "aws-cn-global": { + "description": "AWS China global region" + }, + "cn-north-1": { + "description": "China (Beijing)" + }, + "cn-northwest-1": { + "description": "China (Ningxia)" + } + } + }, { + "id": "aws-us-gov", + "outputs": { + "dnsSuffix": "amazonaws.com", + "dualStackDnsSuffix": "api.aws", + "implicitGlobalRegion": "us-gov-west-1", + "name": "aws-us-gov", + "supportsDualStack": true, + "supportsFIPS": true + }, + "regionRegex": "^us\\-gov\\-\\w+\\-\\d+$", + "regions": { + "aws-us-gov-global": { + "description": "AWS GovCloud (US) global region" + }, + "us-gov-east-1": { + "description": "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + "description": "AWS GovCloud (US-West)" + } + } + }, { + "id": "aws-iso", + "outputs": { + "dnsSuffix": "c2s.ic.gov", + "dualStackDnsSuffix": "c2s.ic.gov", + "implicitGlobalRegion": "us-iso-east-1", + "name": "aws-iso", + "supportsDualStack": false, + "supportsFIPS": true + }, + "regionRegex": "^us\\-iso\\-\\w+\\-\\d+$", + "regions": { + "aws-iso-global": { + "description": "AWS ISO (US) global region" + }, + "us-iso-east-1": { + "description": "US ISO East" + }, + "us-iso-west-1": { + "description": "US ISO WEST" + } + } + }, { + "id": "aws-iso-b", + "outputs": { + "dnsSuffix": "sc2s.sgov.gov", + "dualStackDnsSuffix": "sc2s.sgov.gov", + "implicitGlobalRegion": "us-isob-east-1", + "name": "aws-iso-b", + "supportsDualStack": false, + "supportsFIPS": true + }, + "regionRegex": "^us\\-isob\\-\\w+\\-\\d+$", + "regions": { + "aws-iso-b-global": { + "description": "AWS ISOB (US) global region" + }, + "us-isob-east-1": { + "description": "US ISOB East (Ohio)" + } + } + }, { + "id": "aws-iso-e", + "outputs": { + "dnsSuffix": "cloud.adc-e.uk", + "dualStackDnsSuffix": "cloud.adc-e.uk", + "implicitGlobalRegion": "eu-isoe-west-1", + "name": "aws-iso-e", + "supportsDualStack": false, + "supportsFIPS": true + }, + "regionRegex": "^eu\\-isoe\\-\\w+\\-\\d+$", + "regions": {} + }, { + "id": "aws-iso-f", + "outputs": { + "dnsSuffix": "csp.hci.ic.gov", + "dualStackDnsSuffix": "csp.hci.ic.gov", + "implicitGlobalRegion": "us-isof-south-1", + "name": "aws-iso-f", + "supportsDualStack": false, + "supportsFIPS": true + }, + "regionRegex": "^us\\-isof\\-\\w+\\-\\d+$", + "regions": {} + }], + "version": "1.1" +} diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isIpAddress.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isIpAddress.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/isIpAddress.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/resolveEndpoint.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/resolveEndpoint.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/resolveEndpoint.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/EndpointError.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/EndpointError.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/EndpointError.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/EndpointRuleObject.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/EndpointRuleObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/EndpointRuleObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/ErrorRuleObject.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/ErrorRuleObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/ErrorRuleObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/RuleSetObject.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/RuleSetObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/RuleSetObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/TreeRuleObject.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/TreeRuleObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/TreeRuleObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/index.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/shared.js b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/shared.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-cjs/types/shared.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/aws.js b/node_modules/@aws-sdk/util-endpoints/dist-es/aws.js new file mode 100644 index 0000000..f5557d7 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/aws.js @@ -0,0 +1,10 @@ +import { customEndpointFunctions } from "@smithy/util-endpoints"; +import { isVirtualHostableS3Bucket } from "./lib/aws/isVirtualHostableS3Bucket"; +import { parseArn } from "./lib/aws/parseArn"; +import { partition } from "./lib/aws/partition"; +const awsEndpointFunctions = { + isVirtualHostableS3Bucket: isVirtualHostableS3Bucket, + parseArn: parseArn, + partition: partition, +}; +customEndpointFunctions.aws = awsEndpointFunctions; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/index.js b/node_modules/@aws-sdk/util-endpoints/dist-es/index.js new file mode 100644 index 0000000..d046d90 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/index.js @@ -0,0 +1,5 @@ +export * from "./aws"; +export * from "./lib/aws/partition"; +export * from "./lib/isIpAddress"; +export * from "./resolveEndpoint"; +export * from "./types"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/index.js b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/index.js new file mode 100644 index 0000000..03be049 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/index.js @@ -0,0 +1,3 @@ +export * from "./isVirtualHostableS3Bucket"; +export * from "./parseArn"; +export * from "./partition"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js new file mode 100644 index 0000000..f2bacc0 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js @@ -0,0 +1,25 @@ +import { isValidHostLabel } from "@smithy/util-endpoints"; +import { isIpAddress } from "../isIpAddress"; +export const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (isIpAddress(value)) { + return false; + } + return true; +}; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js new file mode 100644 index 0000000..25cc428 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js @@ -0,0 +1,15 @@ +export const parseArn = (value) => { + const segments = value.split(":"); + if (segments.length < 6) + return null; + const [arn, partition, service, region, accountId, ...resourceId] = segments; + if (arn !== "arn" || partition === "" || service === "" || resourceId[0] === "") + return null; + return { + partition, + service, + region, + accountId, + resourceId: resourceId[0].includes("/") ? resourceId[0].split("/") : resourceId, + }; +}; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js new file mode 100644 index 0000000..8d39d81 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js @@ -0,0 +1,41 @@ +import partitionsInfo from "./partitions.json"; +let selectedPartitionsInfo = partitionsInfo; +let selectedUserAgentPrefix = ""; +export const partition = (value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition of partitions) { + const { regions, outputs } = partition; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData, + }; + } + } + } + for (const partition of partitions) { + const { regionRegex, outputs } = partition; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs, + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex," + + " and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs, + }; +}; +export const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; +}; +export const useDefaultPartitionInfo = () => { + setPartitionInfo(partitionsInfo, ""); +}; +export const getUserAgentPrefix = () => selectedUserAgentPrefix; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json new file mode 100644 index 0000000..c6d22ba --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json @@ -0,0 +1,216 @@ +{ + "partitions": [{ + "id": "aws", + "outputs": { + "dnsSuffix": "amazonaws.com", + "dualStackDnsSuffix": "api.aws", + "implicitGlobalRegion": "us-east-1", + "name": "aws", + "supportsDualStack": true, + "supportsFIPS": true + }, + "regionRegex": "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", + "regions": { + "af-south-1": { + "description": "Africa (Cape Town)" + }, + "ap-east-1": { + "description": "Asia Pacific (Hong Kong)" + }, + "ap-northeast-1": { + "description": "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + "description": "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + "description": "Asia Pacific (Osaka)" + }, + "ap-south-1": { + "description": "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + "description": "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + "description": "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + "description": "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + "description": "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + "description": "Asia Pacific (Melbourne)" + }, + "aws-global": { + "description": "AWS Standard global region" + }, + "ca-central-1": { + "description": "Canada (Central)" + }, + "ca-west-1": { + "description": "Canada West (Calgary)" + }, + "eu-central-1": { + "description": "Europe (Frankfurt)" + }, + "eu-central-2": { + "description": "Europe (Zurich)" + }, + "eu-north-1": { + "description": "Europe (Stockholm)" + }, + "eu-south-1": { + "description": "Europe (Milan)" + }, + "eu-south-2": { + "description": "Europe (Spain)" + }, + "eu-west-1": { + "description": "Europe (Ireland)" + }, + "eu-west-2": { + "description": "Europe (London)" + }, + "eu-west-3": { + "description": "Europe (Paris)" + }, + "il-central-1": { + "description": "Israel (Tel Aviv)" + }, + "me-central-1": { + "description": "Middle East (UAE)" + }, + "me-south-1": { + "description": "Middle East (Bahrain)" + }, + "sa-east-1": { + "description": "South America (Sao Paulo)" + }, + "us-east-1": { + "description": "US East (N. Virginia)" + }, + "us-east-2": { + "description": "US East (Ohio)" + }, + "us-west-1": { + "description": "US West (N. California)" + }, + "us-west-2": { + "description": "US West (Oregon)" + } + } + }, { + "id": "aws-cn", + "outputs": { + "dnsSuffix": "amazonaws.com.cn", + "dualStackDnsSuffix": "api.amazonwebservices.com.cn", + "implicitGlobalRegion": "cn-northwest-1", + "name": "aws-cn", + "supportsDualStack": true, + "supportsFIPS": true + }, + "regionRegex": "^cn\\-\\w+\\-\\d+$", + "regions": { + "aws-cn-global": { + "description": "AWS China global region" + }, + "cn-north-1": { + "description": "China (Beijing)" + }, + "cn-northwest-1": { + "description": "China (Ningxia)" + } + } + }, { + "id": "aws-us-gov", + "outputs": { + "dnsSuffix": "amazonaws.com", + "dualStackDnsSuffix": "api.aws", + "implicitGlobalRegion": "us-gov-west-1", + "name": "aws-us-gov", + "supportsDualStack": true, + "supportsFIPS": true + }, + "regionRegex": "^us\\-gov\\-\\w+\\-\\d+$", + "regions": { + "aws-us-gov-global": { + "description": "AWS GovCloud (US) global region" + }, + "us-gov-east-1": { + "description": "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + "description": "AWS GovCloud (US-West)" + } + } + }, { + "id": "aws-iso", + "outputs": { + "dnsSuffix": "c2s.ic.gov", + "dualStackDnsSuffix": "c2s.ic.gov", + "implicitGlobalRegion": "us-iso-east-1", + "name": "aws-iso", + "supportsDualStack": false, + "supportsFIPS": true + }, + "regionRegex": "^us\\-iso\\-\\w+\\-\\d+$", + "regions": { + "aws-iso-global": { + "description": "AWS ISO (US) global region" + }, + "us-iso-east-1": { + "description": "US ISO East" + }, + "us-iso-west-1": { + "description": "US ISO WEST" + } + } + }, { + "id": "aws-iso-b", + "outputs": { + "dnsSuffix": "sc2s.sgov.gov", + "dualStackDnsSuffix": "sc2s.sgov.gov", + "implicitGlobalRegion": "us-isob-east-1", + "name": "aws-iso-b", + "supportsDualStack": false, + "supportsFIPS": true + }, + "regionRegex": "^us\\-isob\\-\\w+\\-\\d+$", + "regions": { + "aws-iso-b-global": { + "description": "AWS ISOB (US) global region" + }, + "us-isob-east-1": { + "description": "US ISOB East (Ohio)" + } + } + }, { + "id": "aws-iso-e", + "outputs": { + "dnsSuffix": "cloud.adc-e.uk", + "dualStackDnsSuffix": "cloud.adc-e.uk", + "implicitGlobalRegion": "eu-isoe-west-1", + "name": "aws-iso-e", + "supportsDualStack": false, + "supportsFIPS": true + }, + "regionRegex": "^eu\\-isoe\\-\\w+\\-\\d+$", + "regions": {} + }, { + "id": "aws-iso-f", + "outputs": { + "dnsSuffix": "csp.hci.ic.gov", + "dualStackDnsSuffix": "csp.hci.ic.gov", + "implicitGlobalRegion": "us-isof-south-1", + "name": "aws-iso-f", + "supportsDualStack": false, + "supportsFIPS": true + }, + "regionRegex": "^us\\-isof\\-\\w+\\-\\d+$", + "regions": {} + }], + "version": "1.1" +} diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js new file mode 100644 index 0000000..59bfcd8 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js @@ -0,0 +1 @@ +export { isIpAddress } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js b/node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js new file mode 100644 index 0000000..e2453f7 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js @@ -0,0 +1 @@ +export { resolveEndpoint } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js b/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js new file mode 100644 index 0000000..521e688 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js @@ -0,0 +1 @@ +export { EndpointError } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js b/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js b/node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js b/node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js b/node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js b/node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js new file mode 100644 index 0000000..daba501 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js @@ -0,0 +1,6 @@ +export * from "./EndpointError"; +export * from "./EndpointRuleObject"; +export * from "./ErrorRuleObject"; +export * from "./RuleSetObject"; +export * from "./TreeRuleObject"; +export * from "./shared"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js b/node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/aws.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/aws.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/aws.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/index.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/index.d.ts new file mode 100644 index 0000000..d046d90 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/index.d.ts @@ -0,0 +1,5 @@ +export * from "./aws"; +export * from "./lib/aws/partition"; +export * from "./lib/isIpAddress"; +export * from "./resolveEndpoint"; +export * from "./types"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/index.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/index.d.ts new file mode 100644 index 0000000..03be049 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/index.d.ts @@ -0,0 +1,3 @@ +export * from "./isVirtualHostableS3Bucket"; +export * from "./parseArn"; +export * from "./partition"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/isVirtualHostableS3Bucket.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/isVirtualHostableS3Bucket.d.ts new file mode 100644 index 0000000..25d46e4 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/isVirtualHostableS3Bucket.d.ts @@ -0,0 +1,5 @@ +/** + * Evaluates whether a string is a DNS compatible bucket name and can be used with + * virtual hosted style addressing. + */ +export declare const isVirtualHostableS3Bucket: (value: string, allowSubDomains?: boolean) => boolean; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/parseArn.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/parseArn.d.ts new file mode 100644 index 0000000..fa5af83 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/parseArn.d.ts @@ -0,0 +1,7 @@ +import { EndpointARN } from "@smithy/types"; +/** + * Evaluates a single string argument value, and returns an object containing + * details about the parsed ARN. + * If the input was not a valid ARN, the function returns null. + */ +export declare const parseArn: (value: string) => EndpointARN | null; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/partition.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/partition.d.ts new file mode 100644 index 0000000..96d14e4 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/partition.d.ts @@ -0,0 +1,38 @@ +import { EndpointPartition } from "@smithy/types"; +export type PartitionsInfo = { + partitions: Array<{ + id: string; + outputs: { + dnsSuffix: string; + dualStackDnsSuffix: string; + name: string; + supportsDualStack: boolean; + supportsFIPS: boolean; + }; + regionRegex: string; + regions: Record; + }>; +}; +/** + * Evaluates a single string argument value as a region, and matches the + * string value to an AWS partition. + * The matcher MUST always return a successful object describing the partition + * that the region has been determined to be a part of. + */ +export declare const partition: (value: string) => EndpointPartition; +/** + * Set custom partitions.json data. + * @internal + */ +export declare const setPartitionInfo: (partitionsInfo: PartitionsInfo, userAgentPrefix?: string) => void; +/** + * Reset to the default partitions.json data. + * @internal + */ +export declare const useDefaultPartitionInfo: () => void; +/** + * @internal + */ +export declare const getUserAgentPrefix: () => string; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/lib/isIpAddress.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/lib/isIpAddress.d.ts new file mode 100644 index 0000000..59bfcd8 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/lib/isIpAddress.d.ts @@ -0,0 +1 @@ +export { isIpAddress } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/resolveEndpoint.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/resolveEndpoint.d.ts new file mode 100644 index 0000000..e2453f7 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/resolveEndpoint.d.ts @@ -0,0 +1 @@ +export { resolveEndpoint } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/aws.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/aws.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/aws.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..d046d90 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/index.d.ts @@ -0,0 +1,5 @@ +export * from "./aws"; +export * from "./lib/aws/partition"; +export * from "./lib/isIpAddress"; +export * from "./resolveEndpoint"; +export * from "./types"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/index.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/index.d.ts new file mode 100644 index 0000000..03be049 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/index.d.ts @@ -0,0 +1,3 @@ +export * from "./isVirtualHostableS3Bucket"; +export * from "./parseArn"; +export * from "./partition"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/isVirtualHostableS3Bucket.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/isVirtualHostableS3Bucket.d.ts new file mode 100644 index 0000000..5ef3296 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/isVirtualHostableS3Bucket.d.ts @@ -0,0 +1,4 @@ +export declare const isVirtualHostableS3Bucket: ( + value: string, + allowSubDomains?: boolean +) => boolean; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/parseArn.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/parseArn.d.ts new file mode 100644 index 0000000..690d459 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/parseArn.d.ts @@ -0,0 +1,2 @@ +import { EndpointARN } from "@smithy/types"; +export declare const parseArn: (value: string) => EndpointARN | null; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/partition.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/partition.d.ts new file mode 100644 index 0000000..0683113 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/partition.d.ts @@ -0,0 +1,28 @@ +import { EndpointPartition } from "@smithy/types"; +export type PartitionsInfo = { + partitions: Array<{ + id: string; + outputs: { + dnsSuffix: string; + dualStackDnsSuffix: string; + name: string; + supportsDualStack: boolean; + supportsFIPS: boolean; + }; + regionRegex: string; + regions: Record< + string, + | { + description?: string; + } + | undefined + >; + }>; +}; +export declare const partition: (value: string) => EndpointPartition; +export declare const setPartitionInfo: ( + partitionsInfo: PartitionsInfo, + userAgentPrefix?: string +) => void; +export declare const useDefaultPartitionInfo: () => void; +export declare const getUserAgentPrefix: () => string; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/isIpAddress.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/isIpAddress.d.ts new file mode 100644 index 0000000..59bfcd8 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/isIpAddress.d.ts @@ -0,0 +1 @@ +export { isIpAddress } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/resolveEndpoint.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/resolveEndpoint.d.ts new file mode 100644 index 0000000..e2453f7 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/resolveEndpoint.d.ts @@ -0,0 +1 @@ +export { resolveEndpoint } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointError.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointError.d.ts new file mode 100644 index 0000000..521e688 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointError.d.ts @@ -0,0 +1 @@ +export { EndpointError } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointRuleObject.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointRuleObject.d.ts new file mode 100644 index 0000000..b48af7f --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointRuleObject.d.ts @@ -0,0 +1,6 @@ +export { + EndpointObjectProperties, + EndpointObjectHeaders, + EndpointObject, + EndpointRuleObject, +} from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/ErrorRuleObject.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/ErrorRuleObject.d.ts new file mode 100644 index 0000000..e7b8881 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/ErrorRuleObject.d.ts @@ -0,0 +1 @@ +export { ErrorRuleObject } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/RuleSetObject.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/RuleSetObject.d.ts new file mode 100644 index 0000000..2a489c6 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/RuleSetObject.d.ts @@ -0,0 +1,5 @@ +export { + DeprecatedObject, + ParameterObject, + RuleSetObject, +} from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/TreeRuleObject.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/TreeRuleObject.d.ts new file mode 100644 index 0000000..716ddcf --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/TreeRuleObject.d.ts @@ -0,0 +1 @@ +export { RuleSetRules, TreeRuleObject } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/index.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/index.d.ts new file mode 100644 index 0000000..daba501 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/index.d.ts @@ -0,0 +1,6 @@ +export * from "./EndpointError"; +export * from "./EndpointRuleObject"; +export * from "./ErrorRuleObject"; +export * from "./RuleSetObject"; +export * from "./TreeRuleObject"; +export * from "./shared"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/shared.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/shared.d.ts new file mode 100644 index 0000000..cfd2248 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/shared.d.ts @@ -0,0 +1,12 @@ +export { + ReferenceObject, + FunctionObject, + FunctionArgv, + FunctionReturn, + ConditionObject, + Expression, + EndpointParams, + EndpointResolverOptions, + ReferenceRecord, + EvaluateOptions, +} from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointError.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointError.d.ts new file mode 100644 index 0000000..521e688 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointError.d.ts @@ -0,0 +1 @@ +export { EndpointError } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointRuleObject.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointRuleObject.d.ts new file mode 100644 index 0000000..ef666fe --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointRuleObject.d.ts @@ -0,0 +1 @@ +export { EndpointObjectProperties, EndpointObjectHeaders, EndpointObject, EndpointRuleObject, } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/types/ErrorRuleObject.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/types/ErrorRuleObject.d.ts new file mode 100644 index 0000000..e7b8881 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/types/ErrorRuleObject.d.ts @@ -0,0 +1 @@ +export { ErrorRuleObject } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/types/RuleSetObject.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/types/RuleSetObject.d.ts new file mode 100644 index 0000000..c052af0 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/types/RuleSetObject.d.ts @@ -0,0 +1 @@ +export { DeprecatedObject, ParameterObject, RuleSetObject } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/types/TreeRuleObject.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/types/TreeRuleObject.d.ts new file mode 100644 index 0000000..716ddcf --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/types/TreeRuleObject.d.ts @@ -0,0 +1 @@ +export { RuleSetRules, TreeRuleObject } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/types/index.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/types/index.d.ts new file mode 100644 index 0000000..daba501 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/types/index.d.ts @@ -0,0 +1,6 @@ +export * from "./EndpointError"; +export * from "./EndpointRuleObject"; +export * from "./ErrorRuleObject"; +export * from "./RuleSetObject"; +export * from "./TreeRuleObject"; +export * from "./shared"; diff --git a/node_modules/@aws-sdk/util-endpoints/dist-types/types/shared.d.ts b/node_modules/@aws-sdk/util-endpoints/dist-types/types/shared.d.ts new file mode 100644 index 0000000..af7cc53 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/dist-types/types/shared.d.ts @@ -0,0 +1 @@ +export { ReferenceObject, FunctionObject, FunctionArgv, FunctionReturn, ConditionObject, Expression, EndpointParams, EndpointResolverOptions, ReferenceRecord, EvaluateOptions, } from "@smithy/util-endpoints"; diff --git a/node_modules/@aws-sdk/util-endpoints/package.json b/node_modules/@aws-sdk/util-endpoints/package.json new file mode 100644 index 0000000..ac1b125 --- /dev/null +++ b/node_modules/@aws-sdk/util-endpoints/package.json @@ -0,0 +1,56 @@ +{ + "name": "@aws-sdk/util-endpoints", + "version": "3.535.0", + "description": "Utilities to help with endpoint resolution", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline util-endpoints", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest", + "test:integration": "jest --c jest.config.integ.js" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/types": "^2.12.0", + "@smithy/util-endpoints": "^1.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/util-endpoints", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/util-endpoints" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + } +} diff --git a/node_modules/@aws-sdk/util-locate-window/LICENSE b/node_modules/@aws-sdk/util-locate-window/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@aws-sdk/util-locate-window/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-locate-window/README.md b/node_modules/@aws-sdk/util-locate-window/README.md new file mode 100644 index 0000000..cac53d3 --- /dev/null +++ b/node_modules/@aws-sdk/util-locate-window/README.md @@ -0,0 +1,4 @@ +# @aws-sdk/util-locate-window + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-locate-window/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-locate-window) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-locate-window.svg)](https://www.npmjs.com/package/@aws-sdk/util-locate-window) diff --git a/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js b/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js new file mode 100644 index 0000000..717d55f --- /dev/null +++ b/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js @@ -0,0 +1,41 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + locateWindow: () => locateWindow +}); +module.exports = __toCommonJS(src_exports); +var fallbackWindow = {}; +function locateWindow() { + if (typeof window !== "undefined") { + return window; + } else if (typeof self !== "undefined") { + return self; + } + return fallbackWindow; +} +__name(locateWindow, "locateWindow"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + locateWindow +}); + diff --git a/node_modules/@aws-sdk/util-locate-window/dist-es/index.js b/node_modules/@aws-sdk/util-locate-window/dist-es/index.js new file mode 100644 index 0000000..a51e644 --- /dev/null +++ b/node_modules/@aws-sdk/util-locate-window/dist-es/index.js @@ -0,0 +1,10 @@ +const fallbackWindow = {}; +export function locateWindow() { + if (typeof window !== "undefined") { + return window; + } + else if (typeof self !== "undefined") { + return self; + } + return fallbackWindow; +} diff --git a/node_modules/@aws-sdk/util-locate-window/dist-types/index.d.ts b/node_modules/@aws-sdk/util-locate-window/dist-types/index.d.ts new file mode 100644 index 0000000..2b02d7f --- /dev/null +++ b/node_modules/@aws-sdk/util-locate-window/dist-types/index.d.ts @@ -0,0 +1,6 @@ +/** + * Locates the global scope for a browser or browser-like environment. If + * neither `window` nor `self` is defined by the environment, the same object + * will be returned on each invocation. + */ +export declare function locateWindow(): Window; diff --git a/node_modules/@aws-sdk/util-locate-window/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/util-locate-window/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..a5bbba3 --- /dev/null +++ b/node_modules/@aws-sdk/util-locate-window/dist-types/ts3.4/index.d.ts @@ -0,0 +1 @@ +export declare function locateWindow(): Window; diff --git a/node_modules/@aws-sdk/util-locate-window/package.json b/node_modules/@aws-sdk/util-locate-window/package.json new file mode 100644 index 0000000..01182e6 --- /dev/null +++ b/node_modules/@aws-sdk/util-locate-window/package.json @@ -0,0 +1,52 @@ +{ + "name": "@aws-sdk/util-locate-window", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline util-locate-window", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/util-locate-window", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/util-locate-window" + } +} diff --git a/node_modules/@aws-sdk/util-user-agent-browser/LICENSE b/node_modules/@aws-sdk/util-user-agent-browser/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-sdk/util-user-agent-browser/README.md b/node_modules/@aws-sdk/util-user-agent-browser/README.md new file mode 100644 index 0000000..f2b6c62 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/README.md @@ -0,0 +1,10 @@ +# @aws-sdk/util-user-agent-browser + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-user-agent-browser/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-user-agent-browser) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-user-agent-browser.svg)](https://www.npmjs.com/package/@aws-sdk/util-user-agent-browser) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/configurations.js b/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/configurations.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/configurations.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.js b/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.js new file mode 100644 index 0000000..4f4b5ad --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultUserAgent = void 0; +const tslib_1 = require("tslib"); +const bowser_1 = tslib_1.__importDefault(require("bowser")); +const defaultUserAgent = ({ serviceId, clientVersion }) => async () => { + var _a, _b, _c, _d, _e, _f, _g; + const parsedUA = typeof window !== "undefined" && ((_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) + ? bowser_1.default.parse(window.navigator.userAgent) + : undefined; + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.0"], + [`os/${((_b = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.os) === null || _b === void 0 ? void 0 : _b.name) || "other"}`, (_c = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.os) === null || _c === void 0 ? void 0 : _c.version], + ["lang/js"], + ["md/browser", `${(_e = (_d = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.browser) === null || _d === void 0 ? void 0 : _d.name) !== null && _e !== void 0 ? _e : "unknown"}_${(_g = (_f = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.browser) === null || _f === void 0 ? void 0 : _f.version) !== null && _g !== void 0 ? _g : "unknown"}`], + ]; + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + return sections; +}; +exports.defaultUserAgent = defaultUserAgent; diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.native.js b/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.native.js new file mode 100644 index 0000000..c7abae0 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.native.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultUserAgent = void 0; +const defaultUserAgent = ({ serviceId, clientVersion }) => async () => { + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.0"], + ["os/other"], + ["lang/js"], + ["md/rn"], + ]; + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + return sections; +}; +exports.defaultUserAgent = defaultUserAgent; diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-es/configurations.js b/node_modules/@aws-sdk/util-user-agent-browser/dist-es/configurations.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-es/configurations.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js b/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js new file mode 100644 index 0000000..2da60c6 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js @@ -0,0 +1,17 @@ +import bowser from "bowser"; +export const defaultUserAgent = ({ serviceId, clientVersion }) => async () => { + const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent + ? bowser.parse(window.navigator.userAgent) + : undefined; + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.0"], + [`os/${parsedUA?.os?.name || "other"}`, parsedUA?.os?.version], + ["lang/js"], + ["md/browser", `${parsedUA?.browser?.name ?? "unknown"}_${parsedUA?.browser?.version ?? "unknown"}`], + ]; + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + return sections; +}; diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.native.js b/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.native.js new file mode 100644 index 0000000..b95d6db --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.native.js @@ -0,0 +1,13 @@ +export const defaultUserAgent = ({ serviceId, clientVersion }) => async () => { + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.0"], + ["os/other"], + ["lang/js"], + ["md/rn"], + ]; + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + return sections; +}; diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-types/configurations.d.ts b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/configurations.d.ts new file mode 100644 index 0000000..00537a9 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/configurations.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + */ +export interface DefaultUserAgentOptions { + serviceId?: string; + clientVersion: string; +} diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.d.ts b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.d.ts new file mode 100644 index 0000000..1c47002 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.d.ts @@ -0,0 +1,9 @@ +import { Provider, UserAgent } from "@smithy/types"; +import { DefaultUserAgentOptions } from "./configurations"; +/** + * @internal + * + * Default provider to the user agent in browsers. It's a best effort to infer + * the device information. It uses bowser library to detect the browser and version + */ +export declare const defaultUserAgent: ({ serviceId, clientVersion }: DefaultUserAgentOptions) => Provider; diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.native.d.ts b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.native.d.ts new file mode 100644 index 0000000..3e5aff7 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.native.d.ts @@ -0,0 +1,9 @@ +import { Provider, UserAgent } from "@smithy/types"; +import { DefaultUserAgentOptions } from "./configurations"; +/** + * @internal + * + * Default provider to the user agent in ReactNative. It's a best effort to infer + * the device information. It uses bowser library to detect the browser and virsion + */ +export declare const defaultUserAgent: ({ serviceId, clientVersion }: DefaultUserAgentOptions) => Provider; diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/configurations.d.ts b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/configurations.d.ts new file mode 100644 index 0000000..1428231 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/configurations.d.ts @@ -0,0 +1,4 @@ +export interface DefaultUserAgentOptions { + serviceId?: string; + clientVersion: string; +} diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..3b47c4f --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/index.d.ts @@ -0,0 +1,6 @@ +import { Provider, UserAgent } from "@smithy/types"; +import { DefaultUserAgentOptions } from "./configurations"; +export declare const defaultUserAgent: ({ + serviceId, + clientVersion, +}: DefaultUserAgentOptions) => Provider; diff --git a/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/index.native.d.ts b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/index.native.d.ts new file mode 100644 index 0000000..3b47c4f --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/index.native.d.ts @@ -0,0 +1,6 @@ +import { Provider, UserAgent } from "@smithy/types"; +import { DefaultUserAgentOptions } from "./configurations"; +export declare const defaultUserAgent: ({ + serviceId, + clientVersion, +}: DefaultUserAgentOptions) => Provider; diff --git a/node_modules/@aws-sdk/util-user-agent-browser/package.json b/node_modules/@aws-sdk/util-user-agent-browser/package.json new file mode 100644 index 0000000..a3a1860 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-browser/package.json @@ -0,0 +1,53 @@ +{ + "name": "@aws-sdk/util-user-agent-browser", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline util-user-agent-browser", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "browser": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "react-native": "dist-es/index.native.js", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/types": "^2.12.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/util-user-agent-browser", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/util-user-agent-browser" + } +} diff --git a/node_modules/@aws-sdk/util-user-agent-node/LICENSE b/node_modules/@aws-sdk/util-user-agent-node/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@aws-sdk/util-user-agent-node/README.md b/node_modules/@aws-sdk/util-user-agent-node/README.md new file mode 100644 index 0000000..fccfbb5 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/README.md @@ -0,0 +1,10 @@ +# @aws-sdk/util-user-agent-node + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-user-agent-node/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-user-agent-node) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-user-agent-node.svg)](https://www.npmjs.com/package/@aws-sdk/util-user-agent-node) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/crt-availability.js b/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/crt-availability.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/crt-availability.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js b/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js new file mode 100644 index 0000000..0b968b2 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js @@ -0,0 +1,94 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME, + UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME, + crtAvailability: () => crtAvailability, + defaultUserAgent: () => defaultUserAgent +}); +module.exports = __toCommonJS(src_exports); +var import_node_config_provider = require("@smithy/node-config-provider"); +var import_os = require("os"); +var import_process = require("process"); + +// src/crt-availability.ts +var crtAvailability = { + isCrtAvailable: false +}; + +// src/is-crt-available.ts +var isCrtAvailable = /* @__PURE__ */ __name(() => { + if (crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; + } + return null; +}, "isCrtAvailable"); + +// src/index.ts +var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; +var UA_APP_ID_INI_NAME = "sdk-ua-app-id"; +var defaultUserAgent = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => { + const sections = [ + // sdk-metadata + ["aws-sdk-js", clientVersion], + // ua-metadata + ["ua", "2.0"], + // os-metadata + [`os/${(0, import_os.platform)()}`, (0, import_os.release)()], + // language-metadata + // ECMAScript edition doesn't matter in JS, so no version needed. + ["lang/js"], + ["md/nodejs", `${import_process.versions.node}`] + ]; + const crtAvailable = isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); + } + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + if (import_process.env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]); + } + const appIdPromise = (0, import_node_config_provider.loadConfig)({ + environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME], + configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME], + default: void 0 + })(); + let resolvedUserAgent = void 0; + return async () => { + if (!resolvedUserAgent) { + const appId = await appIdPromise; + resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + } + return resolvedUserAgent; + }; +}, "defaultUserAgent"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + crtAvailability, + UA_APP_ID_ENV_NAME, + UA_APP_ID_INI_NAME, + defaultUserAgent +}); + diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/is-crt-available.js b/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/is-crt-available.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/is-crt-available.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-es/crt-availability.js b/node_modules/@aws-sdk/util-user-agent-node/dist-es/crt-availability.js new file mode 100644 index 0000000..99ebeb9 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-es/crt-availability.js @@ -0,0 +1,3 @@ +export const crtAvailability = { + isCrtAvailable: false, +}; diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-es/index.js b/node_modules/@aws-sdk/util-user-agent-node/dist-es/index.js new file mode 100644 index 0000000..fd3b99f --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-es/index.js @@ -0,0 +1,39 @@ +import { loadConfig } from "@smithy/node-config-provider"; +import { platform, release } from "os"; +import { env, versions } from "process"; +import { isCrtAvailable } from "./is-crt-available"; +export { crtAvailability } from "./crt-availability"; +export const UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; +export const UA_APP_ID_INI_NAME = "sdk-ua-app-id"; +export const defaultUserAgent = ({ serviceId, clientVersion }) => { + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.0"], + [`os/${platform()}`, release()], + ["lang/js"], + ["md/nodejs", `${versions.node}`], + ]; + const crtAvailable = isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); + } + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + if (env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${env.AWS_EXECUTION_ENV}`]); + } + const appIdPromise = loadConfig({ + environmentVariableSelector: (env) => env[UA_APP_ID_ENV_NAME], + configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME], + default: undefined, + })(); + let resolvedUserAgent = undefined; + return async () => { + if (!resolvedUserAgent) { + const appId = await appIdPromise; + resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + } + return resolvedUserAgent; + }; +}; diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-es/is-crt-available.js b/node_modules/@aws-sdk/util-user-agent-node/dist-es/is-crt-available.js new file mode 100644 index 0000000..e9f8b0d --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-es/is-crt-available.js @@ -0,0 +1,7 @@ +import { crtAvailability } from "./crt-availability"; +export const isCrtAvailable = () => { + if (crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; + } + return null; +}; diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-types/crt-availability.d.ts b/node_modules/@aws-sdk/util-user-agent-node/dist-types/crt-availability.d.ts new file mode 100644 index 0000000..c2033a0 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-types/crt-availability.d.ts @@ -0,0 +1,9 @@ +/** + * @internal + * + * If \@aws-sdk/signature-v4-crt is installed and loaded, it will register + * this value to true. + */ +export declare const crtAvailability: { + isCrtAvailable: boolean; +}; diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-types/index.d.ts b/node_modules/@aws-sdk/util-user-agent-node/dist-types/index.d.ts new file mode 100644 index 0000000..5ccece5 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-types/index.d.ts @@ -0,0 +1,20 @@ +import { Provider, UserAgent } from "@smithy/types"; +export { crtAvailability } from "./crt-availability"; +/** + * @internal + */ +export declare const UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; +/** + * @internal + */ +export declare const UA_APP_ID_INI_NAME = "sdk-ua-app-id"; +interface DefaultUserAgentOptions { + serviceId?: string; + clientVersion: string; +} +/** + * @internal + * + * Collect metrics from runtime to put into user agent. + */ +export declare const defaultUserAgent: ({ serviceId, clientVersion }: DefaultUserAgentOptions) => Provider; diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-types/is-crt-available.d.ts b/node_modules/@aws-sdk/util-user-agent-node/dist-types/is-crt-available.d.ts new file mode 100644 index 0000000..675ffa8 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-types/is-crt-available.d.ts @@ -0,0 +1,5 @@ +import { UserAgentPair } from "@smithy/types"; +/** + * @internal + */ +export declare const isCrtAvailable: () => UserAgentPair | null; diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/crt-availability.d.ts b/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/crt-availability.d.ts new file mode 100644 index 0000000..9dccfb0 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/crt-availability.d.ts @@ -0,0 +1,3 @@ +export declare const crtAvailability: { + isCrtAvailable: boolean; +}; diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..a1292f7 --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/index.d.ts @@ -0,0 +1,12 @@ +import { Provider, UserAgent } from "@smithy/types"; +export { crtAvailability } from "./crt-availability"; +export declare const UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; +export declare const UA_APP_ID_INI_NAME = "sdk-ua-app-id"; +interface DefaultUserAgentOptions { + serviceId?: string; + clientVersion: string; +} +export declare const defaultUserAgent: ({ + serviceId, + clientVersion, +}: DefaultUserAgentOptions) => Provider; diff --git a/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/is-crt-available.d.ts b/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/is-crt-available.d.ts new file mode 100644 index 0000000..d28355c --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/is-crt-available.d.ts @@ -0,0 +1,2 @@ +import { UserAgentPair } from "@smithy/types"; +export declare const isCrtAvailable: () => UserAgentPair | null; diff --git a/node_modules/@aws-sdk/util-user-agent-node/package.json b/node_modules/@aws-sdk/util-user-agent-node/package.json new file mode 100644 index 0000000..21718dd --- /dev/null +++ b/node_modules/@aws-sdk/util-user-agent-node/package.json @@ -0,0 +1,63 @@ +{ + "name": "@aws-sdk/util-user-agent-node", + "version": "3.535.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline util-user-agent-node", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/util-user-agent-node", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/util-user-agent-node" + } +} diff --git a/node_modules/@aws-sdk/util-utf8-browser/LICENSE b/node_modules/@aws-sdk/util-utf8-browser/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@aws-sdk/util-utf8-browser/README.md b/node_modules/@aws-sdk/util-utf8-browser/README.md new file mode 100644 index 0000000..0ee6c23 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/README.md @@ -0,0 +1,8 @@ +# @aws-sdk/util-utf8-browser + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-utf8-browser/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-utf8-browser) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-utf8-browser.svg)](https://www.npmjs.com/package/@aws-sdk/util-utf8-browser) + +> Deprecated package +> +> This internal package is deprecated in favor of [@aws-sdk/util-utf8](https://www.npmjs.com/package/@aws-sdk/util-utf8). diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js b/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js new file mode 100644 index 0000000..e596087 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toUtf8 = exports.fromUtf8 = void 0; +const pureJs_1 = require("./pureJs"); +const whatwgEncodingApi_1 = require("./whatwgEncodingApi"); +const fromUtf8 = (input) => typeof TextEncoder === "function" ? (0, whatwgEncodingApi_1.fromUtf8)(input) : (0, pureJs_1.fromUtf8)(input); +exports.fromUtf8 = fromUtf8; +const toUtf8 = (input) => typeof TextDecoder === "function" ? (0, whatwgEncodingApi_1.toUtf8)(input) : (0, pureJs_1.toUtf8)(input); +exports.toUtf8 = toUtf8; diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/pureJs.js b/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/pureJs.js new file mode 100644 index 0000000..0361b76 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/pureJs.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toUtf8 = exports.fromUtf8 = void 0; +const fromUtf8 = (input) => { + const bytes = []; + for (let i = 0, len = input.length; i < len; i++) { + const value = input.charCodeAt(i); + if (value < 0x80) { + bytes.push(value); + } + else if (value < 0x800) { + bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000); + } + else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) { + const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111); + bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000); + } + else { + bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000); + } + } + return Uint8Array.from(bytes); +}; +exports.fromUtf8 = fromUtf8; +const toUtf8 = (input) => { + let decoded = ""; + for (let i = 0, len = input.length; i < len; i++) { + const byte = input[i]; + if (byte < 0x80) { + decoded += String.fromCharCode(byte); + } + else if (0b11000000 <= byte && byte < 0b11100000) { + const nextByte = input[++i]; + decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111)); + } + else if (0b11110000 <= byte && byte < 0b101101101) { + const surrogatePair = [byte, input[++i], input[++i], input[++i]]; + const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%"); + decoded += decodeURIComponent(encoded); + } + else { + decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111)); + } + } + return decoded; +}; +exports.toUtf8 = toUtf8; diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/whatwgEncodingApi.js b/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/whatwgEncodingApi.js new file mode 100644 index 0000000..b17f490 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/whatwgEncodingApi.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toUtf8 = exports.fromUtf8 = void 0; +function fromUtf8(input) { + return new TextEncoder().encode(input); +} +exports.fromUtf8 = fromUtf8; +function toUtf8(input) { + return new TextDecoder("utf-8").decode(input); +} +exports.toUtf8 = toUtf8; diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-es/index.js b/node_modules/@aws-sdk/util-utf8-browser/dist-es/index.js new file mode 100644 index 0000000..2f8b105 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-es/index.js @@ -0,0 +1,4 @@ +import { fromUtf8 as jsFromUtf8, toUtf8 as jsToUtf8 } from "./pureJs"; +import { fromUtf8 as textEncoderFromUtf8, toUtf8 as textEncoderToUtf8 } from "./whatwgEncodingApi"; +export const fromUtf8 = (input) => typeof TextEncoder === "function" ? textEncoderFromUtf8(input) : jsFromUtf8(input); +export const toUtf8 = (input) => typeof TextDecoder === "function" ? textEncoderToUtf8(input) : jsToUtf8(input); diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-es/pureJs.js b/node_modules/@aws-sdk/util-utf8-browser/dist-es/pureJs.js new file mode 100644 index 0000000..c038096 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-es/pureJs.js @@ -0,0 +1,42 @@ +export const fromUtf8 = (input) => { + const bytes = []; + for (let i = 0, len = input.length; i < len; i++) { + const value = input.charCodeAt(i); + if (value < 0x80) { + bytes.push(value); + } + else if (value < 0x800) { + bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000); + } + else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) { + const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111); + bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000); + } + else { + bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000); + } + } + return Uint8Array.from(bytes); +}; +export const toUtf8 = (input) => { + let decoded = ""; + for (let i = 0, len = input.length; i < len; i++) { + const byte = input[i]; + if (byte < 0x80) { + decoded += String.fromCharCode(byte); + } + else if (0b11000000 <= byte && byte < 0b11100000) { + const nextByte = input[++i]; + decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111)); + } + else if (0b11110000 <= byte && byte < 0b101101101) { + const surrogatePair = [byte, input[++i], input[++i], input[++i]]; + const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%"); + decoded += decodeURIComponent(encoded); + } + else { + decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111)); + } + } + return decoded; +}; diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js b/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js new file mode 100644 index 0000000..22f6f56 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js @@ -0,0 +1,6 @@ +export function fromUtf8(input) { + return new TextEncoder().encode(input); +} +export function toUtf8(input) { + return new TextDecoder("utf-8").decode(input); +} diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-types/index.d.ts b/node_modules/@aws-sdk/util-utf8-browser/dist-types/index.d.ts new file mode 100644 index 0000000..c0cf357 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-types/index.d.ts @@ -0,0 +1,2 @@ +export declare const fromUtf8: (input: string) => Uint8Array; +export declare const toUtf8: (input: Uint8Array) => string; diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-types/pureJs.d.ts b/node_modules/@aws-sdk/util-utf8-browser/dist-types/pureJs.d.ts new file mode 100644 index 0000000..1590f99 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-types/pureJs.d.ts @@ -0,0 +1,17 @@ +/** + * Converts a JS string from its native UCS-2/UTF-16 representation into a + * Uint8Array of the bytes used to represent the equivalent characters in UTF-8. + * + * Cribbed from the `goog.crypt.stringToUtf8ByteArray` function in the Google + * Closure library, though updated to use typed arrays. + */ +export declare const fromUtf8: (input: string) => Uint8Array; +/** + * Converts a typed array of bytes containing UTF-8 data into a native JS + * string. + * + * Partly cribbed from the `goog.crypt.utf8ByteArrayToString` function in the + * Google Closure library, though updated to use typed arrays and to better + * handle astral plane code points. + */ +export declare const toUtf8: (input: Uint8Array) => string; diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/index.d.ts b/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..c0cf357 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/index.d.ts @@ -0,0 +1,2 @@ +export declare const fromUtf8: (input: string) => Uint8Array; +export declare const toUtf8: (input: Uint8Array) => string; diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/pureJs.d.ts b/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/pureJs.d.ts new file mode 100644 index 0000000..c0cf357 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/pureJs.d.ts @@ -0,0 +1,2 @@ +export declare const fromUtf8: (input: string) => Uint8Array; +export declare const toUtf8: (input: Uint8Array) => string; diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/whatwgEncodingApi.d.ts b/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/whatwgEncodingApi.d.ts new file mode 100644 index 0000000..287ec89 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/whatwgEncodingApi.d.ts @@ -0,0 +1,2 @@ +export declare function fromUtf8(input: string): Uint8Array; +export declare function toUtf8(input: Uint8Array): string; diff --git a/node_modules/@aws-sdk/util-utf8-browser/dist-types/whatwgEncodingApi.d.ts b/node_modules/@aws-sdk/util-utf8-browser/dist-types/whatwgEncodingApi.d.ts new file mode 100644 index 0000000..287ec89 --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/dist-types/whatwgEncodingApi.d.ts @@ -0,0 +1,2 @@ +export declare function fromUtf8(input: string): Uint8Array; +export declare function toUtf8(input: Uint8Array): string; diff --git a/node_modules/@aws-sdk/util-utf8-browser/package.json b/node_modules/@aws-sdk/util-utf8-browser/package.json new file mode 100644 index 0000000..f3dd61f --- /dev/null +++ b/node_modules/@aws-sdk/util-utf8-browser/package.json @@ -0,0 +1,50 @@ +{ + "name": "@aws-sdk/util-utf8-browser", + "version": "3.259.0", + "description": "A browser UTF-8 string <-> UInt8Array converter", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "test": "jest" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.3.1" + }, + "types": "./dist-types/index.d.ts", + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*" + ], + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/util-utf8-browser", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "packages/util-utf8-browser" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.19.2", + "typescript": "~4.6.2" + } +} diff --git a/node_modules/@smithy/abort-controller/LICENSE b/node_modules/@smithy/abort-controller/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/abort-controller/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/abort-controller/README.md b/node_modules/@smithy/abort-controller/README.md new file mode 100644 index 0000000..175bc37 --- /dev/null +++ b/node_modules/@smithy/abort-controller/README.md @@ -0,0 +1,4 @@ +# @smithy/abort-controller + +[![NPM version](https://img.shields.io/npm/v/@smithy/abort-controller/latest.svg)](https://www.npmjs.com/package/@smithy/abort-controller) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/abort-controller.svg)](https://www.npmjs.com/package/@smithy/abort-controller) diff --git a/node_modules/@smithy/abort-controller/dist-cjs/AbortController.js b/node_modules/@smithy/abort-controller/dist-cjs/AbortController.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-cjs/AbortController.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/abort-controller/dist-cjs/AbortSignal.js b/node_modules/@smithy/abort-controller/dist-cjs/AbortSignal.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-cjs/AbortSignal.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/abort-controller/dist-cjs/index.js b/node_modules/@smithy/abort-controller/dist-cjs/index.js new file mode 100644 index 0000000..8661e2f --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-cjs/index.js @@ -0,0 +1,82 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AbortController: () => AbortController, + AbortHandler: () => import_types.AbortHandler, + AbortSignal: () => AbortSignal, + IAbortController: () => import_types.AbortController, + IAbortSignal: () => import_types.AbortSignal +}); +module.exports = __toCommonJS(src_exports); + +// src/AbortController.ts + + +// src/AbortSignal.ts +var import_types = require("@smithy/types"); +var _AbortSignal = class _AbortSignal { + constructor() { + this.onabort = null; + this._aborted = false; + Object.defineProperty(this, "_aborted", { + value: false, + writable: true + }); + } + /** + * Whether the associated operation has already been cancelled. + */ + get aborted() { + return this._aborted; + } + /** + * @internal + */ + abort() { + this._aborted = true; + if (this.onabort) { + this.onabort(this); + this.onabort = null; + } + } +}; +__name(_AbortSignal, "AbortSignal"); +var AbortSignal = _AbortSignal; + +// src/AbortController.ts +var _AbortController = class _AbortController { + constructor() { + this.signal = new AbortSignal(); + } + abort() { + this.signal.abort(); + } +}; +__name(_AbortController, "AbortController"); +var AbortController = _AbortController; +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + AbortController, + AbortSignal +}); + diff --git a/node_modules/@smithy/abort-controller/dist-es/AbortController.js b/node_modules/@smithy/abort-controller/dist-es/AbortController.js new file mode 100644 index 0000000..696f137 --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-es/AbortController.js @@ -0,0 +1,9 @@ +import { AbortSignal } from "./AbortSignal"; +export class AbortController { + constructor() { + this.signal = new AbortSignal(); + } + abort() { + this.signal.abort(); + } +} diff --git a/node_modules/@smithy/abort-controller/dist-es/AbortSignal.js b/node_modules/@smithy/abort-controller/dist-es/AbortSignal.js new file mode 100644 index 0000000..9fc0813 --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-es/AbortSignal.js @@ -0,0 +1,20 @@ +export class AbortSignal { + constructor() { + this.onabort = null; + this._aborted = false; + Object.defineProperty(this, "_aborted", { + value: false, + writable: true, + }); + } + get aborted() { + return this._aborted; + } + abort() { + this._aborted = true; + if (this.onabort) { + this.onabort(this); + this.onabort = null; + } + } +} diff --git a/node_modules/@smithy/abort-controller/dist-es/index.js b/node_modules/@smithy/abort-controller/dist-es/index.js new file mode 100644 index 0000000..a0f47f7 --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-es/index.js @@ -0,0 +1,2 @@ +export * from "./AbortController"; +export * from "./AbortSignal"; diff --git a/node_modules/@smithy/abort-controller/dist-types/AbortController.d.ts b/node_modules/@smithy/abort-controller/dist-types/AbortController.d.ts new file mode 100644 index 0000000..bfbb9af --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-types/AbortController.d.ts @@ -0,0 +1,13 @@ +import { AbortController as IAbortController } from "@smithy/types"; +import { AbortSignal } from "./AbortSignal"; +export { IAbortController }; +/** + * This implementation was added as Node.js didn't support AbortController prior to 15.x + * Use native implementation in browsers or Node.js \>=15.4.0. + * + * @public + */ +export declare class AbortController implements IAbortController { + readonly signal: AbortSignal; + abort(): void; +} diff --git a/node_modules/@smithy/abort-controller/dist-types/AbortSignal.d.ts b/node_modules/@smithy/abort-controller/dist-types/AbortSignal.d.ts new file mode 100644 index 0000000..abdcfe0 --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-types/AbortSignal.d.ts @@ -0,0 +1,18 @@ +import { AbortHandler, AbortSignal as IAbortSignal } from "@smithy/types"; +export { AbortHandler, IAbortSignal }; +/** + * @public + */ +export declare class AbortSignal implements IAbortSignal { + onabort: AbortHandler | null; + private _aborted; + constructor(); + /** + * Whether the associated operation has already been cancelled. + */ + get aborted(): boolean; + /** + * @internal + */ + abort(): void; +} diff --git a/node_modules/@smithy/abort-controller/dist-types/index.d.ts b/node_modules/@smithy/abort-controller/dist-types/index.d.ts new file mode 100644 index 0000000..8788e2f --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-types/index.d.ts @@ -0,0 +1,9 @@ +/** + * This implementation was added as Node.js didn't support AbortController prior to 15.x + * Use native implementation in browsers or Node.js \>=15.4.0. + * + * @deprecated Use standard implementations in [Browsers](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and [Node.js](https://nodejs.org/docs/latest/api/globals.html#class-abortcontroller) + * @packageDocumentation + */ +export * from "./AbortController"; +export * from "./AbortSignal"; diff --git a/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortController.d.ts b/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortController.d.ts new file mode 100644 index 0000000..3df8976 --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortController.d.ts @@ -0,0 +1,13 @@ +import { AbortController as IAbortController } from "@smithy/types"; +import { AbortSignal } from "./AbortSignal"; +export { IAbortController }; +/** + * This implementation was added as Node.js didn't support AbortController prior to 15.x + * Use native implementation in browsers or Node.js \>=15.4.0. + * + * @public + */ +export declare class AbortController implements IAbortController { + readonly signal: AbortSignal; + abort(): void; +} diff --git a/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortSignal.d.ts b/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortSignal.d.ts new file mode 100644 index 0000000..009e30c --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortSignal.d.ts @@ -0,0 +1,18 @@ +import { AbortHandler, AbortSignal as IAbortSignal } from "@smithy/types"; +export { AbortHandler, IAbortSignal }; +/** + * @public + */ +export declare class AbortSignal implements IAbortSignal { + onabort: AbortHandler | null; + private _aborted; + constructor(); + /* + * Whether the associated operation has already been cancelled. + */ + readonly aborted: boolean; + /** + * @internal + */ + abort(): void; +} diff --git a/node_modules/@smithy/abort-controller/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/abort-controller/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..5a907b0 --- /dev/null +++ b/node_modules/@smithy/abort-controller/dist-types/ts3.4/index.d.ts @@ -0,0 +1,9 @@ +/** + * This implementation was added as Node.js didn't support AbortController prior to 15.x + * Use native implementation in browsers or Node.js \>=15.4.0. + * + * @deprecated Use standard implementations in [Browsers](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and [Node.js](https://nodejs.org/docs/latest/api/globals.html#class-abortcontroller) + * @packageDocumentation + */ +export * from "./AbortController"; +export * from "./AbortSignal"; diff --git a/node_modules/@smithy/abort-controller/package.json b/node_modules/@smithy/abort-controller/package.json new file mode 100644 index 0000000..451595d --- /dev/null +++ b/node_modules/@smithy/abort-controller/package.json @@ -0,0 +1,62 @@ +{ + "name": "@smithy/abort-controller", + "version": "2.2.0", + "description": "A simple abort controller library", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline abort-controller", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "extract:docs": "api-extractor run --local", + "test": "yarn g:jest" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/abort-controller", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/abort-controller" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/LICENSE b/node_modules/@smithy/config-resolver/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/config-resolver/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/README.md b/node_modules/@smithy/config-resolver/README.md new file mode 100644 index 0000000..2a25da2 --- /dev/null +++ b/node_modules/@smithy/config-resolver/README.md @@ -0,0 +1,10 @@ +# @smithy/config-resolver + +[![NPM version](https://img.shields.io/npm/v/@smithy/config-resolver/latest.svg)](https://www.npmjs.com/package/@smithy/config-resolver) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/config-resolver.svg)](https://www.npmjs.com/package/@smithy/config-resolver) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseFipsEndpointConfigOptions.js b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseFipsEndpointConfigOptions.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseFipsEndpointConfigOptions.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/index.js b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveCustomEndpointsConfig.js b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveCustomEndpointsConfig.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveCustomEndpointsConfig.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveEndpointsConfig.js b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveEndpointsConfig.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveEndpointsConfig.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/utils/getEndpointFromRegion.js b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/utils/getEndpointFromRegion.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/utils/getEndpointFromRegion.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/index.js b/node_modules/@smithy/config-resolver/dist-cjs/index.js new file mode 100644 index 0000000..1b697ab --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/index.js @@ -0,0 +1,235 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, + CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, + DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, + DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, + ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, + ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, + NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getRegionInfo: () => getRegionInfo, + resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, + resolveEndpointsConfig: () => resolveEndpointsConfig, + resolveRegionConfig: () => resolveRegionConfig +}); +module.exports = __toCommonJS(src_exports); + +// src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts +var import_util_config_provider = require("@smithy/util-config-provider"); +var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; +var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; +var DEFAULT_USE_DUALSTACK_ENDPOINT = false; +var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false +}; + +// src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts + +var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; +var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; +var DEFAULT_USE_FIPS_ENDPOINT = false; +var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false +}; + +// src/endpointsConfig/resolveCustomEndpointsConfig.ts +var import_util_middleware = require("@smithy/util-middleware"); +var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { + const { endpoint, urlParser } = input; + return { + ...input, + tls: input.tls ?? true, + endpoint: (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false) + }; +}, "resolveCustomEndpointsConfig"); + +// src/endpointsConfig/resolveEndpointsConfig.ts + + +// src/endpointsConfig/utils/getEndpointFromRegion.ts +var getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { + const { tls = true } = input; + const region = await input.region(); + const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(region)) { + throw new Error("Invalid region in client config"); + } + const useDualstackEndpoint = await input.useDualstackEndpoint(); + const useFipsEndpoint = await input.useFipsEndpoint(); + const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); +}, "getEndpointFromRegion"); + +// src/endpointsConfig/resolveEndpointsConfig.ts +var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { + const useDualstackEndpoint = (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false); + const { endpoint, useFipsEndpoint, urlParser } = input; + return { + ...input, + tls: input.tls ?? true, + endpoint: endpoint ? (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint + }; +}, "resolveEndpointsConfig"); + +// src/regionConfig/config.ts +var REGION_ENV_NAME = "AWS_REGION"; +var REGION_INI_NAME = "region"; +var NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + } +}; +var NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials" +}; + +// src/regionConfig/isFipsRegion.ts +var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + +// src/regionConfig/getRealRegion.ts +var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + +// src/regionConfig/resolveRegionConfig.ts +var resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return { + ...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(); + } + }; +}, "resolveRegionConfig"); + +// src/regionInfo/getHostnameFromVariants.ts +var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => { + var _a; + return (_a = variants.find( + ({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") + )) == null ? void 0 : _a.hostname; +}, "getHostnameFromVariants"); + +// src/regionInfo/getResolvedHostname.ts +var getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); + +// src/regionInfo/getResolvedPartition.ts +var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); + +// src/regionInfo/getResolvedSigningRegion.ts +var getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; + } else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); + } + } +}, "getResolvedSigningRegion"); + +// src/regionInfo/getRegionInfo.ts +var getRegionInfo = /* @__PURE__ */ __name((region, { + useFipsEndpoint = false, + useDualstackEndpoint = false, + signingService, + regionHash, + partitionHash +}) => { + var _a, _b, _c, _d, _e; + const partition = getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? void 0 : _a.endpoint) ?? region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? void 0 : _b.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? void 0 : _c.variants, hostnameOptions); + const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === void 0) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); + } + const signingRegion = getResolvedSigningRegion(hostname, { + signingRegion: (_d = regionHash[resolvedRegion]) == null ? void 0 : _d.signingRegion, + regionRegex: partitionHash[partition].regionRegex, + useFipsEndpoint + }); + return { + partition, + signingService, + hostname, + ...signingRegion && { signingRegion }, + ...((_e = regionHash[resolvedRegion]) == null ? void 0 : _e.signingService) && { + signingService: regionHash[resolvedRegion].signingService + } + }; +}, "getRegionInfo"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + ENV_USE_DUALSTACK_ENDPOINT, + CONFIG_USE_DUALSTACK_ENDPOINT, + DEFAULT_USE_DUALSTACK_ENDPOINT, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + ENV_USE_FIPS_ENDPOINT, + CONFIG_USE_FIPS_ENDPOINT, + DEFAULT_USE_FIPS_ENDPOINT, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, + resolveCustomEndpointsConfig, + resolveEndpointsConfig, + REGION_ENV_NAME, + REGION_INI_NAME, + NODE_REGION_CONFIG_OPTIONS, + NODE_REGION_CONFIG_FILE_OPTIONS, + resolveRegionConfig, + getRegionInfo +}); + diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/config.js b/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/config.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/config.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/getRealRegion.js b/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/getRealRegion.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/getRealRegion.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/index.js b/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/isFipsRegion.js b/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/isFipsRegion.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/isFipsRegion.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js b/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariant.js b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariant.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariant.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariantTag.js b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariantTag.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariantTag.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/PartitionHash.js b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/PartitionHash.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/PartitionHash.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/RegionHash.js b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/RegionHash.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/RegionHash.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getHostnameFromVariants.js b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getHostnameFromVariants.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getHostnameFromVariants.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getRegionInfo.js b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getRegionInfo.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getRegionInfo.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedHostname.js b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedHostname.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedHostname.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedPartition.js b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedPartition.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedPartition.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedSigningRegion.js b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedSigningRegion.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedSigningRegion.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/index.js b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js new file mode 100644 index 0000000..d061567 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js @@ -0,0 +1,9 @@ +import { booleanSelector, SelectorType } from "@smithy/util-config-provider"; +export const ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; +export const CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; +export const DEFAULT_USE_DUALSTACK_ENDPOINT = false; +export const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG), + default: false, +}; diff --git a/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js new file mode 100644 index 0000000..8cac1e9 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js @@ -0,0 +1,9 @@ +import { booleanSelector, SelectorType } from "@smithy/util-config-provider"; +export const ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; +export const CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; +export const DEFAULT_USE_FIPS_ENDPOINT = false; +export const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG), + default: false, +}; diff --git a/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js new file mode 100644 index 0000000..1424c22 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js @@ -0,0 +1,4 @@ +export * from "./NodeUseDualstackEndpointConfigOptions"; +export * from "./NodeUseFipsEndpointConfigOptions"; +export * from "./resolveCustomEndpointsConfig"; +export * from "./resolveEndpointsConfig"; diff --git a/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js new file mode 100644 index 0000000..a864054 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js @@ -0,0 +1,11 @@ +import { normalizeProvider } from "@smithy/util-middleware"; +export const resolveCustomEndpointsConfig = (input) => { + const { endpoint, urlParser } = input; + return { + ...input, + tls: input.tls ?? true, + endpoint: normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: normalizeProvider(input.useDualstackEndpoint ?? false), + }; +}; diff --git a/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js new file mode 100644 index 0000000..cb15a06 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js @@ -0,0 +1,15 @@ +import { normalizeProvider } from "@smithy/util-middleware"; +import { getEndpointFromRegion } from "./utils/getEndpointFromRegion"; +export const resolveEndpointsConfig = (input) => { + const useDualstackEndpoint = normalizeProvider(input.useDualstackEndpoint ?? false); + const { endpoint, useFipsEndpoint, urlParser } = input; + return { + ...input, + tls: input.tls ?? true, + endpoint: endpoint + ? normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) + : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint, + }; +}; diff --git a/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/utils/getEndpointFromRegion.js b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/utils/getEndpointFromRegion.js new file mode 100644 index 0000000..5627c32 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/utils/getEndpointFromRegion.js @@ -0,0 +1,15 @@ +export const getEndpointFromRegion = async (input) => { + const { tls = true } = input; + const region = await input.region(); + const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(region)) { + throw new Error("Invalid region in client config"); + } + const useDualstackEndpoint = await input.useDualstackEndpoint(); + const useFipsEndpoint = await input.useFipsEndpoint(); + const { hostname } = (await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint })) ?? {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); +}; diff --git a/node_modules/@smithy/config-resolver/dist-es/index.js b/node_modules/@smithy/config-resolver/dist-es/index.js new file mode 100644 index 0000000..61456a7 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/index.js @@ -0,0 +1,3 @@ +export * from "./endpointsConfig"; +export * from "./regionConfig"; +export * from "./regionInfo"; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js b/node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js new file mode 100644 index 0000000..7db9896 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js @@ -0,0 +1,12 @@ +export const REGION_ENV_NAME = "AWS_REGION"; +export const REGION_INI_NAME = "region"; +export const NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + }, +}; +export const NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials", +}; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js b/node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js new file mode 100644 index 0000000..8d1246b --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js @@ -0,0 +1,6 @@ +import { isFipsRegion } from "./isFipsRegion"; +export const getRealRegion = (region) => isFipsRegion(region) + ? ["fips-aws-global", "aws-fips"].includes(region) + ? "us-east-1" + : region.replace(/fips-(dkr-|prod-)?|-fips/, "") + : region; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js b/node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js new file mode 100644 index 0000000..83675f7 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js @@ -0,0 +1,2 @@ +export * from "./config"; +export * from "./resolveRegionConfig"; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js b/node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js new file mode 100644 index 0000000..d758967 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js @@ -0,0 +1 @@ +export const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); diff --git a/node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js b/node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js new file mode 100644 index 0000000..0028a55 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js @@ -0,0 +1,25 @@ +import { getRealRegion } from "./getRealRegion"; +import { isFipsRegion } from "./isFipsRegion"; +export const resolveRegionConfig = (input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return { + ...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(); + }, + }; +}; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionInfo/EndpointVariant.js b/node_modules/@smithy/config-resolver/dist-es/regionInfo/EndpointVariant.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionInfo/EndpointVariant.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionInfo/EndpointVariantTag.js b/node_modules/@smithy/config-resolver/dist-es/regionInfo/EndpointVariantTag.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionInfo/EndpointVariantTag.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js b/node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js b/node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionInfo/getHostnameFromVariants.js b/node_modules/@smithy/config-resolver/dist-es/regionInfo/getHostnameFromVariants.js new file mode 100644 index 0000000..84fc50e --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionInfo/getHostnameFromVariants.js @@ -0,0 +1 @@ +export const getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js b/node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js new file mode 100644 index 0000000..c39e2f7 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js @@ -0,0 +1,29 @@ +import { getHostnameFromVariants } from "./getHostnameFromVariants"; +import { getResolvedHostname } from "./getResolvedHostname"; +import { getResolvedPartition } from "./getResolvedPartition"; +import { getResolvedSigningRegion } from "./getResolvedSigningRegion"; +export const getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash, }) => { + const partition = getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions); + const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === undefined) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); + } + const signingRegion = getResolvedSigningRegion(hostname, { + signingRegion: regionHash[resolvedRegion]?.signingRegion, + regionRegex: partitionHash[partition].regionRegex, + useFipsEndpoint, + }); + return { + partition, + signingService, + hostname, + ...(signingRegion && { signingRegion }), + ...(regionHash[resolvedRegion]?.signingService && { + signingService: regionHash[resolvedRegion].signingService, + }), + }; +}; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionInfo/getResolvedHostname.js b/node_modules/@smithy/config-resolver/dist-es/regionInfo/getResolvedHostname.js new file mode 100644 index 0000000..35fb988 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionInfo/getResolvedHostname.js @@ -0,0 +1,5 @@ +export const getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname + ? regionHostname + : partitionHostname + ? partitionHostname.replace("{region}", resolvedRegion) + : undefined; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionInfo/getResolvedPartition.js b/node_modules/@smithy/config-resolver/dist-es/regionInfo/getResolvedPartition.js new file mode 100644 index 0000000..3d7bc55 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionInfo/getResolvedPartition.js @@ -0,0 +1 @@ +export const getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws"; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionInfo/getResolvedSigningRegion.js b/node_modules/@smithy/config-resolver/dist-es/regionInfo/getResolvedSigningRegion.js new file mode 100644 index 0000000..7977e00 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionInfo/getResolvedSigningRegion.js @@ -0,0 +1,12 @@ +export const getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; + } + else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); + } + } +}; diff --git a/node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js b/node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js new file mode 100644 index 0000000..e29686a --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js @@ -0,0 +1,3 @@ +export * from "./PartitionHash"; +export * from "./RegionHash"; +export * from "./getRegionInfo"; diff --git a/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/NodeUseDualstackEndpointConfigOptions.d.ts b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/NodeUseDualstackEndpointConfigOptions.d.ts new file mode 100644 index 0000000..172d8c1 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/NodeUseDualstackEndpointConfigOptions.d.ts @@ -0,0 +1,17 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; +/** + * @internal + */ +export declare const CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; +/** + * @internal + */ +export declare const DEFAULT_USE_DUALSTACK_ENDPOINT = false; +/** + * @internal + */ +export declare const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/NodeUseFipsEndpointConfigOptions.d.ts b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/NodeUseFipsEndpointConfigOptions.d.ts new file mode 100644 index 0000000..106bbdb --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/NodeUseFipsEndpointConfigOptions.d.ts @@ -0,0 +1,17 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; +/** + * @internal + */ +export declare const CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; +/** + * @internal + */ +export declare const DEFAULT_USE_FIPS_ENDPOINT = false; +/** + * @internal + */ +export declare const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/index.d.ts b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/index.d.ts new file mode 100644 index 0000000..ea1cf59 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/index.d.ts @@ -0,0 +1,16 @@ +/** + * @internal + */ +export * from "./NodeUseDualstackEndpointConfigOptions"; +/** + * @internal + */ +export * from "./NodeUseFipsEndpointConfigOptions"; +/** + * @internal + */ +export * from "./resolveCustomEndpointsConfig"; +/** + * @internal + */ +export * from "./resolveEndpointsConfig"; diff --git a/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/resolveCustomEndpointsConfig.d.ts b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/resolveCustomEndpointsConfig.d.ts new file mode 100644 index 0000000..6c8da97 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/resolveCustomEndpointsConfig.d.ts @@ -0,0 +1,29 @@ +import { Endpoint, Provider, UrlParser } from "@smithy/types"; +import { EndpointsInputConfig, EndpointsResolvedConfig } from "./resolveEndpointsConfig"; +/** + * @public + */ +export interface CustomEndpointsInputConfig extends EndpointsInputConfig { + /** + * The fully qualified endpoint of the webservice. + */ + endpoint: string | Endpoint | Provider; +} +interface PreviouslyResolved { + urlParser: UrlParser; +} +/** + * @internal + */ +export interface CustomEndpointsResolvedConfig extends EndpointsResolvedConfig { + /** + * Whether the endpoint is specified by caller. + * @internal + */ + isCustomEndpoint: true; +} +/** + * @internal + */ +export declare const resolveCustomEndpointsConfig: (input: T & CustomEndpointsInputConfig & PreviouslyResolved) => T & CustomEndpointsResolvedConfig; +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/resolveEndpointsConfig.d.ts b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/resolveEndpointsConfig.d.ts new file mode 100644 index 0000000..376069e --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/resolveEndpointsConfig.d.ts @@ -0,0 +1,51 @@ +import { Endpoint, Provider, RegionInfoProvider, UrlParser } from "@smithy/types"; +/** + * @public + */ +export interface EndpointsInputConfig { + /** + * The fully qualified endpoint of the webservice. This is only required when using + * a custom endpoint (for example, when using a local version of S3). + */ + endpoint?: string | Endpoint | Provider; + /** + * Whether TLS is enabled for requests. + */ + tls?: boolean; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | Provider; +} +interface PreviouslyResolved { + regionInfoProvider: RegionInfoProvider; + urlParser: UrlParser; + region: Provider; + useFipsEndpoint: Provider; +} +/** + * @internal + */ +export interface EndpointsResolvedConfig extends Required { + /** + * Resolved value for input {@link EndpointsInputConfig.endpoint} + */ + endpoint: Provider; + /** + * Whether the endpoint is specified by caller. + * @internal + */ + isCustomEndpoint?: boolean; + /** + * Resolved value for input {@link EndpointsInputConfig.useDualstackEndpoint} + */ + useDualstackEndpoint: Provider; +} +/** + * @internal + * + * @deprecated endpoints rulesets use @smithy/middleware-endpoint resolveEndpointConfig. + * All generated clients should migrate to Endpoints 2.0 endpointRuleSet traits. + */ +export declare const resolveEndpointsConfig: (input: T & EndpointsInputConfig & PreviouslyResolved) => T & EndpointsResolvedConfig; +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/utils/getEndpointFromRegion.d.ts b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/utils/getEndpointFromRegion.d.ts new file mode 100644 index 0000000..5ded732 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/utils/getEndpointFromRegion.d.ts @@ -0,0 +1,11 @@ +import { Provider, RegionInfoProvider, UrlParser } from "@smithy/types"; +interface GetEndpointFromRegionOptions { + region: Provider; + tls?: boolean; + regionInfoProvider: RegionInfoProvider; + urlParser: UrlParser; + useDualstackEndpoint: Provider; + useFipsEndpoint: Provider; +} +export declare const getEndpointFromRegion: (input: GetEndpointFromRegionOptions) => Promise; +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-types/index.d.ts b/node_modules/@smithy/config-resolver/dist-types/index.d.ts new file mode 100644 index 0000000..fde7086 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/index.d.ts @@ -0,0 +1,12 @@ +/** + * @internal + */ +export * from "./endpointsConfig"; +/** + * @internal + */ +export * from "./regionConfig"; +/** + * @internal + */ +export * from "./regionInfo"; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionConfig/config.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionConfig/config.d.ts new file mode 100644 index 0000000..d203bb0 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionConfig/config.d.ts @@ -0,0 +1,17 @@ +import { LoadedConfigSelectors, LocalConfigOptions } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const REGION_ENV_NAME = "AWS_REGION"; +/** + * @internal + */ +export declare const REGION_INI_NAME = "region"; +/** + * @internal + */ +export declare const NODE_REGION_CONFIG_OPTIONS: LoadedConfigSelectors; +/** + * @internal + */ +export declare const NODE_REGION_CONFIG_FILE_OPTIONS: LocalConfigOptions; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionConfig/getRealRegion.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionConfig/getRealRegion.d.ts new file mode 100644 index 0000000..c70fb5b --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionConfig/getRealRegion.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const getRealRegion: (region: string) => string; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionConfig/index.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionConfig/index.d.ts new file mode 100644 index 0000000..6dcf5e5 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionConfig/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./config"; +/** + * @internal + */ +export * from "./resolveRegionConfig"; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionConfig/isFipsRegion.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionConfig/isFipsRegion.d.ts new file mode 100644 index 0000000..b42cee7 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionConfig/isFipsRegion.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const isFipsRegion: (region: string) => boolean; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionConfig/resolveRegionConfig.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionConfig/resolveRegionConfig.d.ts new file mode 100644 index 0000000..c06c9d4 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionConfig/resolveRegionConfig.d.ts @@ -0,0 +1,34 @@ +import { Provider } from "@smithy/types"; +/** + * @public + */ +export interface RegionInputConfig { + /** + * The AWS region to which this client will send requests + */ + region?: string | Provider; + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | Provider; +} +interface PreviouslyResolved { +} +/** + * @internal + */ +export interface RegionResolvedConfig { + /** + * Resolved value for input config {@link RegionInputConfig.region} + */ + region: Provider; + /** + * Resolved value for input {@link RegionInputConfig.useFipsEndpoint} + */ + useFipsEndpoint: Provider; +} +/** + * @internal + */ +export declare const resolveRegionConfig: (input: T & RegionInputConfig & PreviouslyResolved) => T & RegionResolvedConfig; +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionInfo/EndpointVariant.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionInfo/EndpointVariant.d.ts new file mode 100644 index 0000000..9b68e93 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionInfo/EndpointVariant.d.ts @@ -0,0 +1,10 @@ +import { EndpointVariantTag } from "./EndpointVariantTag"; +/** + * @internal + * + * Provides hostname information for specific host label. + */ +export type EndpointVariant = { + hostname: string; + tags: EndpointVariantTag[]; +}; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionInfo/EndpointVariantTag.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionInfo/EndpointVariantTag.d.ts new file mode 100644 index 0000000..ca50e1f --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionInfo/EndpointVariantTag.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + * + * The tag which mentions which area variant is providing information for. + * Can be either "fips" or "dualstack". + */ +export type EndpointVariantTag = "fips" | "dualstack"; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionInfo/PartitionHash.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionInfo/PartitionHash.d.ts new file mode 100644 index 0000000..0a5be17 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionInfo/PartitionHash.d.ts @@ -0,0 +1,14 @@ +import { EndpointVariant } from "./EndpointVariant"; +/** + * @internal + * + * The hash of partition with the information specific to that partition. + * The information includes the list of regions belonging to that partition, + * and the hostname to be used for the partition. + */ +export type PartitionHash = Record; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionInfo/RegionHash.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionInfo/RegionHash.d.ts new file mode 100644 index 0000000..01cd843 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionInfo/RegionHash.d.ts @@ -0,0 +1,12 @@ +import { EndpointVariant } from "./EndpointVariant"; +/** + * @internal + * + * The hash of region with the information specific to that region. + * The information can include hostname, signingService and signingRegion. + */ +export type RegionHash = Record; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionInfo/getHostnameFromVariants.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionInfo/getHostnameFromVariants.d.ts new file mode 100644 index 0000000..47bcf70 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionInfo/getHostnameFromVariants.d.ts @@ -0,0 +1,12 @@ +import { EndpointVariant } from "./EndpointVariant"; +/** + * @internal + */ +export interface GetHostnameFromVariantsOptions { + useFipsEndpoint: boolean; + useDualstackEndpoint: boolean; +} +/** + * @internal + */ +export declare const getHostnameFromVariants: (variants: EndpointVariant[] | undefined, { useFipsEndpoint, useDualstackEndpoint }: GetHostnameFromVariantsOptions) => string | undefined; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionInfo/getRegionInfo.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionInfo/getRegionInfo.d.ts new file mode 100644 index 0000000..0aaae08 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionInfo/getRegionInfo.d.ts @@ -0,0 +1,17 @@ +import { RegionInfo } from "@smithy/types"; +import { PartitionHash } from "./PartitionHash"; +import { RegionHash } from "./RegionHash"; +/** + * @internal + */ +export interface GetRegionInfoOptions { + useFipsEndpoint?: boolean; + useDualstackEndpoint?: boolean; + signingService: string; + regionHash: RegionHash; + partitionHash: PartitionHash; +} +/** + * @internal + */ +export declare const getRegionInfo: (region: string, { useFipsEndpoint, useDualstackEndpoint, signingService, regionHash, partitionHash, }: GetRegionInfoOptions) => RegionInfo; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionInfo/getResolvedHostname.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionInfo/getResolvedHostname.d.ts new file mode 100644 index 0000000..bf7a2b3 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionInfo/getResolvedHostname.d.ts @@ -0,0 +1,11 @@ +/** + * @internal + */ +export interface GetResolvedHostnameOptions { + regionHostname?: string; + partitionHostname?: string; +} +/** + * @internal + */ +export declare const getResolvedHostname: (resolvedRegion: string, { regionHostname, partitionHostname }: GetResolvedHostnameOptions) => string | undefined; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionInfo/getResolvedPartition.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionInfo/getResolvedPartition.d.ts new file mode 100644 index 0000000..587b4fc --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionInfo/getResolvedPartition.d.ts @@ -0,0 +1,11 @@ +import { PartitionHash } from "./PartitionHash"; +/** + * @internal + */ +export interface GetResolvedPartitionOptions { + partitionHash: PartitionHash; +} +/** + * @internal + */ +export declare const getResolvedPartition: (region: string, { partitionHash }: GetResolvedPartitionOptions) => string; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionInfo/getResolvedSigningRegion.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionInfo/getResolvedSigningRegion.d.ts new file mode 100644 index 0000000..3f5f7af --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionInfo/getResolvedSigningRegion.d.ts @@ -0,0 +1,12 @@ +/** + * @internal + */ +export interface GetResolvedSigningRegionOptions { + regionRegex: string; + signingRegion?: string; + useFipsEndpoint: boolean; +} +/** + * @internal + */ +export declare const getResolvedSigningRegion: (hostname: string, { signingRegion, regionRegex, useFipsEndpoint }: GetResolvedSigningRegionOptions) => string | undefined; diff --git a/node_modules/@smithy/config-resolver/dist-types/regionInfo/index.d.ts b/node_modules/@smithy/config-resolver/dist-types/regionInfo/index.d.ts new file mode 100644 index 0000000..64ef0d5 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/regionInfo/index.d.ts @@ -0,0 +1,12 @@ +/** + * @internal + */ +export * from "./PartitionHash"; +/** + * @internal + */ +export * from "./RegionHash"; +/** + * @internal + */ +export * from "./getRegionInfo"; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/NodeUseDualstackEndpointConfigOptions.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/NodeUseDualstackEndpointConfigOptions.d.ts new file mode 100644 index 0000000..169720a --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/NodeUseDualstackEndpointConfigOptions.d.ts @@ -0,0 +1,17 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; +/** + * @internal + */ +export declare const CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; +/** + * @internal + */ +export declare const DEFAULT_USE_DUALSTACK_ENDPOINT = false; +/** + * @internal + */ +export declare const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/NodeUseFipsEndpointConfigOptions.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/NodeUseFipsEndpointConfigOptions.d.ts new file mode 100644 index 0000000..b17417e --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/NodeUseFipsEndpointConfigOptions.d.ts @@ -0,0 +1,17 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; +/** + * @internal + */ +export declare const CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; +/** + * @internal + */ +export declare const DEFAULT_USE_FIPS_ENDPOINT = false; +/** + * @internal + */ +export declare const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/index.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/index.d.ts new file mode 100644 index 0000000..cbabe5b --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/index.d.ts @@ -0,0 +1,16 @@ +/** + * @internal + */ +export * from "./NodeUseDualstackEndpointConfigOptions"; +/** + * @internal + */ +export * from "./NodeUseFipsEndpointConfigOptions"; +/** + * @internal + */ +export * from "./resolveCustomEndpointsConfig"; +/** + * @internal + */ +export * from "./resolveEndpointsConfig"; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/resolveCustomEndpointsConfig.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/resolveCustomEndpointsConfig.d.ts new file mode 100644 index 0000000..18e9add --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/resolveCustomEndpointsConfig.d.ts @@ -0,0 +1,29 @@ +import { Endpoint, Provider, UrlParser } from "@smithy/types"; +import { EndpointsInputConfig, EndpointsResolvedConfig } from "./resolveEndpointsConfig"; +/** + * @public + */ +export interface CustomEndpointsInputConfig extends EndpointsInputConfig { + /** + * The fully qualified endpoint of the webservice. + */ + endpoint: string | Endpoint | Provider; +} +interface PreviouslyResolved { + urlParser: UrlParser; +} +/** + * @internal + */ +export interface CustomEndpointsResolvedConfig extends EndpointsResolvedConfig { + /** + * Whether the endpoint is specified by caller. + * @internal + */ + isCustomEndpoint: true; +} +/** + * @internal + */ +export declare const resolveCustomEndpointsConfig: (input: T & CustomEndpointsInputConfig & PreviouslyResolved) => T & CustomEndpointsResolvedConfig; +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/resolveEndpointsConfig.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/resolveEndpointsConfig.d.ts new file mode 100644 index 0000000..72e29a0 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/resolveEndpointsConfig.d.ts @@ -0,0 +1,51 @@ +import { Endpoint, Provider, RegionInfoProvider, UrlParser } from "@smithy/types"; +/** + * @public + */ +export interface EndpointsInputConfig { + /** + * The fully qualified endpoint of the webservice. This is only required when using + * a custom endpoint (for example, when using a local version of S3). + */ + endpoint?: string | Endpoint | Provider; + /** + * Whether TLS is enabled for requests. + */ + tls?: boolean; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | Provider; +} +interface PreviouslyResolved { + regionInfoProvider: RegionInfoProvider; + urlParser: UrlParser; + region: Provider; + useFipsEndpoint: Provider; +} +/** + * @internal + */ +export interface EndpointsResolvedConfig extends Required { + /** + * Resolved value for input {@link EndpointsInputConfig.endpoint} + */ + endpoint: Provider; + /** + * Whether the endpoint is specified by caller. + * @internal + */ + isCustomEndpoint?: boolean; + /** + * Resolved value for input {@link EndpointsInputConfig.useDualstackEndpoint} + */ + useDualstackEndpoint: Provider; +} +/** + * @internal + * + * @deprecated endpoints rulesets use @smithy/middleware-endpoint resolveEndpointConfig. + * All generated clients should migrate to Endpoints 2.0 endpointRuleSet traits. + */ +export declare const resolveEndpointsConfig: (input: T & EndpointsInputConfig & PreviouslyResolved) => T & EndpointsResolvedConfig; +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/utils/getEndpointFromRegion.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/utils/getEndpointFromRegion.d.ts new file mode 100644 index 0000000..83d4635 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/utils/getEndpointFromRegion.d.ts @@ -0,0 +1,11 @@ +import { Provider, RegionInfoProvider, UrlParser } from "@smithy/types"; +interface GetEndpointFromRegionOptions { + region: Provider; + tls?: boolean; + regionInfoProvider: RegionInfoProvider; + urlParser: UrlParser; + useDualstackEndpoint: Provider; + useFipsEndpoint: Provider; +} +export declare const getEndpointFromRegion: (input: GetEndpointFromRegionOptions) => Promise; +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..e205411 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/index.d.ts @@ -0,0 +1,12 @@ +/** + * @internal + */ +export * from "./endpointsConfig"; +/** + * @internal + */ +export * from "./regionConfig"; +/** + * @internal + */ +export * from "./regionInfo"; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/config.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/config.d.ts new file mode 100644 index 0000000..8f3a9b2 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/config.d.ts @@ -0,0 +1,17 @@ +import { LoadedConfigSelectors, LocalConfigOptions } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const REGION_ENV_NAME = "AWS_REGION"; +/** + * @internal + */ +export declare const REGION_INI_NAME = "region"; +/** + * @internal + */ +export declare const NODE_REGION_CONFIG_OPTIONS: LoadedConfigSelectors; +/** + * @internal + */ +export declare const NODE_REGION_CONFIG_FILE_OPTIONS: LocalConfigOptions; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/getRealRegion.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/getRealRegion.d.ts new file mode 100644 index 0000000..6c11d4d --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/getRealRegion.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const getRealRegion: (region: string) => string; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/index.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/index.d.ts new file mode 100644 index 0000000..0e6f55d --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./config"; +/** + * @internal + */ +export * from "./resolveRegionConfig"; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/isFipsRegion.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/isFipsRegion.d.ts new file mode 100644 index 0000000..1ee8bd4 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/isFipsRegion.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const isFipsRegion: (region: string) => boolean; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/resolveRegionConfig.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/resolveRegionConfig.d.ts new file mode 100644 index 0000000..7aaf9e1 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/resolveRegionConfig.d.ts @@ -0,0 +1,34 @@ +import { Provider } from "@smithy/types"; +/** + * @public + */ +export interface RegionInputConfig { + /** + * The AWS region to which this client will send requests + */ + region?: string | Provider; + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | Provider; +} +interface PreviouslyResolved { +} +/** + * @internal + */ +export interface RegionResolvedConfig { + /** + * Resolved value for input config {@link RegionInputConfig.region} + */ + region: Provider; + /** + * Resolved value for input {@link RegionInputConfig.useFipsEndpoint} + */ + useFipsEndpoint: Provider; +} +/** + * @internal + */ +export declare const resolveRegionConfig: (input: T & RegionInputConfig & PreviouslyResolved) => T & RegionResolvedConfig; +export {}; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/EndpointVariant.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/EndpointVariant.d.ts new file mode 100644 index 0000000..e533cc7 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/EndpointVariant.d.ts @@ -0,0 +1,10 @@ +import { EndpointVariantTag } from "./EndpointVariantTag"; +/** + * @internal + * + * Provides hostname information for specific host label. + */ +export type EndpointVariant = { + hostname: string; + tags: EndpointVariantTag[]; +}; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/EndpointVariantTag.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/EndpointVariantTag.d.ts new file mode 100644 index 0000000..755bbe5 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/EndpointVariantTag.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + * + * The tag which mentions which area variant is providing information for. + * Can be either "fips" or "dualstack". + */ +export type EndpointVariantTag = "fips" | "dualstack"; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/PartitionHash.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/PartitionHash.d.ts new file mode 100644 index 0000000..6fed65e --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/PartitionHash.d.ts @@ -0,0 +1,14 @@ +import { EndpointVariant } from "./EndpointVariant"; +/** + * @internal + * + * The hash of partition with the information specific to that partition. + * The information includes the list of regions belonging to that partition, + * and the hostname to be used for the partition. + */ +export type PartitionHash = Record; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/RegionHash.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/RegionHash.d.ts new file mode 100644 index 0000000..cd90c70 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/RegionHash.d.ts @@ -0,0 +1,12 @@ +import { EndpointVariant } from "./EndpointVariant"; +/** + * @internal + * + * The hash of region with the information specific to that region. + * The information can include hostname, signingService and signingRegion. + */ +export type RegionHash = Record; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getHostnameFromVariants.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getHostnameFromVariants.d.ts new file mode 100644 index 0000000..3d61daa --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getHostnameFromVariants.d.ts @@ -0,0 +1,12 @@ +import { EndpointVariant } from "./EndpointVariant"; +/** + * @internal + */ +export interface GetHostnameFromVariantsOptions { + useFipsEndpoint: boolean; + useDualstackEndpoint: boolean; +} +/** + * @internal + */ +export declare const getHostnameFromVariants: (variants: EndpointVariant[] | undefined, { useFipsEndpoint, useDualstackEndpoint }: GetHostnameFromVariantsOptions) => string | undefined; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getRegionInfo.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getRegionInfo.d.ts new file mode 100644 index 0000000..820a548 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getRegionInfo.d.ts @@ -0,0 +1,17 @@ +import { RegionInfo } from "@smithy/types"; +import { PartitionHash } from "./PartitionHash"; +import { RegionHash } from "./RegionHash"; +/** + * @internal + */ +export interface GetRegionInfoOptions { + useFipsEndpoint?: boolean; + useDualstackEndpoint?: boolean; + signingService: string; + regionHash: RegionHash; + partitionHash: PartitionHash; +} +/** + * @internal + */ +export declare const getRegionInfo: (region: string, { useFipsEndpoint, useDualstackEndpoint, signingService, regionHash, partitionHash, }: GetRegionInfoOptions) => RegionInfo; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getResolvedHostname.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getResolvedHostname.d.ts new file mode 100644 index 0000000..6aae405 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getResolvedHostname.d.ts @@ -0,0 +1,11 @@ +/** + * @internal + */ +export interface GetResolvedHostnameOptions { + regionHostname?: string; + partitionHostname?: string; +} +/** + * @internal + */ +export declare const getResolvedHostname: (resolvedRegion: string, { regionHostname, partitionHostname }: GetResolvedHostnameOptions) => string | undefined; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getResolvedPartition.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getResolvedPartition.d.ts new file mode 100644 index 0000000..355c318 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getResolvedPartition.d.ts @@ -0,0 +1,11 @@ +import { PartitionHash } from "./PartitionHash"; +/** + * @internal + */ +export interface GetResolvedPartitionOptions { + partitionHash: PartitionHash; +} +/** + * @internal + */ +export declare const getResolvedPartition: (region: string, { partitionHash }: GetResolvedPartitionOptions) => string; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getResolvedSigningRegion.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getResolvedSigningRegion.d.ts new file mode 100644 index 0000000..a7b1db6 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/getResolvedSigningRegion.d.ts @@ -0,0 +1,12 @@ +/** + * @internal + */ +export interface GetResolvedSigningRegionOptions { + regionRegex: string; + signingRegion?: string; + useFipsEndpoint: boolean; +} +/** + * @internal + */ +export declare const getResolvedSigningRegion: (hostname: string, { signingRegion, regionRegex, useFipsEndpoint }: GetResolvedSigningRegionOptions) => string | undefined; diff --git a/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/index.d.ts b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/index.d.ts new file mode 100644 index 0000000..5826308 --- /dev/null +++ b/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionInfo/index.d.ts @@ -0,0 +1,12 @@ +/** + * @internal + */ +export * from "./PartitionHash"; +/** + * @internal + */ +export * from "./RegionHash"; +/** + * @internal + */ +export * from "./getRegionInfo"; diff --git a/node_modules/@smithy/config-resolver/package.json b/node_modules/@smithy/config-resolver/package.json new file mode 100644 index 0000000..1215167 --- /dev/null +++ b/node_modules/@smithy/config-resolver/package.json @@ -0,0 +1,64 @@ +{ + "name": "@smithy/config-resolver", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline config-resolver", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest", + "extract:docs": "api-extractor run --local" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^2.3.0", + "@smithy/types": "^2.12.0", + "@smithy/util-config-provider": "^2.3.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/config-resolver", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/config-resolver" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/core/LICENSE b/node_modules/@smithy/core/LICENSE new file mode 100644 index 0000000..e907b58 --- /dev/null +++ b/node_modules/@smithy/core/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/core/README.md b/node_modules/@smithy/core/README.md new file mode 100644 index 0000000..63937d9 --- /dev/null +++ b/node_modules/@smithy/core/README.md @@ -0,0 +1,12 @@ +# @smithy/core + +[![NPM version](https://img.shields.io/npm/v/@smithy/core/latest.svg)](https://www.npmjs.com/package/@smithy/core) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/core.svg)](https://www.npmjs.com/package/@smithy/core) + +> An internal package. You probably shouldn't use this package, at least directly. + +## Usage + +This package provides common or core functionality for generic Smithy clients. + +You do not need to explicitly install this package, since it will be installed during code generation if used. diff --git a/node_modules/@smithy/core/dist-cjs/getSmithyContext.js b/node_modules/@smithy/core/dist-cjs/getSmithyContext.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/getSmithyContext.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/index.js b/node_modules/@smithy/core/dist-cjs/index.js new file mode 100644 index 0000000..8f578db --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/index.js @@ -0,0 +1,493 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig, + EXPIRATION_MS: () => EXPIRATION_MS, + HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner, + HttpBearerAuthSigner: () => HttpBearerAuthSigner, + NoAuthSigner: () => NoAuthSigner, + RequestBuilder: () => RequestBuilder, + createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction, + createPaginator: () => createPaginator, + doesIdentityRequireRefresh: () => doesIdentityRequireRefresh, + getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, + getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, + getHttpSigningPlugin: () => getHttpSigningPlugin, + getSmithyContext: () => getSmithyContext3, + httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, + httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, + httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, + httpSigningMiddleware: () => httpSigningMiddleware, + httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions, + isIdentityExpired: () => isIdentityExpired, + memoizeIdentityProvider: () => memoizeIdentityProvider, + normalizeProvider: () => normalizeProvider, + requestBuilder: () => requestBuilder +}); +module.exports = __toCommonJS(src_exports); + +// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts +var import_util_middleware = require("@smithy/util-middleware"); +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map = /* @__PURE__ */ new Map(); + for (const scheme of httpAuthSchemes) { + map.set(scheme.schemeId, scheme); + } + return map; +} +__name(convertHttpAuthSchemesToMap, "convertHttpAuthSchemesToMap"); +var httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config, mwOptions) => (next, context) => async (args) => { + var _a; + const options = config.httpAuthSchemeProvider( + await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input) + ); + const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); + const smithyContext = (0, import_util_middleware.getSmithyContext)(context); + const failureReasons = []; + for (const option of options) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = ((_a = option.propertiesExtractor) == null ? void 0 : _a.call(option, config, context)) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer + }; + break; + } + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); + } + return next(args); +}, "httpAuthSchemeMiddleware"); + +// src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts +var import_middleware_endpoint = require("@smithy/middleware-endpoint"); +var httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: import_middleware_endpoint.endpointMiddlewareOptions.name +}; +var getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider +}) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), + httpAuthSchemeEndpointRuleSetMiddlewareOptions + ); + } +}), "getHttpAuthSchemeEndpointRuleSetPlugin"); + +// src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts +var import_middleware_serde = require("@smithy/middleware-serde"); +var httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde.serializerMiddlewareOption.name +}; +var getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider +}) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), + httpAuthSchemeMiddlewareOptions + ); + } +}), "getHttpAuthSchemePlugin"); + +// src/middleware-http-signing/httpSigningMiddleware.ts +var import_protocol_http = require("@smithy/protocol-http"); + +var defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => { + throw error; +}, "defaultErrorHandler"); +var defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => { +}, "defaultSuccessHandler"); +var httpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => { + if (!import_protocol_http.HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = (0, import_util_middleware.getSmithyContext)(context); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { + httpAuthOption: { signingProperties = {} }, + identity, + signer + } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity, signingProperties) + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; +}, "httpSigningMiddleware"); + +// src/middleware-http-signing/getHttpSigningMiddleware.ts +var import_middleware_retry = require("@smithy/middleware-retry"); +var httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: import_middleware_retry.retryMiddlewareOptions.name +}; +var getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); + } +}), "getHttpSigningPlugin"); + +// src/util-identity-and-auth/DefaultIdentityProviderConfig.ts +var _DefaultIdentityProviderConfig = class _DefaultIdentityProviderConfig { + /** + * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers. + * + * @param config scheme IDs and identity providers to configure + */ + constructor(config) { + this.authSchemes = /* @__PURE__ */ new Map(); + for (const [key, value] of Object.entries(config)) { + if (value !== void 0) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } +}; +__name(_DefaultIdentityProviderConfig, "DefaultIdentityProviderConfig"); +var DefaultIdentityProviderConfig = _DefaultIdentityProviderConfig; + +// src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts +var import_types = require("@smithy/types"); +var _HttpApiKeyAuthSigner = class _HttpApiKeyAuthSigner { + async sign(httpRequest, identity, signingProperties) { + if (!signingProperties) { + throw new Error( + "request could not be signed with `apiKey` since the `name` and `in` signer properties are missing" + ); + } + if (!signingProperties.name) { + throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); + } + if (!signingProperties.in) { + throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing"); + } + if (!identity.apiKey) { + throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); + } + const clonedRequest = httpRequest.clone(); + if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) { + clonedRequest.query[signingProperties.name] = identity.apiKey; + } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) { + clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey; + } else { + throw new Error( + "request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`" + ); + } + return clonedRequest; + } +}; +__name(_HttpApiKeyAuthSigner, "HttpApiKeyAuthSigner"); +var HttpApiKeyAuthSigner = _HttpApiKeyAuthSigner; + +// src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts +var _HttpBearerAuthSigner = class _HttpBearerAuthSigner { + async sign(httpRequest, identity, signingProperties) { + const clonedRequest = httpRequest.clone(); + if (!identity.token) { + throw new Error("request could not be signed with `token` since the `token` is not defined"); + } + clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`; + return clonedRequest; + } +}; +__name(_HttpBearerAuthSigner, "HttpBearerAuthSigner"); +var HttpBearerAuthSigner = _HttpBearerAuthSigner; + +// src/util-identity-and-auth/httpAuthSchemes/noAuth.ts +var _NoAuthSigner = class _NoAuthSigner { + async sign(httpRequest, identity, signingProperties) { + return httpRequest; + } +}; +__name(_NoAuthSigner, "NoAuthSigner"); +var NoAuthSigner = _NoAuthSigner; + +// src/util-identity-and-auth/memoizeIdentityProvider.ts +var createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs, "createIsIdentityExpiredFunction"); +var EXPIRATION_MS = 3e5; +var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); +var doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity) => identity.expiration !== void 0, "doesIdentityRequireRefresh"); +var memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + if (provider === void 0) { + return void 0; + } + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async (options) => { + if (!pending) { + pending = normalizedProvider(options); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(options); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(options); + } + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; +}, "memoizeIdentityProvider"); + +// src/getSmithyContext.ts + +var getSmithyContext3 = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + +// src/normalizeProvider.ts +var normalizeProvider = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; +}, "normalizeProvider"); + +// src/protocols/requestBuilder.ts + +var import_smithy_client = require("@smithy/smithy-client"); +function requestBuilder(input, context) { + return new RequestBuilder(input, context); +} +__name(requestBuilder, "requestBuilder"); +var _RequestBuilder = class _RequestBuilder { + constructor(input, context) { + this.input = input; + this.context = context; + this.query = {}; + this.method = ""; + this.headers = {}; + this.path = ""; + this.body = null; + this.hostname = ""; + this.resolvePathStack = []; + } + async build() { + const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); + this.path = basePath; + for (const resolvePath of this.resolvePathStack) { + resolvePath(this.path); + } + return new import_protocol_http.HttpRequest({ + protocol, + hostname: this.hostname || hostname, + port, + method: this.method, + path: this.path, + query: this.query, + body: this.body, + headers: this.headers + }); + } + /** + * Brevity setter for "hostname". + */ + hn(hostname) { + this.hostname = hostname; + return this; + } + /** + * Brevity initial builder for "basepath". + */ + bp(uriLabel) { + this.resolvePathStack.push((basePath) => { + this.path = `${(basePath == null ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + }); + return this; + } + /** + * Brevity incremental builder for "path". + */ + p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { + this.resolvePathStack.push((path) => { + this.path = (0, import_smithy_client.resolvedPath)(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + }); + return this; + } + /** + * Brevity setter for "headers". + */ + h(headers) { + this.headers = headers; + return this; + } + /** + * Brevity setter for "query". + */ + q(query) { + this.query = query; + return this; + } + /** + * Brevity setter for "body". + */ + b(body) { + this.body = body; + return this; + } + /** + * Brevity setter for "method". + */ + m(method) { + this.method = method; + return this; + } +}; +__name(_RequestBuilder, "RequestBuilder"); +var RequestBuilder = _RequestBuilder; + +// src/pagination/createPaginator.ts +var makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, ...args) => { + return await client.send(new CommandCtor(input), ...args); +}, "makePagedClientRequest"); +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return /* @__PURE__ */ __name(async function* paginateOperation(config, input, ...additionalArguments) { + let token = config.startingToken || void 0; + let hasNext = true; + let page; + while (hasNext) { + input[inputTokenName] = token; + if (pageSizeTokenName) { + input[pageSizeTokenName] = input[pageSizeTokenName] ?? config.pageSize; + } + if (config.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config.client, input, ...additionalArguments); + } else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + return void 0; + }, "paginateOperation"); +} +__name(createPaginator, "createPaginator"); +var get = /* @__PURE__ */ __name((fromObject, path) => { + let cursor = fromObject; + const pathComponents = path.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return void 0; + } + cursor = cursor[step]; + } + return cursor; +}, "get"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + createPaginator, + httpAuthSchemeMiddleware, + httpAuthSchemeEndpointRuleSetMiddlewareOptions, + getHttpAuthSchemeEndpointRuleSetPlugin, + httpAuthSchemeMiddlewareOptions, + getHttpAuthSchemePlugin, + httpSigningMiddleware, + httpSigningMiddlewareOptions, + getHttpSigningPlugin, + DefaultIdentityProviderConfig, + HttpApiKeyAuthSigner, + HttpBearerAuthSigner, + NoAuthSigner, + createIsIdentityExpiredFunction, + EXPIRATION_MS, + isIdentityExpired, + doesIdentityRequireRefresh, + memoizeIdentityProvider, + getSmithyContext, + normalizeProvider, + requestBuilder, + RequestBuilder +}); + diff --git a/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js b/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js b/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js b/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js b/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js b/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js b/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js b/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/normalizeProvider.js b/node_modules/@smithy/core/dist-cjs/normalizeProvider.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/normalizeProvider.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js b/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/protocols/requestBuilder.js b/node_modules/@smithy/core/dist-cjs/protocols/requestBuilder.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/protocols/requestBuilder.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/core/dist-es/getSmithyContext.js b/node_modules/@smithy/core/dist-es/getSmithyContext.js new file mode 100644 index 0000000..3848a0c --- /dev/null +++ b/node_modules/@smithy/core/dist-es/getSmithyContext.js @@ -0,0 +1,2 @@ +import { SMITHY_CONTEXT_KEY } from "@smithy/types"; +export const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {}); diff --git a/node_modules/@smithy/core/dist-es/index.js b/node_modules/@smithy/core/dist-es/index.js new file mode 100644 index 0000000..8081ce9 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/index.js @@ -0,0 +1,7 @@ +export * from "./middleware-http-auth-scheme"; +export * from "./middleware-http-signing"; +export * from "./util-identity-and-auth"; +export * from "./getSmithyContext"; +export * from "./normalizeProvider"; +export * from "./protocols/requestBuilder"; +export { createPaginator } from "./pagination/createPaginator"; diff --git a/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js b/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js new file mode 100644 index 0000000..d6a2970 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js @@ -0,0 +1,18 @@ +import { endpointMiddlewareOptions } from "@smithy/middleware-endpoint"; +import { httpAuthSchemeMiddleware } from "./httpAuthSchemeMiddleware"; +export const httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: endpointMiddlewareOptions.name, +}; +export const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider, + }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); + }, +}); diff --git a/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js b/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js new file mode 100644 index 0000000..3fe03c5 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js @@ -0,0 +1,18 @@ +import { serializerMiddlewareOption } from "@smithy/middleware-serde"; +import { httpAuthSchemeMiddleware } from "./httpAuthSchemeMiddleware"; +export const httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: serializerMiddlewareOption.name, +}; +export const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider, + }), httpAuthSchemeMiddlewareOptions); + }, +}); diff --git a/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js b/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js new file mode 100644 index 0000000..27d5d56 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js @@ -0,0 +1,40 @@ +import { SMITHY_CONTEXT_KEY, } from "@smithy/types"; +import { getSmithyContext } from "@smithy/util-middleware"; +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map = new Map(); + for (const scheme of httpAuthSchemes) { + map.set(scheme.schemeId, scheme); + } + return map; +} +export const httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => { + const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)); + const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); + const smithyContext = getSmithyContext(context); + const failureReasons = []; + for (const option of options) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer, + }; + break; + } + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); + } + return next(args); +}; diff --git a/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js b/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js new file mode 100644 index 0000000..5042e7d --- /dev/null +++ b/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js @@ -0,0 +1,3 @@ +export * from "./httpAuthSchemeMiddleware"; +export * from "./getHttpAuthSchemeEndpointRuleSetPlugin"; +export * from "./getHttpAuthSchemePlugin"; diff --git a/node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js b/node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js new file mode 100644 index 0000000..d1660b4 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js @@ -0,0 +1,16 @@ +import { retryMiddlewareOptions } from "@smithy/middleware-retry"; +import { httpSigningMiddleware } from "./httpSigningMiddleware"; +export const httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: retryMiddlewareOptions.name, +}; +export const getHttpSigningPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); + }, +}); diff --git a/node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js b/node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js new file mode 100644 index 0000000..dbc1b28 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js @@ -0,0 +1,24 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import { SMITHY_CONTEXT_KEY, } from "@smithy/types"; +import { getSmithyContext } from "@smithy/util-middleware"; +const defaultErrorHandler = (signingProperties) => (error) => { + throw error; +}; +const defaultSuccessHandler = (httpResponse, signingProperties) => { }; +export const httpSigningMiddleware = (config) => (next, context) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = getSmithyContext(context); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity, signer, } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity, signingProperties), + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; +}; diff --git a/node_modules/@smithy/core/dist-es/middleware-http-signing/index.js b/node_modules/@smithy/core/dist-es/middleware-http-signing/index.js new file mode 100644 index 0000000..7bc6cfe --- /dev/null +++ b/node_modules/@smithy/core/dist-es/middleware-http-signing/index.js @@ -0,0 +1,2 @@ +export * from "./httpSigningMiddleware"; +export * from "./getHttpSigningMiddleware"; diff --git a/node_modules/@smithy/core/dist-es/normalizeProvider.js b/node_modules/@smithy/core/dist-es/normalizeProvider.js new file mode 100644 index 0000000..a83ea99 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/normalizeProvider.js @@ -0,0 +1,6 @@ +export const normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; +}; diff --git a/node_modules/@smithy/core/dist-es/pagination/createPaginator.js b/node_modules/@smithy/core/dist-es/pagination/createPaginator.js new file mode 100644 index 0000000..d71f7a7 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/pagination/createPaginator.js @@ -0,0 +1,38 @@ +const makePagedClientRequest = async (CommandCtor, client, input, ...args) => { + return await client.send(new CommandCtor(input), ...args); +}; +export function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return async function* paginateOperation(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input[inputTokenName] = token; + if (pageSizeTokenName) { + input[pageSizeTokenName] = input[pageSizeTokenName] ?? config.pageSize; + } + if (config.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config.client, input, ...additionalArguments); + } + else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + return undefined; + }; +} +const get = (fromObject, path) => { + let cursor = fromObject; + const pathComponents = path.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return undefined; + } + cursor = cursor[step]; + } + return cursor; +}; diff --git a/node_modules/@smithy/core/dist-es/protocols/requestBuilder.js b/node_modules/@smithy/core/dist-es/protocols/requestBuilder.js new file mode 100644 index 0000000..f8e811e --- /dev/null +++ b/node_modules/@smithy/core/dist-es/protocols/requestBuilder.js @@ -0,0 +1,67 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import { resolvedPath } from "@smithy/smithy-client"; +export function requestBuilder(input, context) { + return new RequestBuilder(input, context); +} +export class RequestBuilder { + constructor(input, context) { + this.input = input; + this.context = context; + this.query = {}; + this.method = ""; + this.headers = {}; + this.path = ""; + this.body = null; + this.hostname = ""; + this.resolvePathStack = []; + } + async build() { + const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); + this.path = basePath; + for (const resolvePath of this.resolvePathStack) { + resolvePath(this.path); + } + return new HttpRequest({ + protocol, + hostname: this.hostname || hostname, + port, + method: this.method, + path: this.path, + query: this.query, + body: this.body, + headers: this.headers, + }); + } + hn(hostname) { + this.hostname = hostname; + return this; + } + bp(uriLabel) { + this.resolvePathStack.push((basePath) => { + this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + }); + return this; + } + p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { + this.resolvePathStack.push((path) => { + this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + }); + return this; + } + h(headers) { + this.headers = headers; + return this; + } + q(query) { + this.query = query; + return this; + } + b(body) { + this.body = body; + return this; + } + m(method) { + this.method = method; + return this; + } +} diff --git a/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js b/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js new file mode 100644 index 0000000..3bc1016 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js @@ -0,0 +1,13 @@ +export class DefaultIdentityProviderConfig { + constructor(config) { + this.authSchemes = new Map(); + for (const [key, value] of Object.entries(config)) { + if (value !== undefined) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } +} diff --git a/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js b/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js new file mode 100644 index 0000000..7b49992 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js @@ -0,0 +1,33 @@ +import { HttpApiKeyAuthLocation } from "@smithy/types"; +export class HttpApiKeyAuthSigner { + async sign(httpRequest, identity, signingProperties) { + if (!signingProperties) { + throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing"); + } + if (!signingProperties.name) { + throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); + } + if (!signingProperties.in) { + throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing"); + } + if (!identity.apiKey) { + throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); + } + const clonedRequest = httpRequest.clone(); + if (signingProperties.in === HttpApiKeyAuthLocation.QUERY) { + clonedRequest.query[signingProperties.name] = identity.apiKey; + } + else if (signingProperties.in === HttpApiKeyAuthLocation.HEADER) { + clonedRequest.headers[signingProperties.name] = signingProperties.scheme + ? `${signingProperties.scheme} ${identity.apiKey}` + : identity.apiKey; + } + else { + throw new Error("request can only be signed with `apiKey` locations `query` or `header`, " + + "but found: `" + + signingProperties.in + + "`"); + } + return clonedRequest; + } +} diff --git a/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js b/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js new file mode 100644 index 0000000..18ff4b8 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js @@ -0,0 +1,10 @@ +export class HttpBearerAuthSigner { + async sign(httpRequest, identity, signingProperties) { + const clonedRequest = httpRequest.clone(); + if (!identity.token) { + throw new Error("request could not be signed with `token` since the `token` is not defined"); + } + clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`; + return clonedRequest; + } +} diff --git a/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js b/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js new file mode 100644 index 0000000..9d240fe --- /dev/null +++ b/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js @@ -0,0 +1,3 @@ +export * from "./httpApiKeyAuth"; +export * from "./httpBearerAuth"; +export * from "./noAuth"; diff --git a/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js b/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js new file mode 100644 index 0000000..356193d --- /dev/null +++ b/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js @@ -0,0 +1,5 @@ +export class NoAuthSigner { + async sign(httpRequest, identity, signingProperties) { + return httpRequest; + } +} diff --git a/node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js b/node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js new file mode 100644 index 0000000..87ba64b --- /dev/null +++ b/node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js @@ -0,0 +1,3 @@ +export * from "./DefaultIdentityProviderConfig"; +export * from "./httpAuthSchemes"; +export * from "./memoizeIdentityProvider"; diff --git a/node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js b/node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js new file mode 100644 index 0000000..8050585 --- /dev/null +++ b/node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js @@ -0,0 +1,53 @@ +export const createIsIdentityExpiredFunction = (expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; +export const EXPIRATION_MS = 300000; +export const isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); +export const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined; +export const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { + if (provider === undefined) { + return undefined; + } + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async (options) => { + if (!pending) { + pending = normalizedProvider(options); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } + finally { + pending = undefined; + } + return resolved; + }; + if (isExpired === undefined) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; +}; diff --git a/node_modules/@smithy/core/dist-types/getSmithyContext.d.ts b/node_modules/@smithy/core/dist-types/getSmithyContext.d.ts new file mode 100644 index 0000000..523ee47 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/getSmithyContext.d.ts @@ -0,0 +1,5 @@ +import { HandlerExecutionContext } from "@smithy/types"; +/** + * @internal + */ +export declare const getSmithyContext: (context: HandlerExecutionContext) => Record; diff --git a/node_modules/@smithy/core/dist-types/index.d.ts b/node_modules/@smithy/core/dist-types/index.d.ts new file mode 100644 index 0000000..8081ce9 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/index.d.ts @@ -0,0 +1,7 @@ +export * from "./middleware-http-auth-scheme"; +export * from "./middleware-http-signing"; +export * from "./util-identity-and-auth"; +export * from "./getSmithyContext"; +export * from "./normalizeProvider"; +export * from "./protocols/requestBuilder"; +export { createPaginator } from "./pagination/createPaginator"; diff --git a/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts b/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts new file mode 100644 index 0000000..996b0de --- /dev/null +++ b/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts @@ -0,0 +1,18 @@ +import { HandlerExecutionContext, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, IdentityProviderConfig, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types"; +import { PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +/** + * @internal + */ +export declare const httpAuthSchemeEndpointRuleSetMiddlewareOptions: SerializeHandlerOptions & RelativeMiddlewareOptions; +/** + * @internal + */ +interface HttpAuthSchemeEndpointRuleSetPluginOptions { + httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider; + identityProviderConfigProvider: (config: TConfig) => Promise; +} +/** + * @internal + */ +export declare const getHttpAuthSchemeEndpointRuleSetPlugin: (config: TConfig & PreviouslyResolved, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }: HttpAuthSchemeEndpointRuleSetPluginOptions) => Pluggable; +export {}; diff --git a/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts b/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts new file mode 100644 index 0000000..2e57733 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts @@ -0,0 +1,18 @@ +import { HandlerExecutionContext, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, IdentityProviderConfig, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types"; +import { PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +/** + * @internal + */ +export declare const httpAuthSchemeMiddlewareOptions: SerializeHandlerOptions & RelativeMiddlewareOptions; +/** + * @internal + */ +interface HttpAuthSchemePluginOptions { + httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider; + identityProviderConfigProvider: (config: TConfig) => Promise; +} +/** + * @internal + */ +export declare const getHttpAuthSchemePlugin: (config: TConfig & PreviouslyResolved, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }: HttpAuthSchemePluginOptions) => Pluggable; +export {}; diff --git a/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts b/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts new file mode 100644 index 0000000..f71eb6e --- /dev/null +++ b/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts @@ -0,0 +1,32 @@ +import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, IdentityProviderConfig, SelectedHttpAuthScheme, SerializeMiddleware, SMITHY_CONTEXT_KEY } from "@smithy/types"; +/** + * @internal + */ +export interface PreviouslyResolved { + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: HttpAuthSchemeProvider; +} +/** + * @internal + */ +interface HttpAuthSchemeMiddlewareOptions { + httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider; + identityProviderConfigProvider: (config: TConfig) => Promise; +} +/** + * @internal + */ +interface HttpAuthSchemeMiddlewareSmithyContext extends Record { + selectedHttpAuthScheme?: SelectedHttpAuthScheme; +} +/** + * @internal + */ +interface HttpAuthSchemeMiddlewareHandlerExecutionContext extends HandlerExecutionContext { + [SMITHY_CONTEXT_KEY]?: HttpAuthSchemeMiddlewareSmithyContext; +} +/** + * @internal + */ +export declare const httpAuthSchemeMiddleware: (config: TConfig & PreviouslyResolved, mwOptions: HttpAuthSchemeMiddlewareOptions) => SerializeMiddleware; +export {}; diff --git a/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/index.d.ts b/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/index.d.ts new file mode 100644 index 0000000..5042e7d --- /dev/null +++ b/node_modules/@smithy/core/dist-types/middleware-http-auth-scheme/index.d.ts @@ -0,0 +1,3 @@ +export * from "./httpAuthSchemeMiddleware"; +export * from "./getHttpAuthSchemeEndpointRuleSetPlugin"; +export * from "./getHttpAuthSchemePlugin"; diff --git a/node_modules/@smithy/core/dist-types/middleware-http-signing/getHttpSigningMiddleware.d.ts b/node_modules/@smithy/core/dist-types/middleware-http-signing/getHttpSigningMiddleware.d.ts new file mode 100644 index 0000000..56c89a2 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/middleware-http-signing/getHttpSigningMiddleware.d.ts @@ -0,0 +1,9 @@ +import { FinalizeRequestHandlerOptions, Pluggable, RelativeMiddlewareOptions } from "@smithy/types"; +/** + * @internal + */ +export declare const httpSigningMiddlewareOptions: FinalizeRequestHandlerOptions & RelativeMiddlewareOptions; +/** + * @internal + */ +export declare const getHttpSigningPlugin: (config: object) => Pluggable; diff --git a/node_modules/@smithy/core/dist-types/middleware-http-signing/httpSigningMiddleware.d.ts b/node_modules/@smithy/core/dist-types/middleware-http-signing/httpSigningMiddleware.d.ts new file mode 100644 index 0000000..3b43611 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/middleware-http-signing/httpSigningMiddleware.d.ts @@ -0,0 +1,5 @@ +import { FinalizeRequestMiddleware } from "@smithy/types"; +/** + * @internal + */ +export declare const httpSigningMiddleware: (config: object) => FinalizeRequestMiddleware; diff --git a/node_modules/@smithy/core/dist-types/middleware-http-signing/index.d.ts b/node_modules/@smithy/core/dist-types/middleware-http-signing/index.d.ts new file mode 100644 index 0000000..7bc6cfe --- /dev/null +++ b/node_modules/@smithy/core/dist-types/middleware-http-signing/index.d.ts @@ -0,0 +1,2 @@ +export * from "./httpSigningMiddleware"; +export * from "./getHttpSigningMiddleware"; diff --git a/node_modules/@smithy/core/dist-types/normalizeProvider.d.ts b/node_modules/@smithy/core/dist-types/normalizeProvider.d.ts new file mode 100644 index 0000000..4fe2d9a --- /dev/null +++ b/node_modules/@smithy/core/dist-types/normalizeProvider.d.ts @@ -0,0 +1,7 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + * + * @returns a provider function for the input value if it isn't already one. + */ +export declare const normalizeProvider: (input: T | Provider) => Provider; diff --git a/node_modules/@smithy/core/dist-types/pagination/createPaginator.d.ts b/node_modules/@smithy/core/dist-types/pagination/createPaginator.d.ts new file mode 100644 index 0000000..78fcbe0 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/pagination/createPaginator.d.ts @@ -0,0 +1,7 @@ +import type { PaginationConfiguration, Paginator } from "@smithy/types"; +/** + * @internal + * + * Creates a paginator. + */ +export declare function createPaginator(ClientCtor: any, CommandCtor: any, inputTokenName: string, outputTokenName: string, pageSizeTokenName?: string): (config: PaginationConfigType, input: InputType, ...additionalArguments: any[]) => Paginator; diff --git a/node_modules/@smithy/core/dist-types/protocols/requestBuilder.d.ts b/node_modules/@smithy/core/dist-types/protocols/requestBuilder.d.ts new file mode 100644 index 0000000..3013d8a --- /dev/null +++ b/node_modules/@smithy/core/dist-types/protocols/requestBuilder.d.ts @@ -0,0 +1,51 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import type { SerdeContext } from "@smithy/types"; +/** + * @internal + * used in code-generated serde. + */ +export declare function requestBuilder(input: any, context: SerdeContext): RequestBuilder; +/** + * @internal + */ +export declare class RequestBuilder { + private input; + private context; + private query; + private method; + private headers; + private path; + private body; + private hostname; + private resolvePathStack; + constructor(input: any, context: SerdeContext); + build(): Promise; + /** + * Brevity setter for "hostname". + */ + hn(hostname: string): this; + /** + * Brevity initial builder for "basepath". + */ + bp(uriLabel: string): this; + /** + * Brevity incremental builder for "path". + */ + p(memberName: string, labelValueProvider: () => string | undefined, uriLabel: string, isGreedyLabel: boolean): this; + /** + * Brevity setter for "headers". + */ + h(headers: Record): this; + /** + * Brevity setter for "query". + */ + q(query: Record): this; + /** + * Brevity setter for "body". + */ + b(body: any): this; + /** + * Brevity setter for "method". + */ + m(method: string): this; +} diff --git a/node_modules/@smithy/core/dist-types/ts3.4/getSmithyContext.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/getSmithyContext.d.ts new file mode 100644 index 0000000..14cd7c4 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/getSmithyContext.d.ts @@ -0,0 +1,5 @@ +import { HandlerExecutionContext } from "@smithy/types"; +/** + * @internal + */ +export declare const getSmithyContext: (context: HandlerExecutionContext) => Record; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..56c4f32 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/index.d.ts @@ -0,0 +1,7 @@ +export * from "./middleware-http-auth-scheme"; +export * from "./middleware-http-signing"; +export * from "./util-identity-and-auth"; +export * from "./getSmithyContext"; +export * from "./normalizeProvider"; +export * from "./protocols/requestBuilder"; +export { createPaginator } from "./pagination/createPaginator"; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts new file mode 100644 index 0000000..27e2e26 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.d.ts @@ -0,0 +1,18 @@ +import { HandlerExecutionContext, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, IdentityProviderConfig, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types"; +import { PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +/** + * @internal + */ +export declare const httpAuthSchemeEndpointRuleSetMiddlewareOptions: SerializeHandlerOptions & RelativeMiddlewareOptions; +/** + * @internal + */ +interface HttpAuthSchemeEndpointRuleSetPluginOptions { + httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider; + identityProviderConfigProvider: (config: TConfig) => Promise; +} +/** + * @internal + */ +export declare const getHttpAuthSchemeEndpointRuleSetPlugin: (config: TConfig & PreviouslyResolved, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }: HttpAuthSchemeEndpointRuleSetPluginOptions) => Pluggable; +export {}; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts new file mode 100644 index 0000000..531e6ec --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/getHttpAuthSchemePlugin.d.ts @@ -0,0 +1,18 @@ +import { HandlerExecutionContext, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, IdentityProviderConfig, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types"; +import { PreviouslyResolved } from "./httpAuthSchemeMiddleware"; +/** + * @internal + */ +export declare const httpAuthSchemeMiddlewareOptions: SerializeHandlerOptions & RelativeMiddlewareOptions; +/** + * @internal + */ +interface HttpAuthSchemePluginOptions { + httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider; + identityProviderConfigProvider: (config: TConfig) => Promise; +} +/** + * @internal + */ +export declare const getHttpAuthSchemePlugin: (config: TConfig & PreviouslyResolved, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }: HttpAuthSchemePluginOptions) => Pluggable; +export {}; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts new file mode 100644 index 0000000..e8b7e94 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/httpAuthSchemeMiddleware.d.ts @@ -0,0 +1,32 @@ +import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, IdentityProviderConfig, SelectedHttpAuthScheme, SerializeMiddleware, SMITHY_CONTEXT_KEY } from "@smithy/types"; +/** + * @internal + */ +export interface PreviouslyResolved { + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: HttpAuthSchemeProvider; +} +/** + * @internal + */ +interface HttpAuthSchemeMiddlewareOptions { + httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider; + identityProviderConfigProvider: (config: TConfig) => Promise; +} +/** + * @internal + */ +interface HttpAuthSchemeMiddlewareSmithyContext extends Record { + selectedHttpAuthScheme?: SelectedHttpAuthScheme; +} +/** + * @internal + */ +interface HttpAuthSchemeMiddlewareHandlerExecutionContext extends HandlerExecutionContext { + [SMITHY_CONTEXT_KEY]?: HttpAuthSchemeMiddlewareSmithyContext; +} +/** + * @internal + */ +export declare const httpAuthSchemeMiddleware: (config: TConfig & PreviouslyResolved, mwOptions: HttpAuthSchemeMiddlewareOptions) => SerializeMiddleware; +export {}; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/index.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/index.d.ts new file mode 100644 index 0000000..2f275c5 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-auth-scheme/index.d.ts @@ -0,0 +1,3 @@ +export * from "./httpAuthSchemeMiddleware"; +export * from "./getHttpAuthSchemeEndpointRuleSetPlugin"; +export * from "./getHttpAuthSchemePlugin"; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/getHttpSigningMiddleware.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/getHttpSigningMiddleware.d.ts new file mode 100644 index 0000000..a01bb31 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/getHttpSigningMiddleware.d.ts @@ -0,0 +1,9 @@ +import { FinalizeRequestHandlerOptions, Pluggable, RelativeMiddlewareOptions } from "@smithy/types"; +/** + * @internal + */ +export declare const httpSigningMiddlewareOptions: FinalizeRequestHandlerOptions & RelativeMiddlewareOptions; +/** + * @internal + */ +export declare const getHttpSigningPlugin: (config: object) => Pluggable; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/httpSigningMiddleware.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/httpSigningMiddleware.d.ts new file mode 100644 index 0000000..7a86b0b --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/httpSigningMiddleware.d.ts @@ -0,0 +1,5 @@ +import { FinalizeRequestMiddleware } from "@smithy/types"; +/** + * @internal + */ +export declare const httpSigningMiddleware: (config: object) => FinalizeRequestMiddleware; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/index.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/index.d.ts new file mode 100644 index 0000000..578f26d --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/middleware-http-signing/index.d.ts @@ -0,0 +1,2 @@ +export * from "./httpSigningMiddleware"; +export * from "./getHttpSigningMiddleware"; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/normalizeProvider.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/normalizeProvider.d.ts new file mode 100644 index 0000000..594e8fa --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/normalizeProvider.d.ts @@ -0,0 +1,7 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + * + * @returns a provider function for the input value if it isn't already one. + */ +export declare const normalizeProvider: (input: T | Provider) => Provider; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/pagination/createPaginator.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/pagination/createPaginator.d.ts new file mode 100644 index 0000000..50400d8 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/pagination/createPaginator.d.ts @@ -0,0 +1,7 @@ +import { PaginationConfiguration, Paginator } from "@smithy/types"; +/** + * @internal + * + * Creates a paginator. + */ +export declare function createPaginator(ClientCtor: any, CommandCtor: any, inputTokenName: string, outputTokenName: string, pageSizeTokenName?: string): (config: PaginationConfigType, input: InputType, ...additionalArguments: any[]) => Paginator; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/protocols/requestBuilder.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/protocols/requestBuilder.d.ts new file mode 100644 index 0000000..0449354 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/protocols/requestBuilder.d.ts @@ -0,0 +1,51 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import { SerdeContext } from "@smithy/types"; +/** + * @internal + * used in code-generated serde. + */ +export declare function requestBuilder(input: any, context: SerdeContext): RequestBuilder; +/** + * @internal + */ +export declare class RequestBuilder { + private input; + private context; + private query; + private method; + private headers; + private path; + private body; + private hostname; + private resolvePathStack; + constructor(input: any, context: SerdeContext); + build(): Promise; + /** + * Brevity setter for "hostname". + */ + hn(hostname: string): this; + /** + * Brevity initial builder for "basepath". + */ + bp(uriLabel: string): this; + /** + * Brevity incremental builder for "path". + */ + p(memberName: string, labelValueProvider: () => string | undefined, uriLabel: string, isGreedyLabel: boolean): this; + /** + * Brevity setter for "headers". + */ + h(headers: Record): this; + /** + * Brevity setter for "query". + */ + q(query: Record): this; + /** + * Brevity setter for "body". + */ + b(body: any): this; + /** + * Brevity setter for "method". + */ + m(method: string): this; +} diff --git a/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts new file mode 100644 index 0000000..7e80659 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts @@ -0,0 +1,15 @@ +import { HttpAuthSchemeId, Identity, IdentityProvider, IdentityProviderConfig } from "@smithy/types"; +/** + * Default implementation of IdentityProviderConfig + * @internal + */ +export declare class DefaultIdentityProviderConfig implements IdentityProviderConfig { + private authSchemes; + /** + * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers. + * + * @param config scheme IDs and identity providers to configure + */ + constructor(config: Record | undefined>); + getIdentityProvider(schemeId: HttpAuthSchemeId): IdentityProvider | undefined; +} diff --git a/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts new file mode 100644 index 0000000..3981a1b --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts @@ -0,0 +1,8 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import { ApiKeyIdentity, HttpRequest as IHttpRequest, HttpSigner } from "@smithy/types"; +/** + * @internal + */ +export declare class HttpApiKeyAuthSigner implements HttpSigner { + sign(httpRequest: HttpRequest, identity: ApiKeyIdentity, signingProperties: Record): Promise; +} diff --git a/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts new file mode 100644 index 0000000..9c83b1c --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts @@ -0,0 +1,8 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import { HttpRequest as IHttpRequest, HttpSigner, TokenIdentity } from "@smithy/types"; +/** + * @internal + */ +export declare class HttpBearerAuthSigner implements HttpSigner { + sign(httpRequest: HttpRequest, identity: TokenIdentity, signingProperties: Record): Promise; +} diff --git a/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/index.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/index.d.ts new file mode 100644 index 0000000..aa5caa8 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/index.d.ts @@ -0,0 +1,3 @@ +export * from "./httpApiKeyAuth"; +export * from "./httpBearerAuth"; +export * from "./noAuth"; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts new file mode 100644 index 0000000..0d7b612 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts @@ -0,0 +1,8 @@ +import { HttpRequest, HttpSigner, Identity } from "@smithy/types"; +/** + * Signer for the synthetic @smithy.api#noAuth auth scheme. + * @internal + */ +export declare class NoAuthSigner implements HttpSigner { + sign(httpRequest: HttpRequest, identity: Identity, signingProperties: Record): Promise; +} diff --git a/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/index.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/index.d.ts new file mode 100644 index 0000000..626ade9 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/index.d.ts @@ -0,0 +1,3 @@ +export * from "./DefaultIdentityProviderConfig"; +export * from "./httpAuthSchemes"; +export * from "./memoizeIdentityProvider"; diff --git a/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/memoizeIdentityProvider.d.ts b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/memoizeIdentityProvider.d.ts new file mode 100644 index 0000000..270aa71 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/ts3.4/util-identity-and-auth/memoizeIdentityProvider.d.ts @@ -0,0 +1,30 @@ +import { Identity, IdentityProvider } from "@smithy/types"; +/** + * @internal + */ +export declare const createIsIdentityExpiredFunction: (expirationMs: number) => (identity: Identity) => boolean; +/** + * @internal + * This may need to be configurable in the future, but for now it is defaulted to 5min. + */ +export declare const EXPIRATION_MS = 300000; +/** + * @internal + */ +export declare const isIdentityExpired: (identity: Identity) => boolean; +/** + * @internal + */ +export declare const doesIdentityRequireRefresh: (identity: Identity) => boolean; +/** + * @internal + */ +export interface MemoizedIdentityProvider { + (options?: Record & { + forceRefresh?: boolean; + }): Promise; +} +/** + * @internal + */ +export declare const memoizeIdentityProvider: (provider: IdentityT | IdentityProvider | undefined, isExpired: (resolved: Identity) => boolean, requiresRefresh: (resolved: Identity) => boolean) => MemoizedIdentityProvider | undefined; diff --git a/node_modules/@smithy/core/dist-types/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts b/node_modules/@smithy/core/dist-types/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts new file mode 100644 index 0000000..0b39204 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/util-identity-and-auth/DefaultIdentityProviderConfig.d.ts @@ -0,0 +1,15 @@ +import { HttpAuthSchemeId, Identity, IdentityProvider, IdentityProviderConfig } from "@smithy/types"; +/** + * Default implementation of IdentityProviderConfig + * @internal + */ +export declare class DefaultIdentityProviderConfig implements IdentityProviderConfig { + private authSchemes; + /** + * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers. + * + * @param config scheme IDs and identity providers to configure + */ + constructor(config: Record | undefined>); + getIdentityProvider(schemeId: HttpAuthSchemeId): IdentityProvider | undefined; +} diff --git a/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts b/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts new file mode 100644 index 0000000..63de4bc --- /dev/null +++ b/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.d.ts @@ -0,0 +1,8 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import { ApiKeyIdentity, HttpRequest as IHttpRequest, HttpSigner } from "@smithy/types"; +/** + * @internal + */ +export declare class HttpApiKeyAuthSigner implements HttpSigner { + sign(httpRequest: HttpRequest, identity: ApiKeyIdentity, signingProperties: Record): Promise; +} diff --git a/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts b/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts new file mode 100644 index 0000000..0e31e7d --- /dev/null +++ b/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.d.ts @@ -0,0 +1,8 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import { HttpRequest as IHttpRequest, HttpSigner, TokenIdentity } from "@smithy/types"; +/** + * @internal + */ +export declare class HttpBearerAuthSigner implements HttpSigner { + sign(httpRequest: HttpRequest, identity: TokenIdentity, signingProperties: Record): Promise; +} diff --git a/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/index.d.ts b/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/index.d.ts new file mode 100644 index 0000000..9d240fe --- /dev/null +++ b/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/index.d.ts @@ -0,0 +1,3 @@ +export * from "./httpApiKeyAuth"; +export * from "./httpBearerAuth"; +export * from "./noAuth"; diff --git a/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts b/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts new file mode 100644 index 0000000..fc8d6b1 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/util-identity-and-auth/httpAuthSchemes/noAuth.d.ts @@ -0,0 +1,8 @@ +import { HttpRequest, HttpSigner, Identity } from "@smithy/types"; +/** + * Signer for the synthetic @smithy.api#noAuth auth scheme. + * @internal + */ +export declare class NoAuthSigner implements HttpSigner { + sign(httpRequest: HttpRequest, identity: Identity, signingProperties: Record): Promise; +} diff --git a/node_modules/@smithy/core/dist-types/util-identity-and-auth/index.d.ts b/node_modules/@smithy/core/dist-types/util-identity-and-auth/index.d.ts new file mode 100644 index 0000000..87ba64b --- /dev/null +++ b/node_modules/@smithy/core/dist-types/util-identity-and-auth/index.d.ts @@ -0,0 +1,3 @@ +export * from "./DefaultIdentityProviderConfig"; +export * from "./httpAuthSchemes"; +export * from "./memoizeIdentityProvider"; diff --git a/node_modules/@smithy/core/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts b/node_modules/@smithy/core/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts new file mode 100644 index 0000000..67b3be8 --- /dev/null +++ b/node_modules/@smithy/core/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts @@ -0,0 +1,30 @@ +import { Identity, IdentityProvider } from "@smithy/types"; +/** + * @internal + */ +export declare const createIsIdentityExpiredFunction: (expirationMs: number) => (identity: Identity) => boolean; +/** + * @internal + * This may need to be configurable in the future, but for now it is defaulted to 5min. + */ +export declare const EXPIRATION_MS = 300000; +/** + * @internal + */ +export declare const isIdentityExpired: (identity: Identity) => boolean; +/** + * @internal + */ +export declare const doesIdentityRequireRefresh: (identity: Identity) => boolean; +/** + * @internal + */ +export interface MemoizedIdentityProvider { + (options?: Record & { + forceRefresh?: boolean; + }): Promise; +} +/** + * @internal + */ +export declare const memoizeIdentityProvider: (provider: IdentityT | IdentityProvider | undefined, isExpired: (resolved: Identity) => boolean, requiresRefresh: (resolved: Identity) => boolean) => MemoizedIdentityProvider | undefined; diff --git a/node_modules/@smithy/core/package.json b/node_modules/@smithy/core/package.json new file mode 100644 index 0000000..dcba9ad --- /dev/null +++ b/node_modules/@smithy/core/package.json @@ -0,0 +1,67 @@ +{ + "name": "@smithy/core", + "version": "1.4.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline core", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS Smithy Team", + "email": "", + "url": "https://smithy.io" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-retry": "^2.2.0", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/core", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/core" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/LICENSE b/node_modules/@smithy/credential-provider-imds/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/README.md b/node_modules/@smithy/credential-provider-imds/README.md new file mode 100644 index 0000000..9a8f8a5 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/README.md @@ -0,0 +1,11 @@ +# @smithy/credential-provider-imds + +[![NPM version](https://img.shields.io/npm/v/@smithy/credential-provider-imds/latest.svg)](https://www.npmjs.com/package/@smithy/credential-provider-imds) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/credential-provider-imds.svg)](https://www.npmjs.com/package/@smithy/credential-provider-imds) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. Please use [@smithy/credential-providers](https://www.npmjs.com/package/@smithy/credential-providers) +instead. diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/config/Endpoint.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/config/Endpoint.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/config/Endpoint.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointConfigOptions.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointConfigOptions.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointConfigOptions.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointMode.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointMode.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointMode.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointModeConfigOptions.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointModeConfigOptions.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointModeConfigOptions.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/error/InstanceMetadataV1FallbackError.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/error/InstanceMetadataV1FallbackError.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/error/InstanceMetadataV1FallbackError.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/fromContainerMetadata.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/fromContainerMetadata.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/fromContainerMetadata.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/fromInstanceMetadata.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/fromInstanceMetadata.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/fromInstanceMetadata.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js new file mode 100644 index 0000000..7f285bc --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js @@ -0,0 +1,437 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, + DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, + ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, + ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI, + ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI, + Endpoint: () => Endpoint, + fromContainerMetadata: () => fromContainerMetadata, + fromInstanceMetadata: () => fromInstanceMetadata, + getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint, + httpRequest: () => httpRequest, + providerConfigFromInit: () => providerConfigFromInit +}); +module.exports = __toCommonJS(src_exports); + +// src/fromContainerMetadata.ts + +var import_url = require("url"); + +// src/remoteProvider/httpRequest.ts +var import_property_provider = require("@smithy/property-provider"); +var import_buffer = require("buffer"); +var import_http = require("http"); +function httpRequest(options) { + return new Promise((resolve, reject) => { + var _a; + const req = (0, import_http.request)({ + method: "GET", + ...options, + // Node.js http module doesn't accept hostname with square brackets + // Refs: https://github.com/nodejs/node/issues/39738 + hostname: (_a = options.hostname) == null ? void 0 : _a.replace(/^\[(.+)\]$/, "$1") + }); + req.on("error", (err) => { + reject(Object.assign(new import_property_provider.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new import_property_provider.ProviderError("TimeoutError from instance metadata service")); + req.destroy(); + }); + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || 300 <= statusCode) { + reject( + Object.assign(new import_property_provider.ProviderError("Error response received from instance metadata service"), { statusCode }) + ); + req.destroy(); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(import_buffer.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); +} +__name(httpRequest, "httpRequest"); + +// src/remoteProvider/ImdsCredentials.ts +var isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials"); +var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration) +}), "fromImdsCredentials"); + +// src/remoteProvider/RemoteProviderInit.ts +var DEFAULT_TIMEOUT = 1e3; +var DEFAULT_MAX_RETRIES = 0; +var providerConfigFromInit = /* @__PURE__ */ __name(({ + maxRetries = DEFAULT_MAX_RETRIES, + timeout = DEFAULT_TIMEOUT +}) => ({ maxRetries, timeout }), "providerConfigFromInit"); + +// src/remoteProvider/retry.ts +var retry = /* @__PURE__ */ __name((toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0; i < maxRetries; i++) { + promise = promise.catch(toRetry); + } + return promise; +}, "retry"); + +// src/fromContainerMetadata.ts +var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +var fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => { + const { timeout, maxRetries } = providerConfigFromInit(init); + return () => retry(async () => { + const requestOptions = await getCmdsUri(); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!isImdsCredentials(credsResponse)) { + throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service."); + } + return fromImdsCredentials(credsResponse); + }, maxRetries); +}, "fromContainerMetadata"); +var requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => { + if (process.env[ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[ENV_CMDS_AUTH_TOKEN] + }; + } + const buffer = await httpRequest({ + ...options, + timeout + }); + return buffer.toString(); +}, "requestFromEcsImds"); +var CMDS_IP = "169.254.170.2"; +var GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true +}; +var GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true +}; +var getCmdsUri = /* @__PURE__ */ __name(async () => { + if (process.env[ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[ENV_CMDS_RELATIVE_URI] + }; + } + if (process.env[ENV_CMDS_FULL_URI]) { + const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new import_property_provider.CredentialsProviderError( + `${parsed.hostname} is not a valid container metadata service hostname`, + false + ); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new import_property_provider.CredentialsProviderError( + `${parsed.protocol} is not a valid container metadata service protocol`, + false + ); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : void 0 + }; + } + throw new import_property_provider.CredentialsProviderError( + `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, + false + ); +}, "getCmdsUri"); + +// src/fromInstanceMetadata.ts + + + +// src/error/InstanceMetadataV1FallbackError.ts + +var _InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends import_property_provider.CredentialsProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "InstanceMetadataV1FallbackError"; + Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype); + } +}; +__name(_InstanceMetadataV1FallbackError, "InstanceMetadataV1FallbackError"); +var InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError; + +// src/utils/getInstanceMetadataEndpoint.ts +var import_node_config_provider = require("@smithy/node-config-provider"); +var import_url_parser = require("@smithy/url-parser"); + +// src/config/Endpoint.ts +var Endpoint = /* @__PURE__ */ ((Endpoint2) => { + Endpoint2["IPv4"] = "http://169.254.169.254"; + Endpoint2["IPv6"] = "http://[fd00:ec2::254]"; + return Endpoint2; +})(Endpoint || {}); + +// src/config/EndpointConfigOptions.ts +var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; +var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; +var ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + default: void 0 +}; + +// src/config/EndpointMode.ts +var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { + EndpointMode2["IPv4"] = "IPv4"; + EndpointMode2["IPv6"] = "IPv6"; + return EndpointMode2; +})(EndpointMode || {}); + +// src/config/EndpointModeConfigOptions.ts +var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; +var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; +var ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + default: "IPv4" /* IPv4 */ +}; + +// src/utils/getInstanceMetadataEndpoint.ts +var getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint"); +var getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig"); +var getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => { + const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case "IPv4" /* IPv4 */: + return "http://169.254.169.254" /* IPv4 */; + case "IPv6" /* IPv6 */: + return "http://[fd00:ec2::254]" /* IPv6 */; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); + } +}, "getFromEndpointModeConfig"); + +// src/utils/getExtendedInstanceMetadataCredentials.ts +var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; +var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; +var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; +var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => { + const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); + const newExpiration = new Date(Date.now() + refreshInterval * 1e3); + logger.warn( + `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}. +For more information, please visit: ` + STATIC_STABILITY_DOC_URL + ); + const originalExpiration = credentials.originalExpiration ?? credentials.expiration; + return { + ...credentials, + ...originalExpiration ? { originalExpiration } : {}, + expiration: newExpiration + }; +}, "getExtendedInstanceMetadataCredentials"); + +// src/utils/staticStabilityProvider.ts +var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => { + const logger = (options == null ? void 0 : options.logger) || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = getExtendedInstanceMetadataCredentials(credentials, logger); + } + } catch (e) { + if (pastCredentials) { + logger.warn("Credential renew failed: ", e); + credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger); + } else { + throw e; + } + } + pastCredentials = credentials; + return credentials; + }; +}, "staticStabilityProvider"); + +// src/fromInstanceMetadata.ts +var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; +var IMDS_TOKEN_PATH = "/latest/api/token"; +var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; +var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; +var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; +var fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceImdsProvider(init), { logger: init.logger }), "fromInstanceMetadata"); +var getInstanceImdsProvider = /* @__PURE__ */ __name((init) => { + let disableFetchToken = false; + const { logger, profile } = init; + const { timeout, maxRetries } = providerConfigFromInit(init); + const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => { + var _a; + const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) == null ? void 0 : _a[X_AWS_EC2_METADATA_TOKEN]) == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await (0, import_node_config_provider.loadConfig)( + { + environmentVariableSelector: (env) => { + const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === void 0) { + throw new import_property_provider.CredentialsProviderError( + `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.` + ); + } + return fallbackBlockedFromProcessEnv; + }, + configFileSelector: (profile2) => { + const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; + return fallbackBlockedFromProfile; + }, + default: false + }, + { + profile + } + )(); + if (init.ec2MetadataV1Disabled || configValue) { + const causes = []; + if (init.ec2MetadataV1Disabled) + causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); + if (fallbackBlockedFromProfile) + causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProcessEnv) + causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); + throw new InstanceMetadataV1FallbackError( + `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join( + ", " + )}].` + ); + } + } + const imdsProfile = (await retry(async () => { + let profile2; + try { + profile2 = await getProfile(options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return profile2; + }, maxRetries2)).trim(); + return retry(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries2); + }, "getCredentials"); + return async () => { + const endpoint = await getInstanceMetadataEndpoint(); + if (disableFetchToken) { + logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } catch (error) { + if ((error == null ? void 0 : error.statusCode) === 400) { + throw Object.assign(error, { + message: "EC2 Metadata token request returned error" + }); + } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { + disableFetchToken = true; + } + logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token + }, + timeout + }); + } + }; +}, "getInstanceImdsProvider"); +var getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600" + } +}), "getMetadataToken"); +var getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile"); +var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options) => { + const credsResponse = JSON.parse( + (await httpRequest({ + ...options, + path: IMDS_PATH + profile + })).toString() + ); + if (!isImdsCredentials(credsResponse)) { + throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service."); + } + return fromImdsCredentials(credsResponse); +}, "getCredentialsFromProfile"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + httpRequest, + getInstanceMetadataEndpoint, + Endpoint, + ENV_CMDS_FULL_URI, + ENV_CMDS_RELATIVE_URI, + ENV_CMDS_AUTH_TOKEN, + fromContainerMetadata, + fromInstanceMetadata, + DEFAULT_TIMEOUT, + DEFAULT_MAX_RETRIES, + providerConfigFromInit +}); + diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/ImdsCredentials.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/ImdsCredentials.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/ImdsCredentials.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/RemoteProviderInit.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/RemoteProviderInit.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/RemoteProviderInit.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/httpRequest.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/httpRequest.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/httpRequest.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/index.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/retry.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/retry.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/retry.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/types.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/types.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/types.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getExtendedInstanceMetadataCredentials.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getExtendedInstanceMetadataCredentials.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getExtendedInstanceMetadataCredentials.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getInstanceMetadataEndpoint.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getInstanceMetadataEndpoint.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getInstanceMetadataEndpoint.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/staticStabilityProvider.js b/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/staticStabilityProvider.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/staticStabilityProvider.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/config/Endpoint.js b/node_modules/@smithy/credential-provider-imds/dist-es/config/Endpoint.js new file mode 100644 index 0000000..b088eb0 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/config/Endpoint.js @@ -0,0 +1,5 @@ +export var Endpoint; +(function (Endpoint) { + Endpoint["IPv4"] = "http://169.254.169.254"; + Endpoint["IPv6"] = "http://[fd00:ec2::254]"; +})(Endpoint || (Endpoint = {})); diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointConfigOptions.js b/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointConfigOptions.js new file mode 100644 index 0000000..f043de9 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointConfigOptions.js @@ -0,0 +1,7 @@ +export const ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; +export const CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; +export const ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + default: undefined, +}; diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointMode.js b/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointMode.js new file mode 100644 index 0000000..bace819 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointMode.js @@ -0,0 +1,5 @@ +export var EndpointMode; +(function (EndpointMode) { + EndpointMode["IPv4"] = "IPv4"; + EndpointMode["IPv6"] = "IPv6"; +})(EndpointMode || (EndpointMode = {})); diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointModeConfigOptions.js b/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointModeConfigOptions.js new file mode 100644 index 0000000..15b19d0 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointModeConfigOptions.js @@ -0,0 +1,8 @@ +import { EndpointMode } from "./EndpointMode"; +export const ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; +export const CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; +export const ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + default: EndpointMode.IPv4, +}; diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js b/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js new file mode 100644 index 0000000..29aaf50 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js @@ -0,0 +1,9 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +export class InstanceMetadataV1FallbackError extends CredentialsProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "InstanceMetadataV1FallbackError"; + Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype); + } +} diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js b/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js new file mode 100644 index 0000000..25a53f4 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js @@ -0,0 +1,66 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +import { parse } from "url"; +import { httpRequest } from "./remoteProvider/httpRequest"; +import { fromImdsCredentials, isImdsCredentials } from "./remoteProvider/ImdsCredentials"; +import { providerConfigFromInit } from "./remoteProvider/RemoteProviderInit"; +import { retry } from "./remoteProvider/retry"; +export const ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +export const ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +export const ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +export const fromContainerMetadata = (init = {}) => { + const { timeout, maxRetries } = providerConfigFromInit(init); + return () => retry(async () => { + const requestOptions = await getCmdsUri(); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!isImdsCredentials(credsResponse)) { + throw new CredentialsProviderError("Invalid response received from instance metadata service."); + } + return fromImdsCredentials(credsResponse); + }, maxRetries); +}; +const requestFromEcsImds = async (timeout, options) => { + if (process.env[ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[ENV_CMDS_AUTH_TOKEN], + }; + } + const buffer = await httpRequest({ + ...options, + timeout, + }); + return buffer.toString(); +}; +const CMDS_IP = "169.254.170.2"; +const GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true, +}; +const GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true, +}; +const getCmdsUri = async () => { + if (process.env[ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[ENV_CMDS_RELATIVE_URI], + }; + } + if (process.env[ENV_CMDS_FULL_URI]) { + const parsed = parse(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, false); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, false); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : undefined, + }; + } + throw new CredentialsProviderError("The container metadata credential provider cannot be used unless" + + ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` + + " variable is set", false); +}; diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js b/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js new file mode 100644 index 0000000..bbdf566 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js @@ -0,0 +1,132 @@ +import { loadConfig } from "@smithy/node-config-provider"; +import { CredentialsProviderError } from "@smithy/property-provider"; +import { InstanceMetadataV1FallbackError } from "./error/InstanceMetadataV1FallbackError"; +import { httpRequest } from "./remoteProvider/httpRequest"; +import { fromImdsCredentials, isImdsCredentials } from "./remoteProvider/ImdsCredentials"; +import { providerConfigFromInit } from "./remoteProvider/RemoteProviderInit"; +import { retry } from "./remoteProvider/retry"; +import { getInstanceMetadataEndpoint } from "./utils/getInstanceMetadataEndpoint"; +import { staticStabilityProvider } from "./utils/staticStabilityProvider"; +const IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; +const IMDS_TOKEN_PATH = "/latest/api/token"; +const AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; +const PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; +const X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; +export const fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceImdsProvider(init), { logger: init.logger }); +const getInstanceImdsProvider = (init) => { + let disableFetchToken = false; + const { logger, profile } = init; + const { timeout, maxRetries } = providerConfigFromInit(init); + const getCredentials = async (maxRetries, options) => { + const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await loadConfig({ + environmentVariableSelector: (env) => { + const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === undefined) { + throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`); + } + return fallbackBlockedFromProcessEnv; + }, + configFileSelector: (profile) => { + const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; + return fallbackBlockedFromProfile; + }, + default: false, + }, { + profile, + })(); + if (init.ec2MetadataV1Disabled || configValue) { + const causes = []; + if (init.ec2MetadataV1Disabled) + causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); + if (fallbackBlockedFromProfile) + causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProcessEnv) + causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); + throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(", ")}].`); + } + } + const imdsProfile = (await retry(async () => { + let profile; + try { + profile = await getProfile(options); + } + catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return profile; + }, maxRetries)).trim(); + return retry(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options); + } + catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries); + }; + return async () => { + const endpoint = await getInstanceMetadataEndpoint(); + if (disableFetchToken) { + logger?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } + catch (error) { + if (error?.statusCode === 400) { + throw Object.assign(error, { + message: "EC2 Metadata token request returned error", + }); + } + else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { + disableFetchToken = true; + } + logger?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token, + }, + timeout, + }); + } + }; +}; +const getMetadataToken = async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600", + }, +}); +const getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(); +const getCredentialsFromProfile = async (profile, options) => { + const credsResponse = JSON.parse((await httpRequest({ + ...options, + path: IMDS_PATH + profile, + })).toString()); + if (!isImdsCredentials(credsResponse)) { + throw new CredentialsProviderError("Invalid response received from instance metadata service."); + } + return fromImdsCredentials(credsResponse); +}; diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/index.js b/node_modules/@smithy/credential-provider-imds/dist-es/index.js new file mode 100644 index 0000000..5362760 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/index.js @@ -0,0 +1,7 @@ +export * from "./fromContainerMetadata"; +export * from "./fromInstanceMetadata"; +export * from "./remoteProvider/RemoteProviderInit"; +export * from "./types"; +export { httpRequest } from "./remoteProvider/httpRequest"; +export { getInstanceMetadataEndpoint } from "./utils/getInstanceMetadataEndpoint"; +export { Endpoint } from "./config/Endpoint"; diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js b/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js new file mode 100644 index 0000000..bcd65ed --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js @@ -0,0 +1,12 @@ +export const isImdsCredentials = (arg) => Boolean(arg) && + typeof arg === "object" && + typeof arg.AccessKeyId === "string" && + typeof arg.SecretAccessKey === "string" && + typeof arg.Token === "string" && + typeof arg.Expiration === "string"; +export const fromImdsCredentials = (creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), +}); diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js b/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js new file mode 100644 index 0000000..39ace38 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js @@ -0,0 +1,3 @@ +export const DEFAULT_TIMEOUT = 1000; +export const DEFAULT_MAX_RETRIES = 0; +export const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout }); diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js b/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js new file mode 100644 index 0000000..91742d0 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js @@ -0,0 +1,36 @@ +import { ProviderError } from "@smithy/property-provider"; +import { Buffer } from "buffer"; +import { request } from "http"; +export function httpRequest(options) { + return new Promise((resolve, reject) => { + const req = request({ + method: "GET", + ...options, + hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1"), + }); + req.on("error", (err) => { + reject(Object.assign(new ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new ProviderError("TimeoutError from instance metadata service")); + req.destroy(); + }); + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || 300 <= statusCode) { + reject(Object.assign(new ProviderError("Error response received from instance metadata service"), { statusCode })); + req.destroy(); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); +} diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/index.js b/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/index.js new file mode 100644 index 0000000..d4ad601 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/index.js @@ -0,0 +1,2 @@ +export * from "./ImdsCredentials"; +export * from "./RemoteProviderInit"; diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js b/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js new file mode 100644 index 0000000..22b79bb --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js @@ -0,0 +1,7 @@ +export const retry = (toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0; i < maxRetries; i++) { + promise = promise.catch(toRetry); + } + return promise; +}; diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/types.js b/node_modules/@smithy/credential-provider-imds/dist-es/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js b/node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js new file mode 100644 index 0000000..5614692 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js @@ -0,0 +1,17 @@ +const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; +const STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; +const STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; +export const getExtendedInstanceMetadataCredentials = (credentials, logger) => { + const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); + const newExpiration = new Date(Date.now() + refreshInterval * 1000); + logger.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these " + + `credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: ` + + STATIC_STABILITY_DOC_URL); + const originalExpiration = credentials.originalExpiration ?? credentials.expiration; + return { + ...credentials, + ...(originalExpiration ? { originalExpiration } : {}), + expiration: newExpiration, + }; +}; diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js b/node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js new file mode 100644 index 0000000..4c611ad --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js @@ -0,0 +1,19 @@ +import { loadConfig } from "@smithy/node-config-provider"; +import { parseUrl } from "@smithy/url-parser"; +import { Endpoint as InstanceMetadataEndpoint } from "../config/Endpoint"; +import { ENDPOINT_CONFIG_OPTIONS } from "../config/EndpointConfigOptions"; +import { EndpointMode } from "../config/EndpointMode"; +import { ENDPOINT_MODE_CONFIG_OPTIONS, } from "../config/EndpointModeConfigOptions"; +export const getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig())); +const getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)(); +const getFromEndpointModeConfig = async () => { + const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case EndpointMode.IPv4: + return InstanceMetadataEndpoint.IPv4; + case EndpointMode.IPv6: + return InstanceMetadataEndpoint.IPv6; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`); + } +}; diff --git a/node_modules/@smithy/credential-provider-imds/dist-es/utils/staticStabilityProvider.js b/node_modules/@smithy/credential-provider-imds/dist-es/utils/staticStabilityProvider.js new file mode 100644 index 0000000..9a1e742 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-es/utils/staticStabilityProvider.js @@ -0,0 +1,25 @@ +import { getExtendedInstanceMetadataCredentials } from "./getExtendedInstanceMetadataCredentials"; +export const staticStabilityProvider = (provider, options = {}) => { + const logger = options?.logger || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = getExtendedInstanceMetadataCredentials(credentials, logger); + } + } + catch (e) { + if (pastCredentials) { + logger.warn("Credential renew failed: ", e); + credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger); + } + else { + throw e; + } + } + pastCredentials = credentials; + return credentials; + }; +}; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/config/Endpoint.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/config/Endpoint.d.ts new file mode 100644 index 0000000..000e313 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/config/Endpoint.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + */ +export declare enum Endpoint { + IPv4 = "http://169.254.169.254", + IPv6 = "http://[fd00:ec2::254]" +} diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/config/EndpointConfigOptions.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/config/EndpointConfigOptions.d.ts new file mode 100644 index 0000000..c03e22c --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/config/EndpointConfigOptions.d.ts @@ -0,0 +1,13 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; +/** + * @internal + */ +export declare const CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; +/** + * @internal + */ +export declare const ENDPOINT_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/config/EndpointMode.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/config/EndpointMode.d.ts new file mode 100644 index 0000000..db70619 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/config/EndpointMode.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + */ +export declare enum EndpointMode { + IPv4 = "IPv4", + IPv6 = "IPv6" +} diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/config/EndpointModeConfigOptions.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/config/EndpointModeConfigOptions.d.ts new file mode 100644 index 0000000..c743199 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/config/EndpointModeConfigOptions.d.ts @@ -0,0 +1,13 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; +/** + * @internal + */ +export declare const CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; +/** + * @internal + */ +export declare const ENDPOINT_MODE_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/error/InstanceMetadataV1FallbackError.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/error/InstanceMetadataV1FallbackError.d.ts new file mode 100644 index 0000000..8338ccb --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/error/InstanceMetadataV1FallbackError.d.ts @@ -0,0 +1,12 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +/** + * @public + * + * A specific sub-case of CredentialsProviderError, when the IMDSv1 fallback + * has been attempted but shut off by SDK configuration. + */ +export declare class InstanceMetadataV1FallbackError extends CredentialsProviderError { + readonly tryNextLink: boolean; + name: string; + constructor(message: string, tryNextLink?: boolean); +} diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/fromContainerMetadata.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/fromContainerMetadata.d.ts new file mode 100644 index 0000000..f6f28f0 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/fromContainerMetadata.d.ts @@ -0,0 +1,21 @@ +import { AwsCredentialIdentityProvider } from "@smithy/types"; +import { RemoteProviderInit } from "./remoteProvider/RemoteProviderInit"; +/** + * @internal + */ +export declare const ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +/** + * @internal + */ +export declare const ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +/** + * @internal + */ +export declare const ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +/** + * @internal + * + * Creates a credential provider that will source credentials from the ECS + * Container Metadata Service + */ +export declare const fromContainerMetadata: (init?: RemoteProviderInit) => AwsCredentialIdentityProvider; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/fromInstanceMetadata.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/fromInstanceMetadata.d.ts new file mode 100644 index 0000000..24db95a --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/fromInstanceMetadata.d.ts @@ -0,0 +1,10 @@ +import { Provider } from "@smithy/types"; +import { RemoteProviderInit } from "./remoteProvider/RemoteProviderInit"; +import { InstanceMetadataCredentials } from "./types"; +/** + * @internal + * + * Creates a credential provider that will source credentials from the EC2 + * Instance Metadata Service + */ +export declare const fromInstanceMetadata: (init?: RemoteProviderInit) => Provider; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/index.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/index.d.ts new file mode 100644 index 0000000..5a87b2f --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/index.d.ts @@ -0,0 +1,28 @@ +/** + * @internal + */ +export * from "./fromContainerMetadata"; +/** + * @internal + */ +export * from "./fromInstanceMetadata"; +/** + * @internal + */ +export * from "./remoteProvider/RemoteProviderInit"; +/** + * @internal + */ +export * from "./types"; +/** + * @internal + */ +export { httpRequest } from "./remoteProvider/httpRequest"; +/** + * @internal + */ +export { getInstanceMetadataEndpoint } from "./utils/getInstanceMetadataEndpoint"; +/** + * @internal + */ +export { Endpoint } from "./config/Endpoint"; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/ImdsCredentials.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/ImdsCredentials.d.ts new file mode 100644 index 0000000..78dd7e9 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/ImdsCredentials.d.ts @@ -0,0 +1,18 @@ +import { AwsCredentialIdentity } from "@smithy/types"; +/** + * @internal + */ +export interface ImdsCredentials { + AccessKeyId: string; + SecretAccessKey: string; + Token: string; + Expiration: string; +} +/** + * @internal + */ +export declare const isImdsCredentials: (arg: any) => arg is ImdsCredentials; +/** + * @internal + */ +export declare const fromImdsCredentials: (creds: ImdsCredentials) => AwsCredentialIdentity; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/RemoteProviderInit.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/RemoteProviderInit.d.ts new file mode 100644 index 0000000..df9eff7 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/RemoteProviderInit.d.ts @@ -0,0 +1,40 @@ +import { Logger } from "@smithy/types"; +/** + * @internal + */ +export declare const DEFAULT_TIMEOUT = 1000; +/** + * @internal + */ +export declare const DEFAULT_MAX_RETRIES = 0; +/** + * @public + */ +export interface RemoteProviderConfig { + /** + * The connection timeout (in milliseconds) + */ + timeout: number; + /** + * The maximum number of times the HTTP connection should be retried + */ + maxRetries: number; +} +/** + * @public + */ +export interface RemoteProviderInit extends Partial { + logger?: Logger; + /** + * Only used in the IMDS credential provider. + */ + ec2MetadataV1Disabled?: boolean; + /** + * AWS_PROFILE. + */ + profile?: string; +} +/** + * @internal + */ +export declare const providerConfigFromInit: ({ maxRetries, timeout, }: RemoteProviderInit) => RemoteProviderConfig; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/httpRequest.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/httpRequest.d.ts new file mode 100644 index 0000000..67bd539 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/httpRequest.d.ts @@ -0,0 +1,7 @@ +/// +/// +import { RequestOptions } from "http"; +/** + * @internal + */ +export declare function httpRequest(options: RequestOptions): Promise; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/index.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/index.d.ts new file mode 100644 index 0000000..ed18a70 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./ImdsCredentials"; +/** + * @internal + */ +export * from "./RemoteProviderInit"; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/retry.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/retry.d.ts new file mode 100644 index 0000000..4e8abc0 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/retry.d.ts @@ -0,0 +1,10 @@ +/** + * @internal + */ +export interface RetryableProvider { + (): Promise; +} +/** + * @internal + */ +export declare const retry: (toRetry: RetryableProvider, maxRetries: number) => Promise; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/Endpoint.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/Endpoint.d.ts new file mode 100644 index 0000000..b700953 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/Endpoint.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + */ +export declare enum Endpoint { + IPv4 = "http://169.254.169.254", + IPv6 = "http://[fd00:ec2::254]" +} diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/EndpointConfigOptions.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/EndpointConfigOptions.d.ts new file mode 100644 index 0000000..dbcb243 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/EndpointConfigOptions.d.ts @@ -0,0 +1,13 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; +/** + * @internal + */ +export declare const CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; +/** + * @internal + */ +export declare const ENDPOINT_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/EndpointMode.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/EndpointMode.d.ts new file mode 100644 index 0000000..7dee86e --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/EndpointMode.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + */ +export declare enum EndpointMode { + IPv4 = "IPv4", + IPv6 = "IPv6" +} diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/EndpointModeConfigOptions.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/EndpointModeConfigOptions.d.ts new file mode 100644 index 0000000..1d5e458 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/config/EndpointModeConfigOptions.d.ts @@ -0,0 +1,13 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +/** + * @internal + */ +export declare const ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; +/** + * @internal + */ +export declare const CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; +/** + * @internal + */ +export declare const ENDPOINT_MODE_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/error/InstanceMetadataV1FallbackError.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/error/InstanceMetadataV1FallbackError.d.ts new file mode 100644 index 0000000..93ac220 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/error/InstanceMetadataV1FallbackError.d.ts @@ -0,0 +1,12 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +/** + * @public + * + * A specific sub-case of CredentialsProviderError, when the IMDSv1 fallback + * has been attempted but shut off by SDK configuration. + */ +export declare class InstanceMetadataV1FallbackError extends CredentialsProviderError { + readonly tryNextLink: boolean; + name: string; + constructor(message: string, tryNextLink?: boolean); +} diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/fromContainerMetadata.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/fromContainerMetadata.d.ts new file mode 100644 index 0000000..deb48fd --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/fromContainerMetadata.d.ts @@ -0,0 +1,21 @@ +import { AwsCredentialIdentityProvider } from "@smithy/types"; +import { RemoteProviderInit } from "./remoteProvider/RemoteProviderInit"; +/** + * @internal + */ +export declare const ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +/** + * @internal + */ +export declare const ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +/** + * @internal + */ +export declare const ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +/** + * @internal + * + * Creates a credential provider that will source credentials from the ECS + * Container Metadata Service + */ +export declare const fromContainerMetadata: (init?: RemoteProviderInit) => AwsCredentialIdentityProvider; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/fromInstanceMetadata.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/fromInstanceMetadata.d.ts new file mode 100644 index 0000000..8a533f2 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/fromInstanceMetadata.d.ts @@ -0,0 +1,10 @@ +import { Provider } from "@smithy/types"; +import { RemoteProviderInit } from "./remoteProvider/RemoteProviderInit"; +import { InstanceMetadataCredentials } from "./types"; +/** + * @internal + * + * Creates a credential provider that will source credentials from the EC2 + * Instance Metadata Service + */ +export declare const fromInstanceMetadata: (init?: RemoteProviderInit) => Provider; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..c0bc7e4 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/index.d.ts @@ -0,0 +1,28 @@ +/** + * @internal + */ +export * from "./fromContainerMetadata"; +/** + * @internal + */ +export * from "./fromInstanceMetadata"; +/** + * @internal + */ +export * from "./remoteProvider/RemoteProviderInit"; +/** + * @internal + */ +export * from "./types"; +/** + * @internal + */ +export { httpRequest } from "./remoteProvider/httpRequest"; +/** + * @internal + */ +export { getInstanceMetadataEndpoint } from "./utils/getInstanceMetadataEndpoint"; +/** + * @internal + */ +export { Endpoint } from "./config/Endpoint"; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/ImdsCredentials.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/ImdsCredentials.d.ts new file mode 100644 index 0000000..0bdaeda --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/ImdsCredentials.d.ts @@ -0,0 +1,18 @@ +import { AwsCredentialIdentity } from "@smithy/types"; +/** + * @internal + */ +export interface ImdsCredentials { + AccessKeyId: string; + SecretAccessKey: string; + Token: string; + Expiration: string; +} +/** + * @internal + */ +export declare const isImdsCredentials: (arg: any) => arg is ImdsCredentials; +/** + * @internal + */ +export declare const fromImdsCredentials: (creds: ImdsCredentials) => AwsCredentialIdentity; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/RemoteProviderInit.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/RemoteProviderInit.d.ts new file mode 100644 index 0000000..4fe25f1 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/RemoteProviderInit.d.ts @@ -0,0 +1,40 @@ +import { Logger } from "@smithy/types"; +/** + * @internal + */ +export declare const DEFAULT_TIMEOUT = 1000; +/** + * @internal + */ +export declare const DEFAULT_MAX_RETRIES = 0; +/** + * @public + */ +export interface RemoteProviderConfig { + /** + * The connection timeout (in milliseconds) + */ + timeout: number; + /** + * The maximum number of times the HTTP connection should be retried + */ + maxRetries: number; +} +/** + * @public + */ +export interface RemoteProviderInit extends Partial { + logger?: Logger; + /** + * Only used in the IMDS credential provider. + */ + ec2MetadataV1Disabled?: boolean; + /** + * AWS_PROFILE. + */ + profile?: string; +} +/** + * @internal + */ +export declare const providerConfigFromInit: ({ maxRetries, timeout, }: RemoteProviderInit) => RemoteProviderConfig; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/httpRequest.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/httpRequest.d.ts new file mode 100644 index 0000000..48f249a --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/httpRequest.d.ts @@ -0,0 +1,6 @@ +/// +import { RequestOptions } from "http"; +/** + * @internal + */ +export declare function httpRequest(options: RequestOptions): Promise; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/index.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/index.d.ts new file mode 100644 index 0000000..a9d6094 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./ImdsCredentials"; +/** + * @internal + */ +export * from "./RemoteProviderInit"; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/retry.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/retry.d.ts new file mode 100644 index 0000000..d72d604 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/retry.d.ts @@ -0,0 +1,10 @@ +/** + * @internal + */ +export interface RetryableProvider { + (): Promise; +} +/** + * @internal + */ +export declare const retry: (toRetry: RetryableProvider, maxRetries: number) => Promise; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/types.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/types.d.ts new file mode 100644 index 0000000..2e9592b --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/types.d.ts @@ -0,0 +1,7 @@ +import { AwsCredentialIdentity } from "@smithy/types"; +/** + * @internal + */ +export interface InstanceMetadataCredentials extends AwsCredentialIdentity { + readonly originalExpiration?: Date; +} diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/utils/getExtendedInstanceMetadataCredentials.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/utils/getExtendedInstanceMetadataCredentials.d.ts new file mode 100644 index 0000000..67edd2c --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/utils/getExtendedInstanceMetadataCredentials.d.ts @@ -0,0 +1,6 @@ +import { Logger } from "@smithy/types"; +import { InstanceMetadataCredentials } from "../types"; +/** + * @internal + */ +export declare const getExtendedInstanceMetadataCredentials: (credentials: InstanceMetadataCredentials, logger: Logger) => InstanceMetadataCredentials; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/utils/getInstanceMetadataEndpoint.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/utils/getInstanceMetadataEndpoint.d.ts new file mode 100644 index 0000000..1ad772d --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/utils/getInstanceMetadataEndpoint.d.ts @@ -0,0 +1,21 @@ +import { Endpoint } from "@smithy/types"; +/** + * Returns the host to use for instance metadata service call. + * + * The host is read from endpoint which can be set either in + * {@link ENV_ENDPOINT_NAME} environment variable or {@link CONFIG_ENDPOINT_NAME} + * configuration property. + * + * If endpoint is not set, then endpoint mode is read either from + * {@link ENV_ENDPOINT_MODE_NAME} environment variable or {@link CONFIG_ENDPOINT_MODE_NAME} + * configuration property. If endpoint mode is not set, then default endpoint mode + * {@link EndpointMode.IPv4} is used. + * + * If endpoint mode is set to {@link EndpointMode.IPv4}, then the host is {@link Endpoint.IPv4}. + * If endpoint mode is set to {@link EndpointMode.IPv6}, then the host is {@link Endpoint.IPv6}. + * + * @returns Host to use for instance metadata service call. + * + * @internal + */ +export declare const getInstanceMetadataEndpoint: () => Promise; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/utils/staticStabilityProvider.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/utils/staticStabilityProvider.d.ts new file mode 100644 index 0000000..337091e --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/utils/staticStabilityProvider.d.ts @@ -0,0 +1,16 @@ +import { Logger, Provider } from "@smithy/types"; +import { InstanceMetadataCredentials } from "../types"; +/** + * @internal + * + * IMDS credential supports static stability feature. When used, the expiration + * of recently issued credentials is extended. The server side allows using + * the recently expired credentials. This mitigates impact when clients using + * refreshable credentials are unable to retrieve updates. + * + * @param provider Credential provider + * @returns A credential provider that supports static stability + */ +export declare const staticStabilityProvider: (provider: Provider, options?: { + logger?: Logger | undefined; +}) => Provider; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/types.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/types.d.ts new file mode 100644 index 0000000..e74ec99 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/types.d.ts @@ -0,0 +1,7 @@ +import { AwsCredentialIdentity } from "@smithy/types"; +/** + * @internal + */ +export interface InstanceMetadataCredentials extends AwsCredentialIdentity { + readonly originalExpiration?: Date; +} diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/utils/getExtendedInstanceMetadataCredentials.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/utils/getExtendedInstanceMetadataCredentials.d.ts new file mode 100644 index 0000000..f0ed41b --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/utils/getExtendedInstanceMetadataCredentials.d.ts @@ -0,0 +1,6 @@ +import { Logger } from "@smithy/types"; +import { InstanceMetadataCredentials } from "../types"; +/** + * @internal + */ +export declare const getExtendedInstanceMetadataCredentials: (credentials: InstanceMetadataCredentials, logger: Logger) => InstanceMetadataCredentials; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/utils/getInstanceMetadataEndpoint.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/utils/getInstanceMetadataEndpoint.d.ts new file mode 100644 index 0000000..db6b6da --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/utils/getInstanceMetadataEndpoint.d.ts @@ -0,0 +1,21 @@ +import { Endpoint } from "@smithy/types"; +/** + * Returns the host to use for instance metadata service call. + * + * The host is read from endpoint which can be set either in + * {@link ENV_ENDPOINT_NAME} environment variable or {@link CONFIG_ENDPOINT_NAME} + * configuration property. + * + * If endpoint is not set, then endpoint mode is read either from + * {@link ENV_ENDPOINT_MODE_NAME} environment variable or {@link CONFIG_ENDPOINT_MODE_NAME} + * configuration property. If endpoint mode is not set, then default endpoint mode + * {@link EndpointMode.IPv4} is used. + * + * If endpoint mode is set to {@link EndpointMode.IPv4}, then the host is {@link Endpoint.IPv4}. + * If endpoint mode is set to {@link EndpointMode.IPv6}, then the host is {@link Endpoint.IPv6}. + * + * @returns Host to use for instance metadata service call. + * + * @internal + */ +export declare const getInstanceMetadataEndpoint: () => Promise; diff --git a/node_modules/@smithy/credential-provider-imds/dist-types/utils/staticStabilityProvider.d.ts b/node_modules/@smithy/credential-provider-imds/dist-types/utils/staticStabilityProvider.d.ts new file mode 100644 index 0000000..6bfcb69 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/dist-types/utils/staticStabilityProvider.d.ts @@ -0,0 +1,16 @@ +import { Logger, Provider } from "@smithy/types"; +import { InstanceMetadataCredentials } from "../types"; +/** + * @internal + * + * IMDS credential supports static stability feature. When used, the expiration + * of recently issued credentials is extended. The server side allows using + * the recently expired credentials. This mitigates impact when clients using + * refreshable credentials are unable to retrieve updates. + * + * @param provider Credential provider + * @returns A credential provider that supports static stability + */ +export declare const staticStabilityProvider: (provider: Provider, options?: { + logger?: Logger | undefined; +}) => Provider; diff --git a/node_modules/@smithy/credential-provider-imds/package.json b/node_modules/@smithy/credential-provider-imds/package.json new file mode 100644 index 0000000..0ca7f69 --- /dev/null +++ b/node_modules/@smithy/credential-provider-imds/package.json @@ -0,0 +1,70 @@ +{ + "name": "@smithy/credential-provider-imds", + "version": "2.3.0", + "description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline credential-provider-imds", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "keywords": [ + "aws", + "credentials" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^2.3.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "nock": "^13.0.2", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/credential-provider-imds", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/credential-provider-imds" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/LICENSE b/node_modules/@smithy/eventstream-codec/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/eventstream-codec/README.md b/node_modules/@smithy/eventstream-codec/README.md new file mode 100644 index 0000000..f846ca1 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/README.md @@ -0,0 +1,4 @@ +# @smithy/eventstream-codec + +[![NPM version](https://img.shields.io/npm/v/@smithy/eventstream-codec/latest.svg)](https://www.npmjs.com/package/@smithy/eventstream-codec) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/eventstream-codec.svg)](https://www.npmjs.com/package/@smithy/eventstream-codec) diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/EventStreamCodec.js b/node_modules/@smithy/eventstream-codec/dist-cjs/EventStreamCodec.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/EventStreamCodec.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/HeaderMarshaller.js b/node_modules/@smithy/eventstream-codec/dist-cjs/HeaderMarshaller.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/HeaderMarshaller.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/Int64.js b/node_modules/@smithy/eventstream-codec/dist-cjs/Int64.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/Int64.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/Message.js b/node_modules/@smithy/eventstream-codec/dist-cjs/Message.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/Message.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/MessageDecoderStream.js b/node_modules/@smithy/eventstream-codec/dist-cjs/MessageDecoderStream.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/MessageDecoderStream.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/MessageEncoderStream.js b/node_modules/@smithy/eventstream-codec/dist-cjs/MessageEncoderStream.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/MessageEncoderStream.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/SmithyMessageDecoderStream.js b/node_modules/@smithy/eventstream-codec/dist-cjs/SmithyMessageDecoderStream.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/SmithyMessageDecoderStream.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/SmithyMessageEncoderStream.js b/node_modules/@smithy/eventstream-codec/dist-cjs/SmithyMessageEncoderStream.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/SmithyMessageEncoderStream.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/TestVectors.fixture.js b/node_modules/@smithy/eventstream-codec/dist-cjs/TestVectors.fixture.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/TestVectors.fixture.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/index.js b/node_modules/@smithy/eventstream-codec/dist-cjs/index.js new file mode 100644 index 0000000..fac5c93 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/index.js @@ -0,0 +1,468 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + EventStreamCodec: () => EventStreamCodec, + HeaderMarshaller: () => HeaderMarshaller, + Int64: () => Int64, + MessageDecoderStream: () => MessageDecoderStream, + MessageEncoderStream: () => MessageEncoderStream, + SmithyMessageDecoderStream: () => SmithyMessageDecoderStream, + SmithyMessageEncoderStream: () => SmithyMessageEncoderStream +}); +module.exports = __toCommonJS(src_exports); + +// src/EventStreamCodec.ts +var import_crc322 = require("@aws-crypto/crc32"); + +// src/HeaderMarshaller.ts + + +// src/Int64.ts +var import_util_hex_encoding = require("@smithy/util-hex-encoding"); +var _Int64 = class _Int64 { + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number) { + if (number > 9223372036854776e3 || number < -9223372036854776e3) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { + bytes[i] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new _Int64(bytes); + } + /** + * Called implicitly by infix arithmetic operators. + */ + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } +}; +__name(_Int64, "Int64"); +var Int64 = _Int64; +function negate(bytes) { + for (let i = 0; i < 8; i++) { + bytes[i] ^= 255; + } + for (let i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) + break; + } +} +__name(negate, "negate"); + +// src/HeaderMarshaller.ts +var _HeaderMarshaller = class _HeaderMarshaller { + constructor(toUtf8, fromUtf8) { + this.toUtf8 = toUtf8; + this.fromUtf8 = fromUtf8; + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = this.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 /* boolTrue */ : 1 /* boolFalse */]); + case "byte": + return Uint8Array.from([2 /* byte */, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3 /* short */); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4 /* integer */); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5 /* long */; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6 /* byteArray */); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = this.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7 /* string */); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8 /* timestamp */; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9 /* uuid */; + uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + parse(headers) { + const out = {}; + let position = 0; + while (position < headers.byteLength) { + const nameLength = headers.getUint8(position++); + const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); + position += nameLength; + switch (headers.getUint8(position++)) { + case 0 /* boolTrue */: + out[name] = { + type: BOOLEAN_TAG, + value: true + }; + break; + case 1 /* boolFalse */: + out[name] = { + type: BOOLEAN_TAG, + value: false + }; + break; + case 2 /* byte */: + out[name] = { + type: BYTE_TAG, + value: headers.getInt8(position++) + }; + break; + case 3 /* short */: + out[name] = { + type: SHORT_TAG, + value: headers.getInt16(position, false) + }; + position += 2; + break; + case 4 /* integer */: + out[name] = { + type: INT_TAG, + value: headers.getInt32(position, false) + }; + position += 4; + break; + case 5 /* long */: + out[name] = { + type: LONG_TAG, + value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) + }; + position += 8; + break; + case 6 /* byteArray */: + const binaryLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: BINARY_TAG, + value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) + }; + position += binaryLength; + break; + case 7 /* string */: + const stringLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: STRING_TAG, + value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) + }; + position += stringLength; + break; + case 8 /* timestamp */: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) + }; + position += 8; + break; + case 9 /* uuid */: + const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); + position += 16; + out[name] = { + type: UUID_TAG, + value: `${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(0, 4))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(4, 6))}-${(0, import_util_hex_encoding.toHex)( + uuidBytes.subarray(6, 8) + )}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(8, 10))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(10))}` + }; + break; + default: + throw new Error(`Unrecognized header type tag`); + } + } + return out; + } +}; +__name(_HeaderMarshaller, "HeaderMarshaller"); +var HeaderMarshaller = _HeaderMarshaller; +var BOOLEAN_TAG = "boolean"; +var BYTE_TAG = "byte"; +var SHORT_TAG = "short"; +var INT_TAG = "integer"; +var LONG_TAG = "long"; +var BINARY_TAG = "binary"; +var STRING_TAG = "string"; +var TIMESTAMP_TAG = "timestamp"; +var UUID_TAG = "uuid"; +var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + +// src/splitMessage.ts +var import_crc32 = require("@aws-crypto/crc32"); +var PRELUDE_MEMBER_LENGTH = 4; +var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; +var CHECKSUM_LENGTH = 4; +var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; +function splitMessage({ byteLength, byteOffset, buffer }) { + if (byteLength < MINIMUM_MESSAGE_LENGTH) { + throw new Error("Provided message too short to accommodate event stream message overhead"); + } + const view = new DataView(buffer, byteOffset, byteLength); + const messageLength = view.getUint32(0, false); + if (byteLength !== messageLength) { + throw new Error("Reported message length does not match received message length"); + } + const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); + const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); + const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); + const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); + if (expectedPreludeChecksum !== checksummer.digest()) { + throw new Error( + `The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})` + ); + } + checksummer.update( + new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)) + ); + if (expectedMessageChecksum !== checksummer.digest()) { + throw new Error( + `The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}` + ); + } + return { + headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), + body: new Uint8Array( + buffer, + byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, + messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH) + ) + }; +} +__name(splitMessage, "splitMessage"); + +// src/EventStreamCodec.ts +var _EventStreamCodec = class _EventStreamCodec { + constructor(toUtf8, fromUtf8) { + this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8); + this.messageBuffer = []; + this.isEndOfStream = false; + } + feed(message) { + this.messageBuffer.push(this.decode(message)); + } + endOfStream() { + this.isEndOfStream = true; + } + getMessage() { + const message = this.messageBuffer.pop(); + const isEndOfStream = this.isEndOfStream; + return { + getMessage() { + return message; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + getAvailableMessages() { + const messages = this.messageBuffer; + this.messageBuffer = []; + const isEndOfStream = this.isEndOfStream; + return { + getMessages() { + return messages; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message. + */ + encode({ headers: rawHeaders, body }) { + const headers = this.headerMarshaller.format(rawHeaders); + const length = headers.byteLength + body.byteLength + 16; + const out = new Uint8Array(length); + const view = new DataView(out.buffer, out.byteOffset, out.byteLength); + const checksum = new import_crc322.Crc32(); + view.setUint32(0, length, false); + view.setUint32(4, headers.byteLength, false); + view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); + out.set(headers, 12); + out.set(body, headers.byteLength + 12); + view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); + return out; + } + /** + * Convert a binary event stream message into a JavaScript object with an + * opaque, binary body and tagged, parsed headers. + */ + decode(message) { + const { headers, body } = splitMessage(message); + return { headers: this.headerMarshaller.parse(headers), body }; + } + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message header. + */ + formatHeaders(rawHeaders) { + return this.headerMarshaller.format(rawHeaders); + } +}; +__name(_EventStreamCodec, "EventStreamCodec"); +var EventStreamCodec = _EventStreamCodec; + +// src/MessageDecoderStream.ts +var _MessageDecoderStream = class _MessageDecoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const bytes of this.options.inputStream) { + const decoded = this.options.decoder.decode(bytes); + yield decoded; + } + } +}; +__name(_MessageDecoderStream, "MessageDecoderStream"); +var MessageDecoderStream = _MessageDecoderStream; + +// src/MessageEncoderStream.ts +var _MessageEncoderStream = class _MessageEncoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const msg of this.options.messageStream) { + const encoded = this.options.encoder.encode(msg); + yield encoded; + } + if (this.options.includeEndFrame) { + yield new Uint8Array(0); + } + } +}; +__name(_MessageEncoderStream, "MessageEncoderStream"); +var MessageEncoderStream = _MessageEncoderStream; + +// src/SmithyMessageDecoderStream.ts +var _SmithyMessageDecoderStream = class _SmithyMessageDecoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const message of this.options.messageStream) { + const deserialized = await this.options.deserializer(message); + if (deserialized === void 0) + continue; + yield deserialized; + } + } +}; +__name(_SmithyMessageDecoderStream, "SmithyMessageDecoderStream"); +var SmithyMessageDecoderStream = _SmithyMessageDecoderStream; + +// src/SmithyMessageEncoderStream.ts +var _SmithyMessageEncoderStream = class _SmithyMessageEncoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const chunk of this.options.inputStream) { + const payloadBuf = this.options.serializer(chunk); + yield payloadBuf; + } + } +}; +__name(_SmithyMessageEncoderStream, "SmithyMessageEncoderStream"); +var SmithyMessageEncoderStream = _SmithyMessageEncoderStream; +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + EventStreamCodec, + HeaderMarshaller, + Int64, + MessageDecoderStream, + MessageEncoderStream, + SmithyMessageDecoderStream, + SmithyMessageEncoderStream +}); + diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/splitMessage.js b/node_modules/@smithy/eventstream-codec/dist-cjs/splitMessage.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/splitMessage.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-cjs/vectorTypes.fixture.js b/node_modules/@smithy/eventstream-codec/dist-cjs/vectorTypes.fixture.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-cjs/vectorTypes.fixture.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js b/node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js new file mode 100644 index 0000000..dacbe48 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js @@ -0,0 +1,62 @@ +import { Crc32 } from "@aws-crypto/crc32"; +import { HeaderMarshaller } from "./HeaderMarshaller"; +import { splitMessage } from "./splitMessage"; +export class EventStreamCodec { + constructor(toUtf8, fromUtf8) { + this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8); + this.messageBuffer = []; + this.isEndOfStream = false; + } + feed(message) { + this.messageBuffer.push(this.decode(message)); + } + endOfStream() { + this.isEndOfStream = true; + } + getMessage() { + const message = this.messageBuffer.pop(); + const isEndOfStream = this.isEndOfStream; + return { + getMessage() { + return message; + }, + isEndOfStream() { + return isEndOfStream; + }, + }; + } + getAvailableMessages() { + const messages = this.messageBuffer; + this.messageBuffer = []; + const isEndOfStream = this.isEndOfStream; + return { + getMessages() { + return messages; + }, + isEndOfStream() { + return isEndOfStream; + }, + }; + } + encode({ headers: rawHeaders, body }) { + const headers = this.headerMarshaller.format(rawHeaders); + const length = headers.byteLength + body.byteLength + 16; + const out = new Uint8Array(length); + const view = new DataView(out.buffer, out.byteOffset, out.byteLength); + const checksum = new Crc32(); + view.setUint32(0, length, false); + view.setUint32(4, headers.byteLength, false); + view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); + out.set(headers, 12); + out.set(body, headers.byteLength + 12); + view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); + return out; + } + decode(message) { + const { headers, body } = splitMessage(message); + return { headers: this.headerMarshaller.parse(headers), body }; + } + formatHeaders(rawHeaders) { + return this.headerMarshaller.format(rawHeaders); + } +} diff --git a/node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js b/node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js new file mode 100644 index 0000000..27995b4 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js @@ -0,0 +1,182 @@ +import { fromHex, toHex } from "@smithy/util-hex-encoding"; +import { Int64 } from "./Int64"; +export class HeaderMarshaller { + constructor(toUtf8, fromUtf8) { + this.toUtf8 = toUtf8; + this.fromUtf8 = fromUtf8; + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = this.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = this.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + parse(headers) { + const out = {}; + let position = 0; + while (position < headers.byteLength) { + const nameLength = headers.getUint8(position++); + const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); + position += nameLength; + switch (headers.getUint8(position++)) { + case 0: + out[name] = { + type: BOOLEAN_TAG, + value: true, + }; + break; + case 1: + out[name] = { + type: BOOLEAN_TAG, + value: false, + }; + break; + case 2: + out[name] = { + type: BYTE_TAG, + value: headers.getInt8(position++), + }; + break; + case 3: + out[name] = { + type: SHORT_TAG, + value: headers.getInt16(position, false), + }; + position += 2; + break; + case 4: + out[name] = { + type: INT_TAG, + value: headers.getInt32(position, false), + }; + position += 4; + break; + case 5: + out[name] = { + type: LONG_TAG, + value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)), + }; + position += 8; + break; + case 6: + const binaryLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: BINARY_TAG, + value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength), + }; + position += binaryLength; + break; + case 7: + const stringLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: STRING_TAG, + value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)), + }; + position += stringLength; + break; + case 8: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()), + }; + position += 8; + break; + case 9: + const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); + position += 16; + out[name] = { + type: UUID_TAG, + value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}`, + }; + break; + default: + throw new Error(`Unrecognized header type tag`); + } + } + return out; + } +} +var HEADER_VALUE_TYPE; +(function (HEADER_VALUE_TYPE) { + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["short"] = 3] = "short"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["long"] = 5] = "long"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["string"] = 7] = "string"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["uuid"] = 9] = "uuid"; +})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); +const BOOLEAN_TAG = "boolean"; +const BYTE_TAG = "byte"; +const SHORT_TAG = "short"; +const INT_TAG = "integer"; +const LONG_TAG = "long"; +const BINARY_TAG = "binary"; +const STRING_TAG = "string"; +const TIMESTAMP_TAG = "timestamp"; +const UUID_TAG = "uuid"; +const UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; diff --git a/node_modules/@smithy/eventstream-codec/dist-es/Int64.js b/node_modules/@smithy/eventstream-codec/dist-es/Int64.js new file mode 100644 index 0000000..f3f7785 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/Int64.js @@ -0,0 +1,43 @@ +import { toHex } from "@smithy/util-hex-encoding"; +export class Int64 { + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number) { + if (number > 9223372036854776000 || number < -9223372036854776000) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { + bytes[i] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new Int64(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 0b10000000; + if (negative) { + negate(bytes); + } + return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } +} +function negate(bytes) { + for (let i = 0; i < 8; i++) { + bytes[i] ^= 0xff; + } + for (let i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) + break; + } +} diff --git a/node_modules/@smithy/eventstream-codec/dist-es/Message.js b/node_modules/@smithy/eventstream-codec/dist-es/Message.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/Message.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js b/node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js new file mode 100644 index 0000000..f14ade5 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js @@ -0,0 +1,14 @@ +export class MessageDecoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const bytes of this.options.inputStream) { + const decoded = this.options.decoder.decode(bytes); + yield decoded; + } + } +} diff --git a/node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js b/node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js new file mode 100644 index 0000000..7d5aa8c --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js @@ -0,0 +1,17 @@ +export class MessageEncoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const msg of this.options.messageStream) { + const encoded = this.options.encoder.encode(msg); + yield encoded; + } + if (this.options.includeEndFrame) { + yield new Uint8Array(0); + } + } +} diff --git a/node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js b/node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js new file mode 100644 index 0000000..73b1599 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js @@ -0,0 +1,16 @@ +export class SmithyMessageDecoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const message of this.options.messageStream) { + const deserialized = await this.options.deserializer(message); + if (deserialized === undefined) + continue; + yield deserialized; + } + } +} diff --git a/node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js b/node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js new file mode 100644 index 0000000..a124026 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js @@ -0,0 +1,14 @@ +export class SmithyMessageEncoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const chunk of this.options.inputStream) { + const payloadBuf = this.options.serializer(chunk); + yield payloadBuf; + } + } +} diff --git a/node_modules/@smithy/eventstream-codec/dist-es/TestVectors.fixture.js b/node_modules/@smithy/eventstream-codec/dist-es/TestVectors.fixture.js new file mode 100644 index 0000000..7d09f47 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/TestVectors.fixture.js @@ -0,0 +1,690 @@ +import { Int64 } from "./Int64"; +export const vectors = { + all_headers: { + expectation: "success", + encoded: Uint8Array.from([ + 0, + 0, + 0, + 204, + 0, + 0, + 0, + 175, + 15, + 174, + 100, + 202, + 10, + 101, + 118, + 101, + 110, + 116, + 45, + 116, + 121, + 112, + 101, + 4, + 0, + 0, + 160, + 12, + 12, + 99, + 111, + 110, + 116, + 101, + 110, + 116, + 45, + 116, + 121, + 112, + 101, + 7, + 0, + 16, + 97, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 47, + 106, + 115, + 111, + 110, + 10, + 98, + 111, + 111, + 108, + 32, + 102, + 97, + 108, + 115, + 101, + 1, + 9, + 98, + 111, + 111, + 108, + 32, + 116, + 114, + 117, + 101, + 0, + 4, + 98, + 121, + 116, + 101, + 2, + 207, + 8, + 98, + 121, + 116, + 101, + 32, + 98, + 117, + 102, + 6, + 0, + 20, + 73, + 39, + 109, + 32, + 97, + 32, + 108, + 105, + 116, + 116, + 108, + 101, + 32, + 116, + 101, + 97, + 112, + 111, + 116, + 33, + 9, + 116, + 105, + 109, + 101, + 115, + 116, + 97, + 109, + 112, + 8, + 0, + 0, + 0, + 0, + 0, + 132, + 95, + 237, + 5, + 105, + 110, + 116, + 49, + 54, + 3, + 0, + 42, + 5, + 105, + 110, + 116, + 54, + 52, + 5, + 0, + 0, + 0, + 0, + 2, + 135, + 87, + 178, + 4, + 117, + 117, + 105, + 100, + 9, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 123, + 39, + 102, + 111, + 111, + 39, + 58, + 39, + 98, + 97, + 114, + 39, + 125, + 171, + 165, + 241, + 12, + ]), + decoded: { + headers: { + "event-type": { + type: "integer", + value: 40972, + }, + "content-type": { + type: "string", + value: "application/json", + }, + "bool false": { + type: "boolean", + value: false, + }, + "bool true": { + type: "boolean", + value: true, + }, + byte: { + type: "byte", + value: -49, + }, + "byte buf": { + type: "binary", + value: Uint8Array.from([ + 73, + 39, + 109, + 32, + 97, + 32, + 108, + 105, + 116, + 116, + 108, + 101, + 32, + 116, + 101, + 97, + 112, + 111, + 116, + 33, + ]), + }, + timestamp: { + type: "timestamp", + value: new Date(8675309), + }, + int16: { + type: "short", + value: 42, + }, + int64: { + type: "long", + value: Int64.fromNumber(42424242), + }, + uuid: { + type: "uuid", + value: "01020304-0506-0708-090a-0b0c0d0e0f10", + }, + }, + body: Uint8Array.from([123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125]), + }, + }, + empty_message: { + expectation: "success", + encoded: Uint8Array.from([0, 0, 0, 16, 0, 0, 0, 0, 5, 194, 72, 235, 125, 152, 200, 255]), + decoded: { + headers: {}, + body: Uint8Array.from([]), + }, + }, + int32_header: { + expectation: "success", + encoded: Uint8Array.from([ + 0, + 0, + 0, + 45, + 0, + 0, + 0, + 16, + 65, + 196, + 36, + 184, + 10, + 101, + 118, + 101, + 110, + 116, + 45, + 116, + 121, + 112, + 101, + 4, + 0, + 0, + 160, + 12, + 123, + 39, + 102, + 111, + 111, + 39, + 58, + 39, + 98, + 97, + 114, + 39, + 125, + 54, + 244, + 128, + 160, + ]), + decoded: { + headers: { + "event-type": { + type: "integer", + value: 40972, + }, + }, + body: Uint8Array.from([123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125]), + }, + }, + payload_no_headers: { + expectation: "success", + encoded: Uint8Array.from([ + 0, + 0, + 0, + 29, + 0, + 0, + 0, + 0, + 253, + 82, + 140, + 90, + 123, + 39, + 102, + 111, + 111, + 39, + 58, + 39, + 98, + 97, + 114, + 39, + 125, + 195, + 101, + 57, + 54, + ]), + decoded: { + headers: {}, + body: Uint8Array.from([123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125]), + }, + }, + payload_one_str_header: { + expectation: "success", + encoded: Uint8Array.from([ + 0, + 0, + 0, + 61, + 0, + 0, + 0, + 32, + 7, + 253, + 131, + 150, + 12, + 99, + 111, + 110, + 116, + 101, + 110, + 116, + 45, + 116, + 121, + 112, + 101, + 7, + 0, + 16, + 97, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 47, + 106, + 115, + 111, + 110, + 123, + 39, + 102, + 111, + 111, + 39, + 58, + 39, + 98, + 97, + 114, + 39, + 125, + 141, + 156, + 8, + 177, + ]), + decoded: { + headers: { + "content-type": { + type: "string", + value: "application/json", + }, + }, + body: Uint8Array.from([123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125]), + }, + }, + corrupted_headers: { + expectation: "failure", + encoded: Uint8Array.from([ + 0, + 0, + 0, + 61, + 0, + 0, + 0, + 32, + 7, + 253, + 131, + 150, + 12, + 99, + 111, + 110, + 116, + 101, + 110, + 116, + 45, + 116, + 121, + 112, + 101, + 7, + 0, + 16, + 97, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 47, + 106, + 115, + 111, + 110, + 123, + 97, + 102, + 111, + 111, + 39, + 58, + 39, + 98, + 97, + 114, + 39, + 125, + 141, + 156, + 8, + 177, + ]), + }, + corrupted_header_len: { + expectation: "failure", + encoded: Uint8Array.from([ + 0, + 0, + 0, + 61, + 0, + 0, + 0, + 33, + 7, + 253, + 131, + 150, + 12, + 99, + 111, + 110, + 116, + 101, + 110, + 116, + 45, + 116, + 121, + 112, + 101, + 7, + 0, + 16, + 97, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 47, + 106, + 115, + 111, + 110, + 123, + 39, + 102, + 111, + 111, + 39, + 58, + 39, + 98, + 97, + 114, + 39, + 125, + 141, + 156, + 8, + 177, + ]), + }, + corrupted_length: { + expectation: "failure", + encoded: Uint8Array.from([ + 0, + 0, + 0, + 62, + 0, + 0, + 0, + 32, + 7, + 253, + 131, + 150, + 12, + 99, + 111, + 110, + 116, + 101, + 110, + 116, + 45, + 116, + 121, + 112, + 101, + 7, + 0, + 16, + 97, + 112, + 112, + 108, + 105, + 99, + 97, + 116, + 105, + 111, + 110, + 47, + 106, + 115, + 111, + 110, + 123, + 39, + 102, + 111, + 111, + 39, + 58, + 39, + 98, + 97, + 114, + 39, + 125, + 141, + 156, + 8, + 177, + ]), + }, + corrupted_payload: { + expectation: "failure", + encoded: Uint8Array.from([ + 0, + 0, + 0, + 29, + 0, + 0, + 0, + 0, + 253, + 82, + 140, + 90, + 91, + 39, + 102, + 111, + 111, + 39, + 58, + 39, + 98, + 97, + 114, + 39, + 125, + 195, + 101, + 57, + 54, + ]), + }, +}; diff --git a/node_modules/@smithy/eventstream-codec/dist-es/index.js b/node_modules/@smithy/eventstream-codec/dist-es/index.js new file mode 100644 index 0000000..458feab --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/index.js @@ -0,0 +1,8 @@ +export * from "./EventStreamCodec"; +export * from "./HeaderMarshaller"; +export * from "./Int64"; +export * from "./Message"; +export * from "./MessageDecoderStream"; +export * from "./MessageEncoderStream"; +export * from "./SmithyMessageDecoderStream"; +export * from "./SmithyMessageEncoderStream"; diff --git a/node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js b/node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js new file mode 100644 index 0000000..725346b --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js @@ -0,0 +1,30 @@ +import { Crc32 } from "@aws-crypto/crc32"; +const PRELUDE_MEMBER_LENGTH = 4; +const PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; +const CHECKSUM_LENGTH = 4; +const MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; +export function splitMessage({ byteLength, byteOffset, buffer }) { + if (byteLength < MINIMUM_MESSAGE_LENGTH) { + throw new Error("Provided message too short to accommodate event stream message overhead"); + } + const view = new DataView(buffer, byteOffset, byteLength); + const messageLength = view.getUint32(0, false); + if (byteLength !== messageLength) { + throw new Error("Reported message length does not match received message length"); + } + const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); + const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); + const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); + const checksummer = new Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); + if (expectedPreludeChecksum !== checksummer.digest()) { + throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`); + } + checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH))); + if (expectedMessageChecksum !== checksummer.digest()) { + throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`); + } + return { + headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), + body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)), + }; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-es/vectorTypes.fixture.js b/node_modules/@smithy/eventstream-codec/dist-es/vectorTypes.fixture.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-es/vectorTypes.fixture.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/eventstream-codec/dist-types/EventStreamCodec.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/EventStreamCodec.d.ts new file mode 100644 index 0000000..647ac13 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/EventStreamCodec.d.ts @@ -0,0 +1,31 @@ +import { AvailableMessage, AvailableMessages, Message, MessageDecoder, MessageEncoder, MessageHeaders } from "@smithy/types"; +import { Decoder, Encoder } from "@smithy/types"; +/** + * A Codec that can convert binary-packed event stream messages into + * JavaScript objects and back again into their binary format. + */ +export declare class EventStreamCodec implements MessageEncoder, MessageDecoder { + private readonly headerMarshaller; + private messageBuffer; + private isEndOfStream; + constructor(toUtf8: Encoder, fromUtf8: Decoder); + feed(message: ArrayBufferView): void; + endOfStream(): void; + getMessage(): AvailableMessage; + getAvailableMessages(): AvailableMessages; + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message. + */ + encode({ headers: rawHeaders, body }: Message): Uint8Array; + /** + * Convert a binary event stream message into a JavaScript object with an + * opaque, binary body and tagged, parsed headers. + */ + decode(message: ArrayBufferView): Message; + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message header. + */ + formatHeaders(rawHeaders: MessageHeaders): Uint8Array; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/HeaderMarshaller.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/HeaderMarshaller.d.ts new file mode 100644 index 0000000..481e0d8 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/HeaderMarshaller.d.ts @@ -0,0 +1,12 @@ +import { Decoder, Encoder, MessageHeaders } from "@smithy/types"; +/** + * @internal + */ +export declare class HeaderMarshaller { + private readonly toUtf8; + private readonly fromUtf8; + constructor(toUtf8: Encoder, fromUtf8: Decoder); + format(headers: MessageHeaders): Uint8Array; + private formatHeaderValue; + parse(headers: DataView): MessageHeaders; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/Int64.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/Int64.d.ts new file mode 100644 index 0000000..16c6a80 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/Int64.d.ts @@ -0,0 +1,20 @@ +import { Int64 as IInt64 } from "@smithy/types"; +export interface Int64 extends IInt64 { +} +/** + * A lossless representation of a signed, 64-bit integer. Instances of this + * class may be used in arithmetic expressions as if they were numeric + * primitives, but the binary representation will be preserved unchanged as the + * `bytes` property of the object. The bytes should be encoded as big-endian, + * two's complement integers. + */ +export declare class Int64 { + readonly bytes: Uint8Array; + constructor(bytes: Uint8Array); + static fromNumber(number: number): Int64; + /** + * Called implicitly by infix arithmetic operators. + */ + valueOf(): number; + toString(): string; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/Message.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/Message.d.ts new file mode 100644 index 0000000..4cceffc --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/Message.d.ts @@ -0,0 +1,26 @@ +import { Int64 } from "./Int64"; +/** + * An event stream message. The headers and body properties will always be + * defined, with empty headers represented as an object with no keys and an + * empty body represented as a zero-length Uint8Array. + */ +export interface Message { + headers: MessageHeaders; + body: Uint8Array; +} +export type MessageHeaders = Record; +type HeaderValue = { + type: K; + value: V; +}; +export type BooleanHeaderValue = HeaderValue<"boolean", boolean>; +export type ByteHeaderValue = HeaderValue<"byte", number>; +export type ShortHeaderValue = HeaderValue<"short", number>; +export type IntegerHeaderValue = HeaderValue<"integer", number>; +export type LongHeaderValue = HeaderValue<"long", Int64>; +export type BinaryHeaderValue = HeaderValue<"binary", Uint8Array>; +export type StringHeaderValue = HeaderValue<"string", string>; +export type TimestampHeaderValue = HeaderValue<"timestamp", Date>; +export type UuidHeaderValue = HeaderValue<"uuid", string>; +export type MessageHeaderValue = BooleanHeaderValue | ByteHeaderValue | ShortHeaderValue | IntegerHeaderValue | LongHeaderValue | BinaryHeaderValue | StringHeaderValue | TimestampHeaderValue | UuidHeaderValue; +export {}; diff --git a/node_modules/@smithy/eventstream-codec/dist-types/MessageDecoderStream.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/MessageDecoderStream.d.ts new file mode 100644 index 0000000..4a15787 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/MessageDecoderStream.d.ts @@ -0,0 +1,17 @@ +import { Message, MessageDecoder } from "@smithy/types"; +/** + * @internal + */ +export interface MessageDecoderStreamOptions { + inputStream: AsyncIterable; + decoder: MessageDecoder; +} +/** + * @internal + */ +export declare class MessageDecoderStream implements AsyncIterable { + private readonly options; + constructor(options: MessageDecoderStreamOptions); + [Symbol.asyncIterator](): AsyncIterator; + private asyncIterator; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/MessageEncoderStream.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/MessageEncoderStream.d.ts new file mode 100644 index 0000000..cdacd3c --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/MessageEncoderStream.d.ts @@ -0,0 +1,18 @@ +import { Message, MessageEncoder } from "@smithy/types"; +/** + * @internal + */ +export interface MessageEncoderStreamOptions { + messageStream: AsyncIterable; + encoder: MessageEncoder; + includeEndFrame?: Boolean; +} +/** + * @internal + */ +export declare class MessageEncoderStream implements AsyncIterable { + private readonly options; + constructor(options: MessageEncoderStreamOptions); + [Symbol.asyncIterator](): AsyncIterator; + private asyncIterator; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/SmithyMessageDecoderStream.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/SmithyMessageDecoderStream.d.ts new file mode 100644 index 0000000..2786506 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/SmithyMessageDecoderStream.d.ts @@ -0,0 +1,17 @@ +import { Message } from "@smithy/types"; +/** + * @internal + */ +export interface SmithyMessageDecoderStreamOptions { + readonly messageStream: AsyncIterable; + readonly deserializer: (input: Message) => Promise; +} +/** + * @internal + */ +export declare class SmithyMessageDecoderStream implements AsyncIterable { + private readonly options; + constructor(options: SmithyMessageDecoderStreamOptions); + [Symbol.asyncIterator](): AsyncIterator; + private asyncIterator; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/SmithyMessageEncoderStream.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/SmithyMessageEncoderStream.d.ts new file mode 100644 index 0000000..6240595 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/SmithyMessageEncoderStream.d.ts @@ -0,0 +1,17 @@ +import { Message } from "@smithy/types"; +/** + * @internal + */ +export interface SmithyMessageEncoderStreamOptions { + inputStream: AsyncIterable; + serializer: (event: T) => Message; +} +/** + * @internal + */ +export declare class SmithyMessageEncoderStream implements AsyncIterable { + private readonly options; + constructor(options: SmithyMessageEncoderStreamOptions); + [Symbol.asyncIterator](): AsyncIterator; + private asyncIterator; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/TestVectors.fixture.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/TestVectors.fixture.d.ts new file mode 100644 index 0000000..e1b04e6 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/TestVectors.fixture.d.ts @@ -0,0 +1,2 @@ +import { TestVectors } from "./vectorTypes.fixture"; +export declare const vectors: TestVectors; diff --git a/node_modules/@smithy/eventstream-codec/dist-types/index.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/index.d.ts new file mode 100644 index 0000000..458feab --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/index.d.ts @@ -0,0 +1,8 @@ +export * from "./EventStreamCodec"; +export * from "./HeaderMarshaller"; +export * from "./Int64"; +export * from "./Message"; +export * from "./MessageDecoderStream"; +export * from "./MessageEncoderStream"; +export * from "./SmithyMessageDecoderStream"; +export * from "./SmithyMessageEncoderStream"; diff --git a/node_modules/@smithy/eventstream-codec/dist-types/splitMessage.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/splitMessage.d.ts new file mode 100644 index 0000000..9aa7585 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/splitMessage.d.ts @@ -0,0 +1,11 @@ +/** + * @internal + */ +export interface MessageParts { + headers: DataView; + body: Uint8Array; +} +/** + * @internal + */ +export declare function splitMessage({ byteLength, byteOffset, buffer }: ArrayBufferView): MessageParts; diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/EventStreamCodec.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/EventStreamCodec.d.ts new file mode 100644 index 0000000..dd4bd9f --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/EventStreamCodec.d.ts @@ -0,0 +1,31 @@ +import { AvailableMessage, AvailableMessages, Message, MessageDecoder, MessageEncoder, MessageHeaders } from "@smithy/types"; +import { Decoder, Encoder } from "@smithy/types"; +/** + * A Codec that can convert binary-packed event stream messages into + * JavaScript objects and back again into their binary format. + */ +export declare class EventStreamCodec implements MessageEncoder, MessageDecoder { + private readonly headerMarshaller; + private messageBuffer; + private isEndOfStream; + constructor(toUtf8: Encoder, fromUtf8: Decoder); + feed(message: ArrayBufferView): void; + endOfStream(): void; + getMessage(): AvailableMessage; + getAvailableMessages(): AvailableMessages; + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message. + */ + encode({ headers: rawHeaders, body }: Message): Uint8Array; + /** + * Convert a binary event stream message into a JavaScript object with an + * opaque, binary body and tagged, parsed headers. + */ + decode(message: ArrayBufferView): Message; + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message header. + */ + formatHeaders(rawHeaders: MessageHeaders): Uint8Array; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/HeaderMarshaller.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/HeaderMarshaller.d.ts new file mode 100644 index 0000000..5ecf2d1 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/HeaderMarshaller.d.ts @@ -0,0 +1,12 @@ +import { Decoder, Encoder, MessageHeaders } from "@smithy/types"; +/** + * @internal + */ +export declare class HeaderMarshaller { + private readonly toUtf8; + private readonly fromUtf8; + constructor(toUtf8: Encoder, fromUtf8: Decoder); + format(headers: MessageHeaders): Uint8Array; + private formatHeaderValue; + parse(headers: DataView): MessageHeaders; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/Int64.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/Int64.d.ts new file mode 100644 index 0000000..aebf7e4 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/Int64.d.ts @@ -0,0 +1,20 @@ +import { Int64 as IInt64 } from "@smithy/types"; +export interface Int64 extends IInt64 { +} +/** + * A lossless representation of a signed, 64-bit integer. Instances of this + * class may be used in arithmetic expressions as if they were numeric + * primitives, but the binary representation will be preserved unchanged as the + * `bytes` property of the object. The bytes should be encoded as big-endian, + * two's complement integers. + */ +export declare class Int64 { + readonly bytes: Uint8Array; + constructor(bytes: Uint8Array); + static fromNumber(number: number): Int64; + /** + * Called implicitly by infix arithmetic operators. + */ + valueOf(): number; + toString(): string; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/Message.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/Message.d.ts new file mode 100644 index 0000000..ef57685 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/Message.d.ts @@ -0,0 +1,26 @@ +import { Int64 } from "./Int64"; +/** + * An event stream message. The headers and body properties will always be + * defined, with empty headers represented as an object with no keys and an + * empty body represented as a zero-length Uint8Array. + */ +export interface Message { + headers: MessageHeaders; + body: Uint8Array; +} +export type MessageHeaders = Record; +type HeaderValue = { + type: K; + value: V; +}; +export type BooleanHeaderValue = HeaderValue<"boolean", boolean>; +export type ByteHeaderValue = HeaderValue<"byte", number>; +export type ShortHeaderValue = HeaderValue<"short", number>; +export type IntegerHeaderValue = HeaderValue<"integer", number>; +export type LongHeaderValue = HeaderValue<"long", Int64>; +export type BinaryHeaderValue = HeaderValue<"binary", Uint8Array>; +export type StringHeaderValue = HeaderValue<"string", string>; +export type TimestampHeaderValue = HeaderValue<"timestamp", Date>; +export type UuidHeaderValue = HeaderValue<"uuid", string>; +export type MessageHeaderValue = BooleanHeaderValue | ByteHeaderValue | ShortHeaderValue | IntegerHeaderValue | LongHeaderValue | BinaryHeaderValue | StringHeaderValue | TimestampHeaderValue | UuidHeaderValue; +export {}; diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/MessageDecoderStream.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/MessageDecoderStream.d.ts new file mode 100644 index 0000000..df23a0e --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/MessageDecoderStream.d.ts @@ -0,0 +1,17 @@ +import { Message, MessageDecoder } from "@smithy/types"; +/** + * @internal + */ +export interface MessageDecoderStreamOptions { + inputStream: AsyncIterable; + decoder: MessageDecoder; +} +/** + * @internal + */ +export declare class MessageDecoderStream implements AsyncIterable { + private readonly options; + constructor(options: MessageDecoderStreamOptions); + [Symbol.asyncIterator](): AsyncIterator; + private asyncIterator; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/MessageEncoderStream.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/MessageEncoderStream.d.ts new file mode 100644 index 0000000..a88e547 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/MessageEncoderStream.d.ts @@ -0,0 +1,18 @@ +import { Message, MessageEncoder } from "@smithy/types"; +/** + * @internal + */ +export interface MessageEncoderStreamOptions { + messageStream: AsyncIterable; + encoder: MessageEncoder; + includeEndFrame?: Boolean; +} +/** + * @internal + */ +export declare class MessageEncoderStream implements AsyncIterable { + private readonly options; + constructor(options: MessageEncoderStreamOptions); + [Symbol.asyncIterator](): AsyncIterator; + private asyncIterator; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/SmithyMessageDecoderStream.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/SmithyMessageDecoderStream.d.ts new file mode 100644 index 0000000..e9c13ba --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/SmithyMessageDecoderStream.d.ts @@ -0,0 +1,17 @@ +import { Message } from "@smithy/types"; +/** + * @internal + */ +export interface SmithyMessageDecoderStreamOptions { + readonly messageStream: AsyncIterable; + readonly deserializer: (input: Message) => Promise; +} +/** + * @internal + */ +export declare class SmithyMessageDecoderStream implements AsyncIterable { + private readonly options; + constructor(options: SmithyMessageDecoderStreamOptions); + [Symbol.asyncIterator](): AsyncIterator; + private asyncIterator; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/SmithyMessageEncoderStream.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/SmithyMessageEncoderStream.d.ts new file mode 100644 index 0000000..9d67f42 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/SmithyMessageEncoderStream.d.ts @@ -0,0 +1,17 @@ +import { Message } from "@smithy/types"; +/** + * @internal + */ +export interface SmithyMessageEncoderStreamOptions { + inputStream: AsyncIterable; + serializer: (event: T) => Message; +} +/** + * @internal + */ +export declare class SmithyMessageEncoderStream implements AsyncIterable { + private readonly options; + constructor(options: SmithyMessageEncoderStreamOptions); + [Symbol.asyncIterator](): AsyncIterator; + private asyncIterator; +} diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/TestVectors.fixture.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/TestVectors.fixture.d.ts new file mode 100644 index 0000000..9ed09f2 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/TestVectors.fixture.d.ts @@ -0,0 +1,2 @@ +import { TestVectors } from "./vectorTypes.fixture"; +export declare const vectors: TestVectors; diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..01e6730 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/index.d.ts @@ -0,0 +1,8 @@ +export * from "./EventStreamCodec"; +export * from "./HeaderMarshaller"; +export * from "./Int64"; +export * from "./Message"; +export * from "./MessageDecoderStream"; +export * from "./MessageEncoderStream"; +export * from "./SmithyMessageDecoderStream"; +export * from "./SmithyMessageEncoderStream"; diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/splitMessage.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/splitMessage.d.ts new file mode 100644 index 0000000..48776ec --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/splitMessage.d.ts @@ -0,0 +1,11 @@ +/** + * @internal + */ +export interface MessageParts { + headers: DataView; + body: Uint8Array; +} +/** + * @internal + */ +export declare function splitMessage({ byteLength, byteOffset, buffer }: ArrayBufferView): MessageParts; diff --git a/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/vectorTypes.fixture.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/vectorTypes.fixture.d.ts new file mode 100644 index 0000000..5569194 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/ts3.4/vectorTypes.fixture.d.ts @@ -0,0 +1,12 @@ +import { Message } from "./Message"; +export interface NegativeTestVector { + expectation: "failure"; + encoded: Uint8Array; +} +export interface PositiveTestVector { + expectation: "success"; + encoded: Uint8Array; + decoded: Message; +} +export type TestVector = NegativeTestVector | PositiveTestVector; +export type TestVectors = Record; diff --git a/node_modules/@smithy/eventstream-codec/dist-types/vectorTypes.fixture.d.ts b/node_modules/@smithy/eventstream-codec/dist-types/vectorTypes.fixture.d.ts new file mode 100644 index 0000000..ba9ca72 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/dist-types/vectorTypes.fixture.d.ts @@ -0,0 +1,12 @@ +import { Message } from "./Message"; +export interface NegativeTestVector { + expectation: "failure"; + encoded: Uint8Array; +} +export interface PositiveTestVector { + expectation: "success"; + encoded: Uint8Array; + decoded: Message; +} +export type TestVector = NegativeTestVector | PositiveTestVector; +export type TestVectors = Record; diff --git a/node_modules/@smithy/eventstream-codec/package.json b/node_modules/@smithy/eventstream-codec/package.json new file mode 100644 index 0000000..ebbc844 --- /dev/null +++ b/node_modules/@smithy/eventstream-codec/package.json @@ -0,0 +1,61 @@ +{ + "name": "@smithy/eventstream-codec", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline eventstream-codec", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest --coverage" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@smithy/types": "^2.12.0", + "@smithy/util-hex-encoding": "^2.2.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@smithy/util-utf8": "^2.3.0", + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/eventstream-codec", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/eventstream-codec" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/fetch-http-handler/LICENSE b/node_modules/@smithy/fetch-http-handler/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/fetch-http-handler/README.md b/node_modules/@smithy/fetch-http-handler/README.md new file mode 100644 index 0000000..05df3aa --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/README.md @@ -0,0 +1,4 @@ +# @smithy/fetch-http-handler + +[![NPM version](https://img.shields.io/npm/v/@smithy/fetch-http-handler/latest.svg)](https://www.npmjs.com/package/@smithy/fetch-http-handler) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/fetch-http-handler.svg)](https://www.npmjs.com/package/@smithy/fetch-http-handler) diff --git a/node_modules/@smithy/fetch-http-handler/dist-cjs/fetch-http-handler.js b/node_modules/@smithy/fetch-http-handler/dist-cjs/fetch-http-handler.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-cjs/fetch-http-handler.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js b/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js new file mode 100644 index 0000000..d00eeda --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js @@ -0,0 +1,220 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + FetchHttpHandler: () => FetchHttpHandler, + keepAliveSupport: () => keepAliveSupport, + streamCollector: () => streamCollector +}); +module.exports = __toCommonJS(src_exports); + +// src/fetch-http-handler.ts +var import_protocol_http = require("@smithy/protocol-http"); +var import_querystring_builder = require("@smithy/querystring-builder"); + +// src/request-timeout.ts +function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); +} +__name(requestTimeout, "requestTimeout"); + +// src/fetch-http-handler.ts +var keepAliveSupport = { + supported: Boolean(typeof Request !== "undefined" && "keepalive" in new Request("https://[::1]")) +}; +var _FetchHttpHandler = class _FetchHttpHandler { + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new _FetchHttpHandler(instanceOrOptions); + } + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + } + destroy() { + } + async handle(request, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + if (abortSignal == null ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return Promise.reject(abortError); + } + let path = request.path; + const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request; + const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request.body; + const requestOptions = { body, headers: new Headers(request.headers), method }; + if (typeof AbortController !== "undefined") { + requestOptions["signal"] = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions["keepalive"] = keepAlive; + } + const fetchRequest = new Request(url, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != void 0; + if (!hasReadableStream) { + return response.blob().then((body2) => ({ + response: new import_protocol_http.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); + } + return { + response: new import_protocol_http.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push( + new Promise((resolve, reject) => { + abortSignal.onabort = () => { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + }) + ); + } + return Promise.race(raceOfPromises); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + config[key] = value; + return config; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } +}; +__name(_FetchHttpHandler, "FetchHttpHandler"); +var FetchHttpHandler = _FetchHttpHandler; + +// src/stream-collector.ts +var import_util_base64 = require("@smithy/util-base64"); +var streamCollector = /* @__PURE__ */ __name((stream) => { + if (typeof Blob === "function" && stream instanceof Blob) { + return collectBlob(stream); + } + return collectStream(stream); +}, "streamCollector"); +async function collectBlob(blob) { + const base64 = await readToBase64(blob); + const arrayBuffer = (0, import_util_base64.fromBase64)(base64); + return new Uint8Array(arrayBuffer); +} +__name(collectBlob, "collectBlob"); +async function collectStream(stream) { + let res = new Uint8Array(0); + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + const prior = res; + res = new Uint8Array(prior.length + value.length); + res.set(prior); + res.set(value, prior.length); + } + isDone = done; + } + return res; +} +__name(collectStream, "collectStream"); +function readToBase64(blob) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = reader.result ?? ""; + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob); + }); +} +__name(readToBase64, "readToBase64"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + keepAliveSupport, + FetchHttpHandler, + streamCollector +}); + diff --git a/node_modules/@smithy/fetch-http-handler/dist-cjs/request-timeout.js b/node_modules/@smithy/fetch-http-handler/dist-cjs/request-timeout.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-cjs/request-timeout.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/fetch-http-handler/dist-cjs/stream-collector.js b/node_modules/@smithy/fetch-http-handler/dist-cjs/stream-collector.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-cjs/stream-collector.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js b/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js new file mode 100644 index 0000000..ee889c4 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js @@ -0,0 +1,111 @@ +import { HttpResponse } from "@smithy/protocol-http"; +import { buildQueryString } from "@smithy/querystring-builder"; +import { requestTimeout } from "./request-timeout"; +export const keepAliveSupport = { + supported: Boolean(typeof Request !== "undefined" && "keepalive" in new Request("https://[::1]")), +}; +export class FetchHttpHandler { + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new FetchHttpHandler(instanceOrOptions); + } + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } + else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + } + destroy() { + } + async handle(request, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return Promise.reject(abortError); + } + let path = request.path; + const queryString = buildQueryString(request.query || {}); + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request; + const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; + const body = method === "GET" || method === "HEAD" ? undefined : request.body; + const requestOptions = { body, headers: new Headers(request.headers), method: method }; + if (typeof AbortController !== "undefined") { + requestOptions["signal"] = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions["keepalive"] = keepAlive; + } + const fetchRequest = new Request(url, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != undefined; + if (!hasReadableStream) { + return response.blob().then((body) => ({ + response: new HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body, + }), + })); + } + return { + response: new HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body, + }), + }; + }), + requestTimeout(requestTimeoutInMs), + ]; + if (abortSignal) { + raceOfPromises.push(new Promise((resolve, reject) => { + abortSignal.onabort = () => { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + })); + } + return Promise.race(raceOfPromises); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + config[key] = value; + return config; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } +} diff --git a/node_modules/@smithy/fetch-http-handler/dist-es/index.js b/node_modules/@smithy/fetch-http-handler/dist-es/index.js new file mode 100644 index 0000000..a0c61f1 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-es/index.js @@ -0,0 +1,2 @@ +export * from "./fetch-http-handler"; +export * from "./stream-collector"; diff --git a/node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js b/node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js new file mode 100644 index 0000000..66b09b2 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js @@ -0,0 +1,11 @@ +export function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); +} diff --git a/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js b/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js new file mode 100644 index 0000000..a7b4e83 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js @@ -0,0 +1,45 @@ +import { fromBase64 } from "@smithy/util-base64"; +export const streamCollector = (stream) => { + if (typeof Blob === "function" && stream instanceof Blob) { + return collectBlob(stream); + } + return collectStream(stream); +}; +async function collectBlob(blob) { + const base64 = await readToBase64(blob); + const arrayBuffer = fromBase64(base64); + return new Uint8Array(arrayBuffer); +} +async function collectStream(stream) { + let res = new Uint8Array(0); + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + const prior = res; + res = new Uint8Array(prior.length + value.length); + res.set(prior); + res.set(value, prior.length); + } + isDone = done; + } + return res; +} +function readToBase64(blob) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = (reader.result ?? ""); + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob); + }); +} diff --git a/node_modules/@smithy/fetch-http-handler/dist-types/fetch-http-handler.d.ts b/node_modules/@smithy/fetch-http-handler/dist-types/fetch-http-handler.d.ts new file mode 100644 index 0000000..3dbb1b5 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-types/fetch-http-handler.d.ts @@ -0,0 +1,33 @@ +import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import type { FetchHttpHandlerOptions } from "@smithy/types"; +import { HttpHandlerOptions, Provider } from "@smithy/types"; +export { FetchHttpHandlerOptions }; +type FetchHttpHandlerConfig = FetchHttpHandlerOptions; +/** + * @internal + * Detection of keepalive support. Can be overridden for testing. + */ +export declare const keepAliveSupport: { + supported: boolean; +}; +/** + * @public + * + * HttpHandler implementation using browsers' `fetch` global function. + */ +export declare class FetchHttpHandler implements HttpHandler { + private config?; + private configProvider; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions?: HttpHandler | FetchHttpHandlerOptions | Provider): FetchHttpHandler | HttpHandler; + constructor(options?: FetchHttpHandlerOptions | Provider); + destroy(): void; + handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{ + response: HttpResponse; + }>; + updateHttpClientConfig(key: keyof FetchHttpHandlerConfig, value: FetchHttpHandlerConfig[typeof key]): void; + httpHandlerConfigs(): FetchHttpHandlerConfig; +} diff --git a/node_modules/@smithy/fetch-http-handler/dist-types/index.d.ts b/node_modules/@smithy/fetch-http-handler/dist-types/index.d.ts new file mode 100644 index 0000000..a0c61f1 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-types/index.d.ts @@ -0,0 +1,2 @@ +export * from "./fetch-http-handler"; +export * from "./stream-collector"; diff --git a/node_modules/@smithy/fetch-http-handler/dist-types/request-timeout.d.ts b/node_modules/@smithy/fetch-http-handler/dist-types/request-timeout.d.ts new file mode 100644 index 0000000..28d784b --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-types/request-timeout.d.ts @@ -0,0 +1 @@ +export declare function requestTimeout(timeoutInMs?: number): Promise; diff --git a/node_modules/@smithy/fetch-http-handler/dist-types/stream-collector.d.ts b/node_modules/@smithy/fetch-http-handler/dist-types/stream-collector.d.ts new file mode 100644 index 0000000..b2ca812 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-types/stream-collector.d.ts @@ -0,0 +1,2 @@ +import { StreamCollector } from "@smithy/types"; +export declare const streamCollector: StreamCollector; diff --git a/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/fetch-http-handler.d.ts b/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/fetch-http-handler.d.ts new file mode 100644 index 0000000..f680e61 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/fetch-http-handler.d.ts @@ -0,0 +1,33 @@ +import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import { FetchHttpHandlerOptions } from "@smithy/types"; +import { HttpHandlerOptions, Provider } from "@smithy/types"; +export { FetchHttpHandlerOptions }; +type FetchHttpHandlerConfig = FetchHttpHandlerOptions; +/** + * @internal + * Detection of keepalive support. Can be overridden for testing. + */ +export declare const keepAliveSupport: { + supported: boolean; +}; +/** + * @public + * + * HttpHandler implementation using browsers' `fetch` global function. + */ +export declare class FetchHttpHandler implements HttpHandler { + private config?; + private configProvider; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions?: HttpHandler | FetchHttpHandlerOptions | Provider): FetchHttpHandler | HttpHandler; + constructor(options?: FetchHttpHandlerOptions | Provider); + destroy(): void; + handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{ + response: HttpResponse; + }>; + updateHttpClientConfig(key: keyof FetchHttpHandlerConfig, value: FetchHttpHandlerConfig[typeof key]): void; + httpHandlerConfigs(): FetchHttpHandlerConfig; +} diff --git a/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..d30edab --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/index.d.ts @@ -0,0 +1,2 @@ +export * from "./fetch-http-handler"; +export * from "./stream-collector"; diff --git a/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/request-timeout.d.ts b/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/request-timeout.d.ts new file mode 100644 index 0000000..ca24128 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/request-timeout.d.ts @@ -0,0 +1 @@ +export declare function requestTimeout(timeoutInMs?: number): Promise; diff --git a/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/stream-collector.d.ts b/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/stream-collector.d.ts new file mode 100644 index 0000000..8259097 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/stream-collector.d.ts @@ -0,0 +1,2 @@ +import { StreamCollector } from "@smithy/types"; +export declare const streamCollector: StreamCollector; diff --git a/node_modules/@smithy/fetch-http-handler/package.json b/node_modules/@smithy/fetch-http-handler/package.json new file mode 100644 index 0000000..87847d1 --- /dev/null +++ b/node_modules/@smithy/fetch-http-handler/package.json @@ -0,0 +1,79 @@ +{ + "name": "@smithy/fetch-http-handler", + "version": "2.5.0", + "description": "Provides a way to make requests", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline fetch-http-handler", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "extract:docs": "api-extractor run --local", + "test": "yarn g:jest --coverage --forceExit && karma start karma.conf.js" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "dependencies": { + "@smithy/protocol-http": "^3.3.0", + "@smithy/querystring-builder": "^2.2.0", + "@smithy/types": "^2.12.0", + "@smithy/util-base64": "^2.3.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@smithy/abort-controller": "^2.2.0", + "@tsconfig/recommended": "1.0.1", + "@types/chai-as-promised": "^7.1.2", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "karma": "6.4.0", + "karma-chai": "0.1.0", + "karma-chrome-launcher": "3.1.1", + "karma-coverage": "2.2.1", + "karma-env-preprocessor": "0.1.1", + "karma-firefox-launcher": "2.1.3", + "karma-jasmine": "5.1.0", + "karma-mocha": "2.0.1", + "karma-sourcemap-loader": "0.3.8", + "karma-typescript": "5.5.3", + "karma-webpack": "5.0.0", + "rimraf": "3.0.2", + "typedoc": "0.23.23", + "webpack": "5.76.0", + "webpack-cli": "4.10.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/fetch-http-handler", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/fetch-http-handler" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/hash-node/LICENSE b/node_modules/@smithy/hash-node/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/hash-node/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/hash-node/README.md b/node_modules/@smithy/hash-node/README.md new file mode 100644 index 0000000..a160019 --- /dev/null +++ b/node_modules/@smithy/hash-node/README.md @@ -0,0 +1,10 @@ +# @smithy/md5-node + +[![NPM version](https://img.shields.io/npm/v/@smithy/hash-node/latest.svg)](https://www.npmjs.com/package/@smithy/hash-node) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/hash-node.svg)](https://www.npmjs.com/package/@smithy/hash-node) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/hash-node/dist-cjs/index.js b/node_modules/@smithy/hash-node/dist-cjs/index.js new file mode 100644 index 0000000..7d2a985 --- /dev/null +++ b/node_modules/@smithy/hash-node/dist-cjs/index.js @@ -0,0 +1,66 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Hash: () => Hash +}); +module.exports = __toCommonJS(src_exports); +var import_util_buffer_from = require("@smithy/util-buffer-from"); +var import_util_utf8 = require("@smithy/util-utf8"); +var import_buffer = require("buffer"); +var import_crypto = require("crypto"); +var _Hash = class _Hash { + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); + } + update(toHash, encoding) { + this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding))); + } + digest() { + return Promise.resolve(this.hash.digest()); + } + reset() { + this.hash = this.secret ? (0, import_crypto.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto.createHash)(this.algorithmIdentifier); + } +}; +__name(_Hash, "Hash"); +var Hash = _Hash; +function castSourceData(toCast, encoding) { + if (import_buffer.Buffer.isBuffer(toCast)) { + return toCast; + } + if (typeof toCast === "string") { + return (0, import_util_buffer_from.fromString)(toCast, encoding); + } + if (ArrayBuffer.isView(toCast)) { + return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return (0, import_util_buffer_from.fromArrayBuffer)(toCast); +} +__name(castSourceData, "castSourceData"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + Hash +}); + diff --git a/node_modules/@smithy/hash-node/dist-es/index.js b/node_modules/@smithy/hash-node/dist-es/index.js new file mode 100644 index 0000000..718d9c6 --- /dev/null +++ b/node_modules/@smithy/hash-node/dist-es/index.js @@ -0,0 +1,34 @@ +import { fromArrayBuffer, fromString } from "@smithy/util-buffer-from"; +import { toUint8Array } from "@smithy/util-utf8"; +import { Buffer } from "buffer"; +import { createHash, createHmac } from "crypto"; +export class Hash { + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); + } + update(toHash, encoding) { + this.hash.update(toUint8Array(castSourceData(toHash, encoding))); + } + digest() { + return Promise.resolve(this.hash.digest()); + } + reset() { + this.hash = this.secret + ? createHmac(this.algorithmIdentifier, castSourceData(this.secret)) + : createHash(this.algorithmIdentifier); + } +} +function castSourceData(toCast, encoding) { + if (Buffer.isBuffer(toCast)) { + return toCast; + } + if (typeof toCast === "string") { + return fromString(toCast, encoding); + } + if (ArrayBuffer.isView(toCast)) { + return fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return fromArrayBuffer(toCast); +} diff --git a/node_modules/@smithy/hash-node/dist-types/index.d.ts b/node_modules/@smithy/hash-node/dist-types/index.d.ts new file mode 100644 index 0000000..20ed5ed --- /dev/null +++ b/node_modules/@smithy/hash-node/dist-types/index.d.ts @@ -0,0 +1,13 @@ +import { Checksum, SourceData } from "@smithy/types"; +/** + * @internal + */ +export declare class Hash implements Checksum { + private readonly algorithmIdentifier; + private readonly secret?; + private hash; + constructor(algorithmIdentifier: string, secret?: SourceData); + update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void; + digest(): Promise; + reset(): void; +} diff --git a/node_modules/@smithy/hash-node/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/hash-node/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..313ab7e --- /dev/null +++ b/node_modules/@smithy/hash-node/dist-types/ts3.4/index.d.ts @@ -0,0 +1,13 @@ +import { Checksum, SourceData } from "@smithy/types"; +/** + * @internal + */ +export declare class Hash implements Checksum { + private readonly algorithmIdentifier; + private readonly secret?; + private hash; + constructor(algorithmIdentifier: string, secret?: SourceData); + update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void; + digest(): Promise; + reset(): void; +} diff --git a/node_modules/@smithy/hash-node/package.json b/node_modules/@smithy/hash-node/package.json new file mode 100644 index 0000000..16ab6bb --- /dev/null +++ b/node_modules/@smithy/hash-node/package.json @@ -0,0 +1,64 @@ +{ + "name": "@smithy/hash-node", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline hash-node", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "hash-test-vectors": "^1.3.2", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "dependencies": { + "@smithy/types": "^2.12.0", + "@smithy/util-buffer-from": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/hash-node", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/hash-node" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/invalid-dependency/LICENSE b/node_modules/@smithy/invalid-dependency/LICENSE new file mode 100644 index 0000000..e907b58 --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/invalid-dependency/README.md b/node_modules/@smithy/invalid-dependency/README.md new file mode 100644 index 0000000..9110465 --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/README.md @@ -0,0 +1,10 @@ +# @smithy/invalid-dependency + +[![NPM version](https://img.shields.io/npm/v/@smithy/invalid-dependency/latest.svg)](https://www.npmjs.com/package/@smithy/invalid-dependency) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/invalid-dependency.svg)](https://www.npmjs.com/package/@smithy/invalid-dependency) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/invalid-dependency/dist-cjs/index.js b/node_modules/@smithy/invalid-dependency/dist-cjs/index.js new file mode 100644 index 0000000..8eeb1d4 --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-cjs/index.js @@ -0,0 +1,41 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + invalidFunction: () => invalidFunction, + invalidProvider: () => invalidProvider +}); +module.exports = __toCommonJS(src_exports); + +// src/invalidFunction.ts +var invalidFunction = /* @__PURE__ */ __name((message) => () => { + throw new Error(message); +}, "invalidFunction"); + +// src/invalidProvider.ts +var invalidProvider = /* @__PURE__ */ __name((message) => () => Promise.reject(message), "invalidProvider"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + invalidFunction, + invalidProvider +}); + diff --git a/node_modules/@smithy/invalid-dependency/dist-cjs/invalidFunction.js b/node_modules/@smithy/invalid-dependency/dist-cjs/invalidFunction.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-cjs/invalidFunction.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/invalid-dependency/dist-cjs/invalidProvider.js b/node_modules/@smithy/invalid-dependency/dist-cjs/invalidProvider.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-cjs/invalidProvider.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/invalid-dependency/dist-es/index.js b/node_modules/@smithy/invalid-dependency/dist-es/index.js new file mode 100644 index 0000000..fa0f1a6 --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-es/index.js @@ -0,0 +1,2 @@ +export * from "./invalidFunction"; +export * from "./invalidProvider"; diff --git a/node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js b/node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js new file mode 100644 index 0000000..676f9cb --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js @@ -0,0 +1,3 @@ +export const invalidFunction = (message) => () => { + throw new Error(message); +}; diff --git a/node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js b/node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js new file mode 100644 index 0000000..5305a0b --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js @@ -0,0 +1 @@ +export const invalidProvider = (message) => () => Promise.reject(message); diff --git a/node_modules/@smithy/invalid-dependency/dist-types/index.d.ts b/node_modules/@smithy/invalid-dependency/dist-types/index.d.ts new file mode 100644 index 0000000..1c99a56 --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-types/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./invalidFunction"; +/** + * @internal + */ +export * from "./invalidProvider"; diff --git a/node_modules/@smithy/invalid-dependency/dist-types/invalidFunction.d.ts b/node_modules/@smithy/invalid-dependency/dist-types/invalidFunction.d.ts new file mode 100644 index 0000000..2118b32 --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-types/invalidFunction.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const invalidFunction: (message: string) => () => never; diff --git a/node_modules/@smithy/invalid-dependency/dist-types/invalidProvider.d.ts b/node_modules/@smithy/invalid-dependency/dist-types/invalidProvider.d.ts new file mode 100644 index 0000000..3e9c28c --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-types/invalidProvider.d.ts @@ -0,0 +1,5 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + */ +export declare const invalidProvider: (message: string) => Provider; diff --git a/node_modules/@smithy/invalid-dependency/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/invalid-dependency/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..6818f1c --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-types/ts3.4/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./invalidFunction"; +/** + * @internal + */ +export * from "./invalidProvider"; diff --git a/node_modules/@smithy/invalid-dependency/dist-types/ts3.4/invalidFunction.d.ts b/node_modules/@smithy/invalid-dependency/dist-types/ts3.4/invalidFunction.d.ts new file mode 100644 index 0000000..b0e8f32 --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-types/ts3.4/invalidFunction.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const invalidFunction: (message: string) => () => never; diff --git a/node_modules/@smithy/invalid-dependency/dist-types/ts3.4/invalidProvider.d.ts b/node_modules/@smithy/invalid-dependency/dist-types/ts3.4/invalidProvider.d.ts new file mode 100644 index 0000000..765ee5a --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/dist-types/ts3.4/invalidProvider.d.ts @@ -0,0 +1,5 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + */ +export declare const invalidProvider: (message: string) => Provider; diff --git a/node_modules/@smithy/invalid-dependency/package.json b/node_modules/@smithy/invalid-dependency/package.json new file mode 100644 index 0000000..83ba17c --- /dev/null +++ b/node_modules/@smithy/invalid-dependency/package.json @@ -0,0 +1,57 @@ +{ + "name": "@smithy/invalid-dependency", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline invalid-dependency", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/invalid-dependency", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/invalid-dependency" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/is-array-buffer/LICENSE b/node_modules/@smithy/is-array-buffer/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/is-array-buffer/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/is-array-buffer/README.md b/node_modules/@smithy/is-array-buffer/README.md new file mode 100644 index 0000000..31853f2 --- /dev/null +++ b/node_modules/@smithy/is-array-buffer/README.md @@ -0,0 +1,10 @@ +# @smithy/is-array-buffer + +[![NPM version](https://img.shields.io/npm/v/@smithy/is-array-buffer/latest.svg)](https://www.npmjs.com/package/@smithy/is-array-buffer) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/is-array-buffer.svg)](https://www.npmjs.com/package/@smithy/is-array-buffer) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/is-array-buffer/dist-cjs/index.js b/node_modules/@smithy/is-array-buffer/dist-cjs/index.js new file mode 100644 index 0000000..5d792e7 --- /dev/null +++ b/node_modules/@smithy/is-array-buffer/dist-cjs/index.js @@ -0,0 +1,32 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + isArrayBuffer: () => isArrayBuffer +}); +module.exports = __toCommonJS(src_exports); +var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + isArrayBuffer +}); + diff --git a/node_modules/@smithy/is-array-buffer/dist-es/index.js b/node_modules/@smithy/is-array-buffer/dist-es/index.js new file mode 100644 index 0000000..8096cca --- /dev/null +++ b/node_modules/@smithy/is-array-buffer/dist-es/index.js @@ -0,0 +1,2 @@ +export const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || + Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; diff --git a/node_modules/@smithy/is-array-buffer/dist-types/index.d.ts b/node_modules/@smithy/is-array-buffer/dist-types/index.d.ts new file mode 100644 index 0000000..64f452e --- /dev/null +++ b/node_modules/@smithy/is-array-buffer/dist-types/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const isArrayBuffer: (arg: any) => arg is ArrayBuffer; diff --git a/node_modules/@smithy/is-array-buffer/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/is-array-buffer/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..ca8fd6b --- /dev/null +++ b/node_modules/@smithy/is-array-buffer/dist-types/ts3.4/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const isArrayBuffer: (arg: any) => arg is ArrayBuffer; diff --git a/node_modules/@smithy/is-array-buffer/package.json b/node_modules/@smithy/is-array-buffer/package.json new file mode 100644 index 0000000..ed8affc --- /dev/null +++ b/node_modules/@smithy/is-array-buffer/package.json @@ -0,0 +1,60 @@ +{ + "name": "@smithy/is-array-buffer", + "version": "2.2.0", + "description": "Provides a function for detecting if an argument is an ArrayBuffer", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline is-array-buffer", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/is-array-buffer", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/is-array-buffer" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-content-length/LICENSE b/node_modules/@smithy/middleware-content-length/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/middleware-content-length/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/middleware-content-length/README.md b/node_modules/@smithy/middleware-content-length/README.md new file mode 100644 index 0000000..2d40d92 --- /dev/null +++ b/node_modules/@smithy/middleware-content-length/README.md @@ -0,0 +1,4 @@ +# @smithy/middleware-content-length + +[![NPM version](https://img.shields.io/npm/v/@smithy/middleware-content-length/latest.svg)](https://www.npmjs.com/package/@smithy/middleware-content-length) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/middleware-content-length.svg)](https://www.npmjs.com/package/@smithy/middleware-content-length) diff --git a/node_modules/@smithy/middleware-content-length/dist-cjs/index.js b/node_modules/@smithy/middleware-content-length/dist-cjs/index.js new file mode 100644 index 0000000..9585153 --- /dev/null +++ b/node_modules/@smithy/middleware-content-length/dist-cjs/index.js @@ -0,0 +1,71 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + contentLengthMiddleware: () => contentLengthMiddleware, + contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, + getContentLengthPlugin: () => getContentLengthPlugin +}); +module.exports = __toCommonJS(src_exports); +var import_protocol_http = require("@smithy/protocol-http"); +var CONTENT_LENGTH_HEADER = "content-length"; +function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (import_protocol_http.HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER]: String(length) + }; + } catch (error) { + } + } + } + return next({ + ...args, + request + }); + }; +} +__name(contentLengthMiddleware, "contentLengthMiddleware"); +var contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true +}; +var getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + } +}), "getContentLengthPlugin"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + contentLengthMiddleware, + contentLengthMiddlewareOptions, + getContentLengthPlugin +}); + diff --git a/node_modules/@smithy/middleware-content-length/dist-es/index.js b/node_modules/@smithy/middleware-content-length/dist-es/index.js new file mode 100644 index 0000000..fa18e71 --- /dev/null +++ b/node_modules/@smithy/middleware-content-length/dist-es/index.js @@ -0,0 +1,39 @@ +import { HttpRequest } from "@smithy/protocol-http"; +const CONTENT_LENGTH_HEADER = "content-length"; +export function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && + Object.keys(headers) + .map((str) => str.toLowerCase()) + .indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER]: String(length), + }; + } + catch (error) { + } + } + } + return next({ + ...args, + request, + }); + }; +} +export const contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true, +}; +export const getContentLengthPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + }, +}); diff --git a/node_modules/@smithy/middleware-content-length/dist-types/index.d.ts b/node_modules/@smithy/middleware-content-length/dist-types/index.d.ts new file mode 100644 index 0000000..91a7000 --- /dev/null +++ b/node_modules/@smithy/middleware-content-length/dist-types/index.d.ts @@ -0,0 +1,6 @@ +import { BodyLengthCalculator, BuildHandlerOptions, BuildMiddleware, Pluggable } from "@smithy/types"; +export declare function contentLengthMiddleware(bodyLengthChecker: BodyLengthCalculator): BuildMiddleware; +export declare const contentLengthMiddlewareOptions: BuildHandlerOptions; +export declare const getContentLengthPlugin: (options: { + bodyLengthChecker: BodyLengthCalculator; +}) => Pluggable; diff --git a/node_modules/@smithy/middleware-content-length/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/middleware-content-length/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..10e1e18 --- /dev/null +++ b/node_modules/@smithy/middleware-content-length/dist-types/ts3.4/index.d.ts @@ -0,0 +1,6 @@ +import { BodyLengthCalculator, BuildHandlerOptions, BuildMiddleware, Pluggable } from "@smithy/types"; +export declare function contentLengthMiddleware(bodyLengthChecker: BodyLengthCalculator): BuildMiddleware; +export declare const contentLengthMiddlewareOptions: BuildHandlerOptions; +export declare const getContentLengthPlugin: (options: { + bodyLengthChecker: BodyLengthCalculator; +}) => Pluggable; diff --git a/node_modules/@smithy/middleware-content-length/package.json b/node_modules/@smithy/middleware-content-length/package.json new file mode 100644 index 0000000..b0c0054 --- /dev/null +++ b/node_modules/@smithy/middleware-content-length/package.json @@ -0,0 +1,63 @@ +{ + "name": "@smithy/middleware-content-length", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline middleware-content-length", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "exit 0", + "test:integration": "yarn g:jest --config jest.config.integ.js" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/middleware-content-length", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/middleware-content-length" + }, + "devDependencies": { + "@smithy/util-test": "^0.2.0", + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/LICENSE b/node_modules/@smithy/middleware-endpoint/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/README.md b/node_modules/@smithy/middleware-endpoint/README.md new file mode 100644 index 0000000..e03cbb2 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/README.md @@ -0,0 +1,10 @@ +# @smithy/middleware-endpoint + +[![NPM version](https://img.shields.io/npm/v/@smithy/middleware-endpoint/latest.svg)](https://www.npmjs.com/package/@smithy/middleware-endpoint) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/middleware-endpoint.svg)](https://www.npmjs.com/package/@smithy/middleware-endpoint) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/createConfigValueProvider.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/createConfigValueProvider.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/createConfigValueProvider.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.browser.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.browser.js new file mode 100644 index 0000000..9b578a7 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.browser.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getEndpointFromConfig = void 0; +const getEndpointFromConfig = async (serviceId) => undefined; +exports.getEndpointFromConfig = getEndpointFromConfig; diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js new file mode 100644 index 0000000..c82c9ac --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getEndpointFromConfig = void 0; +const node_config_provider_1 = require("@smithy/node-config-provider"); +const getEndpointUrlConfig_1 = require("./getEndpointUrlConfig"); +const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId))(); +exports.getEndpointFromConfig = getEndpointFromConfig; diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromInstructions.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromInstructions.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromInstructions.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js new file mode 100644 index 0000000..fe5c010 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getEndpointUrlConfig = void 0; +const shared_ini_file_loader_1 = require("@smithy/shared-ini-file-loader"); +const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; +const CONFIG_ENDPOINT_URL = "endpoint_url"; +const getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env) => { + const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); + const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + configFileSelector: (profile, config) => { + if (config && profile.services) { + const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); + const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl) + return endpointUrl; + } + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + default: undefined, +}); +exports.getEndpointUrlConfig = getEndpointUrlConfig; diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/index.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/toEndpointV1.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/toEndpointV1.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/toEndpointV1.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/endpointMiddleware.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/endpointMiddleware.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/endpointMiddleware.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/getEndpointPlugin.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/getEndpointPlugin.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/getEndpointPlugin.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js new file mode 100644 index 0000000..006196d --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js @@ -0,0 +1,254 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + endpointMiddleware: () => endpointMiddleware, + endpointMiddlewareOptions: () => endpointMiddlewareOptions, + getEndpointFromInstructions: () => getEndpointFromInstructions, + getEndpointPlugin: () => getEndpointPlugin, + resolveEndpointConfig: () => resolveEndpointConfig, + resolveParams: () => resolveParams, + toEndpointV1: () => toEndpointV1 +}); +module.exports = __toCommonJS(src_exports); + +// src/service-customizations/s3.ts +var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = (endpointParams == null ? void 0 : endpointParams.Bucket) || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; +}, "resolveParamsForS3"); +var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; +var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; +var DOTS_PATTERN = /\.\./; +var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); +var isArnBucketName = /* @__PURE__ */ __name((bucketName) => { + const [arn, partition, service, region, account, typeOrId] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = [arn, partition, service, account, typeOrId].filter(Boolean).length === 5; + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return arn === "arn" && !!partition && !!service && !!account && !!typeOrId; +}, "isArnBucketName"); + +// src/adaptors/createConfigValueProvider.ts +var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => { + const configProvider = /* @__PURE__ */ __name(async () => { + const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = (credentials == null ? void 0 : credentials.credentialScope) ?? (credentials == null ? void 0 : credentials.CredentialScope); + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname, port, path } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; + } + } + return endpoint; + }; + } + return configProvider; +}, "createConfigValueProvider"); + +// src/adaptors/getEndpointFromInstructions.ts +var import_getEndpointFromConfig = require("./adaptors/getEndpointFromConfig"); + +// src/adaptors/toEndpointV1.ts +var import_url_parser = require("@smithy/url-parser"); +var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + return (0, import_url_parser.parseUrl)(endpoint.url); + } + return endpoint; + } + return (0, import_url_parser.parseUrl)(endpoint); +}, "toEndpointV1"); + +// src/adaptors/getEndpointFromInstructions.ts +var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.endpoint) { + const endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId || ""); + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context); + return endpoint; +}, "getEndpointFromInstructions"); +var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + var _a; + const endpointParams = {}; + const instructions = ((_a = instructionsSupplier == null ? void 0 : instructionsSupplier.getEndpointParameterInstructions) == null ? void 0 : _a.call(instructionsSupplier)) || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; +}, "resolveParams"); + +// src/endpointMiddleware.ts +var import_util_middleware = require("@smithy/util-middleware"); +var endpointMiddleware = /* @__PURE__ */ __name(({ + config, + instructions +}) => { + return (next, context) => async (args) => { + var _a, _b, _c; + const endpoint = await getEndpointFromInstructions( + args.input, + { + getEndpointParameterInstructions() { + return instructions; + } + }, + { ...config }, + context + ); + context.endpointV2 = endpoint; + context.authSchemes = (_a = endpoint.properties) == null ? void 0 : _a.authSchemes; + const authScheme = (_b = context.authSchemes) == null ? void 0 : _b[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = (0, import_util_middleware.getSmithyContext)(context); + const httpAuthOption = (_c = smithyContext == null ? void 0 : smithyContext.selectedHttpAuthScheme) == null ? void 0 : _c.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign( + httpAuthOption.signingProperties || {}, + { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, + authScheme.properties + ); + } + } + return next({ + ...args + }); + }; +}, "endpointMiddleware"); + +// src/getEndpointPlugin.ts +var import_middleware_serde = require("@smithy/middleware-serde"); +var endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde.serializerMiddlewareOption.name +}; +var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + endpointMiddleware({ + config, + instructions + }), + endpointMiddlewareOptions + ); + } +}), "getEndpointPlugin"); + +// src/resolveEndpointConfig.ts + +var resolveEndpointConfig = /* @__PURE__ */ __name((input) => { + const tls = input.tls ?? true; + const { endpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0; + const isCustomEndpoint = !!endpoint; + return { + ...input, + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false), + useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(input.useFipsEndpoint ?? false) + }; +}, "resolveEndpointConfig"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + getEndpointFromInstructions, + resolveParams, + toEndpointV1, + endpointMiddleware, + endpointMiddlewareOptions, + getEndpointPlugin, + resolveEndpointConfig +}); + diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/resolveEndpointConfig.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/resolveEndpointConfig.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/resolveEndpointConfig.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/service-customizations/index.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/service-customizations/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/service-customizations/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/service-customizations/s3.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/service-customizations/s3.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/service-customizations/s3.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/dist-cjs/types.js b/node_modules/@smithy/middleware-endpoint/dist-cjs/types.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-cjs/types.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js new file mode 100644 index 0000000..9a117fc --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js @@ -0,0 +1,32 @@ +export const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => { + const configProvider = async () => { + const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }; + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname, port, path } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; + } + } + return endpoint; + }; + } + return configProvider; +}; diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js new file mode 100644 index 0000000..75fc136 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js @@ -0,0 +1 @@ +export const getEndpointFromConfig = async (serviceId) => undefined; diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.js b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.js new file mode 100644 index 0000000..6978074 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.js @@ -0,0 +1,3 @@ +import { loadConfig } from "@smithy/node-config-provider"; +import { getEndpointUrlConfig } from "./getEndpointUrlConfig"; +export const getEndpointFromConfig = async (serviceId) => loadConfig(getEndpointUrlConfig(serviceId))(); diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js new file mode 100644 index 0000000..8dedd8c --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js @@ -0,0 +1,45 @@ +import { resolveParamsForS3 } from "../service-customizations"; +import { createConfigValueProvider } from "./createConfigValueProvider"; +import { getEndpointFromConfig } from "./getEndpointFromConfig"; +import { toEndpointV1 } from "./toEndpointV1"; +export const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.endpoint) { + const endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId || ""); + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context); + return endpoint; +}; +export const resolveParams = async (commandInput, instructionsSupplier, clientConfig) => { + const endpointParams = {}; + const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; +}; diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointUrlConfig.js b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointUrlConfig.js new file mode 100644 index 0000000..82a1519 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointUrlConfig.js @@ -0,0 +1,31 @@ +import { CONFIG_PREFIX_SEPARATOR } from "@smithy/shared-ini-file-loader"; +const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; +const CONFIG_ENDPOINT_URL = "endpoint_url"; +export const getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env) => { + const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); + const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + configFileSelector: (profile, config) => { + if (config && profile.services) { + const servicesSection = config[["services", profile.services].join(CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); + const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl) + return endpointUrl; + } + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + default: undefined, +}); diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js new file mode 100644 index 0000000..17752da --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js @@ -0,0 +1,2 @@ +export * from "./getEndpointFromInstructions"; +export * from "./toEndpointV1"; diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js new file mode 100644 index 0000000..83f4324 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js @@ -0,0 +1,10 @@ +import { parseUrl } from "@smithy/url-parser"; +export const toEndpointV1 = (endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + return parseUrl(endpoint.url); + } + return endpoint; + } + return parseUrl(endpoint); +}; diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js b/node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js new file mode 100644 index 0000000..1c036ed --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js @@ -0,0 +1,32 @@ +import { getSmithyContext } from "@smithy/util-middleware"; +import { getEndpointFromInstructions } from "./adaptors/getEndpointFromInstructions"; +export const endpointMiddleware = ({ config, instructions, }) => { + return (next, context) => async (args) => { + const endpoint = await getEndpointFromInstructions(args.input, { + getEndpointParameterInstructions() { + return instructions; + }, + }, { ...config }, context); + context.endpointV2 = endpoint; + context.authSchemes = endpoint.properties?.authSchemes; + const authScheme = context.authSchemes?.[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = getSmithyContext(context); + const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet, + }, authScheme.properties); + } + } + return next({ + ...args, + }); + }; +}; diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js b/node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js new file mode 100644 index 0000000..e2335f4 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js @@ -0,0 +1,18 @@ +import { serializerMiddlewareOption } from "@smithy/middleware-serde"; +import { endpointMiddleware } from "./endpointMiddleware"; +export const endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: serializerMiddlewareOption.name, +}; +export const getEndpointPlugin = (config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(endpointMiddleware({ + config, + instructions, + }), endpointMiddlewareOptions); + }, +}); diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/index.js b/node_modules/@smithy/middleware-endpoint/dist-es/index.js new file mode 100644 index 0000000..f89653e --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/index.js @@ -0,0 +1,5 @@ +export * from "./adaptors"; +export * from "./endpointMiddleware"; +export * from "./getEndpointPlugin"; +export * from "./resolveEndpointConfig"; +export * from "./types"; diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js b/node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js new file mode 100644 index 0000000..d5ea0bd --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js @@ -0,0 +1,16 @@ +import { normalizeProvider } from "@smithy/util-middleware"; +import { toEndpointV1 } from "./adaptors/toEndpointV1"; +export const resolveEndpointConfig = (input) => { + const tls = input.tls ?? true; + const { endpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : undefined; + const isCustomEndpoint = !!endpoint; + return { + ...input, + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: normalizeProvider(input.useDualstackEndpoint ?? false), + useFipsEndpoint: normalizeProvider(input.useFipsEndpoint ?? false), + }; +}; diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js b/node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js new file mode 100644 index 0000000..e50e107 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js @@ -0,0 +1 @@ +export * from "./s3"; diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js b/node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js new file mode 100644 index 0000000..b199305 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js @@ -0,0 +1,37 @@ +export const resolveParamsForS3 = async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } + else if (!isDnsCompatibleBucketName(bucket) || + (bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:")) || + bucket.toLowerCase() !== bucket || + bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; +}; +const DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; +const IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; +const DOTS_PATTERN = /\.\./; +export const DOT_PATTERN = /\./; +export const S3_HOSTNAME_PATTERN = /^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./; +export const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); +export const isArnBucketName = (bucketName) => { + const [arn, partition, service, region, account, typeOrId] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = [arn, partition, service, account, typeOrId].filter(Boolean).length === 5; + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return arn === "arn" && !!partition && !!service && !!account && !!typeOrId; +}; diff --git a/node_modules/@smithy/middleware-endpoint/dist-es/types.js b/node_modules/@smithy/middleware-endpoint/dist-es/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-es/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/createConfigValueProvider.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/createConfigValueProvider.d.ts new file mode 100644 index 0000000..df65914 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/createConfigValueProvider.d.ts @@ -0,0 +1,13 @@ +/** + * Normalize some key of the client config to an async provider. + * @internal + * + * @param configKey - the key to look up in config. + * @param canonicalEndpointParamKey - this is the name the EndpointRuleSet uses. + * it will most likely not contain the config + * value, but we use it as a fallback. + * @param config - container of the config values. + * + * @returns async function that will resolve with the value. + */ +export declare const createConfigValueProvider: >(configKey: string, canonicalEndpointParamKey: string, config: Config) => () => Promise; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromConfig.browser.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromConfig.browser.d.ts new file mode 100644 index 0000000..de05fa5 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromConfig.browser.d.ts @@ -0,0 +1 @@ +export declare const getEndpointFromConfig: (serviceId: string) => Promise; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromConfig.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromConfig.d.ts new file mode 100644 index 0000000..e072582 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromConfig.d.ts @@ -0,0 +1 @@ +export declare const getEndpointFromConfig: (serviceId: string) => Promise; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromInstructions.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromInstructions.d.ts new file mode 100644 index 0000000..49cef2a --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromInstructions.d.ts @@ -0,0 +1,28 @@ +import { EndpointParameters, EndpointV2, HandlerExecutionContext } from "@smithy/types"; +import { EndpointResolvedConfig } from "../resolveEndpointConfig"; +import { EndpointParameterInstructions } from "../types"; +/** + * @internal + */ +export type EndpointParameterInstructionsSupplier = Partial<{ + getEndpointParameterInstructions(): EndpointParameterInstructions; +}>; +/** + * This step in the endpoint resolution process is exposed as a function + * to allow packages such as signers, lib-upload, etc. to get + * the V2 Endpoint associated to an instance of some api operation command + * without needing to send it or resolve its middleware stack. + * + * @internal + * @param commandInput - the input of the Command in question. + * @param instructionsSupplier - this is typically a Command constructor. A static function supplying the + * endpoint parameter instructions will exist for commands in services + * having an endpoints ruleset trait. + * @param clientConfig - config of the service client. + * @param context - optional context. + */ +export declare const getEndpointFromInstructions: , Config extends Record>(commandInput: CommandInput, instructionsSupplier: EndpointParameterInstructionsSupplier, clientConfig: Partial> & Config, context?: HandlerExecutionContext) => Promise; +/** + * @internal + */ +export declare const resolveParams: , Config extends Record>(commandInput: CommandInput, instructionsSupplier: EndpointParameterInstructionsSupplier, clientConfig: Partial> & Config) => Promise; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointUrlConfig.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointUrlConfig.d.ts new file mode 100644 index 0000000..0971010 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointUrlConfig.d.ts @@ -0,0 +1,2 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +export declare const getEndpointUrlConfig: (serviceId: string) => LoadedConfigSelectors; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/index.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/index.d.ts new file mode 100644 index 0000000..cc13488 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./getEndpointFromInstructions"; +/** + * @internal + */ +export * from "./toEndpointV1"; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts new file mode 100644 index 0000000..834aabb --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts @@ -0,0 +1,5 @@ +import { Endpoint, EndpointV2 } from "@smithy/types"; +/** + * @internal + */ +export declare const toEndpointV1: (endpoint: string | Endpoint | EndpointV2) => Endpoint; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/endpointMiddleware.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/endpointMiddleware.d.ts new file mode 100644 index 0000000..67cee64 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/endpointMiddleware.d.ts @@ -0,0 +1,10 @@ +import { EndpointParameters, SerializeMiddleware } from "@smithy/types"; +import { EndpointResolvedConfig } from "./resolveEndpointConfig"; +import { EndpointParameterInstructions } from "./types"; +/** + * @internal + */ +export declare const endpointMiddleware: ({ config, instructions, }: { + config: EndpointResolvedConfig; + instructions: EndpointParameterInstructions; +}) => SerializeMiddleware; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/getEndpointPlugin.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/getEndpointPlugin.d.ts new file mode 100644 index 0000000..910f44d --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/getEndpointPlugin.d.ts @@ -0,0 +1,11 @@ +import { EndpointParameters, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types"; +import { EndpointResolvedConfig } from "./resolveEndpointConfig"; +import { EndpointParameterInstructions } from "./types"; +/** + * @internal + */ +export declare const endpointMiddlewareOptions: SerializeHandlerOptions & RelativeMiddlewareOptions; +/** + * @internal + */ +export declare const getEndpointPlugin: (config: EndpointResolvedConfig, instructions: EndpointParameterInstructions) => Pluggable; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/index.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/index.d.ts new file mode 100644 index 0000000..bea06cf --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/index.d.ts @@ -0,0 +1,17 @@ +/** + * @internal + */ +export * from "./adaptors"; +/** + * @internal + */ +export * from "./endpointMiddleware"; +/** + * @internal + */ +export * from "./getEndpointPlugin"; +export * from "./resolveEndpointConfig"; +/** + * @internal + */ +export * from "./types"; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/resolveEndpointConfig.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/resolveEndpointConfig.d.ts new file mode 100644 index 0000000..8243726 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/resolveEndpointConfig.d.ts @@ -0,0 +1,93 @@ +import { Endpoint, EndpointParameters, EndpointV2, Logger, Provider, UrlParser } from "@smithy/types"; +/** + * @public + * + * Endpoint config interfaces and resolver for Endpoint v2. They live in separate package to allow per-service onboarding. + * When all services onboard Endpoint v2, the resolver in config-resolver package can be removed. + * This interface includes all the endpoint parameters with built-in bindings of "AWS::*" and "SDK::*" + */ +export interface EndpointInputConfig { + /** + * The fully qualified endpoint of the webservice. This is only for using + * a custom endpoint (for example, when using a local version of S3). + * + * Endpoint transformations such as S3 applying a bucket to the hostname are + * still applicable to this custom endpoint. + */ + endpoint?: string | Endpoint | Provider | EndpointV2 | Provider; + /** + * Providing a custom endpointProvider will override + * built-in transformations of the endpoint such as S3 adding the bucket + * name to the hostname, since they are part of the default endpointProvider. + */ + endpointProvider?: (params: T, context?: { + logger?: Logger; + }) => EndpointV2; + /** + * Whether TLS is enabled for requests. + * @deprecated + */ + tls?: boolean; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | Provider; + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | Provider; +} +interface PreviouslyResolved { + urlParser: UrlParser; + region: Provider; + endpointProvider: (params: T, context?: { + logger?: Logger; + }) => EndpointV2; + logger?: Logger; +} +/** + * @internal + * + * This supercedes the similarly named EndpointsResolvedConfig (no parametric types) + * from resolveEndpointsConfig.ts in @smithy/config-resolver. + */ +export interface EndpointResolvedConfig { + /** + * Custom endpoint provided by the user. + * This is normalized to a single interface from the various acceptable types. + * This field will be undefined if a custom endpoint is not provided. + */ + endpoint?: Provider; + endpointProvider: (params: T, context?: { + logger?: Logger; + }) => EndpointV2; + /** + * Whether TLS is enabled for requests. + * @deprecated + */ + tls: boolean; + /** + * Whether the endpoint is specified by caller. + * @internal + * @deprecated + */ + isCustomEndpoint?: boolean; + /** + * Resolved value for input {@link EndpointsInputConfig.useDualstackEndpoint} + */ + useDualstackEndpoint: Provider; + /** + * Resolved value for input {@link EndpointsInputConfig.useFipsEndpoint} + */ + useFipsEndpoint: Provider; + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; +} +/** + * @internal + */ +export declare const resolveEndpointConfig: (input: T & EndpointInputConfig

& PreviouslyResolved

) => T & EndpointResolvedConfig

; +export {}; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/service-customizations/index.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/service-customizations/index.d.ts new file mode 100644 index 0000000..716a15d --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/service-customizations/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./s3"; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/service-customizations/s3.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/service-customizations/s3.d.ts new file mode 100644 index 0000000..80b2e6a --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/service-customizations/s3.d.ts @@ -0,0 +1,26 @@ +import { EndpointParameters } from "@smithy/types"; +/** + * @internal + */ +export declare const resolveParamsForS3: (endpointParams: EndpointParameters) => Promise; +/** + * @internal + */ +export declare const DOT_PATTERN: RegExp; +/** + * @internal + */ +export declare const S3_HOSTNAME_PATTERN: RegExp; +/** + * Determines whether a given string is DNS compliant per the rules outlined by + * S3. Length, capitaization, and leading dot restrictions are enforced by the + * DOMAIN_PATTERN regular expression. + * @internal + * + * @see https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html + */ +export declare const isDnsCompatibleBucketName: (bucketName: string) => boolean; +/** + * @internal + */ +export declare const isArnBucketName: (bucketName: string) => boolean; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/createConfigValueProvider.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/createConfigValueProvider.d.ts new file mode 100644 index 0000000..842f8fa --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/createConfigValueProvider.d.ts @@ -0,0 +1,13 @@ +/** + * Normalize some key of the client config to an async provider. + * @internal + * + * @param configKey - the key to look up in config. + * @param canonicalEndpointParamKey - this is the name the EndpointRuleSet uses. + * it will most likely not contain the config + * value, but we use it as a fallback. + * @param config - container of the config values. + * + * @returns async function that will resolve with the value. + */ +export declare const createConfigValueProvider: >(configKey: string, canonicalEndpointParamKey: string, config: Config) => () => Promise; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromConfig.browser.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromConfig.browser.d.ts new file mode 100644 index 0000000..1a4f6ba --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromConfig.browser.d.ts @@ -0,0 +1 @@ +export declare const getEndpointFromConfig: (serviceId: string) => Promise; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromConfig.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromConfig.d.ts new file mode 100644 index 0000000..6c2bf0e --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromConfig.d.ts @@ -0,0 +1 @@ +export declare const getEndpointFromConfig: (serviceId: string) => Promise; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromInstructions.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromInstructions.d.ts new file mode 100644 index 0000000..82dc8df --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromInstructions.d.ts @@ -0,0 +1,28 @@ +import { EndpointParameters, EndpointV2, HandlerExecutionContext } from "@smithy/types"; +import { EndpointResolvedConfig } from "../resolveEndpointConfig"; +import { EndpointParameterInstructions } from "../types"; +/** + * @internal + */ +export type EndpointParameterInstructionsSupplier = Partial<{ + getEndpointParameterInstructions(): EndpointParameterInstructions; +}>; +/** + * This step in the endpoint resolution process is exposed as a function + * to allow packages such as signers, lib-upload, etc. to get + * the V2 Endpoint associated to an instance of some api operation command + * without needing to send it or resolve its middleware stack. + * + * @internal + * @param commandInput - the input of the Command in question. + * @param instructionsSupplier - this is typically a Command constructor. A static function supplying the + * endpoint parameter instructions will exist for commands in services + * having an endpoints ruleset trait. + * @param clientConfig - config of the service client. + * @param context - optional context. + */ +export declare const getEndpointFromInstructions: , Config extends Record>(commandInput: CommandInput, instructionsSupplier: EndpointParameterInstructionsSupplier, clientConfig: Partial> & Config, context?: HandlerExecutionContext) => Promise; +/** + * @internal + */ +export declare const resolveParams: , Config extends Record>(commandInput: CommandInput, instructionsSupplier: EndpointParameterInstructionsSupplier, clientConfig: Partial> & Config) => Promise; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointUrlConfig.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointUrlConfig.d.ts new file mode 100644 index 0000000..7b9d068 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointUrlConfig.d.ts @@ -0,0 +1,2 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +export declare const getEndpointUrlConfig: (serviceId: string) => LoadedConfigSelectors; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/index.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/index.d.ts new file mode 100644 index 0000000..ced0520 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./getEndpointFromInstructions"; +/** + * @internal + */ +export * from "./toEndpointV1"; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/toEndpointV1.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/toEndpointV1.d.ts new file mode 100644 index 0000000..047ded8 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/toEndpointV1.d.ts @@ -0,0 +1,5 @@ +import { Endpoint, EndpointV2 } from "@smithy/types"; +/** + * @internal + */ +export declare const toEndpointV1: (endpoint: string | Endpoint | EndpointV2) => Endpoint; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/endpointMiddleware.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/endpointMiddleware.d.ts new file mode 100644 index 0000000..3f7e40a --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/endpointMiddleware.d.ts @@ -0,0 +1,10 @@ +import { EndpointParameters, SerializeMiddleware } from "@smithy/types"; +import { EndpointResolvedConfig } from "./resolveEndpointConfig"; +import { EndpointParameterInstructions } from "./types"; +/** + * @internal + */ +export declare const endpointMiddleware: ({ config, instructions, }: { + config: EndpointResolvedConfig; + instructions: EndpointParameterInstructions; +}) => SerializeMiddleware; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/getEndpointPlugin.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/getEndpointPlugin.d.ts new file mode 100644 index 0000000..39f93a9 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/getEndpointPlugin.d.ts @@ -0,0 +1,11 @@ +import { EndpointParameters, Pluggable, RelativeMiddlewareOptions, SerializeHandlerOptions } from "@smithy/types"; +import { EndpointResolvedConfig } from "./resolveEndpointConfig"; +import { EndpointParameterInstructions } from "./types"; +/** + * @internal + */ +export declare const endpointMiddlewareOptions: SerializeHandlerOptions & RelativeMiddlewareOptions; +/** + * @internal + */ +export declare const getEndpointPlugin: (config: EndpointResolvedConfig, instructions: EndpointParameterInstructions) => Pluggable; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..2ad75b9 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/index.d.ts @@ -0,0 +1,17 @@ +/** + * @internal + */ +export * from "./adaptors"; +/** + * @internal + */ +export * from "./endpointMiddleware"; +/** + * @internal + */ +export * from "./getEndpointPlugin"; +export * from "./resolveEndpointConfig"; +/** + * @internal + */ +export * from "./types"; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/resolveEndpointConfig.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/resolveEndpointConfig.d.ts new file mode 100644 index 0000000..7b1dfc1 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/resolveEndpointConfig.d.ts @@ -0,0 +1,93 @@ +import { Endpoint, EndpointParameters, EndpointV2, Logger, Provider, UrlParser } from "@smithy/types"; +/** + * @public + * + * Endpoint config interfaces and resolver for Endpoint v2. They live in separate package to allow per-service onboarding. + * When all services onboard Endpoint v2, the resolver in config-resolver package can be removed. + * This interface includes all the endpoint parameters with built-in bindings of "AWS::*" and "SDK::*" + */ +export interface EndpointInputConfig { + /** + * The fully qualified endpoint of the webservice. This is only for using + * a custom endpoint (for example, when using a local version of S3). + * + * Endpoint transformations such as S3 applying a bucket to the hostname are + * still applicable to this custom endpoint. + */ + endpoint?: string | Endpoint | Provider | EndpointV2 | Provider; + /** + * Providing a custom endpointProvider will override + * built-in transformations of the endpoint such as S3 adding the bucket + * name to the hostname, since they are part of the default endpointProvider. + */ + endpointProvider?: (params: T, context?: { + logger?: Logger; + }) => EndpointV2; + /** + * Whether TLS is enabled for requests. + * @deprecated + */ + tls?: boolean; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | Provider; + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | Provider; +} +interface PreviouslyResolved { + urlParser: UrlParser; + region: Provider; + endpointProvider: (params: T, context?: { + logger?: Logger; + }) => EndpointV2; + logger?: Logger; +} +/** + * @internal + * + * This supercedes the similarly named EndpointsResolvedConfig (no parametric types) + * from resolveEndpointsConfig.ts in @smithy/config-resolver. + */ +export interface EndpointResolvedConfig { + /** + * Custom endpoint provided by the user. + * This is normalized to a single interface from the various acceptable types. + * This field will be undefined if a custom endpoint is not provided. + */ + endpoint?: Provider; + endpointProvider: (params: T, context?: { + logger?: Logger; + }) => EndpointV2; + /** + * Whether TLS is enabled for requests. + * @deprecated + */ + tls: boolean; + /** + * Whether the endpoint is specified by caller. + * @internal + * @deprecated + */ + isCustomEndpoint?: boolean; + /** + * Resolved value for input {@link EndpointsInputConfig.useDualstackEndpoint} + */ + useDualstackEndpoint: Provider; + /** + * Resolved value for input {@link EndpointsInputConfig.useFipsEndpoint} + */ + useFipsEndpoint: Provider; + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; +} +/** + * @internal + */ +export declare const resolveEndpointConfig: (input: T & EndpointInputConfig

& PreviouslyResolved

) => T & EndpointResolvedConfig

; +export {}; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/service-customizations/index.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/service-customizations/index.d.ts new file mode 100644 index 0000000..6529752 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/service-customizations/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./s3"; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/service-customizations/s3.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/service-customizations/s3.d.ts new file mode 100644 index 0000000..cace227 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/service-customizations/s3.d.ts @@ -0,0 +1,26 @@ +import { EndpointParameters } from "@smithy/types"; +/** + * @internal + */ +export declare const resolveParamsForS3: (endpointParams: EndpointParameters) => Promise; +/** + * @internal + */ +export declare const DOT_PATTERN: RegExp; +/** + * @internal + */ +export declare const S3_HOSTNAME_PATTERN: RegExp; +/** + * Determines whether a given string is DNS compliant per the rules outlined by + * S3. Length, capitaization, and leading dot restrictions are enforced by the + * DOMAIN_PATTERN regular expression. + * @internal + * + * @see https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html + */ +export declare const isDnsCompatibleBucketName: (bucketName: string) => boolean; +/** + * @internal + */ +export declare const isArnBucketName: (bucketName: string) => boolean; diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/types.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/types.d.ts new file mode 100644 index 0000000..b689f42 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/types.d.ts @@ -0,0 +1,34 @@ +/** + * @internal + */ +export interface EndpointParameterInstructions { + [name: string]: BuiltInParamInstruction | ClientContextParamInstruction | StaticContextParamInstruction | ContextParamInstruction; +} +/** + * @internal + */ +export interface BuiltInParamInstruction { + type: "builtInParams"; + name: string; +} +/** + * @internal + */ +export interface ClientContextParamInstruction { + type: "clientContextParams"; + name: string; +} +/** + * @internal + */ +export interface StaticContextParamInstruction { + type: "staticContextParams"; + value: string | boolean; +} +/** + * @internal + */ +export interface ContextParamInstruction { + type: "contextParams"; + name: string; +} diff --git a/node_modules/@smithy/middleware-endpoint/dist-types/types.d.ts b/node_modules/@smithy/middleware-endpoint/dist-types/types.d.ts new file mode 100644 index 0000000..3079327 --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/dist-types/types.d.ts @@ -0,0 +1,34 @@ +/** + * @internal + */ +export interface EndpointParameterInstructions { + [name: string]: BuiltInParamInstruction | ClientContextParamInstruction | StaticContextParamInstruction | ContextParamInstruction; +} +/** + * @internal + */ +export interface BuiltInParamInstruction { + type: "builtInParams"; + name: string; +} +/** + * @internal + */ +export interface ClientContextParamInstruction { + type: "clientContextParams"; + name: string; +} +/** + * @internal + */ +export interface StaticContextParamInstruction { + type: "staticContextParams"; + value: string | boolean; +} +/** + * @internal + */ +export interface ContextParamInstruction { + type: "contextParams"; + name: string; +} diff --git a/node_modules/@smithy/middleware-endpoint/package.json b/node_modules/@smithy/middleware-endpoint/package.json new file mode 100644 index 0000000..0e7d14d --- /dev/null +++ b/node_modules/@smithy/middleware-endpoint/package.json @@ -0,0 +1,73 @@ +{ + "name": "@smithy/middleware-endpoint", + "version": "2.5.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline middleware-endpoint", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest --passWithNoTests", + "extract:docs": "api-extractor run --local" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/middleware-serde": "^2.3.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "browser": { + "./dist-es/adaptors/getEndpointFromConfig": "./dist-es/adaptors/getEndpointFromConfig.browser" + }, + "react-native": { + "./dist-es/adaptors/getEndpointFromConfig": "./dist-es/adaptors/getEndpointFromConfig.browser", + "./dist-cjs/adaptors/getEndpointFromConfig": "./dist-cjs/adaptors/getEndpointFromConfig.browser" + }, + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/middleware-endpoint", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/middleware-endpoint" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/LICENSE b/node_modules/@smithy/middleware-retry/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/middleware-retry/README.md b/node_modules/@smithy/middleware-retry/README.md new file mode 100644 index 0000000..4da538f --- /dev/null +++ b/node_modules/@smithy/middleware-retry/README.md @@ -0,0 +1,11 @@ +# @smithy/middleware-retry + +[![NPM version](https://img.shields.io/npm/v/@smithy/middleware-retry/latest.svg)](https://www.npmjs.com/package/@smithy/middleware-retry) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/middleware-retry.svg)](https://www.npmjs.com/package/@smithy/middleware-retry) + +## Usage + +See [@smithy/util-retry](https://github.com/awslabs/smithy-typescript/tree/main/packages/util-retry) +for retry behavior and configuration. + +See also: [AWS Documentation: Retry behavior](https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html). diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/AdaptiveRetryStrategy.js b/node_modules/@smithy/middleware-retry/dist-cjs/AdaptiveRetryStrategy.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/AdaptiveRetryStrategy.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/StandardRetryStrategy.js b/node_modules/@smithy/middleware-retry/dist-cjs/StandardRetryStrategy.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/StandardRetryStrategy.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/configurations.js b/node_modules/@smithy/middleware-retry/dist-cjs/configurations.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/configurations.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/defaultRetryQuota.js b/node_modules/@smithy/middleware-retry/dist-cjs/defaultRetryQuota.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/defaultRetryQuota.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/delayDecider.js b/node_modules/@smithy/middleware-retry/dist-cjs/delayDecider.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/delayDecider.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/index.js b/node_modules/@smithy/middleware-retry/dist-cjs/index.js new file mode 100644 index 0000000..3e84253 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/index.js @@ -0,0 +1,425 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, + CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, + ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS, + ENV_RETRY_MODE: () => ENV_RETRY_MODE, + NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS, + NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS, + StandardRetryStrategy: () => StandardRetryStrategy, + defaultDelayDecider: () => defaultDelayDecider, + defaultRetryDecider: () => defaultRetryDecider, + getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin, + getRetryAfterHint: () => getRetryAfterHint, + getRetryPlugin: () => getRetryPlugin, + omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware, + omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions, + resolveRetryConfig: () => resolveRetryConfig, + retryMiddleware: () => retryMiddleware, + retryMiddlewareOptions: () => retryMiddlewareOptions +}); +module.exports = __toCommonJS(src_exports); + +// src/AdaptiveRetryStrategy.ts + + +// src/StandardRetryStrategy.ts +var import_protocol_http = require("@smithy/protocol-http"); + + +var import_uuid = require("uuid"); + +// src/defaultRetryQuota.ts +var import_util_retry = require("@smithy/util-retry"); +var getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = (options == null ? void 0 : options.noRetryIncrement) ?? import_util_retry.NO_RETRY_INCREMENT; + const retryCost = (options == null ? void 0 : options.retryCost) ?? import_util_retry.RETRY_COST; + const timeoutRetryCost = (options == null ? void 0 : options.timeoutRetryCost) ?? import_util_retry.TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount"); + const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens"); + const retrieveRetryTokens = /* @__PURE__ */ __name((error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }, "retrieveRetryTokens"); + const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount ?? noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }, "releaseRetryTokens"); + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens + }); +}, "getDefaultRetryQuota"); + +// src/delayDecider.ts + +var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider"); + +// src/retryDecider.ts +var import_service_error_classification = require("@smithy/service-error-classification"); +var defaultRetryDecider = /* @__PURE__ */ __name((error) => { + if (!error) { + return false; + } + return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error); +}, "defaultRetryDecider"); + +// src/util.ts +var asSdkError = /* @__PURE__ */ __name((error) => { + if (error instanceof Error) + return error; + if (error instanceof Object) + return Object.assign(new Error(), error); + if (typeof error === "string") + return new Error(error); + return new Error(`AWS SDK error wrapper for ${error}`); +}, "asSdkError"); + +// src/StandardRetryStrategy.ts +var _StandardRetryStrategy = class _StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = import_util_retry.RETRY_MODES.STANDARD; + this.retryDecider = (options == null ? void 0 : options.retryDecider) ?? defaultRetryDecider; + this.delayDecider = (options == null ? void 0 : options.delayDecider) ?? defaultDelayDecider; + this.retryQuota = (options == null ? void 0 : options.retryQuota) ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS); + } + shouldRetry(error, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); + } + async getMaxAttempts() { + let maxAttempts; + try { + maxAttempts = await this.maxAttemptsProvider(); + } catch (error) { + maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS; + } + return maxAttempts; + } + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request } = args; + if (import_protocol_http.HttpRequest.isInstance(request)) { + request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); + } + while (true) { + try { + if (import_protocol_http.HttpRequest.isInstance(request)) { + request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + if (options == null ? void 0 : options.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options == null ? void 0 : options.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } catch (e) { + const err = asSdkError(e); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider( + (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE, + attempts + ); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; + } + } + } +}; +__name(_StandardRetryStrategy, "StandardRetryStrategy"); +var StandardRetryStrategy = _StandardRetryStrategy; +var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return retryAfterSeconds * 1e3; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); +}, "getDelayFromRetryAfterHeader"); + +// src/AdaptiveRetryStrategy.ts +var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy extends StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter(); + this.mode = import_util_retry.RETRY_MODES.ADAPTIVE; + } + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + } + }); + } +}; +__name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); +var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; + +// src/configurations.ts +var import_util_middleware = require("@smithy/util-middleware"); + +var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; +var CONFIG_MAX_ATTEMPTS = "max_attempts"; +var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + const value = env[ENV_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[CONFIG_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: import_util_retry.DEFAULT_MAX_ATTEMPTS +}; +var resolveRetryConfig = /* @__PURE__ */ __name((input) => { + const { retryStrategy } = input; + const maxAttempts = (0, import_util_middleware.normalizeProvider)(input.maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS); + return { + ...input, + maxAttempts, + retryStrategy: async () => { + if (retryStrategy) { + return retryStrategy; + } + const retryMode = await (0, import_util_middleware.normalizeProvider)(input.retryMode)(); + if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) { + return new import_util_retry.AdaptiveRetryStrategy(maxAttempts); + } + return new import_util_retry.StandardRetryStrategy(maxAttempts); + } + }; +}, "resolveRetryConfig"); +var ENV_RETRY_MODE = "AWS_RETRY_MODE"; +var CONFIG_RETRY_MODE = "retry_mode"; +var NODE_RETRY_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: import_util_retry.DEFAULT_RETRY_MODE +}; + +// src/omitRetryHeadersMiddleware.ts + + +var omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { + const { request } = args; + if (import_protocol_http.HttpRequest.isInstance(request)) { + delete request.headers[import_util_retry.INVOCATION_ID_HEADER]; + delete request.headers[import_util_retry.REQUEST_HEADER]; + } + return next(args); +}, "omitRetryHeadersMiddleware"); +var omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true +}; +var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); + } +}), "getOmitRetryHeadersPlugin"); + +// src/retryMiddleware.ts + + +var import_smithy_client = require("@smithy/smithy-client"); + + +var import_isStreamingPayload = require("./isStreamingPayload/isStreamingPayload"); +var retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + var _a; + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest = import_protocol_http.HttpRequest.isInstance(request); + if (isRequest) { + request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); + } + while (true) { + try { + if (isRequest) { + request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } catch (e) { + const retryErrorInfo = getRetryErrorInfo(e); + lastError = asSdkError(e); + if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request)) { + (_a = context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger) == null ? void 0 : _a.warn( + "An error was encountered in a non-retryable streaming request." + ); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + } + } else { + retryStrategy = retryStrategy; + if (retryStrategy == null ? void 0 : retryStrategy.mode) + context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } +}, "retryMiddleware"); +var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); +var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { + const errorInfo = { + error, + errorType: getRetryErrorType(error) + }; + const retryAfterHint = getRetryAfterHint(error.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; +}, "getRetryErrorInfo"); +var getRetryErrorType = /* @__PURE__ */ __name((error) => { + if ((0, import_service_error_classification.isThrottlingError)(error)) + return "THROTTLING"; + if ((0, import_service_error_classification.isTransientError)(error)) + return "TRANSIENT"; + if ((0, import_service_error_classification.isServerError)(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; +}, "getRetryErrorType"); +var retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true +}; +var getRetryPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + } +}), "getRetryPlugin"); +var getRetryAfterHint = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1e3); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; +}, "getRetryAfterHint"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + AdaptiveRetryStrategy, + StandardRetryStrategy, + ENV_MAX_ATTEMPTS, + CONFIG_MAX_ATTEMPTS, + NODE_MAX_ATTEMPT_CONFIG_OPTIONS, + resolveRetryConfig, + ENV_RETRY_MODE, + CONFIG_RETRY_MODE, + NODE_RETRY_MODE_CONFIG_OPTIONS, + defaultDelayDecider, + omitRetryHeadersMiddleware, + omitRetryHeadersMiddlewareOptions, + getOmitRetryHeadersPlugin, + defaultRetryDecider, + retryMiddleware, + retryMiddlewareOptions, + getRetryPlugin, + getRetryAfterHint +}); + diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.browser.js b/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.browser.js new file mode 100644 index 0000000..21fc19a --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.browser.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isStreamingPayload = void 0; +const isStreamingPayload = (request) => (request === null || request === void 0 ? void 0 : request.body) instanceof ReadableStream; +exports.isStreamingPayload = isStreamingPayload; diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js b/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js new file mode 100644 index 0000000..06f420b --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isStreamingPayload = void 0; +const stream_1 = require("stream"); +const isStreamingPayload = (request) => (request === null || request === void 0 ? void 0 : request.body) instanceof stream_1.Readable || + (typeof ReadableStream !== "undefined" && (request === null || request === void 0 ? void 0 : request.body) instanceof ReadableStream); +exports.isStreamingPayload = isStreamingPayload; diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/omitRetryHeadersMiddleware.js b/node_modules/@smithy/middleware-retry/dist-cjs/omitRetryHeadersMiddleware.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/omitRetryHeadersMiddleware.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/retryDecider.js b/node_modules/@smithy/middleware-retry/dist-cjs/retryDecider.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/retryDecider.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/retryMiddleware.js b/node_modules/@smithy/middleware-retry/dist-cjs/retryMiddleware.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/retryMiddleware.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/types.js b/node_modules/@smithy/middleware-retry/dist-cjs/types.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/types.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/dist-cjs/util.js b/node_modules/@smithy/middleware-retry/dist-cjs/util.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-cjs/util.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js b/node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js new file mode 100644 index 0000000..d349451 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js @@ -0,0 +1,20 @@ +import { DefaultRateLimiter, RETRY_MODES } from "@smithy/util-retry"; +import { StandardRetryStrategy } from "./StandardRetryStrategy"; +export class AdaptiveRetryStrategy extends StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.mode = RETRY_MODES.ADAPTIVE; + } + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + }, + }); + } +} diff --git a/node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js b/node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js new file mode 100644 index 0000000..e718ad6 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js @@ -0,0 +1,90 @@ +import { HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import { isThrottlingError } from "@smithy/service-error-classification"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, INVOCATION_ID_HEADER, REQUEST_HEADER, RETRY_MODES, THROTTLING_RETRY_DELAY_BASE, } from "@smithy/util-retry"; +import { v4 } from "uuid"; +import { getDefaultRetryQuota } from "./defaultRetryQuota"; +import { defaultDelayDecider } from "./delayDecider"; +import { defaultRetryDecider } from "./retryDecider"; +import { asSdkError } from "./util"; +export class StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = RETRY_MODES.STANDARD; + this.retryDecider = options?.retryDecider ?? defaultRetryDecider; + this.delayDecider = options?.delayDecider ?? defaultDelayDecider; + this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS); + } + shouldRetry(error, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); + } + async getMaxAttempts() { + let maxAttempts; + try { + maxAttempts = await this.maxAttemptsProvider(); + } + catch (error) { + maxAttempts = DEFAULT_MAX_ATTEMPTS; + } + return maxAttempts; + } + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request } = args; + if (HttpRequest.isInstance(request)) { + request.headers[INVOCATION_ID_HEADER] = v4(); + } + while (true) { + try { + if (HttpRequest.isInstance(request)) { + request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + if (options?.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options?.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } + catch (e) { + const err = asSdkError(e); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider(isThrottlingError(err) ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE, attempts); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; + } + } + } +} +const getDelayFromRetryAfterHeader = (response) => { + if (!HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return retryAfterSeconds * 1000; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); +}; diff --git a/node_modules/@smithy/middleware-retry/dist-es/configurations.js b/node_modules/@smithy/middleware-retry/dist-es/configurations.js new file mode 100644 index 0000000..55834b0 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/configurations.js @@ -0,0 +1,52 @@ +import { normalizeProvider } from "@smithy/util-middleware"; +import { AdaptiveRetryStrategy, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, RETRY_MODES, StandardRetryStrategy, } from "@smithy/util-retry"; +export const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; +export const CONFIG_MAX_ATTEMPTS = "max_attempts"; +export const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + const value = env[ENV_MAX_ATTEMPTS]; + if (!value) + return undefined; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[CONFIG_MAX_ATTEMPTS]; + if (!value) + return undefined; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: DEFAULT_MAX_ATTEMPTS, +}; +export const resolveRetryConfig = (input) => { + const { retryStrategy } = input; + const maxAttempts = normalizeProvider(input.maxAttempts ?? DEFAULT_MAX_ATTEMPTS); + return { + ...input, + maxAttempts, + retryStrategy: async () => { + if (retryStrategy) { + return retryStrategy; + } + const retryMode = await normalizeProvider(input.retryMode)(); + if (retryMode === RETRY_MODES.ADAPTIVE) { + return new AdaptiveRetryStrategy(maxAttempts); + } + return new StandardRetryStrategy(maxAttempts); + }, + }; +}; +export const ENV_RETRY_MODE = "AWS_RETRY_MODE"; +export const CONFIG_RETRY_MODE = "retry_mode"; +export const NODE_RETRY_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: DEFAULT_RETRY_MODE, +}; diff --git a/node_modules/@smithy/middleware-retry/dist-es/defaultRetryQuota.js b/node_modules/@smithy/middleware-retry/dist-es/defaultRetryQuota.js new file mode 100644 index 0000000..4bf6771 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/defaultRetryQuota.js @@ -0,0 +1,27 @@ +import { NO_RETRY_INCREMENT, RETRY_COST, TIMEOUT_RETRY_COST } from "@smithy/util-retry"; +export const getDefaultRetryQuota = (initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = options?.noRetryIncrement ?? NO_RETRY_INCREMENT; + const retryCost = options?.retryCost ?? RETRY_COST; + const timeoutRetryCost = options?.timeoutRetryCost ?? TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = (error) => (error.name === "TimeoutError" ? timeoutRetryCost : retryCost); + const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity; + const retrieveRetryTokens = (error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }; + const releaseRetryTokens = (capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount ?? noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }; + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens, + }); +}; diff --git a/node_modules/@smithy/middleware-retry/dist-es/delayDecider.js b/node_modules/@smithy/middleware-retry/dist-es/delayDecider.js new file mode 100644 index 0000000..2928506 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/delayDecider.js @@ -0,0 +1,2 @@ +import { MAXIMUM_RETRY_DELAY } from "@smithy/util-retry"; +export const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); diff --git a/node_modules/@smithy/middleware-retry/dist-es/index.js b/node_modules/@smithy/middleware-retry/dist-es/index.js new file mode 100644 index 0000000..9ebe326 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/index.js @@ -0,0 +1,7 @@ +export * from "./AdaptiveRetryStrategy"; +export * from "./StandardRetryStrategy"; +export * from "./configurations"; +export * from "./delayDecider"; +export * from "./omitRetryHeadersMiddleware"; +export * from "./retryDecider"; +export * from "./retryMiddleware"; diff --git a/node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js b/node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js new file mode 100644 index 0000000..9569e92 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js @@ -0,0 +1 @@ +export const isStreamingPayload = (request) => request?.body instanceof ReadableStream; diff --git a/node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.js b/node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.js new file mode 100644 index 0000000..7dcc687 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.js @@ -0,0 +1,3 @@ +import { Readable } from "stream"; +export const isStreamingPayload = (request) => request?.body instanceof Readable || + (typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream); diff --git a/node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js b/node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js new file mode 100644 index 0000000..cb3c372 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js @@ -0,0 +1,22 @@ +import { HttpRequest } from "@smithy/protocol-http"; +import { INVOCATION_ID_HEADER, REQUEST_HEADER } from "@smithy/util-retry"; +export const omitRetryHeadersMiddleware = () => (next) => async (args) => { + const { request } = args; + if (HttpRequest.isInstance(request)) { + delete request.headers[INVOCATION_ID_HEADER]; + delete request.headers[REQUEST_HEADER]; + } + return next(args); +}; +export const omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true, +}; +export const getOmitRetryHeadersPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); + }, +}); diff --git a/node_modules/@smithy/middleware-retry/dist-es/retryDecider.js b/node_modules/@smithy/middleware-retry/dist-es/retryDecider.js new file mode 100644 index 0000000..b965fba --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/retryDecider.js @@ -0,0 +1,7 @@ +import { isClockSkewError, isRetryableByTrait, isThrottlingError, isTransientError, } from "@smithy/service-error-classification"; +export const defaultRetryDecider = (error) => { + if (!error) { + return false; + } + return isRetryableByTrait(error) || isClockSkewError(error) || isThrottlingError(error) || isTransientError(error); +}; diff --git a/node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js b/node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js new file mode 100644 index 0000000..a897735 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js @@ -0,0 +1,112 @@ +import { HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import { isServerError, isThrottlingError, isTransientError } from "@smithy/service-error-classification"; +import { NoOpLogger } from "@smithy/smithy-client"; +import { INVOCATION_ID_HEADER, REQUEST_HEADER } from "@smithy/util-retry"; +import { v4 } from "uuid"; +import { isStreamingPayload } from "./isStreamingPayload/isStreamingPayload"; +import { asSdkError } from "./util"; +export const retryMiddleware = (options) => (next, context) => async (args) => { + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest = HttpRequest.isInstance(request); + if (isRequest) { + request.headers[INVOCATION_ID_HEADER] = v4(); + } + while (true) { + try { + if (isRequest) { + request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } + catch (e) { + const retryErrorInfo = getRetryErrorInfo(e); + lastError = asSdkError(e); + if (isRequest && isStreamingPayload(request)) { + (context.logger instanceof NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request."); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } + catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + } + } + else { + retryStrategy = retryStrategy; + if (retryStrategy?.mode) + context.userAgent = [...(context.userAgent || []), ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } +}; +const isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && + typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && + typeof retryStrategy.recordSuccess !== "undefined"; +const getRetryErrorInfo = (error) => { + const errorInfo = { + error, + errorType: getRetryErrorType(error), + }; + const retryAfterHint = getRetryAfterHint(error.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; +}; +const getRetryErrorType = (error) => { + if (isThrottlingError(error)) + return "THROTTLING"; + if (isTransientError(error)) + return "TRANSIENT"; + if (isServerError(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; +}; +export const retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true, +}; +export const getRetryPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + }, +}); +export const getRetryAfterHint = (response) => { + if (!HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1000); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; +}; diff --git a/node_modules/@smithy/middleware-retry/dist-es/types.js b/node_modules/@smithy/middleware-retry/dist-es/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/middleware-retry/dist-es/util.js b/node_modules/@smithy/middleware-retry/dist-es/util.js new file mode 100644 index 0000000..f45e6b4 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-es/util.js @@ -0,0 +1,9 @@ +export const asSdkError = (error) => { + if (error instanceof Error) + return error; + if (error instanceof Object) + return Object.assign(new Error(), error); + if (typeof error === "string") + return new Error(error); + return new Error(`AWS SDK error wrapper for ${error}`); +}; diff --git a/node_modules/@smithy/middleware-retry/dist-types/AdaptiveRetryStrategy.d.ts b/node_modules/@smithy/middleware-retry/dist-types/AdaptiveRetryStrategy.d.ts new file mode 100644 index 0000000..3ae352b --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/AdaptiveRetryStrategy.d.ts @@ -0,0 +1,20 @@ +import { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider } from "@smithy/types"; +import { RateLimiter } from "@smithy/util-retry"; +import { StandardRetryStrategy, StandardRetryStrategyOptions } from "./StandardRetryStrategy"; +/** + * Strategy options to be passed to AdaptiveRetryStrategy + */ +export interface AdaptiveRetryStrategyOptions extends StandardRetryStrategyOptions { + rateLimiter?: RateLimiter; +} +/** + * @deprecated use AdaptiveRetryStrategy from @smithy/util-retry + */ +export declare class AdaptiveRetryStrategy extends StandardRetryStrategy { + private rateLimiter; + constructor(maxAttemptsProvider: Provider, options?: AdaptiveRetryStrategyOptions); + retry(next: FinalizeHandler, args: FinalizeHandlerArguments): Promise<{ + response: unknown; + output: Ouput; + }>; +} diff --git a/node_modules/@smithy/middleware-retry/dist-types/StandardRetryStrategy.d.ts b/node_modules/@smithy/middleware-retry/dist-types/StandardRetryStrategy.d.ts new file mode 100644 index 0000000..5496e25 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/StandardRetryStrategy.d.ts @@ -0,0 +1,30 @@ +import { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider, RetryStrategy } from "@smithy/types"; +import { DelayDecider, RetryDecider, RetryQuota } from "./types"; +/** + * Strategy options to be passed to StandardRetryStrategy + */ +export interface StandardRetryStrategyOptions { + retryDecider?: RetryDecider; + delayDecider?: DelayDecider; + retryQuota?: RetryQuota; +} +/** + * @deprecated use StandardRetryStrategy from @smithy/util-retry + */ +export declare class StandardRetryStrategy implements RetryStrategy { + private readonly maxAttemptsProvider; + private retryDecider; + private delayDecider; + private retryQuota; + mode: string; + constructor(maxAttemptsProvider: Provider, options?: StandardRetryStrategyOptions); + private shouldRetry; + private getMaxAttempts; + retry(next: FinalizeHandler, args: FinalizeHandlerArguments, options?: { + beforeRequest: Function; + afterRequest: Function; + }): Promise<{ + response: unknown; + output: Ouput; + }>; +} diff --git a/node_modules/@smithy/middleware-retry/dist-types/configurations.d.ts b/node_modules/@smithy/middleware-retry/dist-types/configurations.d.ts new file mode 100644 index 0000000..dccd15e --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/configurations.d.ts @@ -0,0 +1,45 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import { Provider, RetryStrategy, RetryStrategyV2 } from "@smithy/types"; +export declare const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; +export declare const CONFIG_MAX_ATTEMPTS = "max_attempts"; +export declare const NODE_MAX_ATTEMPT_CONFIG_OPTIONS: LoadedConfigSelectors; +/** + * @public + */ +export interface RetryInputConfig { + /** + * The maximum number of times requests that encounter retryable failures should be attempted. + */ + maxAttempts?: number | Provider; + /** + * The strategy to retry the request. Using built-in exponential backoff strategy by default. + */ + retryStrategy?: RetryStrategy | RetryStrategyV2; +} +/** + * @internal + */ +export interface PreviouslyResolved { + /** + * Specifies provider for retry algorithm to use. + * @internal + */ + retryMode: string | Provider; +} +/** + * @internal + */ +export interface RetryResolvedConfig { + /** + * Resolved value for input config {@link RetryInputConfig.maxAttempts} + */ + maxAttempts: Provider; + /** + * Resolved value for input config {@link RetryInputConfig.retryStrategy} + */ + retryStrategy: Provider; +} +export declare const resolveRetryConfig: (input: T & PreviouslyResolved & RetryInputConfig) => T & RetryResolvedConfig; +export declare const ENV_RETRY_MODE = "AWS_RETRY_MODE"; +export declare const CONFIG_RETRY_MODE = "retry_mode"; +export declare const NODE_RETRY_MODE_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/middleware-retry/dist-types/defaultRetryQuota.d.ts b/node_modules/@smithy/middleware-retry/dist-types/defaultRetryQuota.d.ts new file mode 100644 index 0000000..811bb12 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/defaultRetryQuota.d.ts @@ -0,0 +1,18 @@ +import { RetryQuota } from "./types"; +export interface DefaultRetryQuotaOptions { + /** + * The total amount of retry token to be incremented from retry token balance + * if an SDK operation invocation succeeds without requiring a retry request. + */ + noRetryIncrement?: number; + /** + * The total amount of retry tokens to be decremented from retry token balance. + */ + retryCost?: number; + /** + * The total amount of retry tokens to be decremented from retry token balance + * when a throttling error is encountered. + */ + timeoutRetryCost?: number; +} +export declare const getDefaultRetryQuota: (initialRetryTokens: number, options?: DefaultRetryQuotaOptions) => RetryQuota; diff --git a/node_modules/@smithy/middleware-retry/dist-types/delayDecider.d.ts b/node_modules/@smithy/middleware-retry/dist-types/delayDecider.d.ts new file mode 100644 index 0000000..a7251fc --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/delayDecider.d.ts @@ -0,0 +1,4 @@ +/** + * Calculate a capped, fully-jittered exponential backoff time. + */ +export declare const defaultDelayDecider: (delayBase: number, attempts: number) => number; diff --git a/node_modules/@smithy/middleware-retry/dist-types/index.d.ts b/node_modules/@smithy/middleware-retry/dist-types/index.d.ts new file mode 100644 index 0000000..9ebe326 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/index.d.ts @@ -0,0 +1,7 @@ +export * from "./AdaptiveRetryStrategy"; +export * from "./StandardRetryStrategy"; +export * from "./configurations"; +export * from "./delayDecider"; +export * from "./omitRetryHeadersMiddleware"; +export * from "./retryDecider"; +export * from "./retryMiddleware"; diff --git a/node_modules/@smithy/middleware-retry/dist-types/isStreamingPayload/isStreamingPayload.browser.d.ts b/node_modules/@smithy/middleware-retry/dist-types/isStreamingPayload/isStreamingPayload.browser.d.ts new file mode 100644 index 0000000..48d70ba --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/isStreamingPayload/isStreamingPayload.browser.d.ts @@ -0,0 +1,5 @@ +import type { HttpRequest } from "@smithy/protocol-http"; +/** + * @internal + */ +export declare const isStreamingPayload: (request: HttpRequest) => boolean; diff --git a/node_modules/@smithy/middleware-retry/dist-types/isStreamingPayload/isStreamingPayload.d.ts b/node_modules/@smithy/middleware-retry/dist-types/isStreamingPayload/isStreamingPayload.d.ts new file mode 100644 index 0000000..48d70ba --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/isStreamingPayload/isStreamingPayload.d.ts @@ -0,0 +1,5 @@ +import type { HttpRequest } from "@smithy/protocol-http"; +/** + * @internal + */ +export declare const isStreamingPayload: (request: HttpRequest) => boolean; diff --git a/node_modules/@smithy/middleware-retry/dist-types/omitRetryHeadersMiddleware.d.ts b/node_modules/@smithy/middleware-retry/dist-types/omitRetryHeadersMiddleware.d.ts new file mode 100644 index 0000000..4e0d52c --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/omitRetryHeadersMiddleware.d.ts @@ -0,0 +1,4 @@ +import { FinalizeHandler, MetadataBearer, Pluggable, RelativeMiddlewareOptions } from "@smithy/types"; +export declare const omitRetryHeadersMiddleware: () => (next: FinalizeHandler) => FinalizeHandler; +export declare const omitRetryHeadersMiddlewareOptions: RelativeMiddlewareOptions; +export declare const getOmitRetryHeadersPlugin: (options: unknown) => Pluggable; diff --git a/node_modules/@smithy/middleware-retry/dist-types/retryDecider.d.ts b/node_modules/@smithy/middleware-retry/dist-types/retryDecider.d.ts new file mode 100644 index 0000000..da69249 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/retryDecider.d.ts @@ -0,0 +1,5 @@ +import { SdkError } from "@smithy/types"; +/** + * @deprecated this is only used in the deprecated StandardRetryStrategy. Do not use in new code. + */ +export declare const defaultRetryDecider: (error: SdkError) => boolean; diff --git a/node_modules/@smithy/middleware-retry/dist-types/retryMiddleware.d.ts b/node_modules/@smithy/middleware-retry/dist-types/retryMiddleware.d.ts new file mode 100644 index 0000000..38fd571 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/retryMiddleware.d.ts @@ -0,0 +1,6 @@ +import { AbsoluteLocation, FinalizeHandler, FinalizeRequestHandlerOptions, HandlerExecutionContext, MetadataBearer, Pluggable } from "@smithy/types"; +import { RetryResolvedConfig } from "./configurations"; +export declare const retryMiddleware: (options: RetryResolvedConfig) => (next: FinalizeHandler, context: HandlerExecutionContext) => FinalizeHandler; +export declare const retryMiddlewareOptions: FinalizeRequestHandlerOptions & AbsoluteLocation; +export declare const getRetryPlugin: (options: RetryResolvedConfig) => Pluggable; +export declare const getRetryAfterHint: (response: unknown) => Date | undefined; diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/AdaptiveRetryStrategy.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/AdaptiveRetryStrategy.d.ts new file mode 100644 index 0000000..968e63d --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/AdaptiveRetryStrategy.d.ts @@ -0,0 +1,20 @@ +import { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider } from "@smithy/types"; +import { RateLimiter } from "@smithy/util-retry"; +import { StandardRetryStrategy, StandardRetryStrategyOptions } from "./StandardRetryStrategy"; +/** + * Strategy options to be passed to AdaptiveRetryStrategy + */ +export interface AdaptiveRetryStrategyOptions extends StandardRetryStrategyOptions { + rateLimiter?: RateLimiter; +} +/** + * @deprecated use AdaptiveRetryStrategy from @smithy/util-retry + */ +export declare class AdaptiveRetryStrategy extends StandardRetryStrategy { + private rateLimiter; + constructor(maxAttemptsProvider: Provider, options?: AdaptiveRetryStrategyOptions); + retry(next: FinalizeHandler, args: FinalizeHandlerArguments): Promise<{ + response: unknown; + output: Ouput; + }>; +} diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/StandardRetryStrategy.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/StandardRetryStrategy.d.ts new file mode 100644 index 0000000..4c1b09d --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/StandardRetryStrategy.d.ts @@ -0,0 +1,30 @@ +import { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider, RetryStrategy } from "@smithy/types"; +import { DelayDecider, RetryDecider, RetryQuota } from "./types"; +/** + * Strategy options to be passed to StandardRetryStrategy + */ +export interface StandardRetryStrategyOptions { + retryDecider?: RetryDecider; + delayDecider?: DelayDecider; + retryQuota?: RetryQuota; +} +/** + * @deprecated use StandardRetryStrategy from @smithy/util-retry + */ +export declare class StandardRetryStrategy implements RetryStrategy { + private readonly maxAttemptsProvider; + private retryDecider; + private delayDecider; + private retryQuota; + mode: string; + constructor(maxAttemptsProvider: Provider, options?: StandardRetryStrategyOptions); + private shouldRetry; + private getMaxAttempts; + retry(next: FinalizeHandler, args: FinalizeHandlerArguments, options?: { + beforeRequest: Function; + afterRequest: Function; + }): Promise<{ + response: unknown; + output: Ouput; + }>; +} diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/configurations.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/configurations.d.ts new file mode 100644 index 0000000..fa79c14 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/configurations.d.ts @@ -0,0 +1,45 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import { Provider, RetryStrategy, RetryStrategyV2 } from "@smithy/types"; +export declare const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; +export declare const CONFIG_MAX_ATTEMPTS = "max_attempts"; +export declare const NODE_MAX_ATTEMPT_CONFIG_OPTIONS: LoadedConfigSelectors; +/** + * @public + */ +export interface RetryInputConfig { + /** + * The maximum number of times requests that encounter retryable failures should be attempted. + */ + maxAttempts?: number | Provider; + /** + * The strategy to retry the request. Using built-in exponential backoff strategy by default. + */ + retryStrategy?: RetryStrategy | RetryStrategyV2; +} +/** + * @internal + */ +export interface PreviouslyResolved { + /** + * Specifies provider for retry algorithm to use. + * @internal + */ + retryMode: string | Provider; +} +/** + * @internal + */ +export interface RetryResolvedConfig { + /** + * Resolved value for input config {@link RetryInputConfig.maxAttempts} + */ + maxAttempts: Provider; + /** + * Resolved value for input config {@link RetryInputConfig.retryStrategy} + */ + retryStrategy: Provider; +} +export declare const resolveRetryConfig: (input: T & PreviouslyResolved & RetryInputConfig) => T & RetryResolvedConfig; +export declare const ENV_RETRY_MODE = "AWS_RETRY_MODE"; +export declare const CONFIG_RETRY_MODE = "retry_mode"; +export declare const NODE_RETRY_MODE_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/defaultRetryQuota.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/defaultRetryQuota.d.ts new file mode 100644 index 0000000..461f346 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/defaultRetryQuota.d.ts @@ -0,0 +1,18 @@ +import { RetryQuota } from "./types"; +export interface DefaultRetryQuotaOptions { + /** + * The total amount of retry token to be incremented from retry token balance + * if an SDK operation invocation succeeds without requiring a retry request. + */ + noRetryIncrement?: number; + /** + * The total amount of retry tokens to be decremented from retry token balance. + */ + retryCost?: number; + /** + * The total amount of retry tokens to be decremented from retry token balance + * when a throttling error is encountered. + */ + timeoutRetryCost?: number; +} +export declare const getDefaultRetryQuota: (initialRetryTokens: number, options?: DefaultRetryQuotaOptions) => RetryQuota; diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/delayDecider.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/delayDecider.d.ts new file mode 100644 index 0000000..8516eba --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/delayDecider.d.ts @@ -0,0 +1,4 @@ +/** + * Calculate a capped, fully-jittered exponential backoff time. + */ +export declare const defaultDelayDecider: (delayBase: number, attempts: number) => number; diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..e366bbb --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/index.d.ts @@ -0,0 +1,7 @@ +export * from "./AdaptiveRetryStrategy"; +export * from "./StandardRetryStrategy"; +export * from "./configurations"; +export * from "./delayDecider"; +export * from "./omitRetryHeadersMiddleware"; +export * from "./retryDecider"; +export * from "./retryMiddleware"; diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/isStreamingPayload/isStreamingPayload.browser.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/isStreamingPayload/isStreamingPayload.browser.d.ts new file mode 100644 index 0000000..2a4d542 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/isStreamingPayload/isStreamingPayload.browser.d.ts @@ -0,0 +1,5 @@ +import { HttpRequest } from "@smithy/protocol-http"; +/** + * @internal + */ +export declare const isStreamingPayload: (request: HttpRequest) => boolean; diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/isStreamingPayload/isStreamingPayload.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/isStreamingPayload/isStreamingPayload.d.ts new file mode 100644 index 0000000..2a4d542 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/isStreamingPayload/isStreamingPayload.d.ts @@ -0,0 +1,5 @@ +import { HttpRequest } from "@smithy/protocol-http"; +/** + * @internal + */ +export declare const isStreamingPayload: (request: HttpRequest) => boolean; diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/omitRetryHeadersMiddleware.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/omitRetryHeadersMiddleware.d.ts new file mode 100644 index 0000000..23f0b71 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/omitRetryHeadersMiddleware.d.ts @@ -0,0 +1,4 @@ +import { FinalizeHandler, MetadataBearer, Pluggable, RelativeMiddlewareOptions } from "@smithy/types"; +export declare const omitRetryHeadersMiddleware: () => (next: FinalizeHandler) => FinalizeHandler; +export declare const omitRetryHeadersMiddlewareOptions: RelativeMiddlewareOptions; +export declare const getOmitRetryHeadersPlugin: (options: unknown) => Pluggable; diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/retryDecider.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/retryDecider.d.ts new file mode 100644 index 0000000..7053912 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/retryDecider.d.ts @@ -0,0 +1,5 @@ +import { SdkError } from "@smithy/types"; +/** + * @deprecated this is only used in the deprecated StandardRetryStrategy. Do not use in new code. + */ +export declare const defaultRetryDecider: (error: SdkError) => boolean; diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/retryMiddleware.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/retryMiddleware.d.ts new file mode 100644 index 0000000..99eb6ae --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/retryMiddleware.d.ts @@ -0,0 +1,6 @@ +import { AbsoluteLocation, FinalizeHandler, FinalizeRequestHandlerOptions, HandlerExecutionContext, MetadataBearer, Pluggable } from "@smithy/types"; +import { RetryResolvedConfig } from "./configurations"; +export declare const retryMiddleware: (options: RetryResolvedConfig) => (next: FinalizeHandler, context: HandlerExecutionContext) => FinalizeHandler; +export declare const retryMiddlewareOptions: FinalizeRequestHandlerOptions & AbsoluteLocation; +export declare const getRetryPlugin: (options: RetryResolvedConfig) => Pluggable; +export declare const getRetryAfterHint: (response: unknown) => Date | undefined; diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/types.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/types.d.ts new file mode 100644 index 0000000..99d2c11 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/types.d.ts @@ -0,0 +1,53 @@ +import { SdkError } from "@smithy/types"; +/** + * Determines whether an error is retryable based on the number of retries + * already attempted, the HTTP status code, and the error received (if any). + * + * @param error - The error encountered. + */ +export interface RetryDecider { + (error: SdkError): boolean; +} +/** + * Determines the number of milliseconds to wait before retrying an action. + * + * @param delayBase - The base delay (in milliseconds). + * @param attempts - The number of times the action has already been tried. + */ +export interface DelayDecider { + (delayBase: number, attempts: number): number; +} +/** + * Interface that specifies the retry quota behavior. + */ +export interface RetryQuota { + /** + * returns true if retry tokens are available from the retry quota bucket. + */ + hasRetryTokens: (error: SdkError) => boolean; + /** + * returns token amount from the retry quota bucket. + * throws error is retry tokens are not available. + */ + retrieveRetryTokens: (error: SdkError) => number; + /** + * releases tokens back to the retry quota. + */ + releaseRetryTokens: (releaseCapacityAmount?: number) => void; +} +export interface RateLimiter { + /** + * If there is sufficient capacity (tokens) available, it immediately returns. + * If there is not sufficient capacity, it will either sleep a certain amount + * of time until the rate limiter can retrieve a token from its token bucket + * or raise an exception indicating there is insufficient capacity. + */ + getSendToken: () => Promise; + /** + * Updates the client sending rate based on response. + * If the response was successful, the capacity and fill rate are increased. + * If the response was a throttling response, the capacity and fill rate are + * decreased. Transient errors do not affect the rate limiter. + */ + updateClientSendingRate: (response: any) => void; +} diff --git a/node_modules/@smithy/middleware-retry/dist-types/ts3.4/util.d.ts b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/util.d.ts new file mode 100644 index 0000000..7684a9f --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/ts3.4/util.d.ts @@ -0,0 +1,2 @@ +import { SdkError } from "@smithy/types"; +export declare const asSdkError: (error: unknown) => SdkError; diff --git a/node_modules/@smithy/middleware-retry/dist-types/types.d.ts b/node_modules/@smithy/middleware-retry/dist-types/types.d.ts new file mode 100644 index 0000000..5a4849c --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/types.d.ts @@ -0,0 +1,53 @@ +import { SdkError } from "@smithy/types"; +/** + * Determines whether an error is retryable based on the number of retries + * already attempted, the HTTP status code, and the error received (if any). + * + * @param error - The error encountered. + */ +export interface RetryDecider { + (error: SdkError): boolean; +} +/** + * Determines the number of milliseconds to wait before retrying an action. + * + * @param delayBase - The base delay (in milliseconds). + * @param attempts - The number of times the action has already been tried. + */ +export interface DelayDecider { + (delayBase: number, attempts: number): number; +} +/** + * Interface that specifies the retry quota behavior. + */ +export interface RetryQuota { + /** + * returns true if retry tokens are available from the retry quota bucket. + */ + hasRetryTokens: (error: SdkError) => boolean; + /** + * returns token amount from the retry quota bucket. + * throws error is retry tokens are not available. + */ + retrieveRetryTokens: (error: SdkError) => number; + /** + * releases tokens back to the retry quota. + */ + releaseRetryTokens: (releaseCapacityAmount?: number) => void; +} +export interface RateLimiter { + /** + * If there is sufficient capacity (tokens) available, it immediately returns. + * If there is not sufficient capacity, it will either sleep a certain amount + * of time until the rate limiter can retrieve a token from its token bucket + * or raise an exception indicating there is insufficient capacity. + */ + getSendToken: () => Promise; + /** + * Updates the client sending rate based on response. + * If the response was successful, the capacity and fill rate are increased. + * If the response was a throttling response, the capacity and fill rate are + * decreased. Transient errors do not affect the rate limiter. + */ + updateClientSendingRate: (response: any) => void; +} diff --git a/node_modules/@smithy/middleware-retry/dist-types/util.d.ts b/node_modules/@smithy/middleware-retry/dist-types/util.d.ts new file mode 100644 index 0000000..00939b8 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/dist-types/util.d.ts @@ -0,0 +1,2 @@ +import { SdkError } from "@smithy/types"; +export declare const asSdkError: (error: unknown) => SdkError; diff --git a/node_modules/@smithy/middleware-retry/node_modules/.bin/uuid b/node_modules/@smithy/middleware-retry/node_modules/.bin/uuid new file mode 120000 index 0000000..588f70e --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/dist/bin/uuid \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/CHANGELOG.md b/node_modules/@smithy/middleware-retry/node_modules/uuid/CHANGELOG.md new file mode 100644 index 0000000..7519d19 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,229 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) + +### Bug Fixes + +- lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536) + +### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) + +### Bug Fixes + +- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375) + +## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27) + +### Features + +- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180) + +## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23) + +### Features + +- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5)) +- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437) +- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659)) + +### Bug Fixes + +- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8)) + +## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20) + +### Features + +- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d)) +- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2)) + +### Bug Fixes + +- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444) + +## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29) + +### ⚠ BREAKING CHANGES + +- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export. + + ```diff + -import uuid from 'uuid'; + -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869' + +import { v4 as uuidv4 } from 'uuid'; + +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' + ``` + +- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported. + + Instead use the named exports that this module exports. + + For ECMAScript Modules (ESM): + + ```diff + -import uuidv4 from 'uuid/v4'; + +import { v4 as uuidv4 } from 'uuid'; + uuidv4(); + ``` + + For CommonJS: + + ```diff + -const uuidv4 = require('uuid/v4'); + +const { v4: uuidv4 } = require('uuid'); + uuidv4(); + ``` + +### Features + +- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342) +- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) + +### Bug Fixes + +- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) + +### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31) + +### Bug Fixes + +- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408) + +### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04) + +### Bug Fixes + +- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) +- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) +- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) + +### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25) + +### Bug Fixes + +- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) +- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378) + +## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24) + +### ⚠ BREAKING CHANGES + +- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed. +- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants. +- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function. +- Remove support for generating v3 and v5 UUIDs in Node.js<4.x +- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers. + +### Features + +- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345) +- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555)) +- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b)) +- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0)) +- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173) +- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627)) +- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +### Bug Fixes + +- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48)) +- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370) +- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23)) + +## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) + +### Features + +- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) + +### Bug Fixes + +- no longer run ci tests on node v4 +- upgrade dependencies + +## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) + +### Bug Fixes + +- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) + +## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) + +### Bug Fixes + +- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) + +# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) + +### Bug Fixes + +- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) +- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) +- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) +- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) + +### Features + +- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) + +## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) + +### Bug Fixes + +- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + +# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) + +### Bug Fixes + +- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) +- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + +### Features + +- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) + +# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) + +### Bug Fixes + +- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) +- Fix typo (#178) +- Simple typo fix (#165) + +### Features + +- v5 support in CLI (#197) +- V5 support (#188) + +# 3.0.1 (2016-11-28) + +- split uuid versions into separate files + +# 3.0.0 (2016-11-17) + +- remove .parse and .unparse + +# 2.0.0 + +- Removed uuid.BufferClass + +# 1.4.0 + +- Improved module context detection +- Removed public RNG functions + +# 1.3.2 + +- Improve tests and handling of v1() options (Issue #24) +- Expose RNG option to allow for perf testing with different generators + +# 1.3.0 + +- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +- Support for node.js crypto API +- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/CONTRIBUTING.md b/node_modules/@smithy/middleware-retry/node_modules/uuid/CONTRIBUTING.md new file mode 100644 index 0000000..4a4503d --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing + +Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! + +## Testing + +```shell +npm test +``` + +## Releasing + +Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): + +```shell +npm run release -- --dry-run # verify output manually +npm run release # follow the instructions from the output of this command +``` diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/LICENSE.md b/node_modules/@smithy/middleware-retry/node_modules/uuid/LICENSE.md new file mode 100644 index 0000000..3934168 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2010-2020 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/README.md b/node_modules/@smithy/middleware-retry/node_modules/uuid/README.md new file mode 100644 index 0000000..ed27e57 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/README.md @@ -0,0 +1,505 @@ + + +# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser) + +For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs + +- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs +- **Cross-platform** - Support for ... + - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) + - Node 8, 10, 12, 14 + - Chrome, Safari, Firefox, Edge, IE 11 browsers + - Webpack and rollup.js module bundlers + - [React Native / Expo](#react-native--expo) +- **Secure** - Cryptographically-strong random values +- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers +- **CLI** - Includes the [`uuid` command line](#command-line) utility + +**Upgrading from `uuid@3.x`?** Your code is probably okay, but check out [Upgrading From `uuid@3.x`](#upgrading-from-uuid3x) for details. + +## Quickstart + +To create a random UUID... + +**1. Install** + +```shell +npm install uuid +``` + +**2. Create a UUID** (ES6 module syntax) + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' +``` + +... or using CommonJS syntax: + +```javascript +const { v4: uuidv4 } = require('uuid'); +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +For timestamp UUIDs, namespace UUIDs, and other options read on ... + +## API Summary + +| | | | +| --- | --- | --- | +| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | +| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | +| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | +| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | +| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | +| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | +| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | +| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | +| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | + +## API + +### uuid.NIL + +The nil UUID string (all zeros). + +Example: + +```javascript +import { NIL as NIL_UUID } from 'uuid'; + +NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' +``` + +### uuid.parse(str) + +Convert UUID string to array of bytes + +| | | +| --------- | ---------------------------------------- | +| `str` | A valid UUID `String` | +| _returns_ | `Uint8Array[16]` | +| _throws_ | `TypeError` if `str` is not a valid UUID | + +Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. + +Example: + +```javascript +import { parse as uuidParse } from 'uuid'; + +// Parse a UUID +const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); + +// Convert to hex strings to show byte order (for documentation purposes) +[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨ + // [ + // '6e', 'c0', 'bd', '7f', + // '11', 'c0', '43', 'da', + // '97', '5e', '2a', '8a', + // 'd9', 'eb', 'ae', '0b' + // ] +``` + +### uuid.stringify(arr[, offset]) + +Convert array of bytes to UUID string + +| | | +| -------------- | ---------------------------------------------------------------------------- | +| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | +| [`offset` = 0] | `Number` Starting index in the Array | +| _returns_ | `String` | +| _throws_ | `TypeError` if a valid UUID string cannot be generated | + +Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. + +Example: + +```javascript +import { stringify as uuidStringify } from 'uuid'; + +const uuidBytes = [ + 0x6e, + 0xc0, + 0xbd, + 0x7f, + 0x11, + 0xc0, + 0x43, + 0xda, + 0x97, + 0x5e, + 0x2a, + 0x8a, + 0xd9, + 0xeb, + 0xae, + 0x0b, +]; + +uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' +``` + +### uuid.v1([options[, buffer[, offset]]]) + +Create an RFC version 1 (timestamp) UUID + +| | | +| --- | --- | +| [`options`] | `Object` with one or more of the following properties: | +| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | +| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | +| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | +| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanseconds to add to `msecs`, should be 0-10,000) | +| [`options.random`] | `Array` of 16 random bytes (0-255) | +| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | +| _throws_ | `Error` if more than 10M UUIDs/sec are requested | + +Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. + +Note: `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields. + +Example: + +```javascript +import { v1 as uuidv1 } from 'uuid'; + +uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' +``` + +Example using `options`: + +```javascript +import { v1 as uuidv1 } from 'uuid'; + +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678, +}; +uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' +``` + +### uuid.v3(name, namespace[, buffer[, offset]]) + +Create an RFC version 3 (namespace w/ MD5) UUID + +API is identical to `v5()`, but uses "v3" instead. + +⚠️ Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." + +### uuid.v4([options[, buffer[, offset]]]) + +Create an RFC version 4 (random) UUID + +| | | +| --- | --- | +| [`options`] | `Object` with one or more of the following properties: | +| [`options.random`] | `Array` of 16 random bytes (0-255) | +| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | + +Example: + +```javascript +import { v4 as uuidv4 } from 'uuid'; + +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +Example using predefined `random` values: + +```javascript +import { v4 as uuidv4 } from 'uuid'; + +const v4options = { + random: [ + 0x10, + 0x91, + 0x56, + 0xbe, + 0xc4, + 0xfb, + 0xc1, + 0xea, + 0x71, + 0xb4, + 0xef, + 0xe1, + 0x67, + 0x1c, + 0x58, + 0x36, + ], +}; +uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' +``` + +### uuid.v5(name, namespace[, buffer[, offset]]) + +Create an RFC version 5 (namespace w/ SHA-1) UUID + +| | | +| --- | --- | +| `name` | `String \| Array` | +| `namespace` | `String \| Array[16]` Namespace UUID | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | + +Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. + +Example with custom namespace: + +```javascript +import { v5 as uuidv5 } from 'uuid'; + +// Define a custom namespace. Readers, create your own using something like +// https://www.uuidgenerator.net/ +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; + +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' +``` + +Example with RFC `URL` namespace: + +```javascript +import { v5 as uuidv5 } from 'uuid'; + +uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' +``` + +### uuid.validate(str) + +Test a string to see if it is a valid UUID + +| | | +| --------- | --------------------------------------------------- | +| `str` | `String` to validate | +| _returns_ | `true` if string is a valid UUID, `false` otherwise | + +Example: + +```javascript +import { validate as uuidValidate } from 'uuid'; + +uuidValidate('not a UUID'); // ⇨ false +uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true +``` + +Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. + +```javascript +import { version as uuidVersion } from 'uuid'; +import { validate as uuidValidate } from 'uuid'; + +function uuidValidateV4(uuid) { + return uuidValidate(uuid) && uuidVersion(uuid) === 4; +} + +const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210'; +const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836'; + +uuidValidateV4(v4Uuid); // ⇨ true +uuidValidateV4(v1Uuid); // ⇨ false +``` + +### uuid.version(str) + +Detect RFC version of a UUID + +| | | +| --------- | ---------------------------------------- | +| `str` | A valid UUID `String` | +| _returns_ | `Number` The RFC version of the UUID | +| _throws_ | `TypeError` if `str` is not a valid UUID | + +Example: + +```javascript +import { version as uuidVersion } from 'uuid'; + +uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1 +uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4 +``` + +## Command Line + +UUIDs can be generated from the command line using `uuid`. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 +``` + +The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: + +```shell +$ uuid --help + +Usage: + uuid + uuid v1 + uuid v3 + uuid v4 + uuid v5 + uuid --help + +Note: may be "URL" or "DNS" to use the corresponding UUIDs +defined by RFC4122 +``` + +## ECMAScript Modules + +This library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments). + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +To run the examples you must first create a dist build of this library in the module root: + +```shell +npm run build +``` + +## CDN Builds + +### ECMAScript Modules + +To load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/): + +```html + +``` + +### UMD + +To load this module directly into older browsers you can use the [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds from any of the following CDNs: + +**Using [UNPKG](https://unpkg.com/uuid@latest/dist/umd/)**: + +```html + +``` + +**Using [jsDelivr](https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/)**: + +```html + +``` + +**Using [cdnjs](https://cdnjs.com/libraries/uuid)**: + +```html + +``` + +These CDNs all provide the same [`uuidv4()`](#uuidv4options-buffer-offset) method: + +```html + +``` + +Methods for the other algorithms ([`uuidv1()`](#uuidv1options-buffer-offset), [`uuidv3()`](#uuidv3name-namespace-buffer-offset) and [`uuidv5()`](#uuidv5name-namespace-buffer-offset)) are available from the files `uuidv1.min.js`, `uuidv3.min.js` and `uuidv5.min.js` respectively. + +## "getRandomValues() not supported" + +This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill: + +### React Native / Expo + +1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) +1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point: + +```javascript +import 'react-native-get-random-values'; +import { v4 as uuidv4 } from 'uuid'; +``` + +Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`. + +### Web Workers / Service Workers (Edge <= 18) + +[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please). + +## Upgrading From `uuid@7.x` + +### Only Named Exports Supported When Using with Node.js ESM + +`uuid@7.x` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports. + +Instead of doing: + +```javascript +import uuid from 'uuid'; +uuid.v4(); +``` + +you will now have to use the named exports: + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); +``` + +### Deep Requires No Longer Supported + +Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7.x`](#deep-requires-now-deprecated) are no longer supported. + +## Upgrading From `uuid@3.x` + +"_Wait... what happened to `uuid@4.x` - `uuid@6.x`?!?_" + +In order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped. + +### Deep Requires Now Deprecated + +`uuid@3.x` encouraged the use of deep requires to minimize the bundle size of browser builds: + +```javascript +const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED! +uuidv4(); +``` + +As of `uuid@7.x` this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the `import` syntax: + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); +``` + +... or for CommonJS: + +```javascript +const { v4: uuidv4 } = require('uuid'); +uuidv4(); +``` + +### Default Export Removed + +`uuid@3.x` was exporting the Version 4 UUID method as a default export: + +```javascript +const uuid = require('uuid'); // <== REMOVED! +``` + +This usage pattern was already discouraged in `uuid@3.x` and has been removed in `uuid@7.x`. + +---- +Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/bin/uuid b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/bin/uuid new file mode 100755 index 0000000..f38d2ee --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/bin/uuid @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('../uuid-bin'); diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/index.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/index.js new file mode 100644 index 0000000..1db6f6d --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/index.js @@ -0,0 +1,9 @@ +export { default as v1 } from './v1.js'; +export { default as v3 } from './v3.js'; +export { default as v4 } from './v4.js'; +export { default as v5 } from './v5.js'; +export { default as NIL } from './nil.js'; +export { default as version } from './version.js'; +export { default as validate } from './validate.js'; +export { default as stringify } from './stringify.js'; +export { default as parse } from './parse.js'; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/md5.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/md5.js new file mode 100644 index 0000000..8b5d46a --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/md5.js @@ -0,0 +1,215 @@ +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ +function md5(bytes) { + if (typeof bytes === 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = new Uint8Array(msg.length); + + for (var i = 0; i < msg.length; ++i) { + bytes[i] = msg.charCodeAt(i); + } + } + + return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8)); +} +/* + * Convert an array of little-endian words to an array of bytes + */ + + +function md5ToHexEncodedArray(input) { + var output = []; + var length32 = input.length * 32; + var hexTab = '0123456789abcdef'; + + for (var i = 0; i < length32; i += 8) { + var x = input[i >> 5] >>> i % 32 & 0xff; + var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16); + output.push(hex); + } + + return output; +} +/** + * Calculate output length with padding and bit length + */ + + +function getOutputLength(inputLength8) { + return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; +} +/* + * Calculate the MD5 of an array of little-endian words, and a bit length. + */ + + +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << len % 32; + x[getOutputLength(len) - 1] = len; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for (var i = 0; i < x.length; i += 16) { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + + return [a, b, c, d]; +} +/* + * Convert an array bytes to an array of little-endian words + * Characters >255 have their high-byte silently ignored. + */ + + +function bytesToWords(input) { + if (input.length === 0) { + return []; + } + + var length8 = input.length * 8; + var output = new Uint32Array(getOutputLength(length8)); + + for (var i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; + } + + return output; +} +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ + + +function safeAdd(x, y) { + var lsw = (x & 0xffff) + (y & 0xffff); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return msw << 16 | lsw & 0xffff; +} +/* + * Bitwise rotate a 32-bit number to the left. + */ + + +function bitRotateLeft(num, cnt) { + return num << cnt | num >>> 32 - cnt; +} +/* + * These functions implement the four basic operations the algorithm uses. + */ + + +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} + +function md5ff(a, b, c, d, x, s, t) { + return md5cmn(b & c | ~b & d, a, b, x, s, t); +} + +function md5gg(a, b, c, d, x, s, t) { + return md5cmn(b & d | c & ~d, a, b, x, s, t); +} + +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} + +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | ~d), a, b, x, s, t); +} + +export default md5; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/nil.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/nil.js new file mode 100644 index 0000000..b36324c --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/nil.js @@ -0,0 +1 @@ +export default '00000000-0000-0000-0000-000000000000'; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/parse.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/parse.js new file mode 100644 index 0000000..7c5b1d5 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/parse.js @@ -0,0 +1,35 @@ +import validate from './validate.js'; + +function parse(uuid) { + if (!validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + var v; + var arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +export default parse; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/regex.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/regex.js new file mode 100644 index 0000000..3da8673 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/regex.js @@ -0,0 +1 @@ +export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/rng.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/rng.js new file mode 100644 index 0000000..8abbf2e --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/rng.js @@ -0,0 +1,19 @@ +// Unique ID creation requires a high quality random # generator. In the browser we therefore +// require the crypto API and do not support built-in fallback to lower quality random number +// generators (like Math.random()). +var getRandomValues; +var rnds8 = new Uint8Array(16); +export default function rng() { + // lazy load so that environments that need to polyfill have a chance to do so + if (!getRandomValues) { + // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, + // find the complete implementation of crypto (msCrypto) on IE11. + getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); + + if (!getRandomValues) { + throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); + } + } + + return getRandomValues(rnds8); +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/sha1.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/sha1.js new file mode 100644 index 0000000..940548b --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/sha1.js @@ -0,0 +1,96 @@ +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +function f(s, x, y, z) { + switch (s) { + case 0: + return x & y ^ ~x & z; + + case 1: + return x ^ y ^ z; + + case 2: + return x & y ^ x & z ^ y & z; + + case 3: + return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return x << n | x >>> 32 - n; +} + +function sha1(bytes) { + var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof bytes === 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = []; + + for (var i = 0; i < msg.length; ++i) { + bytes.push(msg.charCodeAt(i)); + } + } else if (!Array.isArray(bytes)) { + // Convert Array-like to Array + bytes = Array.prototype.slice.call(bytes); + } + + bytes.push(0x80); + var l = bytes.length / 4 + 2; + var N = Math.ceil(l / 16); + var M = new Array(N); + + for (var _i = 0; _i < N; ++_i) { + var arr = new Uint32Array(16); + + for (var j = 0; j < 16; ++j) { + arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3]; + } + + M[_i] = arr; + } + + M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); + M[N - 1][14] = Math.floor(M[N - 1][14]); + M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; + + for (var _i2 = 0; _i2 < N; ++_i2) { + var W = new Uint32Array(80); + + for (var t = 0; t < 16; ++t) { + W[t] = M[_i2][t]; + } + + for (var _t = 16; _t < 80; ++_t) { + W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1); + } + + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + for (var _t2 = 0; _t2 < 80; ++_t2) { + var s = Math.floor(_t2 / 20); + var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = H[0] + a >>> 0; + H[1] = H[1] + b >>> 0; + H[2] = H[2] + c >>> 0; + H[3] = H[3] + d >>> 0; + H[4] = H[4] + e >>> 0; + } + + return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; +} + +export default sha1; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/stringify.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/stringify.js new file mode 100644 index 0000000..3102111 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/stringify.js @@ -0,0 +1,30 @@ +import validate from './validate.js'; +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + +var byteToHex = []; + +for (var i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr) { + var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!validate(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +export default stringify; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v1.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v1.js new file mode 100644 index 0000000..1a22591 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v1.js @@ -0,0 +1,95 @@ +import rng from './rng.js'; +import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +var _nodeId; + +var _clockseq; // Previous uuid creation time + + +var _lastMSecs = 0; +var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || new Array(16); + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + var seedBytes = options.random || (options.rng || rng)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + var tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || stringify(b); +} + +export default v1; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v3.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v3.js new file mode 100644 index 0000000..c9ab9a4 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v3.js @@ -0,0 +1,4 @@ +import v35 from './v35.js'; +import md5 from './md5.js'; +var v3 = v35('v3', 0x30, md5); +export default v3; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v35.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v35.js new file mode 100644 index 0000000..31dd8a1 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v35.js @@ -0,0 +1,64 @@ +import stringify from './stringify.js'; +import parse from './parse.js'; + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + var bytes = []; + + for (var i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +export var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +export var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +export default function (name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = parse(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + var bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (var i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return stringify(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v4.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v4.js new file mode 100644 index 0000000..404810a --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v4.js @@ -0,0 +1,24 @@ +import rng from './rng.js'; +import stringify from './stringify.js'; + +function v4(options, buf, offset) { + options = options || {}; + var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (var i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return stringify(rnds); +} + +export default v4; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v5.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v5.js new file mode 100644 index 0000000..c08d96b --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/v5.js @@ -0,0 +1,4 @@ +import v35 from './v35.js'; +import sha1 from './sha1.js'; +var v5 = v35('v5', 0x50, sha1); +export default v5; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/validate.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/validate.js new file mode 100644 index 0000000..f1cdc7a --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/validate.js @@ -0,0 +1,7 @@ +import REGEX from './regex.js'; + +function validate(uuid) { + return typeof uuid === 'string' && REGEX.test(uuid); +} + +export default validate; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/version.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/version.js new file mode 100644 index 0000000..77530e9 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-browser/version.js @@ -0,0 +1,11 @@ +import validate from './validate.js'; + +function version(uuid) { + if (!validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +export default version; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js new file mode 100644 index 0000000..1db6f6d --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js @@ -0,0 +1,9 @@ +export { default as v1 } from './v1.js'; +export { default as v3 } from './v3.js'; +export { default as v4 } from './v4.js'; +export { default as v5 } from './v5.js'; +export { default as NIL } from './nil.js'; +export { default as version } from './version.js'; +export { default as validate } from './validate.js'; +export { default as stringify } from './stringify.js'; +export { default as parse } from './parse.js'; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js new file mode 100644 index 0000000..4d68b04 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js @@ -0,0 +1,13 @@ +import crypto from 'crypto'; + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return crypto.createHash('md5').update(bytes).digest(); +} + +export default md5; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js new file mode 100644 index 0000000..b36324c --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js @@ -0,0 +1 @@ +export default '00000000-0000-0000-0000-000000000000'; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js new file mode 100644 index 0000000..6421c5d --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js @@ -0,0 +1,35 @@ +import validate from './validate.js'; + +function parse(uuid) { + if (!validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +export default parse; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js new file mode 100644 index 0000000..3da8673 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js @@ -0,0 +1 @@ +export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/rng.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/rng.js new file mode 100644 index 0000000..8006244 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/rng.js @@ -0,0 +1,12 @@ +import crypto from 'crypto'; +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; +export default function rng() { + if (poolPtr > rnds8Pool.length - 16) { + crypto.randomFillSync(rnds8Pool); + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js new file mode 100644 index 0000000..e23850b --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js @@ -0,0 +1,13 @@ +import crypto from 'crypto'; + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return crypto.createHash('sha1').update(bytes).digest(); +} + +export default sha1; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js new file mode 100644 index 0000000..f9bca12 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js @@ -0,0 +1,29 @@ +import validate from './validate.js'; +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!validate(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +export default stringify; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js new file mode 100644 index 0000000..ebf81ac --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js @@ -0,0 +1,95 @@ +import rng from './rng.js'; +import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || stringify(b); +} + +export default v1; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js new file mode 100644 index 0000000..09063b8 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js @@ -0,0 +1,4 @@ +import v35 from './v35.js'; +import md5 from './md5.js'; +const v3 = v35('v3', 0x30, md5); +export default v3; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js new file mode 100644 index 0000000..22f6a19 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js @@ -0,0 +1,64 @@ +import stringify from './stringify.js'; +import parse from './parse.js'; + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +export default function (name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = parse(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return stringify(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js new file mode 100644 index 0000000..efad926 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js @@ -0,0 +1,24 @@ +import rng from './rng.js'; +import stringify from './stringify.js'; + +function v4(options, buf, offset) { + options = options || {}; + const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return stringify(rnds); +} + +export default v4; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js new file mode 100644 index 0000000..e87fe31 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js @@ -0,0 +1,4 @@ +import v35 from './v35.js'; +import sha1 from './sha1.js'; +const v5 = v35('v5', 0x50, sha1); +export default v5; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js new file mode 100644 index 0000000..f1cdc7a --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js @@ -0,0 +1,7 @@ +import REGEX from './regex.js'; + +function validate(uuid) { + return typeof uuid === 'string' && REGEX.test(uuid); +} + +export default validate; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js new file mode 100644 index 0000000..77530e9 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js @@ -0,0 +1,11 @@ +import validate from './validate.js'; + +function version(uuid) { + if (!validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +export default version; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/index.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/index.js new file mode 100644 index 0000000..bf13b10 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/index.js @@ -0,0 +1,79 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "v1", { + enumerable: true, + get: function () { + return _v.default; + } +}); +Object.defineProperty(exports, "v3", { + enumerable: true, + get: function () { + return _v2.default; + } +}); +Object.defineProperty(exports, "v4", { + enumerable: true, + get: function () { + return _v3.default; + } +}); +Object.defineProperty(exports, "v5", { + enumerable: true, + get: function () { + return _v4.default; + } +}); +Object.defineProperty(exports, "NIL", { + enumerable: true, + get: function () { + return _nil.default; + } +}); +Object.defineProperty(exports, "version", { + enumerable: true, + get: function () { + return _version.default; + } +}); +Object.defineProperty(exports, "validate", { + enumerable: true, + get: function () { + return _validate.default; + } +}); +Object.defineProperty(exports, "stringify", { + enumerable: true, + get: function () { + return _stringify.default; + } +}); +Object.defineProperty(exports, "parse", { + enumerable: true, + get: function () { + return _parse.default; + } +}); + +var _v = _interopRequireDefault(require("./v1.js")); + +var _v2 = _interopRequireDefault(require("./v3.js")); + +var _v3 = _interopRequireDefault(require("./v4.js")); + +var _v4 = _interopRequireDefault(require("./v5.js")); + +var _nil = _interopRequireDefault(require("./nil.js")); + +var _version = _interopRequireDefault(require("./version.js")); + +var _validate = _interopRequireDefault(require("./validate.js")); + +var _stringify = _interopRequireDefault(require("./stringify.js")); + +var _parse = _interopRequireDefault(require("./parse.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/md5-browser.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/md5-browser.js new file mode 100644 index 0000000..7a4582a --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/md5-browser.js @@ -0,0 +1,223 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ +function md5(bytes) { + if (typeof bytes === 'string') { + const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = new Uint8Array(msg.length); + + for (let i = 0; i < msg.length; ++i) { + bytes[i] = msg.charCodeAt(i); + } + } + + return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8)); +} +/* + * Convert an array of little-endian words to an array of bytes + */ + + +function md5ToHexEncodedArray(input) { + const output = []; + const length32 = input.length * 32; + const hexTab = '0123456789abcdef'; + + for (let i = 0; i < length32; i += 8) { + const x = input[i >> 5] >>> i % 32 & 0xff; + const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16); + output.push(hex); + } + + return output; +} +/** + * Calculate output length with padding and bit length + */ + + +function getOutputLength(inputLength8) { + return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; +} +/* + * Calculate the MD5 of an array of little-endian words, and a bit length. + */ + + +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << len % 32; + x[getOutputLength(len) - 1] = len; + let a = 1732584193; + let b = -271733879; + let c = -1732584194; + let d = 271733878; + + for (let i = 0; i < x.length; i += 16) { + const olda = a; + const oldb = b; + const oldc = c; + const oldd = d; + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + + return [a, b, c, d]; +} +/* + * Convert an array bytes to an array of little-endian words + * Characters >255 have their high-byte silently ignored. + */ + + +function bytesToWords(input) { + if (input.length === 0) { + return []; + } + + const length8 = input.length * 8; + const output = new Uint32Array(getOutputLength(length8)); + + for (let i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; + } + + return output; +} +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ + + +function safeAdd(x, y) { + const lsw = (x & 0xffff) + (y & 0xffff); + const msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return msw << 16 | lsw & 0xffff; +} +/* + * Bitwise rotate a 32-bit number to the left. + */ + + +function bitRotateLeft(num, cnt) { + return num << cnt | num >>> 32 - cnt; +} +/* + * These functions implement the four basic operations the algorithm uses. + */ + + +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} + +function md5ff(a, b, c, d, x, s, t) { + return md5cmn(b & c | ~b & d, a, b, x, s, t); +} + +function md5gg(a, b, c, d, x, s, t) { + return md5cmn(b & d | c & ~d, a, b, x, s, t); +} + +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} + +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | ~d), a, b, x, s, t); +} + +var _default = md5; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/md5.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/md5.js new file mode 100644 index 0000000..824d481 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/md5.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _crypto = _interopRequireDefault(require("crypto")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); +} + +var _default = md5; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/nil.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/nil.js new file mode 100644 index 0000000..7ade577 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/nil.js @@ -0,0 +1,8 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/parse.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/parse.js new file mode 100644 index 0000000..4c69fc3 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/parse.js @@ -0,0 +1,45 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(require("./validate.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default = parse; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/regex.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/regex.js new file mode 100644 index 0000000..1ef91d6 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/regex.js @@ -0,0 +1,8 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/rng-browser.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/rng-browser.js new file mode 100644 index 0000000..91faeae --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/rng-browser.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = rng; +// Unique ID creation requires a high quality random # generator. In the browser we therefore +// require the crypto API and do not support built-in fallback to lower quality random number +// generators (like Math.random()). +let getRandomValues; +const rnds8 = new Uint8Array(16); + +function rng() { + // lazy load so that environments that need to polyfill have a chance to do so + if (!getRandomValues) { + // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, + // find the complete implementation of crypto (msCrypto) on IE11. + getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); + + if (!getRandomValues) { + throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); + } + } + + return getRandomValues(rnds8); +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/rng.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/rng.js new file mode 100644 index 0000000..3507f93 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/rng.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = rng; + +var _crypto = _interopRequireDefault(require("crypto")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/sha1-browser.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/sha1-browser.js new file mode 100644 index 0000000..24cbced --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/sha1-browser.js @@ -0,0 +1,104 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +function f(s, x, y, z) { + switch (s) { + case 0: + return x & y ^ ~x & z; + + case 1: + return x ^ y ^ z; + + case 2: + return x & y ^ x & z ^ y & z; + + case 3: + return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return x << n | x >>> 32 - n; +} + +function sha1(bytes) { + const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof bytes === 'string') { + const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = []; + + for (let i = 0; i < msg.length; ++i) { + bytes.push(msg.charCodeAt(i)); + } + } else if (!Array.isArray(bytes)) { + // Convert Array-like to Array + bytes = Array.prototype.slice.call(bytes); + } + + bytes.push(0x80); + const l = bytes.length / 4 + 2; + const N = Math.ceil(l / 16); + const M = new Array(N); + + for (let i = 0; i < N; ++i) { + const arr = new Uint32Array(16); + + for (let j = 0; j < 16; ++j) { + arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3]; + } + + M[i] = arr; + } + + M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); + M[N - 1][14] = Math.floor(M[N - 1][14]); + M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; + + for (let i = 0; i < N; ++i) { + const W = new Uint32Array(80); + + for (let t = 0; t < 16; ++t) { + W[t] = M[i][t]; + } + + for (let t = 16; t < 80; ++t) { + W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); + } + + let a = H[0]; + let b = H[1]; + let c = H[2]; + let d = H[3]; + let e = H[4]; + + for (let t = 0; t < 80; ++t) { + const s = Math.floor(t / 20); + const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = H[0] + a >>> 0; + H[1] = H[1] + b >>> 0; + H[2] = H[2] + c >>> 0; + H[3] = H[3] + d >>> 0; + H[4] = H[4] + e >>> 0; + } + + return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; +} + +var _default = sha1; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/sha1.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/sha1.js new file mode 100644 index 0000000..03bdd63 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/sha1.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _crypto = _interopRequireDefault(require("crypto")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/stringify.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/stringify.js new file mode 100644 index 0000000..b8e7519 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/stringify.js @@ -0,0 +1,39 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(require("./validate.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default = stringify; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuid.min.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuid.min.js new file mode 100644 index 0000000..639ca2f --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuid.min.js @@ -0,0 +1 @@ +!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self).uuid={})}(this,(function(r){"use strict";var e,n=new Uint8Array(16);function t(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(n)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function a(r){return"string"==typeof r&&o.test(r)}for(var i,u,f=[],s=0;s<256;++s)f.push((s+256).toString(16).substr(1));function c(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(f[r[e+0]]+f[r[e+1]]+f[r[e+2]]+f[r[e+3]]+"-"+f[r[e+4]]+f[r[e+5]]+"-"+f[r[e+6]]+f[r[e+7]]+"-"+f[r[e+8]]+f[r[e+9]]+"-"+f[r[e+10]]+f[r[e+11]]+f[r[e+12]]+f[r[e+13]]+f[r[e+14]]+f[r[e+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n}var l=0,d=0;function v(r){if(!a(r))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(r.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(r.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(r.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(r.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}function p(r,e,n){function t(r,t,o,a){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],n=0;n>>9<<4)+1}function y(r,e){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}function g(r,e,n,t,o,a){return y((i=y(y(e,r),y(t,a)))<<(u=o)|i>>>32-u,n);var i,u}function m(r,e,n,t,o,a,i){return g(e&n|~e&t,r,e,o,a,i)}function w(r,e,n,t,o,a,i){return g(e&t|n&~t,r,e,o,a,i)}function b(r,e,n,t,o,a,i){return g(e^n^t,r,e,o,a,i)}function A(r,e,n,t,o,a,i){return g(n^(e|~t),r,e,o,a,i)}var U=p("v3",48,(function(r){if("string"==typeof r){var e=unescape(encodeURIComponent(r));r=new Uint8Array(e.length);for(var n=0;n>5]>>>o%32&255,i=parseInt(t.charAt(a>>>4&15)+t.charAt(15&a),16);e.push(i)}return e}(function(r,e){r[e>>5]|=128<>5]|=(255&r[t/8])<>>32-e}var R=p("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=[];for(var o=0;o>>0;w=m,m=g,g=C(y,30)>>>0,y=h,h=U}n[0]=n[0]+h>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+w>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));r.NIL="00000000-0000-0000-0000-000000000000",r.parse=v,r.stringify=c,r.v1=function(r,e,n){var o=e&&n||0,a=e||new Array(16),f=(r=r||{}).node||i,s=void 0!==r.clockseq?r.clockseq:u;if(null==f||null==s){var v=r.random||(r.rng||t)();null==f&&(f=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==s&&(s=u=16383&(v[6]<<8|v[7]))}var p=void 0!==r.msecs?r.msecs:Date.now(),h=void 0!==r.nsecs?r.nsecs:d+1,y=p-l+(h-d)/1e4;if(y<0&&void 0===r.clockseq&&(s=s+1&16383),(y<0||p>l)&&void 0===r.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=p,d=h,u=s;var g=(1e4*(268435455&(p+=122192928e5))+h)%4294967296;a[o++]=g>>>24&255,a[o++]=g>>>16&255,a[o++]=g>>>8&255,a[o++]=255&g;var m=p/4294967296*1e4&268435455;a[o++]=m>>>8&255,a[o++]=255&m,a[o++]=m>>>24&15|16,a[o++]=m>>>16&255,a[o++]=s>>>8|128,a[o++]=255&s;for(var w=0;w<6;++w)a[o+w]=f[w];return e||c(a)},r.v3=U,r.v4=function(r,e,n){var o=(r=r||{}).random||(r.rng||t)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){n=n||0;for(var a=0;a<16;++a)e[n+a]=o[a];return e}return c(o)},r.v5=R,r.validate=a,r.version=function(r){if(!a(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)},Object.defineProperty(r,"__esModule",{value:!0})})); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidNIL.min.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidNIL.min.js new file mode 100644 index 0000000..30b28a7 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidNIL.min.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidNIL=n()}(this,(function(){"use strict";return"00000000-0000-0000-0000-000000000000"})); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidParse.min.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidParse.min.js new file mode 100644 index 0000000..d48ea6a --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidParse.min.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidParse=n()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(n){if(!function(n){return"string"==typeof n&&e.test(n)}(n))throw TypeError("Invalid UUID");var t,i=new Uint8Array(16);return i[0]=(t=parseInt(n.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(n.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(n.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(n.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(n.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i}})); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidStringify.min.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidStringify.min.js new file mode 100644 index 0000000..fd39adc --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidStringify.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidStringify=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function t(t){return"string"==typeof t&&e.test(t)}for(var i=[],n=0;n<256;++n)i.push((n+256).toString(16).substr(1));return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,f=(i[e[n+0]]+i[e[n+1]]+i[e[n+2]]+i[e[n+3]]+"-"+i[e[n+4]]+i[e[n+5]]+"-"+i[e[n+6]]+i[e[n+7]]+"-"+i[e[n+8]]+i[e[n+9]]+"-"+i[e[n+10]]+i[e[n+11]]+i[e[n+12]]+i[e[n+13]]+i[e[n+14]]+i[e[n+15]]).toLowerCase();if(!t(f))throw TypeError("Stringified UUID is invalid");return f}})); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidValidate.min.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidValidate.min.js new file mode 100644 index 0000000..378e5b9 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidValidate.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidValidate=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(t){return"string"==typeof t&&e.test(t)}})); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidVersion.min.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidVersion.min.js new file mode 100644 index 0000000..274bb09 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidVersion.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidVersion=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(t){if(!function(t){return"string"==typeof t&&e.test(t)}(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}})); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidv1.min.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidv1.min.js new file mode 100644 index 0000000..2622889 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidv1.min.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidv1=o()}(this,(function(){"use strict";var e,o=new Uint8Array(16);function t(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(e){return"string"==typeof e&&n.test(e)}for(var i,u,s=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));var d=0,f=0;return function(e,o,n){var a=o&&n||0,c=o||new Array(16),l=(e=e||{}).node||i,p=void 0!==e.clockseq?e.clockseq:u;if(null==l||null==p){var v=e.random||(e.rng||t)();null==l&&(l=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==p&&(p=u=16383&(v[6]<<8|v[7]))}var y=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:f+1,g=y-d+(m-f)/1e4;if(g<0&&void 0===e.clockseq&&(p=p+1&16383),(g<0||y>d)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=y,f=m,u=p;var h=(1e4*(268435455&(y+=122192928e5))+m)%4294967296;c[a++]=h>>>24&255,c[a++]=h>>>16&255,c[a++]=h>>>8&255,c[a++]=255&h;var w=y/4294967296*1e4&268435455;c[a++]=w>>>8&255,c[a++]=255&w,c[a++]=w>>>24&15|16,c[a++]=w>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var b=0;b<6;++b)c[a+b]=l[b];return o||function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=(s[e[o+0]]+s[e[o+1]]+s[e[o+2]]+s[e[o+3]]+"-"+s[e[o+4]]+s[e[o+5]]+"-"+s[e[o+6]]+s[e[o+7]]+"-"+s[e[o+8]]+s[e[o+9]]+"-"+s[e[o+10]]+s[e[o+11]]+s[e[o+12]]+s[e[o+13]]+s[e[o+14]]+s[e[o+15]]).toLowerCase();if(!r(t))throw TypeError("Stringified UUID is invalid");return t}(c)}})); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidv3.min.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidv3.min.js new file mode 100644 index 0000000..8d37b62 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidv3.min.js @@ -0,0 +1 @@ +!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).uuidv3=r()}(this,(function(){"use strict";var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(r){return"string"==typeof r&&n.test(r)}for(var e=[],t=0;t<256;++t)e.push((t+256).toString(16).substr(1));function i(n){return 14+(n+64>>>9<<4)+1}function o(n,r){var e=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(e>>16)<<16|65535&e}function a(n,r,e,t,i,a){return o((f=o(o(r,n),o(t,a)))<<(u=i)|f>>>32-u,e);var f,u}function f(n,r,e,t,i,o,f){return a(r&e|~r&t,n,r,i,o,f)}function u(n,r,e,t,i,o,f){return a(r&t|e&~t,n,r,i,o,f)}function c(n,r,e,t,i,o,f){return a(r^e^t,n,r,i,o,f)}function s(n,r,e,t,i,o,f){return a(e^(r|~t),n,r,i,o,f)}return function(n,t,i){function o(n,o,a,f){if("string"==typeof n&&(n=function(n){n=unescape(encodeURIComponent(n));for(var r=[],e=0;e>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=255&e,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=255&e,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=255&e,t[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=255&e,t}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var u=new Uint8Array(16+n.length);if(u.set(o),u.set(n,o.length),(u=i(u))[6]=15&u[6]|t,u[8]=63&u[8]|128,a){f=f||0;for(var c=0;c<16;++c)a[f+c]=u[c];return a}return function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(e[n[t+0]]+e[n[t+1]]+e[n[t+2]]+e[n[t+3]]+"-"+e[n[t+4]]+e[n[t+5]]+"-"+e[n[t+6]]+e[n[t+7]]+"-"+e[n[t+8]]+e[n[t+9]]+"-"+e[n[t+10]]+e[n[t+11]]+e[n[t+12]]+e[n[t+13]]+e[n[t+14]]+e[n[t+15]]).toLowerCase();if(!r(i))throw TypeError("Stringified UUID is invalid");return i}(u)}try{o.name=n}catch(n){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v3",48,(function(n){if("string"==typeof n){var r=unescape(encodeURIComponent(n));n=new Uint8Array(r.length);for(var e=0;e>5]>>>i%32&255,a=parseInt(t.charAt(o>>>4&15)+t.charAt(15&o),16);r.push(a)}return r}(function(n,r){n[r>>5]|=128<>5]|=(255&n[t/8])<1&&void 0!==arguments[1]?arguments[1]:0,o=(i[t[e+0]]+i[t[e+1]]+i[t[e+2]]+i[t[e+3]]+"-"+i[t[e+4]]+i[t[e+5]]+"-"+i[t[e+6]]+i[t[e+7]]+"-"+i[t[e+8]]+i[t[e+9]]+"-"+i[t[e+10]]+i[t[e+11]]+i[t[e+12]]+i[t[e+13]]+i[t[e+14]]+i[t[e+15]]).toLowerCase();if(!r(o))throw TypeError("Stringified UUID is invalid");return o}(u)}})); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidv5.min.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidv5.min.js new file mode 100644 index 0000000..ba6fc63 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/umd/uuidv5.min.js @@ -0,0 +1 @@ +!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).uuidv5=e()}(this,(function(){"use strict";var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function e(e){return"string"==typeof e&&r.test(e)}for(var t=[],n=0;n<256;++n)t.push((n+256).toString(16).substr(1));function a(r,e,t,n){switch(r){case 0:return e&t^~e&n;case 1:return e^t^n;case 2:return e&t^e&n^t&n;case 3:return e^t^n}}function o(r,e){return r<>>32-e}return function(r,n,a){function o(r,o,i,f){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],t=0;t>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(r.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(r.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(r.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+r.length);if(s.set(o),s.set(r,o.length),(s=a(s))[6]=15&s[6]|n,s[8]=63&s[8]|128,i){f=f||0;for(var u=0;u<16;++u)i[f+u]=s[u];return i}return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=(t[r[n+0]]+t[r[n+1]]+t[r[n+2]]+t[r[n+3]]+"-"+t[r[n+4]]+t[r[n+5]]+"-"+t[r[n+6]]+t[r[n+7]]+"-"+t[r[n+8]]+t[r[n+9]]+"-"+t[r[n+10]]+t[r[n+11]]+t[r[n+12]]+t[r[n+13]]+t[r[n+14]]+t[r[n+15]]).toLowerCase();if(!e(a))throw TypeError("Stringified UUID is invalid");return a}(s)}try{o.name=r}catch(r){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=[];for(var i=0;i>>0;A=U,U=w,w=o(b,30)>>>0,b=g,g=C}t[0]=t[0]+g>>>0,t[1]=t[1]+b>>>0,t[2]=t[2]+w>>>0,t[3]=t[3]+U>>>0,t[4]=t[4]+A>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,255&t[0],t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,255&t[1],t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,255&t[2],t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,255&t[3],t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,255&t[4]]}))})); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/uuid-bin.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/uuid-bin.js new file mode 100644 index 0000000..50a7a9f --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/uuid-bin.js @@ -0,0 +1,85 @@ +"use strict"; + +var _assert = _interopRequireDefault(require("assert")); + +var _v = _interopRequireDefault(require("./v1.js")); + +var _v2 = _interopRequireDefault(require("./v3.js")); + +var _v3 = _interopRequireDefault(require("./v4.js")); + +var _v4 = _interopRequireDefault(require("./v5.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function usage() { + console.log('Usage:'); + console.log(' uuid'); + console.log(' uuid v1'); + console.log(' uuid v3 '); + console.log(' uuid v4'); + console.log(' uuid v5 '); + console.log(' uuid --help'); + console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); +} + +const args = process.argv.slice(2); + +if (args.indexOf('--help') >= 0) { + usage(); + process.exit(0); +} + +const version = args.shift() || 'v4'; + +switch (version) { + case 'v1': + console.log((0, _v.default)()); + break; + + case 'v3': + { + const name = args.shift(); + let namespace = args.shift(); + (0, _assert.default)(name != null, 'v3 name not specified'); + (0, _assert.default)(namespace != null, 'v3 namespace not specified'); + + if (namespace === 'URL') { + namespace = _v2.default.URL; + } + + if (namespace === 'DNS') { + namespace = _v2.default.DNS; + } + + console.log((0, _v2.default)(name, namespace)); + break; + } + + case 'v4': + console.log((0, _v3.default)()); + break; + + case 'v5': + { + const name = args.shift(); + let namespace = args.shift(); + (0, _assert.default)(name != null, 'v5 name not specified'); + (0, _assert.default)(namespace != null, 'v5 namespace not specified'); + + if (namespace === 'URL') { + namespace = _v4.default.URL; + } + + if (namespace === 'DNS') { + namespace = _v4.default.DNS; + } + + console.log((0, _v4.default)(name, namespace)); + break; + } + + default: + usage(); + process.exit(1); +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v1.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v1.js new file mode 100644 index 0000000..abb9b3d --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v1.js @@ -0,0 +1,107 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _rng = _interopRequireDefault(require("./rng.js")); + +var _stringify = _interopRequireDefault(require("./stringify.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.default)(b); +} + +var _default = v1; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v3.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v3.js new file mode 100644 index 0000000..6b47ff5 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v3.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _v = _interopRequireDefault(require("./v35.js")); + +var _md = _interopRequireDefault(require("./md5.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v35.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v35.js new file mode 100644 index 0000000..f784c63 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v35.js @@ -0,0 +1,78 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.URL = exports.DNS = void 0; + +var _stringify = _interopRequireDefault(require("./stringify.js")); + +var _parse = _interopRequireDefault(require("./parse.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v4.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v4.js new file mode 100644 index 0000000..838ce0b --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v4.js @@ -0,0 +1,37 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _rng = _interopRequireDefault(require("./rng.js")); + +var _stringify = _interopRequireDefault(require("./stringify.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.default)(rnds); +} + +var _default = v4; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v5.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v5.js new file mode 100644 index 0000000..99d615e --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v5.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _v = _interopRequireDefault(require("./v35.js")); + +var _sha = _interopRequireDefault(require("./sha1.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/validate.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/validate.js new file mode 100644 index 0000000..fd05215 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/validate.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regex = _interopRequireDefault(require("./regex.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/version.js b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/version.js new file mode 100644 index 0000000..b72949c --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/dist/version.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(require("./validate.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +var _default = version; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/package.json b/node_modules/@smithy/middleware-retry/node_modules/uuid/package.json new file mode 100644 index 0000000..f0ab371 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/package.json @@ -0,0 +1,135 @@ +{ + "name": "uuid", + "version": "8.3.2", + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "bin": { + "uuid": "./dist/bin/uuid" + }, + "sideEffects": false, + "main": "./dist/index.js", + "exports": { + ".": { + "node": { + "module": "./dist/esm-node/index.js", + "require": "./dist/index.js", + "import": "./wrapper.mjs" + }, + "default": "./dist/esm-browser/index.js" + }, + "./package.json": "./package.json" + }, + "module": "./dist/esm-node/index.js", + "browser": { + "./dist/md5.js": "./dist/md5-browser.js", + "./dist/rng.js": "./dist/rng-browser.js", + "./dist/sha1.js": "./dist/sha1-browser.js", + "./dist/esm-node/index.js": "./dist/esm-browser/index.js" + }, + "files": [ + "CHANGELOG.md", + "CONTRIBUTING.md", + "LICENSE.md", + "README.md", + "dist", + "wrapper.mjs" + ], + "devDependencies": { + "@babel/cli": "7.11.6", + "@babel/core": "7.11.6", + "@babel/preset-env": "7.11.5", + "@commitlint/cli": "11.0.0", + "@commitlint/config-conventional": "11.0.0", + "@rollup/plugin-node-resolve": "9.0.0", + "babel-eslint": "10.1.0", + "bundlewatch": "0.3.1", + "eslint": "7.10.0", + "eslint-config-prettier": "6.12.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.22.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-prettier": "3.1.4", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", + "husky": "4.3.0", + "jest": "25.5.4", + "lint-staged": "10.4.0", + "npm-run-all": "4.1.5", + "optional-dev-dependency": "2.0.1", + "prettier": "2.1.2", + "random-seed": "0.3.0", + "rollup": "2.28.2", + "rollup-plugin-terser": "7.0.2", + "runmd": "1.3.2", + "standard-version": "9.0.0" + }, + "optionalDevDependencies": { + "@wdio/browserstack-service": "6.4.0", + "@wdio/cli": "6.4.0", + "@wdio/jasmine-framework": "6.4.0", + "@wdio/local-runner": "6.4.0", + "@wdio/spec-reporter": "6.4.0", + "@wdio/static-server-service": "6.4.0", + "@wdio/sync": "6.4.0" + }, + "scripts": { + "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build", + "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build", + "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test", + "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test", + "lint": "npm run eslint:check && npm run prettier:check", + "eslint:check": "eslint src/ test/ examples/ *.js", + "eslint:fix": "eslint --fix src/ test/ examples/ *.js", + "pretest": "[ -n $CI ] || npm run build", + "test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/", + "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**", + "test:browser": "wdio run ./wdio.conf.js", + "pretest:node": "npm run build", + "test:node": "npm-run-all --parallel examples:node:**", + "test:pack": "./scripts/testpack.sh", + "pretest:benchmark": "npm run build", + "test:benchmark": "cd examples/benchmark && npm install && npm test", + "prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'", + "prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'", + "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", + "md": "runmd --watch --output=README.md README_js.md", + "docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )", + "docs:diff": "npm run docs && git diff --quiet README.md", + "build": "./scripts/build.sh", + "prepack": "npm run build", + "release": "standard-version --no-verify" + }, + "repository": { + "type": "git", + "url": "https://github.com/uuidjs/uuid.git" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.{js,jsx,json,md}": [ + "prettier --write" + ], + "*.{js,jsx}": [ + "eslint --fix" + ] + }, + "standard-version": { + "scripts": { + "postchangelog": "prettier --write CHANGELOG.md" + } + } +} diff --git a/node_modules/@smithy/middleware-retry/node_modules/uuid/wrapper.mjs b/node_modules/@smithy/middleware-retry/node_modules/uuid/wrapper.mjs new file mode 100644 index 0000000..c31e9ce --- /dev/null +++ b/node_modules/@smithy/middleware-retry/node_modules/uuid/wrapper.mjs @@ -0,0 +1,10 @@ +import uuid from './dist/index.js'; +export const v1 = uuid.v1; +export const v3 = uuid.v3; +export const v4 = uuid.v4; +export const v5 = uuid.v5; +export const NIL = uuid.NIL; +export const version = uuid.version; +export const validate = uuid.validate; +export const stringify = uuid.stringify; +export const parse = uuid.parse; diff --git a/node_modules/@smithy/middleware-retry/package.json b/node_modules/@smithy/middleware-retry/package.json new file mode 100644 index 0000000..660fb56 --- /dev/null +++ b/node_modules/@smithy/middleware-retry/package.json @@ -0,0 +1,78 @@ +{ + "name": "@smithy/middleware-retry", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline middleware-retry", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "extract:docs": "api-extractor run --local", + "test": "yarn g:jest", + "test:integration": "yarn g:jest --config jest.config.integ.js" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "browser": { + "./dist-es/isStreamingPayload/isStreamingPayload": "./dist-es/isStreamingPayload/isStreamingPayload.browser" + }, + "react-native": { + "./dist-cjs/isStreamingPayload/isStreamingPayload": "./dist-cjs/isStreamingPayload/isStreamingPayload.browser", + "./dist-es/isStreamingPayload/isStreamingPayload": "./dist-es/isStreamingPayload/isStreamingPayload.browser" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^2.3.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/service-error-classification": "^2.1.5", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "tslib": "^2.6.2", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@smithy/util-test": "^0.2.0", + "@tsconfig/recommended": "1.0.1", + "@types/uuid": "^8.3.0", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/middleware-retry", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/middleware-retry" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-serde/LICENSE b/node_modules/@smithy/middleware-serde/LICENSE new file mode 100644 index 0000000..e907b58 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/middleware-serde/README.md b/node_modules/@smithy/middleware-serde/README.md new file mode 100644 index 0000000..d2bbfa6 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/README.md @@ -0,0 +1,4 @@ +# @smithy/middleware-serde + +[![NPM version](https://img.shields.io/npm/v/@smithy/middleware-serde/latest.svg)](https://www.npmjs.com/package/@smithy/middleware-serde) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/middleware-serde.svg)](https://www.npmjs.com/package/@smithy/middleware-serde) diff --git a/node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js b/node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-serde/dist-cjs/index.js b/node_modules/@smithy/middleware-serde/dist-cjs/index.js new file mode 100644 index 0000000..ad6f710 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-cjs/index.js @@ -0,0 +1,102 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + deserializerMiddleware: () => deserializerMiddleware, + deserializerMiddlewareOption: () => deserializerMiddlewareOption, + getSerdePlugin: () => getSerdePlugin, + serializerMiddleware: () => serializerMiddleware, + serializerMiddlewareOption: () => serializerMiddlewareOption +}); +module.exports = __toCommonJS(src_exports); + +// src/deserializerMiddleware.ts +var deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed + }; + } catch (error) { + Object.defineProperty(error, "$response", { + value: response + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + error.message += "\n " + hint; + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + } + throw error; + } +}, "deserializerMiddleware"); + +// src/serializerMiddleware.ts +var serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => { + var _a; + const endpoint = ((_a = context.endpointV2) == null ? void 0 : _a.url) && options.urlParser ? async () => options.urlParser(context.endpointV2.url) : options.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); + } + const request = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request + }); +}, "serializerMiddleware"); + +// src/serdePlugin.ts +var deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true +}; +var serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true +}; +function getSerdePlugin(config, serializer, deserializer) { + return { + applyToStack: (commandStack) => { + commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); + commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); + } + }; +} +__name(getSerdePlugin, "getSerdePlugin"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + deserializerMiddleware, + deserializerMiddlewareOption, + serializerMiddlewareOption, + getSerdePlugin, + serializerMiddleware +}); + diff --git a/node_modules/@smithy/middleware-serde/dist-cjs/serdePlugin.js b/node_modules/@smithy/middleware-serde/dist-cjs/serdePlugin.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-cjs/serdePlugin.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-serde/dist-cjs/serializerMiddleware.js b/node_modules/@smithy/middleware-serde/dist-cjs/serializerMiddleware.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-cjs/serializerMiddleware.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js b/node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js new file mode 100644 index 0000000..62d507c --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js @@ -0,0 +1,25 @@ +export const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed, + }; + } + catch (error) { + Object.defineProperty(error, "$response", { + value: response, + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + error.message += "\n " + hint; + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + } + throw error; + } +}; diff --git a/node_modules/@smithy/middleware-serde/dist-es/index.js b/node_modules/@smithy/middleware-serde/dist-es/index.js new file mode 100644 index 0000000..166a2be --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-es/index.js @@ -0,0 +1,3 @@ +export * from "./deserializerMiddleware"; +export * from "./serdePlugin"; +export * from "./serializerMiddleware"; diff --git a/node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js b/node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js new file mode 100644 index 0000000..be2a06e --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js @@ -0,0 +1,22 @@ +import { deserializerMiddleware } from "./deserializerMiddleware"; +import { serializerMiddleware } from "./serializerMiddleware"; +export const deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true, +}; +export const serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true, +}; +export function getSerdePlugin(config, serializer, deserializer) { + return { + applyToStack: (commandStack) => { + commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); + commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); + }, + }; +} diff --git a/node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js b/node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js new file mode 100644 index 0000000..b02b93d --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js @@ -0,0 +1,13 @@ +export const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { + const endpoint = context.endpointV2?.url && options.urlParser + ? async () => options.urlParser(context.endpointV2.url) + : options.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); + } + const request = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request, + }); +}; diff --git a/node_modules/@smithy/middleware-serde/dist-types/deserializerMiddleware.d.ts b/node_modules/@smithy/middleware-serde/dist-types/deserializerMiddleware.d.ts new file mode 100644 index 0000000..4d81141 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-types/deserializerMiddleware.d.ts @@ -0,0 +1,5 @@ +import { DeserializeMiddleware, ResponseDeserializer, SerdeContext, SerdeFunctions } from "@smithy/types"; +/** + * @internal + */ +export declare const deserializerMiddleware: (options: SerdeFunctions, deserializer: ResponseDeserializer) => DeserializeMiddleware; diff --git a/node_modules/@smithy/middleware-serde/dist-types/index.d.ts b/node_modules/@smithy/middleware-serde/dist-types/index.d.ts new file mode 100644 index 0000000..166a2be --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-types/index.d.ts @@ -0,0 +1,3 @@ +export * from "./deserializerMiddleware"; +export * from "./serdePlugin"; +export * from "./serializerMiddleware"; diff --git a/node_modules/@smithy/middleware-serde/dist-types/serdePlugin.d.ts b/node_modules/@smithy/middleware-serde/dist-types/serdePlugin.d.ts new file mode 100644 index 0000000..bf1091a --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-types/serdePlugin.d.ts @@ -0,0 +1,12 @@ +import { DeserializeHandlerOptions, Endpoint, MetadataBearer, Pluggable, Provider, RequestSerializer, ResponseDeserializer, SerdeContext, SerdeFunctions, SerializeHandlerOptions, UrlParser } from "@smithy/types"; +export declare const deserializerMiddlewareOption: DeserializeHandlerOptions; +export declare const serializerMiddlewareOption: SerializeHandlerOptions; +export type V1OrV2Endpoint = { + urlParser?: UrlParser; + endpoint?: Provider; +}; +/** + * @internal + * + */ +export declare function getSerdePlugin(config: V1OrV2Endpoint & SerdeFunctions, serializer: RequestSerializer, deserializer: ResponseDeserializer): Pluggable; diff --git a/node_modules/@smithy/middleware-serde/dist-types/serializerMiddleware.d.ts b/node_modules/@smithy/middleware-serde/dist-types/serializerMiddleware.d.ts new file mode 100644 index 0000000..5437298 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-types/serializerMiddleware.d.ts @@ -0,0 +1,6 @@ +import { RequestSerializer, SerdeContext, SerdeFunctions, SerializeMiddleware } from "@smithy/types"; +import type { V1OrV2Endpoint } from "./serdePlugin"; +/** + * @internal + */ +export declare const serializerMiddleware: (options: V1OrV2Endpoint & SerdeFunctions, serializer: RequestSerializer) => SerializeMiddleware; diff --git a/node_modules/@smithy/middleware-serde/dist-types/ts3.4/deserializerMiddleware.d.ts b/node_modules/@smithy/middleware-serde/dist-types/ts3.4/deserializerMiddleware.d.ts new file mode 100644 index 0000000..b0ed492 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-types/ts3.4/deserializerMiddleware.d.ts @@ -0,0 +1,5 @@ +import { DeserializeMiddleware, ResponseDeserializer, SerdeContext, SerdeFunctions } from "@smithy/types"; +/** + * @internal + */ +export declare const deserializerMiddleware: (options: SerdeFunctions, deserializer: ResponseDeserializer) => DeserializeMiddleware; diff --git a/node_modules/@smithy/middleware-serde/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/middleware-serde/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..ec66df4 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-types/ts3.4/index.d.ts @@ -0,0 +1,3 @@ +export * from "./deserializerMiddleware"; +export * from "./serdePlugin"; +export * from "./serializerMiddleware"; diff --git a/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serdePlugin.d.ts b/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serdePlugin.d.ts new file mode 100644 index 0000000..c381721 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serdePlugin.d.ts @@ -0,0 +1,12 @@ +import { DeserializeHandlerOptions, Endpoint, MetadataBearer, Pluggable, Provider, RequestSerializer, ResponseDeserializer, SerdeContext, SerdeFunctions, SerializeHandlerOptions, UrlParser } from "@smithy/types"; +export declare const deserializerMiddlewareOption: DeserializeHandlerOptions; +export declare const serializerMiddlewareOption: SerializeHandlerOptions; +export type V1OrV2Endpoint = { + urlParser?: UrlParser; + endpoint?: Provider; +}; +/** + * @internal + * + */ +export declare function getSerdePlugin(config: V1OrV2Endpoint & SerdeFunctions, serializer: RequestSerializer, deserializer: ResponseDeserializer): Pluggable; diff --git a/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serializerMiddleware.d.ts b/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serializerMiddleware.d.ts new file mode 100644 index 0000000..914b3b6 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serializerMiddleware.d.ts @@ -0,0 +1,6 @@ +import { RequestSerializer, SerdeContext, SerdeFunctions, SerializeMiddleware } from "@smithy/types"; +import { V1OrV2Endpoint } from "./serdePlugin"; +/** + * @internal + */ +export declare const serializerMiddleware: (options: V1OrV2Endpoint & SerdeFunctions, serializer: RequestSerializer) => SerializeMiddleware; diff --git a/node_modules/@smithy/middleware-serde/package.json b/node_modules/@smithy/middleware-serde/package.json new file mode 100644 index 0000000..71e5b90 --- /dev/null +++ b/node_modules/@smithy/middleware-serde/package.json @@ -0,0 +1,62 @@ +{ + "name": "@smithy/middleware-serde", + "version": "2.3.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline middleware-serde", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest", + "test:integration": "yarn g:jest --config jest.config.integ.js" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/middleware-serde", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/middleware-serde" + }, + "devDependencies": { + "@smithy/util-test": "^0.2.0", + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/middleware-stack/LICENSE b/node_modules/@smithy/middleware-stack/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/middleware-stack/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/middleware-stack/README.md b/node_modules/@smithy/middleware-stack/README.md new file mode 100644 index 0000000..c09d4d3 --- /dev/null +++ b/node_modules/@smithy/middleware-stack/README.md @@ -0,0 +1,78 @@ +# @smithy/middleware-stack + +[![NPM version](https://img.shields.io/npm/v/@smithy/middleware-stack/latest.svg)](https://www.npmjs.com/package/@smithy/middleware-stack) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/middleware-stack.svg)](https://www.npmjs.com/package/@smithy/middleware-stack) + +The package contains an implementation of middleware stack interface. Middleware +stack is a structure storing middleware in specified order and resolve these +middleware into a single handler. + +A middleware stack has five `Step`s, each of them represents a specific request life cycle: + +- **initialize**: The input is being prepared. Examples of typical initialization tasks include injecting default options computing derived parameters. + +- **serialize**: The input is complete and ready to be serialized. Examples of typical serialization tasks include input validation and building an HTTP request from user input. + +- **build**: The input has been serialized into an HTTP request, but that request may require further modification. Any request alterations will be applied to all retries. Examples of typical build tasks include injecting HTTP headers that describe a stable aspect of the request, such as `Content-Length` or a body checksum. + +- **finalizeRequest**: The request is being prepared to be sent over the wire. The request in this stage should already be semantically complete and should therefore only be altered to match the recipient's expectations. Examples of typical finalization tasks include request signing and injecting hop-by-hop headers. + +- **deserialize**: The response has arrived, the middleware here will deserialize the raw response object to structured response + +## Adding Middleware + +There are two ways to add middleware to a middleware stack. They both add middleware to specified `Step` but they provide fine-grained location control differently. + +### Absolute Location + +You can add middleware to specified step with: + +```javascript +stack.add(middleware, { + step: "finalizeRequest", +}); +``` + +This approach works for most cases. Sometimes you want your middleware to be executed in the front of the `Step`, you can set the `Priority` to `high`. Set the `Priority` to `low` then this middleware will be executed at the end of `Step`: + +```javascript +stack.add(middleware, { + step: "finalizeRequest", + priority: "high", +}); +``` + +If multiple middleware is added to same `step` with same `priority`, the order of them is determined by the order of adding them. + +### Relative Location + +In some cases, you might want to execute your middleware before some other known middleware, then you can use `addRelativeTo()`: + +```javascript +stack.add(middleware, { + step: "finalizeRequest", + name: "myMiddleware", +}); +stack.addRelativeTo(anotherMiddleware, { + relation: "before", //or 'after' + toMiddleware: "myMiddleware", +}); +``` + +## Removing Middleware + +You can remove middleware by name one at a time: + +```javascript +stack.remove("Middleware1"); +``` + +If you specify tags for middleware, you can remove multiple middleware at a time according to tag: + +```javascript +stack.add(middleware, { + step: "finalizeRequest", + tags: ["final"], +}); +stack.removeByTag("final"); +``` diff --git a/node_modules/@smithy/middleware-stack/dist-cjs/MiddlewareStack.js b/node_modules/@smithy/middleware-stack/dist-cjs/MiddlewareStack.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-cjs/MiddlewareStack.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-stack/dist-cjs/index.js b/node_modules/@smithy/middleware-stack/dist-cjs/index.js new file mode 100644 index 0000000..18329dd --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-cjs/index.js @@ -0,0 +1,318 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + constructStack: () => constructStack +}); +module.exports = __toCommonJS(src_exports); + +// src/MiddlewareStack.ts +var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; +}, "getAllAliases"); +var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; +}, "getMiddlewareNameWithAliases"); +var constructStack = /* @__PURE__ */ __name(() => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = /* @__PURE__ */ __name((entries) => entries.sort( + (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"] + ), "sort"); + const removeByName = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByName"); + const removeByReference = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByReference"); + const cloneTo = /* @__PURE__ */ __name((toStack) => { + var _a; + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + (_a = toStack.identifyOnResolve) == null ? void 0 : _a.call(toStack, stack.identifyOnResolve()); + return toStack; + }, "cloneTo"); + const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }, "expandRelativeMiddlewareList"); + const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === void 0) { + if (debug) { + return; + } + throw new Error( + `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}` + ); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, []); + return mainChain; + }, "getMiddlewareList"); + const stack = { + add: (middleware, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex( + (entry2) => { + var _a; + return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias)); + } + ); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error( + `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.` + ); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex( + (entry2) => { + var _a; + return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias)); + } + ); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error( + `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.` + ); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + var _a; + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve( + identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? void 0 : _a.call(from)) ?? false) + ); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? mw.relation + " " + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context) => { + for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { + handler = middleware(handler, context); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + } + }; + return stack; +}, "constructStack"); +var stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 +}; +var priorityWeights = { + high: 3, + normal: 2, + low: 1 +}; +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + constructStack +}); + diff --git a/node_modules/@smithy/middleware-stack/dist-cjs/types.js b/node_modules/@smithy/middleware-stack/dist-cjs/types.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-cjs/types.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js b/node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js new file mode 100644 index 0000000..2e02c73 --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js @@ -0,0 +1,281 @@ +const getAllAliases = (name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; +}; +const getMiddlewareNameWithAliases = (name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; +}; +export const constructStack = () => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = new Set(); + const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || + priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]); + const removeByName = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const removeByReference = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const cloneTo = (toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + toStack.identifyOnResolve?.(stack.identifyOnResolve()); + return toStack; + }; + const expandRelativeMiddlewareList = (from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } + else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } + else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }; + const getMiddlewareList = (debug = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [], + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [], + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === undefined) { + if (debug) { + return; + } + throw new Error(`${entry.toMiddleware} is not found when adding ` + + `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` + + `middleware ${entry.relation} ${entry.toMiddleware}`); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries) + .map(expandRelativeMiddlewareList) + .reduce((wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, []); + return mainChain; + }; + const stack = { + add: (middleware, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options, + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ` + + `${toOverride.priority} priority in ${toOverride.step} step cannot ` + + `be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ` + + `${entry.priority} priority in ${entry.step} step.`); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware, + ...options, + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ` + + `${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` + + `by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} ` + + `"${entry.toMiddleware}" middleware.`); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? + mw.relation + + " " + + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context) => { + for (const middleware of getMiddlewareList() + .map((entry) => entry.middleware) + .reverse()) { + handler = middleware(handler, context); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + }, + }; + return stack; +}; +const stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1, +}; +const priorityWeights = { + high: 3, + normal: 2, + low: 1, +}; diff --git a/node_modules/@smithy/middleware-stack/dist-es/index.js b/node_modules/@smithy/middleware-stack/dist-es/index.js new file mode 100644 index 0000000..16f56ce --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-es/index.js @@ -0,0 +1 @@ +export * from "./MiddlewareStack"; diff --git a/node_modules/@smithy/middleware-stack/dist-es/types.js b/node_modules/@smithy/middleware-stack/dist-es/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-es/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/middleware-stack/dist-types/MiddlewareStack.d.ts b/node_modules/@smithy/middleware-stack/dist-types/MiddlewareStack.d.ts new file mode 100644 index 0000000..9c4d003 --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-types/MiddlewareStack.d.ts @@ -0,0 +1,2 @@ +import { MiddlewareStack } from "@smithy/types"; +export declare const constructStack: () => MiddlewareStack; diff --git a/node_modules/@smithy/middleware-stack/dist-types/index.d.ts b/node_modules/@smithy/middleware-stack/dist-types/index.d.ts new file mode 100644 index 0000000..16f56ce --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-types/index.d.ts @@ -0,0 +1 @@ +export * from "./MiddlewareStack"; diff --git a/node_modules/@smithy/middleware-stack/dist-types/ts3.4/MiddlewareStack.d.ts b/node_modules/@smithy/middleware-stack/dist-types/ts3.4/MiddlewareStack.d.ts new file mode 100644 index 0000000..68bee28 --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-types/ts3.4/MiddlewareStack.d.ts @@ -0,0 +1,2 @@ +import { MiddlewareStack } from "@smithy/types"; +export declare const constructStack: () => MiddlewareStack; diff --git a/node_modules/@smithy/middleware-stack/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/middleware-stack/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..d906b7d --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-types/ts3.4/index.d.ts @@ -0,0 +1 @@ +export * from "./MiddlewareStack"; diff --git a/node_modules/@smithy/middleware-stack/dist-types/ts3.4/types.d.ts b/node_modules/@smithy/middleware-stack/dist-types/ts3.4/types.d.ts new file mode 100644 index 0000000..38eb54c --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-types/ts3.4/types.d.ts @@ -0,0 +1,22 @@ +import { AbsoluteLocation, HandlerOptions, MiddlewareType, Priority, RelativeLocation, Step } from "@smithy/types"; +export interface MiddlewareEntry extends HandlerOptions { + middleware: MiddlewareType; +} +export interface AbsoluteMiddlewareEntry extends MiddlewareEntry, AbsoluteLocation { + step: Step; + priority: Priority; +} +export interface RelativeMiddlewareEntry extends MiddlewareEntry, RelativeLocation { +} +export type Normalized, Input extends object = {}, Output extends object = {}> = T & { + after: Normalized, Input, Output>[]; + before: Normalized, Input, Output>[]; +}; +export interface NormalizedRelativeEntry extends HandlerOptions { + step: Step; + middleware: MiddlewareType; + next?: NormalizedRelativeEntry; + prev?: NormalizedRelativeEntry; + priority: null; +} +export type NamedMiddlewareEntriesMap = Record>; diff --git a/node_modules/@smithy/middleware-stack/dist-types/types.d.ts b/node_modules/@smithy/middleware-stack/dist-types/types.d.ts new file mode 100644 index 0000000..4aa5fc6 --- /dev/null +++ b/node_modules/@smithy/middleware-stack/dist-types/types.d.ts @@ -0,0 +1,22 @@ +import { AbsoluteLocation, HandlerOptions, MiddlewareType, Priority, RelativeLocation, Step } from "@smithy/types"; +export interface MiddlewareEntry extends HandlerOptions { + middleware: MiddlewareType; +} +export interface AbsoluteMiddlewareEntry extends MiddlewareEntry, AbsoluteLocation { + step: Step; + priority: Priority; +} +export interface RelativeMiddlewareEntry extends MiddlewareEntry, RelativeLocation { +} +export type Normalized, Input extends object = {}, Output extends object = {}> = T & { + after: Normalized, Input, Output>[]; + before: Normalized, Input, Output>[]; +}; +export interface NormalizedRelativeEntry extends HandlerOptions { + step: Step; + middleware: MiddlewareType; + next?: NormalizedRelativeEntry; + prev?: NormalizedRelativeEntry; + priority: null; +} +export type NamedMiddlewareEntriesMap = Record>; diff --git a/node_modules/@smithy/middleware-stack/package.json b/node_modules/@smithy/middleware-stack/package.json new file mode 100644 index 0000000..869361b --- /dev/null +++ b/node_modules/@smithy/middleware-stack/package.json @@ -0,0 +1,63 @@ +{ + "name": "@smithy/middleware-stack", + "version": "2.2.0", + "description": "Provides a means for composing multiple middleware functions into a single handler", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline middleware-stack", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "extract:docs": "api-extractor run --local", + "test": "yarn g:jest" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "email": "", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/middleware-stack", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/middleware-stack" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/node-config-provider/LICENSE b/node_modules/@smithy/node-config-provider/LICENSE new file mode 100644 index 0000000..74d4e5c --- /dev/null +++ b/node_modules/@smithy/node-config-provider/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/node-config-provider/README.md b/node_modules/@smithy/node-config-provider/README.md new file mode 100644 index 0000000..af591d2 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/README.md @@ -0,0 +1,4 @@ +# @smithy/node-config-provider + +[![NPM version](https://img.shields.io/npm/v/@smithy/node-config-provider/latest.svg)](https://www.npmjs.com/package/@smithy/node-config-provider) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/node-config-provider.svg)](https://www.npmjs.com/package/@smithy/node-config-provider) diff --git a/node_modules/@smithy/node-config-provider/dist-cjs/configLoader.js b/node_modules/@smithy/node-config-provider/dist-cjs/configLoader.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-cjs/configLoader.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-config-provider/dist-cjs/fromEnv.js b/node_modules/@smithy/node-config-provider/dist-cjs/fromEnv.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-cjs/fromEnv.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-config-provider/dist-cjs/fromSharedConfigFiles.js b/node_modules/@smithy/node-config-provider/dist-cjs/fromSharedConfigFiles.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-cjs/fromSharedConfigFiles.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-config-provider/dist-cjs/fromStatic.js b/node_modules/@smithy/node-config-provider/dist-cjs/fromStatic.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-cjs/fromStatic.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-config-provider/dist-cjs/index.js b/node_modules/@smithy/node-config-provider/dist-cjs/index.js new file mode 100644 index 0000000..77046db --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-cjs/index.js @@ -0,0 +1,87 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + loadConfig: () => loadConfig +}); +module.exports = __toCommonJS(src_exports); + +// src/configLoader.ts + + +// src/fromEnv.ts +var import_property_provider = require("@smithy/property-provider"); +var fromEnv = /* @__PURE__ */ __name((envVarSelector) => async () => { + try { + const config = envVarSelector(process.env); + if (config === void 0) { + throw new Error(); + } + return config; + } catch (e) { + throw new import_property_provider.CredentialsProviderError( + e.message || `Cannot load config from environment variables with getter: ${envVarSelector}` + ); + } +}, "fromEnv"); + +// src/fromSharedConfigFiles.ts + +var import_shared_ini_file_loader = require("@smithy/shared-ini-file-loader"); +var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = (0, import_shared_ini_file_loader.getProfileName)(init); + const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === void 0) { + throw new Error(); + } + return configValue; + } catch (e) { + throw new import_property_provider.CredentialsProviderError( + e.message || `Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}` + ); + } +}, "fromSharedConfigFiles"); + +// src/fromStatic.ts + +var isFunction = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); +var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider.fromStatic)(defaultValue), "fromStatic"); + +// src/configLoader.ts +var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, import_property_provider.memoize)( + (0, import_property_provider.chain)( + fromEnv(environmentVariableSelector), + fromSharedConfigFiles(configFileSelector, configuration), + fromStatic(defaultValue) + ) +), "loadConfig"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + loadConfig +}); + diff --git a/node_modules/@smithy/node-config-provider/dist-es/configLoader.js b/node_modules/@smithy/node-config-provider/dist-es/configLoader.js new file mode 100644 index 0000000..db044dd --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-es/configLoader.js @@ -0,0 +1,5 @@ +import { chain, memoize } from "@smithy/property-provider"; +import { fromEnv } from "./fromEnv"; +import { fromSharedConfigFiles } from "./fromSharedConfigFiles"; +import { fromStatic } from "./fromStatic"; +export const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => memoize(chain(fromEnv(environmentVariableSelector), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); diff --git a/node_modules/@smithy/node-config-provider/dist-es/fromEnv.js b/node_modules/@smithy/node-config-provider/dist-es/fromEnv.js new file mode 100644 index 0000000..60050ec --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-es/fromEnv.js @@ -0,0 +1,13 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +export const fromEnv = (envVarSelector) => async () => { + try { + const config = envVarSelector(process.env); + if (config === undefined) { + throw new Error(); + } + return config; + } + catch (e) { + throw new CredentialsProviderError(e.message || `Cannot load config from environment variables with getter: ${envVarSelector}`); + } +}; diff --git a/node_modules/@smithy/node-config-provider/dist-es/fromSharedConfigFiles.js b/node_modules/@smithy/node-config-provider/dist-es/fromSharedConfigFiles.js new file mode 100644 index 0000000..e02a913 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-es/fromSharedConfigFiles.js @@ -0,0 +1,22 @@ +import { CredentialsProviderError } from "@smithy/property-provider"; +import { getProfileName, loadSharedConfigFiles } from "@smithy/shared-ini-file-loader"; +export const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = getProfileName(init); + const { configFile, credentialsFile } = await loadSharedConfigFiles(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" + ? { ...profileFromCredentials, ...profileFromConfig } + : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === undefined) { + throw new Error(); + } + return configValue; + } + catch (e) { + throw new CredentialsProviderError(e.message || `Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}`); + } +}; diff --git a/node_modules/@smithy/node-config-provider/dist-es/fromStatic.js b/node_modules/@smithy/node-config-provider/dist-es/fromStatic.js new file mode 100644 index 0000000..c9f91ff --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-es/fromStatic.js @@ -0,0 +1,3 @@ +import { fromStatic as convertToProvider } from "@smithy/property-provider"; +const isFunction = (func) => typeof func === "function"; +export const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : convertToProvider(defaultValue); diff --git a/node_modules/@smithy/node-config-provider/dist-es/index.js b/node_modules/@smithy/node-config-provider/dist-es/index.js new file mode 100644 index 0000000..2d035d9 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-es/index.js @@ -0,0 +1 @@ +export * from "./configLoader"; diff --git a/node_modules/@smithy/node-config-provider/dist-types/configLoader.d.ts b/node_modules/@smithy/node-config-provider/dist-types/configLoader.d.ts new file mode 100644 index 0000000..b694bef --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-types/configLoader.d.ts @@ -0,0 +1,22 @@ +import { Provider } from "@smithy/types"; +import { GetterFromEnv } from "./fromEnv"; +import { GetterFromConfig, SharedConfigInit } from "./fromSharedConfigFiles"; +import { FromStaticConfig } from "./fromStatic"; +export type LocalConfigOptions = SharedConfigInit; +export interface LoadedConfigSelectors { + /** + * A getter function getting the config values from all the environment + * variables. + */ + environmentVariableSelector: GetterFromEnv; + /** + * A getter function getting config values associated with the inferred + * profile from shared INI files + */ + configFileSelector: GetterFromConfig; + /** + * Default value or getter + */ + default: FromStaticConfig; +} +export declare const loadConfig: ({ environmentVariableSelector, configFileSelector, default: defaultValue }: LoadedConfigSelectors, configuration?: LocalConfigOptions) => Provider; diff --git a/node_modules/@smithy/node-config-provider/dist-types/fromEnv.d.ts b/node_modules/@smithy/node-config-provider/dist-types/fromEnv.d.ts new file mode 100644 index 0000000..3608cea --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-types/fromEnv.d.ts @@ -0,0 +1,7 @@ +import { Provider } from "@smithy/types"; +export type GetterFromEnv = (env: Record) => T | undefined; +/** + * Get config value given the environment variable name or getter from + * environment variable. + */ +export declare const fromEnv: (envVarSelector: GetterFromEnv) => Provider; diff --git a/node_modules/@smithy/node-config-provider/dist-types/fromSharedConfigFiles.d.ts b/node_modules/@smithy/node-config-provider/dist-types/fromSharedConfigFiles.d.ts new file mode 100644 index 0000000..dd04d09 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-types/fromSharedConfigFiles.d.ts @@ -0,0 +1,15 @@ +import { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +import { ParsedIniData, Profile, Provider } from "@smithy/types"; +export interface SharedConfigInit extends SourceProfileInit { + /** + * The preferred shared ini file to load the config. "config" option refers to + * the shared config file(defaults to `~/.aws/config`). "credentials" option + * refers to the shared credentials file(defaults to `~/.aws/credentials`) + */ + preferredFile?: "config" | "credentials"; +} +export type GetterFromConfig = (profile: Profile, configFile?: ParsedIniData) => T | undefined; +/** + * Get config value from the shared config files with inferred profile name. + */ +export declare const fromSharedConfigFiles: (configSelector: GetterFromConfig, { preferredFile, ...init }?: SharedConfigInit) => Provider; diff --git a/node_modules/@smithy/node-config-provider/dist-types/fromStatic.d.ts b/node_modules/@smithy/node-config-provider/dist-types/fromStatic.d.ts new file mode 100644 index 0000000..91cd637 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-types/fromStatic.d.ts @@ -0,0 +1,3 @@ +import { Provider } from "@smithy/types"; +export type FromStaticConfig = T | (() => T) | Provider; +export declare const fromStatic: (defaultValue: FromStaticConfig) => Provider; diff --git a/node_modules/@smithy/node-config-provider/dist-types/index.d.ts b/node_modules/@smithy/node-config-provider/dist-types/index.d.ts new file mode 100644 index 0000000..2d035d9 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-types/index.d.ts @@ -0,0 +1 @@ +export * from "./configLoader"; diff --git a/node_modules/@smithy/node-config-provider/dist-types/ts3.4/configLoader.d.ts b/node_modules/@smithy/node-config-provider/dist-types/ts3.4/configLoader.d.ts new file mode 100644 index 0000000..c3ce9fb --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-types/ts3.4/configLoader.d.ts @@ -0,0 +1,22 @@ +import { Provider } from "@smithy/types"; +import { GetterFromEnv } from "./fromEnv"; +import { GetterFromConfig, SharedConfigInit } from "./fromSharedConfigFiles"; +import { FromStaticConfig } from "./fromStatic"; +export type LocalConfigOptions = SharedConfigInit; +export interface LoadedConfigSelectors { + /** + * A getter function getting the config values from all the environment + * variables. + */ + environmentVariableSelector: GetterFromEnv; + /** + * A getter function getting config values associated with the inferred + * profile from shared INI files + */ + configFileSelector: GetterFromConfig; + /** + * Default value or getter + */ + default: FromStaticConfig; +} +export declare const loadConfig: ({ environmentVariableSelector, configFileSelector, default: defaultValue }: LoadedConfigSelectors, configuration?: LocalConfigOptions) => Provider; diff --git a/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromEnv.d.ts b/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromEnv.d.ts new file mode 100644 index 0000000..2d25337 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromEnv.d.ts @@ -0,0 +1,7 @@ +import { Provider } from "@smithy/types"; +export type GetterFromEnv = (env: Record) => T | undefined; +/** + * Get config value given the environment variable name or getter from + * environment variable. + */ +export declare const fromEnv: (envVarSelector: GetterFromEnv) => Provider; diff --git a/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromSharedConfigFiles.d.ts b/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromSharedConfigFiles.d.ts new file mode 100644 index 0000000..67c0580 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromSharedConfigFiles.d.ts @@ -0,0 +1,15 @@ +import { SourceProfileInit } from "@smithy/shared-ini-file-loader"; +import { ParsedIniData, Profile, Provider } from "@smithy/types"; +export interface SharedConfigInit extends SourceProfileInit { + /** + * The preferred shared ini file to load the config. "config" option refers to + * the shared config file(defaults to `~/.aws/config`). "credentials" option + * refers to the shared credentials file(defaults to `~/.aws/credentials`) + */ + preferredFile?: "config" | "credentials"; +} +export type GetterFromConfig = (profile: Profile, configFile?: ParsedIniData) => T | undefined; +/** + * Get config value from the shared config files with inferred profile name. + */ +export declare const fromSharedConfigFiles: (configSelector: GetterFromConfig, { preferredFile, ...init }?: SharedConfigInit) => Provider; diff --git a/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromStatic.d.ts b/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromStatic.d.ts new file mode 100644 index 0000000..3df2b42 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromStatic.d.ts @@ -0,0 +1,3 @@ +import { Provider } from "@smithy/types"; +export type FromStaticConfig = T | (() => T) | Provider; +export declare const fromStatic: (defaultValue: FromStaticConfig) => Provider; diff --git a/node_modules/@smithy/node-config-provider/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/node-config-provider/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..74a76f5 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/dist-types/ts3.4/index.d.ts @@ -0,0 +1 @@ +export * from "./configLoader"; diff --git a/node_modules/@smithy/node-config-provider/package.json b/node_modules/@smithy/node-config-provider/package.json new file mode 100644 index 0000000..469d885 --- /dev/null +++ b/node_modules/@smithy/node-config-provider/package.json @@ -0,0 +1,65 @@ +{ + "name": "@smithy/node-config-provider", + "version": "2.3.0", + "description": "Load config default values from ini config files and environmental variable", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline node-config-provider", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest --passWithNoTests" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "email": "", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "dependencies": { + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/node-config-provider", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/node-config-provider" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/LICENSE b/node_modules/@smithy/node-http-handler/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/node-http-handler/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/README.md b/node_modules/@smithy/node-http-handler/README.md new file mode 100644 index 0000000..4063e67 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/README.md @@ -0,0 +1,4 @@ +# @smithy/node-http-handler + +[![NPM version](https://img.shields.io/npm/v/@smithy/node-http-handler/latest.svg)](https://www.npmjs.com/package/@smithy/node-http-handler) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/node-http-handler.svg)](https://www.npmjs.com/package/@smithy/node-http-handler) diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/constants.js b/node_modules/@smithy/node-http-handler/dist-cjs/constants.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/constants.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/get-transformed-headers.js b/node_modules/@smithy/node-http-handler/dist-cjs/get-transformed-headers.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/get-transformed-headers.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/index.js b/node_modules/@smithy/node-http-handler/dist-cjs/index.js new file mode 100644 index 0000000..33f8461 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/index.js @@ -0,0 +1,687 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, + NodeHttp2Handler: () => NodeHttp2Handler, + NodeHttpHandler: () => NodeHttpHandler, + streamCollector: () => streamCollector +}); +module.exports = __toCommonJS(src_exports); + +// src/node-http-handler.ts +var import_protocol_http = require("@smithy/protocol-http"); +var import_querystring_builder = require("@smithy/querystring-builder"); +var import_http = require("http"); +var import_https = require("https"); + +// src/constants.ts +var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + +// src/get-transformed-headers.ts +var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; +}, "getTransformedHeaders"); + +// src/set-connection-timeout.ts +var setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return; + } + const timeoutId = setTimeout(() => { + request.destroy(); + reject( + Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError" + }) + ); + }, timeoutInMs); + request.on("socket", (socket) => { + if (socket.connecting) { + socket.on("connect", () => { + clearTimeout(timeoutId); + }); + } else { + clearTimeout(timeoutId); + } + }); +}, "setConnectionTimeout"); + +// src/set-socket-keep-alive.ts +var setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }) => { + if (keepAlive !== true) { + return; + } + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); +}, "setSocketKeepAlive"); + +// src/set-socket-timeout.ts +var setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => { + request.setTimeout(timeoutInMs, () => { + request.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }); +}, "setSocketTimeout"); + +// src/write-request-body.ts +var import_stream = require("stream"); +var MIN_WAIT_TIME = 1e3; +async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { + const headers = request.headers ?? {}; + const expect = headers["Expect"] || headers["expect"]; + let timeoutId = -1; + let hasError = false; + if (expect === "100-continue") { + await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + clearTimeout(timeoutId); + resolve(); + }); + httpRequest.on("error", () => { + hasError = true; + clearTimeout(timeoutId); + resolve(); + }); + }) + ]); + } + if (!hasError) { + writeBody(httpRequest, request.body); + } +} +__name(writeRequestBody, "writeRequestBody"); +function writeBody(httpRequest, body) { + if (body instanceof import_stream.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + httpRequest.end(body); + return; + } + const uint8 = body; + if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); +} +__name(writeBody, "writeBody"); + +// src/node-http-handler.ts +var DEFAULT_REQUEST_TIMEOUT = 0; +var _NodeHttpHandler = class _NodeHttpHandler { + constructor(options) { + this.socketWarningTimestamp = 0; + // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286 + this.metadata = { handlerProtocol: "http/1.1" }; + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }).catch(reject); + } else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new _NodeHttpHandler(instanceOrOptions); + } + /** + * @internal + * + * @param agent - http(s) agent in use by the NodeHttpHandler instance. + * @returns timestamp of last emitted warning. + */ + static checkSocketUsage(agent, socketWarningTimestamp) { + var _a, _b; + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15e3; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0; + const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + console.warn( + "@smithy/node-http-handler:WARN", + `socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.`, + "See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html", + "or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config." + ); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout: requestTimeout ?? socketTimeout, + httpAgent: (() => { + if (httpAgent instanceof import_http.Agent || typeof (httpAgent == null ? void 0 : httpAgent.destroy) === "function") { + return httpAgent; + } + return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof import_https.Agent || typeof (httpsAgent == null ? void 0 : httpsAgent.destroy) === "function") { + return httpsAgent; + } + return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })() + }; + } + destroy() { + var _a, _b, _c, _d; + (_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy(); + (_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy(); + } + async handle(request, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + let socketCheckTimeoutId; + return new Promise((_resolve, _reject) => { + let writeRequestBodyPromise = void 0; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + clearTimeout(socketCheckTimeoutId); + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }, "reject"); + if (!this.config) { + throw new Error("Node HTTP request handler config is not resolved"); + } + if (abortSignal == null ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; + socketCheckTimeoutId = setTimeout(() => { + this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp); + }, this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3)); + const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); + let auth = void 0; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const nodeHttpsOptions = { + headers: request.headers, + host: request.hostname, + method: request.method, + path, + port: request.port, + agent, + auth + }; + const requestFunc = isSSL ? import_https.request : import_http.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new import_protocol_http.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } else { + reject(err); + } + }); + setConnectionTimeout(req, reject, this.config.connectionTimeout); + setSocketTimeout(req, reject, this.config.requestTimeout); + if (abortSignal) { + abortSignal.onabort = () => { + req.abort(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + } + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + setSocketKeepAlive(req, { + // @ts-expect-error keepAlive is not public on httpAgent. + keepAlive: httpAgent.keepAlive, + // @ts-expect-error keepAliveMsecs is not public on httpAgent. + keepAliveMsecs: httpAgent.keepAliveMsecs + }); + } + writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch(_reject); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } +}; +__name(_NodeHttpHandler, "NodeHttpHandler"); +var NodeHttpHandler = _NodeHttpHandler; + +// src/node-http2-handler.ts + + +var import_http22 = require("http2"); + +// src/node-http2-connection-manager.ts +var import_http2 = __toESM(require("http2")); + +// src/node-http2-connection-pool.ts +var _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool { + constructor(sessions) { + this.sessions = []; + this.sessions = sessions ?? []; + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } + } +}; +__name(_NodeHttp2ConnectionPool, "NodeHttp2ConnectionPool"); +var NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool; + +// src/node-http2-connection-manager.ts +var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager { + constructor(config) { + this.sessionCache = /* @__PURE__ */ new Map(); + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = import_http2.default.connect(url); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error( + "Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString() + ); + } + }); + } + session.unref(); + const destroySessionCb = /* @__PURE__ */ __name(() => { + session.destroy(); + this.deleteSession(url, session); + }, "destroySessionCb"); + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; + } + /** + * Delete a session from the connection pool. + * @param authority The authority of the session to delete. + * @param session The session to delete. + */ + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + var _a; + const cacheKey = this.getUrlString(requestContext); + (_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request) { + return request.destination.toString(); + } +}; +__name(_NodeHttp2ConnectionManager, "NodeHttp2ConnectionManager"); +var NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager; + +// src/node-http2-handler.ts +var _NodeHttp2Handler = class _NodeHttp2Handler { + constructor(options) { + this.metadata = { handlerProtocol: "h2" }; + this.connectionManager = new NodeHttp2ConnectionManager({}); + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((opts) => { + resolve(opts || {}); + }).catch(reject); + } else { + resolve(options || {}); + } + }); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new _NodeHttp2Handler(instanceOrOptions); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout, disableConcurrentStreams } = this.config; + return new Promise((_resolve, _reject) => { + var _a; + let fulfilled = false; + let writeRequestBodyPromise = void 0; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }, "reject"); + if (abortSignal == null ? void 0 : abortSignal.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false + }); + const rejectWithDestroy = /* @__PURE__ */ __name((err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }, "rejectWithDestroy"); + const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const req = session.request({ + ...request.headers, + [import_http22.constants.HTTP2_HEADER_PATH]: path, + [import_http22.constants.HTTP2_HEADER_METHOD]: method + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new import_protocol_http.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (requestTimeout) { + req.setTimeout(requestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + abortSignal.onabort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }; + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy( + new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) + ); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + /** + * Destroys a session. + * @param session The session to destroy. + */ + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } +}; +__name(_NodeHttp2Handler, "NodeHttp2Handler"); +var NodeHttp2Handler = _NodeHttp2Handler; + +// src/stream-collector/collector.ts + +var _Collector = class _Collector extends import_stream.Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; + } + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } +}; +__name(_Collector, "Collector"); +var Collector = _Collector; + +// src/stream-collector/index.ts +var streamCollector = /* @__PURE__ */ __name((stream) => new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); +}), "streamCollector"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + DEFAULT_REQUEST_TIMEOUT, + NodeHttpHandler, + NodeHttp2Handler, + streamCollector +}); + diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/node-http-handler.js b/node_modules/@smithy/node-http-handler/dist-cjs/node-http-handler.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/node-http-handler.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-manager.js b/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-manager.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-manager.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-pool.js b/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-pool.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-pool.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-handler.js b/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-handler.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-handler.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/readable.mock.js b/node_modules/@smithy/node-http-handler/dist-cjs/readable.mock.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/readable.mock.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/server.mock.js b/node_modules/@smithy/node-http-handler/dist-cjs/server.mock.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/server.mock.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/set-connection-timeout.js b/node_modules/@smithy/node-http-handler/dist-cjs/set-connection-timeout.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/set-connection-timeout.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-keep-alive.js b/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-keep-alive.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-keep-alive.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-timeout.js b/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-timeout.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-timeout.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/collector.js b/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/collector.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/collector.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/index.js b/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/readable.mock.js b/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/readable.mock.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/readable.mock.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-cjs/write-request-body.js b/node_modules/@smithy/node-http-handler/dist-cjs/write-request-body.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-cjs/write-request-body.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/node-http-handler/dist-es/constants.js b/node_modules/@smithy/node-http-handler/dist-es/constants.js new file mode 100644 index 0000000..0619d28 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/constants.js @@ -0,0 +1 @@ +export const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; diff --git a/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js b/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js new file mode 100644 index 0000000..562883c --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js @@ -0,0 +1,9 @@ +const getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; +}; +export { getTransformedHeaders }; diff --git a/node_modules/@smithy/node-http-handler/dist-es/index.js b/node_modules/@smithy/node-http-handler/dist-es/index.js new file mode 100644 index 0000000..09c0b9a --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/index.js @@ -0,0 +1,3 @@ +export * from "./node-http-handler"; +export * from "./node-http2-handler"; +export * from "./stream-collector"; diff --git a/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js b/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js new file mode 100644 index 0000000..bc8fb0b --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js @@ -0,0 +1,184 @@ +import { HttpResponse } from "@smithy/protocol-http"; +import { buildQueryString } from "@smithy/querystring-builder"; +import { Agent as hAgent, request as hRequest } from "http"; +import { Agent as hsAgent, request as hsRequest } from "https"; +import { NODEJS_TIMEOUT_ERROR_CODES } from "./constants"; +import { getTransformedHeaders } from "./get-transformed-headers"; +import { setConnectionTimeout } from "./set-connection-timeout"; +import { setSocketKeepAlive } from "./set-socket-keep-alive"; +import { setSocketTimeout } from "./set-socket-timeout"; +import { writeRequestBody } from "./write-request-body"; +export const DEFAULT_REQUEST_TIMEOUT = 0; +export class NodeHttpHandler { + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttpHandler(instanceOrOptions); + } + static checkSocketUsage(agent, socketWarningTimestamp) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15000; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = sockets[origin]?.length ?? 0; + const requestsEnqueued = requests[origin]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + console.warn("@smithy/node-http-handler:WARN", `socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.`, "See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html", "or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config."); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } + constructor(options) { + this.socketWarningTimestamp = 0; + this.metadata = { handlerProtocol: "http/1.1" }; + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }) + .catch(reject); + } + else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout: requestTimeout ?? socketTimeout, + httpAgent: (() => { + if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") { + return httpAgent; + } + return new hAgent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof hsAgent || typeof httpsAgent?.destroy === "function") { + return httpsAgent; + } + return new hsAgent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + }; + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + let socketCheckTimeoutId; + return new Promise((_resolve, _reject) => { + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + clearTimeout(socketCheckTimeoutId); + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _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"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; + socketCheckTimeoutId = setTimeout(() => { + this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp); + }, this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000)); + const queryString = buildQueryString(request.query || {}); + let auth = undefined; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const nodeHttpsOptions = { + headers: request.headers, + host: request.hostname, + method: request.method, + path, + port: request.port, + agent, + auth, + }; + const requestFunc = isSSL ? hsRequest : hRequest; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res, + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } + else { + reject(err); + } + }); + setConnectionTimeout(req, reject, this.config.connectionTimeout); + setSocketTimeout(req, reject, this.config.requestTimeout); + if (abortSignal) { + abortSignal.onabort = () => { + req.abort(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + } + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + setSocketKeepAlive(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs, + }); + } + writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch(_reject); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } +} diff --git a/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js b/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js new file mode 100644 index 0000000..57aab15 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js @@ -0,0 +1,86 @@ +import http2 from "http2"; +import { NodeHttp2ConnectionPool } from "./node-http2-connection-pool"; +export class NodeHttp2ConnectionManager { + constructor(config) { + this.sessionCache = new Map(); + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = http2.connect(url); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error("Fail to set maxConcurrentStreams to " + + this.config.maxConcurrency + + "when creating new session for " + + requestContext.destination.toString()); + } + }); + } + session.unref(); + const destroySessionCb = () => { + session.destroy(); + this.deleteSession(url, session); + }; + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; + } + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + const cacheKey = this.getUrlString(requestContext); + this.sessionCache.get(cacheKey)?.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request) { + return request.destination.toString(); + } +} diff --git a/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js b/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js new file mode 100644 index 0000000..429eb49 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js @@ -0,0 +1,32 @@ +export class NodeHttp2ConnectionPool { + constructor(sessions) { + this.sessions = []; + this.sessions = sessions ?? []; + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } + } +} diff --git a/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js b/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js new file mode 100644 index 0000000..576be06 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js @@ -0,0 +1,159 @@ +import { HttpResponse } from "@smithy/protocol-http"; +import { buildQueryString } from "@smithy/querystring-builder"; +import { constants } from "http2"; +import { getTransformedHeaders } from "./get-transformed-headers"; +import { NodeHttp2ConnectionManager } from "./node-http2-connection-manager"; +import { writeRequestBody } from "./write-request-body"; +export class NodeHttp2Handler { + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttp2Handler(instanceOrOptions); + } + constructor(options) { + this.metadata = { handlerProtocol: "h2" }; + this.connectionManager = new NodeHttp2ConnectionManager({}); + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((opts) => { + resolve(opts || {}); + }) + .catch(reject); + } + else { + resolve(options || {}); + } + }); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout, disableConcurrentStreams } = this.config; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: this.config?.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false, + }); + const rejectWithDestroy = (err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }; + const queryString = buildQueryString(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const req = session.request({ + ...request.headers, + [constants.HTTP2_HEADER_PATH]: path, + [constants.HTTP2_HEADER_METHOD]: method, + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req, + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (requestTimeout) { + req.setTimeout(requestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + abortSignal.onabort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }; + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } +} diff --git a/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js b/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js new file mode 100644 index 0000000..41fb0b6 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js @@ -0,0 +1,19 @@ +import { Readable } from "stream"; +export class ReadFromBuffers extends Readable { + constructor(options) { + super(options); + this.numBuffersRead = 0; + this.buffersToRead = options.buffers; + this.errorAfter = typeof options.errorAfter === "number" ? options.errorAfter : -1; + } + _read() { + if (this.errorAfter !== -1 && this.errorAfter === this.numBuffersRead) { + this.emit("error", new Error("Mock Error")); + return; + } + if (this.numBuffersRead >= this.buffersToRead.length) { + return this.push(null); + } + return this.push(this.buffersToRead[this.numBuffersRead++]); + } +} diff --git a/node_modules/@smithy/node-http-handler/dist-es/server.mock.js b/node_modules/@smithy/node-http-handler/dist-es/server.mock.js new file mode 100644 index 0000000..87e7864 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/server.mock.js @@ -0,0 +1,81 @@ +import { readFileSync } from "fs"; +import { createServer as createHttpServer } from "http"; +import { createServer as createHttp2Server } from "http2"; +import { createServer as createHttpsServer } from "https"; +import { join } from "path"; +import { Readable } from "stream"; +const fixturesDir = join(__dirname, "..", "fixtures"); +const setResponseHeaders = (response, headers) => { + for (const [key, value] of Object.entries(headers)) { + response.setHeader(key, value); + } +}; +const setResponseBody = (response, body) => { + if (body instanceof Readable) { + body.pipe(response); + } + else { + response.end(body); + } +}; +export const createResponseFunction = (httpResp) => (request, response) => { + response.statusCode = httpResp.statusCode; + setResponseHeaders(response, httpResp.headers); + setResponseBody(response, httpResp.body); +}; +export const createResponseFunctionWithDelay = (httpResp, delay) => (request, response) => { + response.statusCode = httpResp.statusCode; + setResponseHeaders(response, httpResp.headers); + setTimeout(() => setResponseBody(response, httpResp.body), delay); +}; +export const createContinueResponseFunction = (httpResp) => (request, response) => { + response.writeContinue(); + setTimeout(() => { + createResponseFunction(httpResp)(request, response); + }, 100); +}; +export const createMockHttpsServer = () => { + const server = createHttpsServer({ + key: readFileSync(join(fixturesDir, "test-server-key.pem")), + cert: readFileSync(join(fixturesDir, "test-server-cert.pem")), + }); + return server; +}; +export const createMockHttpServer = () => { + const server = createHttpServer(); + return server; +}; +export const createMockHttp2Server = () => { + const server = createHttp2Server(); + return server; +}; +export const createMirrorResponseFunction = (httpResp) => (request, response) => { + const bufs = []; + request.on("data", (chunk) => { + bufs.push(chunk); + }); + request.on("end", () => { + response.statusCode = httpResp.statusCode; + setResponseHeaders(response, httpResp.headers); + setResponseBody(response, Buffer.concat(bufs)); + }); + request.on("error", (err) => { + response.statusCode = 500; + setResponseHeaders(response, httpResp.headers); + setResponseBody(response, err.message); + }); +}; +export const getResponseBody = (response) => { + return new Promise((resolve, reject) => { + const bufs = []; + response.body.on("data", function (d) { + bufs.push(d); + }); + response.body.on("end", function () { + resolve(Buffer.concat(bufs).toString()); + }); + response.body.on("error", (err) => { + reject(err); + }); + }); +}; diff --git a/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js b/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js new file mode 100644 index 0000000..7774552 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js @@ -0,0 +1,21 @@ +export const setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return; + } + const timeoutId = setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError", + })); + }, timeoutInMs); + request.on("socket", (socket) => { + if (socket.connecting) { + socket.on("connect", () => { + clearTimeout(timeoutId); + }); + } + else { + clearTimeout(timeoutId); + } + }); +}; diff --git a/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js b/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js new file mode 100644 index 0000000..fe73391 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js @@ -0,0 +1,8 @@ +export const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }) => { + if (keepAlive !== true) { + return; + } + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); +}; diff --git a/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js b/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js new file mode 100644 index 0000000..aa710c3 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js @@ -0,0 +1,6 @@ +export const setSocketTimeout = (request, reject, timeoutInMs = 0) => { + request.setTimeout(timeoutInMs, () => { + request.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }); +}; diff --git a/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js b/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js new file mode 100644 index 0000000..c3737e9 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js @@ -0,0 +1,11 @@ +import { Writable } from "stream"; +export class Collector extends Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; + } + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } +} diff --git a/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js b/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js new file mode 100644 index 0000000..7e6cd8b --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js @@ -0,0 +1,14 @@ +import { Collector } from "./collector"; +export const streamCollector = (stream) => new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); +}); diff --git a/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js b/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js new file mode 100644 index 0000000..2f653c5 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js @@ -0,0 +1,19 @@ +import { Readable } from "stream"; +export class ReadFromBuffers extends Readable { + constructor(options) { + super(options); + this.numBuffersRead = 0; + this.buffersToRead = options.buffers; + this.errorAfter = typeof options.errorAfter === "number" ? options.errorAfter : -1; + } + _read(size) { + if (this.errorAfter !== -1 && this.errorAfter === this.numBuffersRead) { + this.emit("error", new Error("Mock Error")); + return; + } + if (this.numBuffersRead >= this.buffersToRead.length) { + return this.push(null); + } + return this.push(this.buffersToRead[this.numBuffersRead++]); + } +} diff --git a/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js b/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js new file mode 100644 index 0000000..82f67c8 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js @@ -0,0 +1,52 @@ +import { Readable } from "stream"; +const MIN_WAIT_TIME = 1000; +export async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { + const headers = request.headers ?? {}; + const expect = headers["Expect"] || headers["expect"]; + let timeoutId = -1; + let hasError = false; + if (expect === "100-continue") { + await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + clearTimeout(timeoutId); + resolve(); + }); + httpRequest.on("error", () => { + hasError = true; + clearTimeout(timeoutId); + resolve(); + }); + }), + ]); + } + if (!hasError) { + writeBody(httpRequest, request.body); + } +} +function writeBody(httpRequest, body) { + if (body instanceof Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + httpRequest.end(body); + return; + } + const uint8 = body; + if (typeof uint8 === "object" && + uint8.buffer && + typeof uint8.byteOffset === "number" && + typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts b/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts new file mode 100644 index 0000000..3540461 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts @@ -0,0 +1,5 @@ +/** + * Node.js system error codes that indicate timeout. + * @deprecated use NODEJS_TIMEOUT_ERROR_CODES from @smithy/service-error-classification/constants + */ +export declare const NODEJS_TIMEOUT_ERROR_CODES: string[]; diff --git a/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts b/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts new file mode 100644 index 0000000..bb7cd4e --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts @@ -0,0 +1,4 @@ +import { HeaderBag } from "@smithy/types"; +import { IncomingHttpHeaders } from "http2"; +declare const getTransformedHeaders: (headers: IncomingHttpHeaders) => HeaderBag; +export { getTransformedHeaders }; diff --git a/node_modules/@smithy/node-http-handler/dist-types/index.d.ts b/node_modules/@smithy/node-http-handler/dist-types/index.d.ts new file mode 100644 index 0000000..09c0b9a --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/index.d.ts @@ -0,0 +1,3 @@ +export * from "./node-http-handler"; +export * from "./node-http2-handler"; +export * from "./stream-collector"; diff --git a/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts b/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts new file mode 100644 index 0000000..ae66c6f --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts @@ -0,0 +1,37 @@ +/// +/// +import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import type { NodeHttpHandlerOptions } from "@smithy/types"; +import { HttpHandlerOptions, Provider } from "@smithy/types"; +import { Agent as hAgent } from "http"; +import { Agent as hsAgent } from "https"; +export { NodeHttpHandlerOptions }; +export declare const DEFAULT_REQUEST_TIMEOUT = 0; +export declare class NodeHttpHandler implements HttpHandler { + private config?; + private configProvider; + private socketWarningTimestamp; + readonly metadata: { + handlerProtocol: string; + }; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions?: HttpHandler | NodeHttpHandlerOptions | Provider): NodeHttpHandler | HttpHandler; + /** + * @internal + * + * @param agent - http(s) agent in use by the NodeHttpHandler instance. + * @returns timestamp of last emitted warning. + */ + static checkSocketUsage(agent: hAgent | hsAgent, socketWarningTimestamp: number): number; + constructor(options?: NodeHttpHandlerOptions | Provider); + private resolveDefaultConfig; + destroy(): void; + handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{ + response: HttpResponse; + }>; + updateHttpClientConfig(key: keyof NodeHttpHandlerOptions, value: NodeHttpHandlerOptions[typeof key]): void; + httpHandlerConfigs(): NodeHttpHandlerOptions; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts b/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts new file mode 100644 index 0000000..51f2a4e --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts @@ -0,0 +1,22 @@ +/// +import { RequestContext } from "@smithy/types"; +import { ConnectConfiguration } from "@smithy/types"; +import { ConnectionManager, ConnectionManagerConfiguration } from "@smithy/types"; +import { ClientHttp2Session } from "http2"; +export declare class NodeHttp2ConnectionManager implements ConnectionManager { + constructor(config: ConnectionManagerConfiguration); + private config; + private readonly sessionCache; + lease(requestContext: RequestContext, connectionConfiguration: ConnectConfiguration): ClientHttp2Session; + /** + * Delete a session from the connection pool. + * @param authority The authority of the session to delete. + * @param session The session to delete. + */ + deleteSession(authority: string, session: ClientHttp2Session): void; + release(requestContext: RequestContext, session: ClientHttp2Session): void; + destroy(): void; + setMaxConcurrentStreams(maxConcurrentStreams: number): void; + setDisableConcurrentStreams(disableConcurrentStreams: boolean): void; + private getUrlString; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts b/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts new file mode 100644 index 0000000..6695893 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts @@ -0,0 +1,13 @@ +/// +import { ConnectionPool } from "@smithy/types"; +import { ClientHttp2Session } from "http2"; +export declare class NodeHttp2ConnectionPool implements ConnectionPool { + private sessions; + constructor(sessions?: ClientHttp2Session[]); + poll(): ClientHttp2Session | void; + offerLast(session: ClientHttp2Session): void; + contains(session: ClientHttp2Session): boolean; + remove(session: ClientHttp2Session): void; + [Symbol.iterator](): IterableIterator; + destroy(connection: ClientHttp2Session): void; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts b/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts new file mode 100644 index 0000000..35aa9d3 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts @@ -0,0 +1,57 @@ +import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import { HttpHandlerOptions, Provider } from "@smithy/types"; +/** + * Represents the http2 options that can be passed to a node http2 client. + */ +export interface NodeHttp2HandlerOptions { + /** + * The maximum time in milliseconds that a stream may remain idle before it + * is closed. + */ + requestTimeout?: number; + /** + * The maximum time in milliseconds that a session or socket may remain idle + * before it is closed. + * https://nodejs.org/docs/latest-v12.x/api/http2.html#http2_http2session_and_sockets + */ + sessionTimeout?: number; + /** + * Disables processing concurrent streams on a ClientHttp2Session instance. When set + * to true, a new session instance is created for each request to a URL. + * **Default:** false. + * https://nodejs.org/api/http2.html#http2_class_clienthttp2session + */ + disableConcurrentStreams?: boolean; + /** + * Maximum number of concurrent Http2Stream instances per ClientHttp2Session. Each session + * may have up to 2^31-1 Http2Stream instances over its lifetime. + * This value must be greater than or equal to 0. + * https://nodejs.org/api/http2.html#class-http2stream + */ + maxConcurrentStreams?: number; +} +export declare class NodeHttp2Handler implements HttpHandler { + private config?; + private configProvider; + readonly metadata: { + handlerProtocol: string; + }; + private readonly connectionManager; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions?: HttpHandler | NodeHttp2HandlerOptions | Provider): HttpHandler | NodeHttp2Handler; + constructor(options?: NodeHttp2HandlerOptions | Provider); + destroy(): void; + handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{ + response: HttpResponse; + }>; + updateHttpClientConfig(key: keyof NodeHttp2HandlerOptions, value: NodeHttp2HandlerOptions[typeof key]): void; + httpHandlerConfigs(): NodeHttp2HandlerOptions; + /** + * Destroys a session. + * @param session The session to destroy. + */ + private destroySession; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts b/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts new file mode 100644 index 0000000..231c609 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts @@ -0,0 +1,14 @@ +/// +/// +import { Readable, ReadableOptions } from "stream"; +export interface ReadFromBuffersOptions extends ReadableOptions { + buffers: Buffer[]; + errorAfter?: number; +} +export declare class ReadFromBuffers extends Readable { + private buffersToRead; + private numBuffersRead; + private errorAfter; + constructor(options: ReadFromBuffersOptions); + _read(): boolean | undefined; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts b/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts new file mode 100644 index 0000000..585a677 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts @@ -0,0 +1,12 @@ +import { HttpResponse } from "@smithy/types"; +import { IncomingMessage, Server as HttpServer, ServerResponse } from "http"; +import { Http2Server } from "http2"; +import { Server as HttpsServer } from "https"; +export declare const createResponseFunction: (httpResp: HttpResponse) => (request: IncomingMessage, response: ServerResponse) => void; +export declare const createResponseFunctionWithDelay: (httpResp: HttpResponse, delay: number) => (request: IncomingMessage, response: ServerResponse) => void; +export declare const createContinueResponseFunction: (httpResp: HttpResponse) => (request: IncomingMessage, response: ServerResponse) => void; +export declare const createMockHttpsServer: () => HttpsServer; +export declare const createMockHttpServer: () => HttpServer; +export declare const createMockHttp2Server: () => Http2Server; +export declare const createMirrorResponseFunction: (httpResp: HttpResponse) => (request: IncomingMessage, response: ServerResponse) => void; +export declare const getResponseBody: (response: HttpResponse) => Promise; diff --git a/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts b/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts new file mode 100644 index 0000000..d18bb48 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts @@ -0,0 +1,2 @@ +import { ClientRequest } from "http"; +export declare const setConnectionTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number) => void; diff --git a/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts b/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts new file mode 100644 index 0000000..9449b08 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts @@ -0,0 +1,6 @@ +import { ClientRequest } from "http"; +export interface SocketKeepAliveOptions { + keepAlive: boolean; + keepAliveMsecs?: number; +} +export declare const setSocketKeepAlive: (request: ClientRequest, { keepAlive, keepAliveMsecs }: SocketKeepAliveOptions) => void; diff --git a/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts b/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts new file mode 100644 index 0000000..f056b73 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts @@ -0,0 +1,2 @@ +import { ClientRequest } from "http"; +export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number) => void; diff --git a/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts b/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts new file mode 100644 index 0000000..1e7ae26 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts @@ -0,0 +1,7 @@ +/// +/// +import { Writable } from "stream"; +export declare class Collector extends Writable { + readonly bufferedBytes: Buffer[]; + _write(chunk: Buffer, encoding: string, callback: (err?: Error) => void): void; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts b/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts new file mode 100644 index 0000000..b2ca812 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts @@ -0,0 +1,2 @@ +import { StreamCollector } from "@smithy/types"; +export declare const streamCollector: StreamCollector; diff --git a/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts b/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts new file mode 100644 index 0000000..7210c92 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts @@ -0,0 +1,14 @@ +/// +/// +import { Readable, ReadableOptions } from "stream"; +export interface ReadFromBuffersOptions extends ReadableOptions { + buffers: Buffer[]; + errorAfter?: number; +} +export declare class ReadFromBuffers extends Readable { + private buffersToRead; + private numBuffersRead; + private errorAfter; + constructor(options: ReadFromBuffersOptions); + _read(size: number): boolean | undefined; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts new file mode 100644 index 0000000..b02b0b6 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts @@ -0,0 +1,5 @@ +/** + * Node.js system error codes that indicate timeout. + * @deprecated use NODEJS_TIMEOUT_ERROR_CODES from @smithy/service-error-classification/constants + */ +export declare const NODEJS_TIMEOUT_ERROR_CODES: string[]; diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts new file mode 100644 index 0000000..c6f5a8b --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts @@ -0,0 +1,4 @@ +import { HeaderBag } from "@smithy/types"; +import { IncomingHttpHeaders } from "http2"; +declare const getTransformedHeaders: (headers: IncomingHttpHeaders) => HeaderBag; +export { getTransformedHeaders }; diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..055c48c --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts @@ -0,0 +1,3 @@ +export * from "./node-http-handler"; +export * from "./node-http2-handler"; +export * from "./stream-collector"; diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts new file mode 100644 index 0000000..1720254 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts @@ -0,0 +1,36 @@ +/// +import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import { NodeHttpHandlerOptions } from "@smithy/types"; +import { HttpHandlerOptions, Provider } from "@smithy/types"; +import { Agent as hAgent } from "http"; +import { Agent as hsAgent } from "https"; +export { NodeHttpHandlerOptions }; +export declare const DEFAULT_REQUEST_TIMEOUT = 0; +export declare class NodeHttpHandler implements HttpHandler { + private config?; + private configProvider; + private socketWarningTimestamp; + readonly metadata: { + handlerProtocol: string; + }; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions?: HttpHandler | NodeHttpHandlerOptions | Provider): NodeHttpHandler | HttpHandler; + /** + * @internal + * + * @param agent - http(s) agent in use by the NodeHttpHandler instance. + * @returns timestamp of last emitted warning. + */ + static checkSocketUsage(agent: hAgent | hsAgent, socketWarningTimestamp: number): number; + constructor(options?: NodeHttpHandlerOptions | Provider); + private resolveDefaultConfig; + destroy(): void; + handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{ + response: HttpResponse; + }>; + updateHttpClientConfig(key: keyof NodeHttpHandlerOptions, value: NodeHttpHandlerOptions[typeof key]): void; + httpHandlerConfigs(): NodeHttpHandlerOptions; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts new file mode 100644 index 0000000..03327b6 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts @@ -0,0 +1,22 @@ +/// +import { RequestContext } from "@smithy/types"; +import { ConnectConfiguration } from "@smithy/types"; +import { ConnectionManager, ConnectionManagerConfiguration } from "@smithy/types"; +import { ClientHttp2Session } from "http2"; +export declare class NodeHttp2ConnectionManager implements ConnectionManager { + constructor(config: ConnectionManagerConfiguration); + private config; + private readonly sessionCache; + lease(requestContext: RequestContext, connectionConfiguration: ConnectConfiguration): ClientHttp2Session; + /** + * Delete a session from the connection pool. + * @param authority The authority of the session to delete. + * @param session The session to delete. + */ + deleteSession(authority: string, session: ClientHttp2Session): void; + release(requestContext: RequestContext, session: ClientHttp2Session): void; + destroy(): void; + setMaxConcurrentStreams(maxConcurrentStreams: number): void; + setDisableConcurrentStreams(disableConcurrentStreams: boolean): void; + private getUrlString; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts new file mode 100644 index 0000000..e9116cb --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts @@ -0,0 +1,13 @@ +/// +import { ConnectionPool } from "@smithy/types"; +import { ClientHttp2Session } from "http2"; +export declare class NodeHttp2ConnectionPool implements ConnectionPool { + private sessions; + constructor(sessions?: ClientHttp2Session[]); + poll(): ClientHttp2Session | void; + offerLast(session: ClientHttp2Session): void; + contains(session: ClientHttp2Session): boolean; + remove(session: ClientHttp2Session): void; + [Symbol.iterator](): IterableIterator; + destroy(connection: ClientHttp2Session): void; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts new file mode 100644 index 0000000..eb91697 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts @@ -0,0 +1,57 @@ +import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import { HttpHandlerOptions, Provider } from "@smithy/types"; +/** + * Represents the http2 options that can be passed to a node http2 client. + */ +export interface NodeHttp2HandlerOptions { + /** + * The maximum time in milliseconds that a stream may remain idle before it + * is closed. + */ + requestTimeout?: number; + /** + * The maximum time in milliseconds that a session or socket may remain idle + * before it is closed. + * https://nodejs.org/docs/latest-v12.x/api/http2.html#http2_http2session_and_sockets + */ + sessionTimeout?: number; + /** + * Disables processing concurrent streams on a ClientHttp2Session instance. When set + * to true, a new session instance is created for each request to a URL. + * **Default:** false. + * https://nodejs.org/api/http2.html#http2_class_clienthttp2session + */ + disableConcurrentStreams?: boolean; + /** + * Maximum number of concurrent Http2Stream instances per ClientHttp2Session. Each session + * may have up to 2^31-1 Http2Stream instances over its lifetime. + * This value must be greater than or equal to 0. + * https://nodejs.org/api/http2.html#class-http2stream + */ + maxConcurrentStreams?: number; +} +export declare class NodeHttp2Handler implements HttpHandler { + private config?; + private configProvider; + readonly metadata: { + handlerProtocol: string; + }; + private readonly connectionManager; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions?: HttpHandler | NodeHttp2HandlerOptions | Provider): HttpHandler | NodeHttp2Handler; + constructor(options?: NodeHttp2HandlerOptions | Provider); + destroy(): void; + handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{ + response: HttpResponse; + }>; + updateHttpClientConfig(key: keyof NodeHttp2HandlerOptions, value: NodeHttp2HandlerOptions[typeof key]): void; + httpHandlerConfigs(): NodeHttp2HandlerOptions; + /** + * Destroys a session. + * @param session The session to destroy. + */ + private destroySession; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts new file mode 100644 index 0000000..f0492d4 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts @@ -0,0 +1,13 @@ +/// +import { Readable, ReadableOptions } from "stream"; +export interface ReadFromBuffersOptions extends ReadableOptions { + buffers: Buffer[]; + errorAfter?: number; +} +export declare class ReadFromBuffers extends Readable { + private buffersToRead; + private numBuffersRead; + private errorAfter; + constructor(options: ReadFromBuffersOptions); + _read(): boolean | undefined; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts new file mode 100644 index 0000000..6a7e350 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts @@ -0,0 +1,12 @@ +import { HttpResponse } from "@smithy/types"; +import { IncomingMessage, Server as HttpServer, ServerResponse } from "http"; +import { Http2Server } from "http2"; +import { Server as HttpsServer } from "https"; +export declare const createResponseFunction: (httpResp: HttpResponse) => (request: IncomingMessage, response: ServerResponse) => void; +export declare const createResponseFunctionWithDelay: (httpResp: HttpResponse, delay: number) => (request: IncomingMessage, response: ServerResponse) => void; +export declare const createContinueResponseFunction: (httpResp: HttpResponse) => (request: IncomingMessage, response: ServerResponse) => void; +export declare const createMockHttpsServer: () => HttpsServer; +export declare const createMockHttpServer: () => HttpServer; +export declare const createMockHttp2Server: () => Http2Server; +export declare const createMirrorResponseFunction: (httpResp: HttpResponse) => (request: IncomingMessage, response: ServerResponse) => void; +export declare const getResponseBody: (response: HttpResponse) => Promise; diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts new file mode 100644 index 0000000..6515fc2 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts @@ -0,0 +1,2 @@ +import { ClientRequest } from "http"; +export declare const setConnectionTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number) => void; diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts new file mode 100644 index 0000000..15d94e0 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts @@ -0,0 +1,6 @@ +import { ClientRequest } from "http"; +export interface SocketKeepAliveOptions { + keepAlive: boolean; + keepAliveMsecs?: number; +} +export declare const setSocketKeepAlive: (request: ClientRequest, { keepAlive, keepAliveMsecs }: SocketKeepAliveOptions) => void; diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts new file mode 100644 index 0000000..26f3477 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts @@ -0,0 +1,2 @@ +import { ClientRequest } from "http"; +export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number) => void; diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts new file mode 100644 index 0000000..c329bd4 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts @@ -0,0 +1,6 @@ +/// +import { Writable } from "stream"; +export declare class Collector extends Writable { + readonly bufferedBytes: Buffer[]; + _write(chunk: Buffer, encoding: string, callback: (err?: Error) => void): void; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts new file mode 100644 index 0000000..8259097 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts @@ -0,0 +1,2 @@ +import { StreamCollector } from "@smithy/types"; +export declare const streamCollector: StreamCollector; diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts new file mode 100644 index 0000000..e2c0a4c --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts @@ -0,0 +1,13 @@ +/// +import { Readable, ReadableOptions } from "stream"; +export interface ReadFromBuffersOptions extends ReadableOptions { + buffers: Buffer[]; + errorAfter?: number; +} +export declare class ReadFromBuffers extends Readable { + private buffersToRead; + private numBuffersRead; + private errorAfter; + constructor(options: ReadFromBuffersOptions); + _read(size: number): boolean | undefined; +} diff --git a/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts new file mode 100644 index 0000000..b083db3 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts @@ -0,0 +1,12 @@ +/// +import { HttpRequest } from "@smithy/types"; +import { ClientRequest } from "http"; +import { ClientHttp2Stream } from "http2"; +/** + * This resolves when writeBody has been called. + * + * @param httpRequest - opened Node.js request. + * @param request - container with the request body. + * @param maxContinueTimeoutMs - maximum time to wait for the continue event. Minimum of 1000ms. + */ +export declare function writeRequestBody(httpRequest: ClientRequest | ClientHttp2Stream, request: HttpRequest, maxContinueTimeoutMs?: number): Promise; diff --git a/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts b/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts new file mode 100644 index 0000000..ca90a1a --- /dev/null +++ b/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts @@ -0,0 +1,13 @@ +/// +/// +import { HttpRequest } from "@smithy/types"; +import { ClientRequest } from "http"; +import { ClientHttp2Stream } from "http2"; +/** + * This resolves when writeBody has been called. + * + * @param httpRequest - opened Node.js request. + * @param request - container with the request body. + * @param maxContinueTimeoutMs - maximum time to wait for the continue event. Minimum of 1000ms. + */ +export declare function writeRequestBody(httpRequest: ClientRequest | ClientHttp2Stream, request: HttpRequest, maxContinueTimeoutMs?: number): Promise; diff --git a/node_modules/@smithy/node-http-handler/package.json b/node_modules/@smithy/node-http-handler/package.json new file mode 100644 index 0000000..353eca8 --- /dev/null +++ b/node_modules/@smithy/node-http-handler/package.json @@ -0,0 +1,67 @@ +{ + "name": "@smithy/node-http-handler", + "version": "2.5.0", + "description": "Provides a way to make requests", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline node-http-handler", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "extract:docs": "api-extractor run --local", + "test": "yarn g:jest --coverage --forceExit" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "email": "", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "dependencies": { + "@smithy/abort-controller": "^2.2.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/querystring-builder": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/node-http-handler", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/node-http-handler" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/property-provider/LICENSE b/node_modules/@smithy/property-provider/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/property-provider/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/property-provider/README.md b/node_modules/@smithy/property-provider/README.md new file mode 100644 index 0000000..b35fafb --- /dev/null +++ b/node_modules/@smithy/property-provider/README.md @@ -0,0 +1,10 @@ +# @smithy/property-provider + +[![NPM version](https://img.shields.io/npm/v/@smithy/property-provider/latest.svg)](https://www.npmjs.com/package/@smithy/property-provider) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/property-provider.svg)](https://www.npmjs.com/package/@smithy/property-provider) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/property-provider/dist-cjs/CredentialsProviderError.js b/node_modules/@smithy/property-provider/dist-cjs/CredentialsProviderError.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-cjs/CredentialsProviderError.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/property-provider/dist-cjs/ProviderError.js b/node_modules/@smithy/property-provider/dist-cjs/ProviderError.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-cjs/ProviderError.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/property-provider/dist-cjs/TokenProviderError.js b/node_modules/@smithy/property-provider/dist-cjs/TokenProviderError.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-cjs/TokenProviderError.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/property-provider/dist-cjs/chain.js b/node_modules/@smithy/property-provider/dist-cjs/chain.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-cjs/chain.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/property-provider/dist-cjs/fromStatic.js b/node_modules/@smithy/property-provider/dist-cjs/fromStatic.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-cjs/fromStatic.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/property-provider/dist-cjs/index.js b/node_modules/@smithy/property-provider/dist-cjs/index.js new file mode 100644 index 0000000..a7feb93 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-cjs/index.js @@ -0,0 +1,150 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + CredentialsProviderError: () => CredentialsProviderError, + ProviderError: () => ProviderError, + TokenProviderError: () => TokenProviderError, + chain: () => chain, + fromStatic: () => fromStatic, + memoize: () => memoize +}); +module.exports = __toCommonJS(src_exports); + +// src/ProviderError.ts +var _ProviderError = class _ProviderError extends Error { + constructor(message, tryNextLink = true) { + super(message); + this.tryNextLink = tryNextLink; + this.name = "ProviderError"; + Object.setPrototypeOf(this, _ProviderError.prototype); + } + static from(error, tryNextLink = true) { + return Object.assign(new this(error.message, tryNextLink), error); + } +}; +__name(_ProviderError, "ProviderError"); +var ProviderError = _ProviderError; + +// src/CredentialsProviderError.ts +var _CredentialsProviderError = class _CredentialsProviderError extends ProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "CredentialsProviderError"; + Object.setPrototypeOf(this, _CredentialsProviderError.prototype); + } +}; +__name(_CredentialsProviderError, "CredentialsProviderError"); +var CredentialsProviderError = _CredentialsProviderError; + +// src/TokenProviderError.ts +var _TokenProviderError = class _TokenProviderError extends ProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "TokenProviderError"; + Object.setPrototypeOf(this, _TokenProviderError.prototype); + } +}; +__name(_TokenProviderError, "TokenProviderError"); +var TokenProviderError = _TokenProviderError; + +// src/chain.ts +var chain = /* @__PURE__ */ __name((...providers) => async () => { + if (providers.length === 0) { + throw new ProviderError("No providers in chain"); + } + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } catch (err) { + lastProviderError = err; + if (err == null ? void 0 : err.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; +}, "chain"); + +// src/fromStatic.ts +var fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic"); + +// src/memoize.ts +var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; +}, "memoize"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + CredentialsProviderError, + ProviderError, + TokenProviderError, + chain, + fromStatic, + memoize +}); + diff --git a/node_modules/@smithy/property-provider/dist-cjs/memoize.js b/node_modules/@smithy/property-provider/dist-cjs/memoize.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-cjs/memoize.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js b/node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js new file mode 100644 index 0000000..959f4d4 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js @@ -0,0 +1,9 @@ +import { ProviderError } from "./ProviderError"; +export class CredentialsProviderError extends ProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "CredentialsProviderError"; + Object.setPrototypeOf(this, CredentialsProviderError.prototype); + } +} diff --git a/node_modules/@smithy/property-provider/dist-es/ProviderError.js b/node_modules/@smithy/property-provider/dist-es/ProviderError.js new file mode 100644 index 0000000..cedfe3e --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-es/ProviderError.js @@ -0,0 +1,11 @@ +export class ProviderError extends Error { + constructor(message, tryNextLink = true) { + super(message); + this.tryNextLink = tryNextLink; + this.name = "ProviderError"; + Object.setPrototypeOf(this, ProviderError.prototype); + } + static from(error, tryNextLink = true) { + return Object.assign(new this(error.message, tryNextLink), error); + } +} diff --git a/node_modules/@smithy/property-provider/dist-es/TokenProviderError.js b/node_modules/@smithy/property-provider/dist-es/TokenProviderError.js new file mode 100644 index 0000000..1f6c974 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-es/TokenProviderError.js @@ -0,0 +1,9 @@ +import { ProviderError } from "./ProviderError"; +export class TokenProviderError extends ProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "TokenProviderError"; + Object.setPrototypeOf(this, TokenProviderError.prototype); + } +} diff --git a/node_modules/@smithy/property-provider/dist-es/chain.js b/node_modules/@smithy/property-provider/dist-es/chain.js new file mode 100644 index 0000000..c389f7f --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-es/chain.js @@ -0,0 +1,21 @@ +import { ProviderError } from "./ProviderError"; +export const chain = (...providers) => async () => { + if (providers.length === 0) { + throw new ProviderError("No providers in chain"); + } + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } + catch (err) { + lastProviderError = err; + if (err?.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; +}; diff --git a/node_modules/@smithy/property-provider/dist-es/fromStatic.js b/node_modules/@smithy/property-provider/dist-es/fromStatic.js new file mode 100644 index 0000000..67da7a7 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-es/fromStatic.js @@ -0,0 +1 @@ +export const fromStatic = (staticValue) => () => Promise.resolve(staticValue); diff --git a/node_modules/@smithy/property-provider/dist-es/index.js b/node_modules/@smithy/property-provider/dist-es/index.js new file mode 100644 index 0000000..15d14e5 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-es/index.js @@ -0,0 +1,6 @@ +export * from "./CredentialsProviderError"; +export * from "./ProviderError"; +export * from "./TokenProviderError"; +export * from "./chain"; +export * from "./fromStatic"; +export * from "./memoize"; diff --git a/node_modules/@smithy/property-provider/dist-es/memoize.js b/node_modules/@smithy/property-provider/dist-es/memoize.js new file mode 100644 index 0000000..e04839a --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-es/memoize.js @@ -0,0 +1,45 @@ +export const memoize = (provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } + finally { + pending = undefined; + } + return resolved; + }; + if (isExpired === undefined) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; +}; diff --git a/node_modules/@smithy/property-provider/dist-types/CredentialsProviderError.d.ts b/node_modules/@smithy/property-provider/dist-types/CredentialsProviderError.d.ts new file mode 100644 index 0000000..fbab780 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/CredentialsProviderError.d.ts @@ -0,0 +1,17 @@ +import { ProviderError } from "./ProviderError"; +/** + * @public + * + * An error representing a failure of an individual credential provider. + * + * This error class has special meaning to the {@link chain} method. If a + * provider in the chain is rejected with an error, the chain will only proceed + * to the next provider if the value of the `tryNextLink` property on the error + * is truthy. This allows individual providers to halt the chain and also + * ensures the chain will stop if an entirely unexpected error is encountered. + */ +export declare class CredentialsProviderError extends ProviderError { + readonly tryNextLink: boolean; + name: string; + constructor(message: string, tryNextLink?: boolean); +} diff --git a/node_modules/@smithy/property-provider/dist-types/ProviderError.d.ts b/node_modules/@smithy/property-provider/dist-types/ProviderError.d.ts new file mode 100644 index 0000000..503206a --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/ProviderError.d.ts @@ -0,0 +1,17 @@ +/** + * @public + * + * An error representing a failure of an individual provider. + * + * This error class has special meaning to the {@link chain} method. If a + * provider in the chain is rejected with an error, the chain will only proceed + * to the next provider if the value of the `tryNextLink` property on the error + * is truthy. This allows individual providers to halt the chain and also + * ensures the chain will stop if an entirely unexpected error is encountered. + */ +export declare class ProviderError extends Error { + readonly tryNextLink: boolean; + name: string; + constructor(message: string, tryNextLink?: boolean); + static from(error: Error, tryNextLink?: boolean): ProviderError; +} diff --git a/node_modules/@smithy/property-provider/dist-types/TokenProviderError.d.ts b/node_modules/@smithy/property-provider/dist-types/TokenProviderError.d.ts new file mode 100644 index 0000000..a5ad554 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/TokenProviderError.d.ts @@ -0,0 +1,17 @@ +import { ProviderError } from "./ProviderError"; +/** + * @public + * + * An error representing a failure of an individual token provider. + * + * This error class has special meaning to the {@link chain} method. If a + * provider in the chain is rejected with an error, the chain will only proceed + * to the next provider if the value of the `tryNextLink` property on the error + * is truthy. This allows individual providers to halt the chain and also + * ensures the chain will stop if an entirely unexpected error is encountered. + */ +export declare class TokenProviderError extends ProviderError { + readonly tryNextLink: boolean; + name: string; + constructor(message: string, tryNextLink?: boolean); +} diff --git a/node_modules/@smithy/property-provider/dist-types/chain.d.ts b/node_modules/@smithy/property-provider/dist-types/chain.d.ts new file mode 100644 index 0000000..168df5c --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/chain.d.ts @@ -0,0 +1,13 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + * + * Compose a single credential provider function from multiple credential + * providers. The first provider in the argument list will always be invoked; + * subsequent providers in the list will be invoked in the order in which the + * were received if the preceding provider did not successfully resolve. + * + * If no providers were received or no provider resolves successfully, the + * returned promise will be rejected. + */ +export declare const chain: (...providers: Provider[]) => Provider; diff --git a/node_modules/@smithy/property-provider/dist-types/fromStatic.d.ts b/node_modules/@smithy/property-provider/dist-types/fromStatic.d.ts new file mode 100644 index 0000000..f58bece --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/fromStatic.d.ts @@ -0,0 +1,5 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + */ +export declare const fromStatic: (staticValue: T) => Provider; diff --git a/node_modules/@smithy/property-provider/dist-types/index.d.ts b/node_modules/@smithy/property-provider/dist-types/index.d.ts new file mode 100644 index 0000000..6326994 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/index.d.ts @@ -0,0 +1,24 @@ +/** + * @internal + */ +export * from "./CredentialsProviderError"; +/** + * @internal + */ +export * from "./ProviderError"; +/** + * @internal + */ +export * from "./TokenProviderError"; +/** + * @internal + */ +export * from "./chain"; +/** + * @internal + */ +export * from "./fromStatic"; +/** + * @internal + */ +export * from "./memoize"; diff --git a/node_modules/@smithy/property-provider/dist-types/memoize.d.ts b/node_modules/@smithy/property-provider/dist-types/memoize.d.ts new file mode 100644 index 0000000..ce197c0 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/memoize.d.ts @@ -0,0 +1,40 @@ +import { MemoizedProvider, Provider } from "@smithy/types"; +interface MemoizeOverload { + /** + * + * Decorates a provider function with either static memoization. + * + * To create a statically memoized provider, supply a provider as the only + * argument to this function. The provider will be invoked once, and all + * invocations of the provider returned by `memoize` will return the same + * promise object. + * + * @param provider The provider whose result should be cached indefinitely. + */ + (provider: Provider): MemoizedProvider; + /** + * Decorates a provider function with refreshing memoization. + * + * @param provider The provider whose result should be cached. + * @param isExpired A function that will evaluate the resolved value and + * determine if it is expired. For example, when + * memoizing AWS credential providers, this function + * should return `true` when the credential's + * expiration is in the past (or very near future) and + * `false` otherwise. + * @param requiresRefresh A function that will evaluate the resolved value and + * determine if it represents static value or one that + * will eventually need to be refreshed. For example, + * AWS credentials that have no defined expiration will + * never need to be refreshed, so this function would + * return `true` if the credentials resolved by the + * underlying provider had an expiration and `false` + * otherwise. + */ + (provider: Provider, isExpired: (resolved: T) => boolean, requiresRefresh?: (resolved: T) => boolean): MemoizedProvider; +} +/** + * @internal + */ +export declare const memoize: MemoizeOverload; +export {}; diff --git a/node_modules/@smithy/property-provider/dist-types/ts3.4/CredentialsProviderError.d.ts b/node_modules/@smithy/property-provider/dist-types/ts3.4/CredentialsProviderError.d.ts new file mode 100644 index 0000000..108140d --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/ts3.4/CredentialsProviderError.d.ts @@ -0,0 +1,17 @@ +import { ProviderError } from "./ProviderError"; +/** + * @public + * + * An error representing a failure of an individual credential provider. + * + * This error class has special meaning to the {@link chain} method. If a + * provider in the chain is rejected with an error, the chain will only proceed + * to the next provider if the value of the `tryNextLink` property on the error + * is truthy. This allows individual providers to halt the chain and also + * ensures the chain will stop if an entirely unexpected error is encountered. + */ +export declare class CredentialsProviderError extends ProviderError { + readonly tryNextLink: boolean; + name: string; + constructor(message: string, tryNextLink?: boolean); +} diff --git a/node_modules/@smithy/property-provider/dist-types/ts3.4/ProviderError.d.ts b/node_modules/@smithy/property-provider/dist-types/ts3.4/ProviderError.d.ts new file mode 100644 index 0000000..9c973c4 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/ts3.4/ProviderError.d.ts @@ -0,0 +1,17 @@ +/** + * @public + * + * An error representing a failure of an individual provider. + * + * This error class has special meaning to the {@link chain} method. If a + * provider in the chain is rejected with an error, the chain will only proceed + * to the next provider if the value of the `tryNextLink` property on the error + * is truthy. This allows individual providers to halt the chain and also + * ensures the chain will stop if an entirely unexpected error is encountered. + */ +export declare class ProviderError extends Error { + readonly tryNextLink: boolean; + name: string; + constructor(message: string, tryNextLink?: boolean); + static from(error: Error, tryNextLink?: boolean): ProviderError; +} diff --git a/node_modules/@smithy/property-provider/dist-types/ts3.4/TokenProviderError.d.ts b/node_modules/@smithy/property-provider/dist-types/ts3.4/TokenProviderError.d.ts new file mode 100644 index 0000000..40d6d7b --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/ts3.4/TokenProviderError.d.ts @@ -0,0 +1,17 @@ +import { ProviderError } from "./ProviderError"; +/** + * @public + * + * An error representing a failure of an individual token provider. + * + * This error class has special meaning to the {@link chain} method. If a + * provider in the chain is rejected with an error, the chain will only proceed + * to the next provider if the value of the `tryNextLink` property on the error + * is truthy. This allows individual providers to halt the chain and also + * ensures the chain will stop if an entirely unexpected error is encountered. + */ +export declare class TokenProviderError extends ProviderError { + readonly tryNextLink: boolean; + name: string; + constructor(message: string, tryNextLink?: boolean); +} diff --git a/node_modules/@smithy/property-provider/dist-types/ts3.4/chain.d.ts b/node_modules/@smithy/property-provider/dist-types/ts3.4/chain.d.ts new file mode 100644 index 0000000..44390b8 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/ts3.4/chain.d.ts @@ -0,0 +1,13 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + * + * Compose a single credential provider function from multiple credential + * providers. The first provider in the argument list will always be invoked; + * subsequent providers in the list will be invoked in the order in which the + * were received if the preceding provider did not successfully resolve. + * + * If no providers were received or no provider resolves successfully, the + * returned promise will be rejected. + */ +export declare const chain: (...providers: Provider[]) => Provider; diff --git a/node_modules/@smithy/property-provider/dist-types/ts3.4/fromStatic.d.ts b/node_modules/@smithy/property-provider/dist-types/ts3.4/fromStatic.d.ts new file mode 100644 index 0000000..0df6309 --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/ts3.4/fromStatic.d.ts @@ -0,0 +1,5 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + */ +export declare const fromStatic: (staticValue: T) => Provider; diff --git a/node_modules/@smithy/property-provider/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/property-provider/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..e28099d --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/ts3.4/index.d.ts @@ -0,0 +1,24 @@ +/** + * @internal + */ +export * from "./CredentialsProviderError"; +/** + * @internal + */ +export * from "./ProviderError"; +/** + * @internal + */ +export * from "./TokenProviderError"; +/** + * @internal + */ +export * from "./chain"; +/** + * @internal + */ +export * from "./fromStatic"; +/** + * @internal + */ +export * from "./memoize"; diff --git a/node_modules/@smithy/property-provider/dist-types/ts3.4/memoize.d.ts b/node_modules/@smithy/property-provider/dist-types/ts3.4/memoize.d.ts new file mode 100644 index 0000000..29ce53d --- /dev/null +++ b/node_modules/@smithy/property-provider/dist-types/ts3.4/memoize.d.ts @@ -0,0 +1,40 @@ +import { MemoizedProvider, Provider } from "@smithy/types"; +interface MemoizeOverload { + /** + * + * Decorates a provider function with either static memoization. + * + * To create a statically memoized provider, supply a provider as the only + * argument to this function. The provider will be invoked once, and all + * invocations of the provider returned by `memoize` will return the same + * promise object. + * + * @param provider The provider whose result should be cached indefinitely. + */ + (provider: Provider): MemoizedProvider; + /** + * Decorates a provider function with refreshing memoization. + * + * @param provider The provider whose result should be cached. + * @param isExpired A function that will evaluate the resolved value and + * determine if it is expired. For example, when + * memoizing AWS credential providers, this function + * should return `true` when the credential's + * expiration is in the past (or very near future) and + * `false` otherwise. + * @param requiresRefresh A function that will evaluate the resolved value and + * determine if it represents static value or one that + * will eventually need to be refreshed. For example, + * AWS credentials that have no defined expiration will + * never need to be refreshed, so this function would + * return `true` if the credentials resolved by the + * underlying provider had an expiration and `false` + * otherwise. + */ + (provider: Provider, isExpired: (resolved: T) => boolean, requiresRefresh?: (resolved: T) => boolean): MemoizedProvider; +} +/** + * @internal + */ +export declare const memoize: MemoizeOverload; +export {}; diff --git a/node_modules/@smithy/property-provider/package.json b/node_modules/@smithy/property-provider/package.json new file mode 100644 index 0000000..b7db927 --- /dev/null +++ b/node_modules/@smithy/property-provider/package.json @@ -0,0 +1,60 @@ +{ + "name": "@smithy/property-provider", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline property-provider", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/property-provider", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/property-provider" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/protocol-http/LICENSE b/node_modules/@smithy/protocol-http/LICENSE new file mode 100644 index 0000000..e907b58 --- /dev/null +++ b/node_modules/@smithy/protocol-http/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/protocol-http/README.md b/node_modules/@smithy/protocol-http/README.md new file mode 100644 index 0000000..a547ab0 --- /dev/null +++ b/node_modules/@smithy/protocol-http/README.md @@ -0,0 +1,4 @@ +# @smithy/protocol-http + +[![NPM version](https://img.shields.io/npm/v/@smithy/protocol-http/latest.svg)](https://www.npmjs.com/package/@smithy/protocol-http) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/protocol-http.svg)](https://www.npmjs.com/package/@smithy/protocol-http) diff --git a/node_modules/@smithy/protocol-http/dist-cjs/Field.js b/node_modules/@smithy/protocol-http/dist-cjs/Field.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-cjs/Field.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/protocol-http/dist-cjs/Fields.js b/node_modules/@smithy/protocol-http/dist-cjs/Fields.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-cjs/Fields.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js b/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/protocol-http/dist-cjs/extensions/index.js b/node_modules/@smithy/protocol-http/dist-cjs/extensions/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-cjs/extensions/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/protocol-http/dist-cjs/httpHandler.js b/node_modules/@smithy/protocol-http/dist-cjs/httpHandler.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-cjs/httpHandler.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js b/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js b/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/protocol-http/dist-cjs/index.js b/node_modules/@smithy/protocol-http/dist-cjs/index.js new file mode 100644 index 0000000..182663f --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-cjs/index.js @@ -0,0 +1,237 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Field: () => Field, + Fields: () => Fields, + HttpRequest: () => HttpRequest, + HttpResponse: () => HttpResponse, + getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, + isValidHostname: () => isValidHostname, + resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig +}); +module.exports = __toCommonJS(src_exports); + +// src/extensions/httpExtensionConfiguration.ts +var getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let httpHandler = runtimeConfig.httpHandler; + return { + setHttpHandler(handler) { + httpHandler = handler; + }, + httpHandler() { + return httpHandler; + }, + updateHttpClientConfig(key, value) { + httpHandler.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return httpHandler.httpHandlerConfigs(); + } + }; +}, "getHttpHandlerExtensionConfiguration"); +var resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler() + }; +}, "resolveHttpHandlerRuntimeConfig"); + +// src/Field.ts +var import_types = require("@smithy/types"); +var _Field = class _Field { + constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; + } + /** + * Appends a value to the field. + * + * @param value The value to append. + */ + add(value) { + this.values.push(value); + } + /** + * Overwrite existing field values. + * + * @param values The new field values. + */ + set(values) { + this.values = values; + } + /** + * Remove all matching entries from list. + * + * @param value Value to remove. + */ + remove(value) { + this.values = this.values.filter((v) => v !== value); + } + /** + * Get comma-delimited string. + * + * @returns String representation of {@link Field}. + */ + toString() { + return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); + } + /** + * Get string values as a list + * + * @returns Values in {@link Field} as a list. + */ + get() { + return this.values; + } +}; +__name(_Field, "Field"); +var Field = _Field; + +// src/Fields.ts +var _Fields = class _Fields { + constructor({ fields = [], encoding = "utf-8" }) { + this.entries = {}; + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; + } + /** + * Set entry for a {@link Field} name. The `name` + * attribute will be used to key the collection. + * + * @param field The {@link Field} to set. + */ + setField(field) { + this.entries[field.name.toLowerCase()] = field; + } + /** + * Retrieve {@link Field} entry by name. + * + * @param name The name of the {@link Field} entry + * to retrieve + * @returns The {@link Field} if it exists. + */ + getField(name) { + return this.entries[name.toLowerCase()]; + } + /** + * Delete entry from collection. + * + * @param name Name of the entry to delete. + */ + removeField(name) { + delete this.entries[name.toLowerCase()]; + } + /** + * Helper function for retrieving specific types of fields. + * Used to grab all headers or all trailers. + * + * @param kind {@link FieldPosition} of entries to retrieve. + * @returns The {@link Field} entries with the specified + * {@link FieldPosition}. + */ + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); + } +}; +__name(_Fields, "Fields"); +var Fields = _Fields; + +// src/httpRequest.ts +var _HttpRequest = class _HttpRequest { + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static isInstance(request) { + if (!request) + return false; + const req = request; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + clone() { + const cloned = new _HttpRequest({ + ...this, + headers: { ...this.headers } + }); + if (cloned.query) + cloned.query = cloneQuery(cloned.query); + return cloned; + } +}; +__name(_HttpRequest, "HttpRequest"); +var HttpRequest = _HttpRequest; +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); +} +__name(cloneQuery, "cloneQuery"); + +// src/httpResponse.ts +var _HttpResponse = class _HttpResponse { + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } +}; +__name(_HttpResponse, "HttpResponse"); +var HttpResponse = _HttpResponse; + +// src/isValidHostname.ts +function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); +} +__name(isValidHostname, "isValidHostname"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + getHttpHandlerExtensionConfiguration, + resolveHttpHandlerRuntimeConfig, + Field, + Fields, + HttpRequest, + HttpResponse, + isValidHostname +}); + diff --git a/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js b/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/protocol-http/dist-cjs/types.js b/node_modules/@smithy/protocol-http/dist-cjs/types.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-cjs/types.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/protocol-http/dist-es/Field.js b/node_modules/@smithy/protocol-http/dist-es/Field.js new file mode 100644 index 0000000..918c883 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-es/Field.js @@ -0,0 +1,23 @@ +import { FieldPosition } from "@smithy/types"; +export class Field { + constructor({ name, kind = FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; + } + add(value) { + this.values.push(value); + } + set(values) { + this.values = values; + } + remove(value) { + this.values = this.values.filter((v) => v !== value); + } + toString() { + return this.values.map((v) => (v.includes(",") || v.includes(" ") ? `"${v}"` : v)).join(", "); + } + get() { + return this.values; + } +} diff --git a/node_modules/@smithy/protocol-http/dist-es/Fields.js b/node_modules/@smithy/protocol-http/dist-es/Fields.js new file mode 100644 index 0000000..efa591f --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-es/Fields.js @@ -0,0 +1,19 @@ +export class Fields { + constructor({ fields = [], encoding = "utf-8" }) { + this.entries = {}; + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; + } + setField(field) { + this.entries[field.name.toLowerCase()] = field; + } + getField(name) { + return this.entries[name.toLowerCase()]; + } + removeField(name) { + delete this.entries[name.toLowerCase()]; + } + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); + } +} diff --git a/node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js b/node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js new file mode 100644 index 0000000..b728287 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js @@ -0,0 +1,22 @@ +export const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { + let httpHandler = runtimeConfig.httpHandler; + return { + setHttpHandler(handler) { + httpHandler = handler; + }, + httpHandler() { + return httpHandler; + }, + updateHttpClientConfig(key, value) { + httpHandler.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return httpHandler.httpHandlerConfigs(); + }, + }; +}; +export const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler(), + }; +}; diff --git a/node_modules/@smithy/protocol-http/dist-es/extensions/index.js b/node_modules/@smithy/protocol-http/dist-es/extensions/index.js new file mode 100644 index 0000000..a215a4a --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-es/extensions/index.js @@ -0,0 +1 @@ +export * from "./httpExtensionConfiguration"; diff --git a/node_modules/@smithy/protocol-http/dist-es/httpHandler.js b/node_modules/@smithy/protocol-http/dist-es/httpHandler.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-es/httpHandler.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/protocol-http/dist-es/httpRequest.js b/node_modules/@smithy/protocol-http/dist-es/httpRequest.js new file mode 100644 index 0000000..1e490cd --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-es/httpRequest.js @@ -0,0 +1,48 @@ +export class HttpRequest { + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol + ? options.protocol.slice(-1) !== ":" + ? `${options.protocol}:` + : options.protocol + : "https:"; + this.path = options.path ? (options.path.charAt(0) !== "/" ? `/${options.path}` : options.path) : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static isInstance(request) { + if (!request) + return false; + const req = request; + return ("method" in req && + "protocol" in req && + "hostname" in req && + "path" in req && + typeof req["query"] === "object" && + typeof req["headers"] === "object"); + } + clone() { + const cloned = new HttpRequest({ + ...this, + headers: { ...this.headers }, + }); + if (cloned.query) + cloned.query = cloneQuery(cloned.query); + return cloned; + } +} +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param, + }; + }, {}); +} diff --git a/node_modules/@smithy/protocol-http/dist-es/httpResponse.js b/node_modules/@smithy/protocol-http/dist-es/httpResponse.js new file mode 100644 index 0000000..75f470f --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-es/httpResponse.js @@ -0,0 +1,14 @@ +export class HttpResponse { + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } +} diff --git a/node_modules/@smithy/protocol-http/dist-es/index.js b/node_modules/@smithy/protocol-http/dist-es/index.js new file mode 100644 index 0000000..8ff7f26 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-es/index.js @@ -0,0 +1,8 @@ +export * from "./extensions"; +export * from "./Field"; +export * from "./Fields"; +export * from "./httpHandler"; +export * from "./httpRequest"; +export * from "./httpResponse"; +export * from "./isValidHostname"; +export * from "./types"; diff --git a/node_modules/@smithy/protocol-http/dist-es/isValidHostname.js b/node_modules/@smithy/protocol-http/dist-es/isValidHostname.js new file mode 100644 index 0000000..464c7db --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-es/isValidHostname.js @@ -0,0 +1,4 @@ +export function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); +} diff --git a/node_modules/@smithy/protocol-http/dist-es/types.js b/node_modules/@smithy/protocol-http/dist-es/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-es/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/protocol-http/dist-types/Field.d.ts b/node_modules/@smithy/protocol-http/dist-types/Field.d.ts new file mode 100644 index 0000000..2d1613a --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/Field.d.ts @@ -0,0 +1,49 @@ +import { FieldOptions, FieldPosition } from "@smithy/types"; +/** + * A name-value pair representing a single field + * transmitted in an HTTP Request or Response. + * + * The kind will dictate metadata placement within + * an HTTP message. + * + * All field names are case insensitive and + * case-variance must be treated as equivalent. + * Names MAY be normalized but SHOULD be preserved + * for accuracy during transmission. + */ +export declare class Field { + readonly name: string; + readonly kind: FieldPosition; + values: string[]; + constructor({ name, kind, values }: FieldOptions); + /** + * Appends a value to the field. + * + * @param value The value to append. + */ + add(value: string): void; + /** + * Overwrite existing field values. + * + * @param values The new field values. + */ + set(values: string[]): void; + /** + * Remove all matching entries from list. + * + * @param value Value to remove. + */ + remove(value: string): void; + /** + * Get comma-delimited string. + * + * @returns String representation of {@link Field}. + */ + toString(): string; + /** + * Get string values as a list + * + * @returns Values in {@link Field} as a list. + */ + get(): string[]; +} diff --git a/node_modules/@smithy/protocol-http/dist-types/Fields.d.ts b/node_modules/@smithy/protocol-http/dist-types/Fields.d.ts new file mode 100644 index 0000000..8915826 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/Fields.d.ts @@ -0,0 +1,44 @@ +import { FieldPosition } from "@smithy/types"; +import { Field } from "./Field"; +export type FieldsOptions = { + fields?: Field[]; + encoding?: string; +}; +/** + * Collection of Field entries mapped by name. + */ +export declare class Fields { + private readonly entries; + private readonly encoding; + constructor({ fields, encoding }: FieldsOptions); + /** + * Set entry for a {@link Field} name. The `name` + * attribute will be used to key the collection. + * + * @param field The {@link Field} to set. + */ + setField(field: Field): void; + /** + * Retrieve {@link Field} entry by name. + * + * @param name The name of the {@link Field} entry + * to retrieve + * @returns The {@link Field} if it exists. + */ + getField(name: string): Field | undefined; + /** + * Delete entry from collection. + * + * @param name Name of the entry to delete. + */ + removeField(name: string): void; + /** + * Helper function for retrieving specific types of fields. + * Used to grab all headers or all trailers. + * + * @param kind {@link FieldPosition} of entries to retrieve. + * @returns The {@link Field} entries with the specified + * {@link FieldPosition}. + */ + getByType(kind: FieldPosition): Field[]; +} diff --git a/node_modules/@smithy/protocol-http/dist-types/extensions/httpExtensionConfiguration.d.ts b/node_modules/@smithy/protocol-http/dist-types/extensions/httpExtensionConfiguration.d.ts new file mode 100644 index 0000000..bfe452d --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/extensions/httpExtensionConfiguration.d.ts @@ -0,0 +1,37 @@ +import { HttpHandler } from "../httpHandler"; +/** + * @internal + */ +export interface HttpHandlerExtensionConfiguration { + setHttpHandler(handler: HttpHandler): void; + httpHandler(): HttpHandler; + updateHttpClientConfig(key: keyof HandlerConfig, value: HandlerConfig[typeof key]): void; + httpHandlerConfigs(): HandlerConfig; +} +/** + * @internal + */ +export type HttpHandlerExtensionConfigType = Partial<{ + httpHandler: HttpHandler; +}>; +/** + * @internal + * + * Helper function to resolve default extension configuration from runtime config + */ +export declare const getHttpHandlerExtensionConfiguration: (runtimeConfig: Partial<{ + httpHandler: HttpHandler; +}>) => { + setHttpHandler(handler: HttpHandler): void; + httpHandler(): HttpHandler; + updateHttpClientConfig(key: keyof HandlerConfig, value: HandlerConfig[keyof HandlerConfig]): void; + httpHandlerConfigs(): HandlerConfig; +}; +/** + * @internal + * + * Helper function to resolve runtime config from default extension configuration + */ +export declare const resolveHttpHandlerRuntimeConfig: (httpHandlerExtensionConfiguration: HttpHandlerExtensionConfiguration) => Partial<{ + httpHandler: HttpHandler; +}>; diff --git a/node_modules/@smithy/protocol-http/dist-types/extensions/index.d.ts b/node_modules/@smithy/protocol-http/dist-types/extensions/index.d.ts new file mode 100644 index 0000000..a215a4a --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/extensions/index.d.ts @@ -0,0 +1 @@ +export * from "./httpExtensionConfiguration"; diff --git a/node_modules/@smithy/protocol-http/dist-types/httpHandler.d.ts b/node_modules/@smithy/protocol-http/dist-types/httpHandler.d.ts new file mode 100644 index 0000000..68f2a93 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/httpHandler.d.ts @@ -0,0 +1,37 @@ +import type { FetchHttpHandlerOptions, HttpHandlerOptions, NodeHttpHandlerOptions, RequestHandler } from "@smithy/types"; +import type { HttpRequest } from "./httpRequest"; +import type { HttpResponse } from "./httpResponse"; +/** + * @internal + */ +export type HttpHandler = RequestHandler & { + /** + * @internal + * @param key + * @param value + */ + updateHttpClientConfig(key: keyof HttpHandlerConfig, value: HttpHandlerConfig[typeof key]): void; + /** + * @internal + */ + httpHandlerConfigs(): HttpHandlerConfig; +}; +/** + * @public + * + * A type representing the accepted user inputs for the `requestHandler` field + * of a client's constructor object. + * + * You may provide an instance of an HttpHandler, or alternatively + * provide the constructor arguments as an object which will be passed + * to the constructor of the default request handler. + * + * The default class constructor to which your arguments will be passed + * varies. The Node.js default is the NodeHttpHandler and the browser/react-native + * default is the FetchHttpHandler. In rarer cases specific clients may be + * configured to use other default implementations such as Websocket or HTTP2. + * + * The fallback type Record is part of the union to allow + * passing constructor params to an unknown requestHandler type. + */ +export type HttpHandlerUserInput = HttpHandler | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record; diff --git a/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts b/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts new file mode 100644 index 0000000..ed35544 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts @@ -0,0 +1,23 @@ +import { HeaderBag, HttpMessage, HttpRequest as IHttpRequest, QueryParameterBag, URI } from "@smithy/types"; +type HttpRequestOptions = Partial & Partial & { + method?: string; +}; +export interface HttpRequest extends IHttpRequest { +} +export declare class HttpRequest implements HttpMessage, URI { + method: string; + protocol: string; + hostname: string; + port?: number; + path: string; + query: QueryParameterBag; + headers: HeaderBag; + username?: string; + password?: string; + fragment?: string; + body?: any; + constructor(options: HttpRequestOptions); + static isInstance(request: unknown): request is HttpRequest; + clone(): HttpRequest; +} +export {}; diff --git a/node_modules/@smithy/protocol-http/dist-types/httpResponse.d.ts b/node_modules/@smithy/protocol-http/dist-types/httpResponse.d.ts new file mode 100644 index 0000000..a4eeecc --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/httpResponse.d.ts @@ -0,0 +1,16 @@ +import { HeaderBag, HttpMessage, HttpResponse as IHttpResponse } from "@smithy/types"; +type HttpResponseOptions = Partial & { + statusCode: number; + reason?: string; +}; +export interface HttpResponse extends IHttpResponse { +} +export declare class HttpResponse { + statusCode: number; + reason?: string; + headers: HeaderBag; + body?: any; + constructor(options: HttpResponseOptions); + static isInstance(response: unknown): response is HttpResponse; +} +export {}; diff --git a/node_modules/@smithy/protocol-http/dist-types/index.d.ts b/node_modules/@smithy/protocol-http/dist-types/index.d.ts new file mode 100644 index 0000000..8ff7f26 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/index.d.ts @@ -0,0 +1,8 @@ +export * from "./extensions"; +export * from "./Field"; +export * from "./Fields"; +export * from "./httpHandler"; +export * from "./httpRequest"; +export * from "./httpResponse"; +export * from "./isValidHostname"; +export * from "./types"; diff --git a/node_modules/@smithy/protocol-http/dist-types/isValidHostname.d.ts b/node_modules/@smithy/protocol-http/dist-types/isValidHostname.d.ts new file mode 100644 index 0000000..6fb5bcb --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/isValidHostname.d.ts @@ -0,0 +1 @@ +export declare function isValidHostname(hostname: string): boolean; diff --git a/node_modules/@smithy/protocol-http/dist-types/ts3.4/Field.d.ts b/node_modules/@smithy/protocol-http/dist-types/ts3.4/Field.d.ts new file mode 100644 index 0000000..faa4b70 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/ts3.4/Field.d.ts @@ -0,0 +1,49 @@ +import { FieldOptions, FieldPosition } from "@smithy/types"; +/** + * A name-value pair representing a single field + * transmitted in an HTTP Request or Response. + * + * The kind will dictate metadata placement within + * an HTTP message. + * + * All field names are case insensitive and + * case-variance must be treated as equivalent. + * Names MAY be normalized but SHOULD be preserved + * for accuracy during transmission. + */ +export declare class Field { + readonly name: string; + readonly kind: FieldPosition; + values: string[]; + constructor({ name, kind, values }: FieldOptions); + /** + * Appends a value to the field. + * + * @param value The value to append. + */ + add(value: string): void; + /** + * Overwrite existing field values. + * + * @param values The new field values. + */ + set(values: string[]): void; + /** + * Remove all matching entries from list. + * + * @param value Value to remove. + */ + remove(value: string): void; + /** + * Get comma-delimited string. + * + * @returns String representation of {@link Field}. + */ + toString(): string; + /** + * Get string values as a list + * + * @returns Values in {@link Field} as a list. + */ + get(): string[]; +} diff --git a/node_modules/@smithy/protocol-http/dist-types/ts3.4/Fields.d.ts b/node_modules/@smithy/protocol-http/dist-types/ts3.4/Fields.d.ts new file mode 100644 index 0000000..616f55e --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/ts3.4/Fields.d.ts @@ -0,0 +1,44 @@ +import { FieldPosition } from "@smithy/types"; +import { Field } from "./Field"; +export type FieldsOptions = { + fields?: Field[]; + encoding?: string; +}; +/** + * Collection of Field entries mapped by name. + */ +export declare class Fields { + private readonly entries; + private readonly encoding; + constructor({ fields, encoding }: FieldsOptions); + /** + * Set entry for a {@link Field} name. The `name` + * attribute will be used to key the collection. + * + * @param field The {@link Field} to set. + */ + setField(field: Field): void; + /** + * Retrieve {@link Field} entry by name. + * + * @param name The name of the {@link Field} entry + * to retrieve + * @returns The {@link Field} if it exists. + */ + getField(name: string): Field | undefined; + /** + * Delete entry from collection. + * + * @param name Name of the entry to delete. + */ + removeField(name: string): void; + /** + * Helper function for retrieving specific types of fields. + * Used to grab all headers or all trailers. + * + * @param kind {@link FieldPosition} of entries to retrieve. + * @returns The {@link Field} entries with the specified + * {@link FieldPosition}. + */ + getByType(kind: FieldPosition): Field[]; +} diff --git a/node_modules/@smithy/protocol-http/dist-types/ts3.4/extensions/httpExtensionConfiguration.d.ts b/node_modules/@smithy/protocol-http/dist-types/ts3.4/extensions/httpExtensionConfiguration.d.ts new file mode 100644 index 0000000..3cd2cf6 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/ts3.4/extensions/httpExtensionConfiguration.d.ts @@ -0,0 +1,37 @@ +import { HttpHandler } from "../httpHandler"; +/** + * @internal + */ +export interface HttpHandlerExtensionConfiguration { + setHttpHandler(handler: HttpHandler): void; + httpHandler(): HttpHandler; + updateHttpClientConfig(key: keyof HandlerConfig, value: HandlerConfig[typeof key]): void; + httpHandlerConfigs(): HandlerConfig; +} +/** + * @internal + */ +export type HttpHandlerExtensionConfigType = Partial<{ + httpHandler: HttpHandler; +}>; +/** + * @internal + * + * Helper function to resolve default extension configuration from runtime config + */ +export declare const getHttpHandlerExtensionConfiguration: (runtimeConfig: Partial<{ + httpHandler: HttpHandler; +}>) => { + setHttpHandler(handler: HttpHandler): void; + httpHandler(): HttpHandler; + updateHttpClientConfig(key: keyof HandlerConfig, value: HandlerConfig[keyof HandlerConfig]): void; + httpHandlerConfigs(): HandlerConfig; +}; +/** + * @internal + * + * Helper function to resolve runtime config from default extension configuration + */ +export declare const resolveHttpHandlerRuntimeConfig: (httpHandlerExtensionConfiguration: HttpHandlerExtensionConfiguration) => Partial<{ + httpHandler: HttpHandler; +}>; diff --git a/node_modules/@smithy/protocol-http/dist-types/ts3.4/extensions/index.d.ts b/node_modules/@smithy/protocol-http/dist-types/ts3.4/extensions/index.d.ts new file mode 100644 index 0000000..e0f765b --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/ts3.4/extensions/index.d.ts @@ -0,0 +1 @@ +export * from "./httpExtensionConfiguration"; diff --git a/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpHandler.d.ts b/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpHandler.d.ts new file mode 100644 index 0000000..a4fc420 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpHandler.d.ts @@ -0,0 +1,37 @@ +import { FetchHttpHandlerOptions, HttpHandlerOptions, NodeHttpHandlerOptions, RequestHandler } from "@smithy/types"; +import { HttpRequest } from "./httpRequest"; +import { HttpResponse } from "./httpResponse"; +/** + * @internal + */ +export type HttpHandler = RequestHandler & { + /** + * @internal + * @param key + * @param value + */ + updateHttpClientConfig(key: keyof HttpHandlerConfig, value: HttpHandlerConfig[typeof key]): void; + /** + * @internal + */ + httpHandlerConfigs(): HttpHandlerConfig; +}; +/** + * @public + * + * A type representing the accepted user inputs for the `requestHandler` field + * of a client's constructor object. + * + * You may provide an instance of an HttpHandler, or alternatively + * provide the constructor arguments as an object which will be passed + * to the constructor of the default request handler. + * + * The default class constructor to which your arguments will be passed + * varies. The Node.js default is the NodeHttpHandler and the browser/react-native + * default is the FetchHttpHandler. In rarer cases specific clients may be + * configured to use other default implementations such as Websocket or HTTP2. + * + * The fallback type Record is part of the union to allow + * passing constructor params to an unknown requestHandler type. + */ +export type HttpHandlerUserInput = HttpHandler | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record; diff --git a/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpRequest.d.ts b/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpRequest.d.ts new file mode 100644 index 0000000..80c45b8 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpRequest.d.ts @@ -0,0 +1,23 @@ +import { HeaderBag, HttpMessage, HttpRequest as IHttpRequest, QueryParameterBag, URI } from "@smithy/types"; +type HttpRequestOptions = Partial & Partial & { + method?: string; +}; +export interface HttpRequest extends IHttpRequest { +} +export declare class HttpRequest implements HttpMessage, URI { + method: string; + protocol: string; + hostname: string; + port?: number; + path: string; + query: QueryParameterBag; + headers: HeaderBag; + username?: string; + password?: string; + fragment?: string; + body?: any; + constructor(options: HttpRequestOptions); + static isInstance(request: unknown): request is HttpRequest; + clone(): HttpRequest; +} +export {}; diff --git a/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpResponse.d.ts b/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpResponse.d.ts new file mode 100644 index 0000000..e748d0a --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpResponse.d.ts @@ -0,0 +1,16 @@ +import { HeaderBag, HttpMessage, HttpResponse as IHttpResponse } from "@smithy/types"; +type HttpResponseOptions = Partial & { + statusCode: number; + reason?: string; +}; +export interface HttpResponse extends IHttpResponse { +} +export declare class HttpResponse { + statusCode: number; + reason?: string; + headers: HeaderBag; + body?: any; + constructor(options: HttpResponseOptions); + static isInstance(response: unknown): response is HttpResponse; +} +export {}; diff --git a/node_modules/@smithy/protocol-http/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/protocol-http/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..08feffa --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/ts3.4/index.d.ts @@ -0,0 +1,8 @@ +export * from "./extensions"; +export * from "./Field"; +export * from "./Fields"; +export * from "./httpHandler"; +export * from "./httpRequest"; +export * from "./httpResponse"; +export * from "./isValidHostname"; +export * from "./types"; diff --git a/node_modules/@smithy/protocol-http/dist-types/ts3.4/isValidHostname.d.ts b/node_modules/@smithy/protocol-http/dist-types/ts3.4/isValidHostname.d.ts new file mode 100644 index 0000000..7b85b36 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/ts3.4/isValidHostname.d.ts @@ -0,0 +1 @@ +export declare function isValidHostname(hostname: string): boolean; diff --git a/node_modules/@smithy/protocol-http/dist-types/ts3.4/types.d.ts b/node_modules/@smithy/protocol-http/dist-types/ts3.4/types.d.ts new file mode 100644 index 0000000..42e3c66 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/ts3.4/types.d.ts @@ -0,0 +1,21 @@ +import { FieldOptions as __FieldOptions, FieldPosition as __FieldPosition, HeaderBag as __HeaderBag, HttpHandlerOptions as __HttpHandlerOptions, HttpMessage as __HttpMessage } from "@smithy/types"; +/** + * @deprecated Use FieldOptions from `@smithy/types` instead + */ +export type FieldOptions = __FieldOptions; +/** + * @deprecated Use FieldPosition from `@smithy/types` instead + */ +export type FieldPosition = __FieldPosition; +/** + * @deprecated Use HeaderBag from `@smithy/types` instead + */ +export type HeaderBag = __HeaderBag; +/** + * @deprecated Use HttpMessage from `@smithy/types` instead + */ +export type HttpMessage = __HttpMessage; +/** + * @deprecated Use HttpHandlerOptions from `@smithy/types` instead + */ +export type HttpHandlerOptions = __HttpHandlerOptions; diff --git a/node_modules/@smithy/protocol-http/dist-types/types.d.ts b/node_modules/@smithy/protocol-http/dist-types/types.d.ts new file mode 100644 index 0000000..0d597b9 --- /dev/null +++ b/node_modules/@smithy/protocol-http/dist-types/types.d.ts @@ -0,0 +1,21 @@ +import { FieldOptions as __FieldOptions, FieldPosition as __FieldPosition, HeaderBag as __HeaderBag, HttpHandlerOptions as __HttpHandlerOptions, HttpMessage as __HttpMessage } from "@smithy/types"; +/** + * @deprecated Use FieldOptions from `@smithy/types` instead + */ +export type FieldOptions = __FieldOptions; +/** + * @deprecated Use FieldPosition from `@smithy/types` instead + */ +export type FieldPosition = __FieldPosition; +/** + * @deprecated Use HeaderBag from `@smithy/types` instead + */ +export type HeaderBag = __HeaderBag; +/** + * @deprecated Use HttpMessage from `@smithy/types` instead + */ +export type HttpMessage = __HttpMessage; +/** + * @deprecated Use HttpHandlerOptions from `@smithy/types` instead + */ +export type HttpHandlerOptions = __HttpHandlerOptions; diff --git a/node_modules/@smithy/protocol-http/package.json b/node_modules/@smithy/protocol-http/package.json new file mode 100644 index 0000000..60cc49d --- /dev/null +++ b/node_modules/@smithy/protocol-http/package.json @@ -0,0 +1,61 @@ +{ + "name": "@smithy/protocol-http", + "version": "3.3.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline protocol-http", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS Smithy Team", + "email": "", + "url": "https://smithy.io" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/protocol-http", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/protocol-http" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/querystring-builder/LICENSE b/node_modules/@smithy/querystring-builder/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@smithy/querystring-builder/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/querystring-builder/README.md b/node_modules/@smithy/querystring-builder/README.md new file mode 100644 index 0000000..00275da --- /dev/null +++ b/node_modules/@smithy/querystring-builder/README.md @@ -0,0 +1,10 @@ +# @smithy/querystring-builder + +[![NPM version](https://img.shields.io/npm/v/@smithy/querystring-builder/latest.svg)](https://www.npmjs.com/package/@smithy/querystring-builder) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/querystring-builder.svg)](https://www.npmjs.com/package/@smithy/querystring-builder) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/querystring-builder/dist-cjs/index.js b/node_modules/@smithy/querystring-builder/dist-cjs/index.js new file mode 100644 index 0000000..7030242 --- /dev/null +++ b/node_modules/@smithy/querystring-builder/dist-cjs/index.js @@ -0,0 +1,52 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + buildQueryString: () => buildQueryString +}); +module.exports = __toCommonJS(src_exports); +var import_util_uri_escape = require("@smithy/util-uri-escape"); +function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = (0, import_util_uri_escape.escapeUri)(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); +} +__name(buildQueryString, "buildQueryString"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + buildQueryString +}); + diff --git a/node_modules/@smithy/querystring-builder/dist-es/index.js b/node_modules/@smithy/querystring-builder/dist-es/index.js new file mode 100644 index 0000000..fbc7684 --- /dev/null +++ b/node_modules/@smithy/querystring-builder/dist-es/index.js @@ -0,0 +1,21 @@ +import { escapeUri } from "@smithy/util-uri-escape"; +export function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = escapeUri(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${escapeUri(value[i])}`); + } + } + else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${escapeUri(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); +} diff --git a/node_modules/@smithy/querystring-builder/dist-types/index.d.ts b/node_modules/@smithy/querystring-builder/dist-types/index.d.ts new file mode 100644 index 0000000..538b1b0 --- /dev/null +++ b/node_modules/@smithy/querystring-builder/dist-types/index.d.ts @@ -0,0 +1,5 @@ +import { QueryParameterBag } from "@smithy/types"; +/** + * @internal + */ +export declare function buildQueryString(query: QueryParameterBag): string; diff --git a/node_modules/@smithy/querystring-builder/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/querystring-builder/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..1f866f3 --- /dev/null +++ b/node_modules/@smithy/querystring-builder/dist-types/ts3.4/index.d.ts @@ -0,0 +1,5 @@ +import { QueryParameterBag } from "@smithy/types"; +/** + * @internal + */ +export declare function buildQueryString(query: QueryParameterBag): string; diff --git a/node_modules/@smithy/querystring-builder/package.json b/node_modules/@smithy/querystring-builder/package.json new file mode 100644 index 0000000..d67e5cb --- /dev/null +++ b/node_modules/@smithy/querystring-builder/package.json @@ -0,0 +1,61 @@ +{ + "name": "@smithy/querystring-builder", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline querystring-builder", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "exit 0" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^2.12.0", + "@smithy/util-uri-escape": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/querystring-builder", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/querystring-builder" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/querystring-parser/LICENSE b/node_modules/@smithy/querystring-parser/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@smithy/querystring-parser/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/querystring-parser/README.md b/node_modules/@smithy/querystring-parser/README.md new file mode 100644 index 0000000..02dcf51 --- /dev/null +++ b/node_modules/@smithy/querystring-parser/README.md @@ -0,0 +1,10 @@ +# @smithy/querystring-parser + +[![NPM version](https://img.shields.io/npm/v/@smithy/querystring-parser/latest.svg)](https://www.npmjs.com/package/@smithy/querystring-parser) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/querystring-parser.svg)](https://www.npmjs.com/package/@smithy/querystring-parser) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/querystring-parser/dist-cjs/index.js b/node_modules/@smithy/querystring-parser/dist-cjs/index.js new file mode 100644 index 0000000..924647c --- /dev/null +++ b/node_modules/@smithy/querystring-parser/dist-cjs/index.js @@ -0,0 +1,53 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + parseQueryString: () => parseQueryString +}); +module.exports = __toCommonJS(src_exports); +function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } + } + return query; +} +__name(parseQueryString, "parseQueryString"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + parseQueryString +}); + diff --git a/node_modules/@smithy/querystring-parser/dist-es/index.js b/node_modules/@smithy/querystring-parser/dist-es/index.js new file mode 100644 index 0000000..bd7bf00 --- /dev/null +++ b/node_modules/@smithy/querystring-parser/dist-es/index.js @@ -0,0 +1,23 @@ +export function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } + else if (Array.isArray(query[key])) { + query[key].push(value); + } + else { + query[key] = [query[key], value]; + } + } + } + return query; +} diff --git a/node_modules/@smithy/querystring-parser/dist-types/index.d.ts b/node_modules/@smithy/querystring-parser/dist-types/index.d.ts new file mode 100644 index 0000000..fdc1ba5 --- /dev/null +++ b/node_modules/@smithy/querystring-parser/dist-types/index.d.ts @@ -0,0 +1,5 @@ +import { QueryParameterBag } from "@smithy/types"; +/** + * @internal + */ +export declare function parseQueryString(querystring: string): QueryParameterBag; diff --git a/node_modules/@smithy/querystring-parser/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/querystring-parser/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..8bb747d --- /dev/null +++ b/node_modules/@smithy/querystring-parser/dist-types/ts3.4/index.d.ts @@ -0,0 +1,5 @@ +import { QueryParameterBag } from "@smithy/types"; +/** + * @internal + */ +export declare function parseQueryString(querystring: string): QueryParameterBag; diff --git a/node_modules/@smithy/querystring-parser/package.json b/node_modules/@smithy/querystring-parser/package.json new file mode 100644 index 0000000..7edccb7 --- /dev/null +++ b/node_modules/@smithy/querystring-parser/package.json @@ -0,0 +1,60 @@ +{ + "name": "@smithy/querystring-parser", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline querystring-parser", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/querystring-parser", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/querystring-parser" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/service-error-classification/LICENSE b/node_modules/@smithy/service-error-classification/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@smithy/service-error-classification/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/service-error-classification/README.md b/node_modules/@smithy/service-error-classification/README.md new file mode 100644 index 0000000..902dd43 --- /dev/null +++ b/node_modules/@smithy/service-error-classification/README.md @@ -0,0 +1,4 @@ +# @smithy/service-error-classification + +[![NPM version](https://img.shields.io/npm/v/@smithy/service-error-classification/latest.svg)](https://www.npmjs.com/package/@smithy/service-error-classification) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/service-error-classification.svg)](https://www.npmjs.com/package/@smithy/service-error-classification) diff --git a/node_modules/@smithy/service-error-classification/dist-cjs/constants.js b/node_modules/@smithy/service-error-classification/dist-cjs/constants.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/service-error-classification/dist-cjs/constants.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/service-error-classification/dist-cjs/index.js b/node_modules/@smithy/service-error-classification/dist-cjs/index.js new file mode 100644 index 0000000..2dd94b8 --- /dev/null +++ b/node_modules/@smithy/service-error-classification/dist-cjs/index.js @@ -0,0 +1,98 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + isClockSkewCorrectedError: () => isClockSkewCorrectedError, + isClockSkewError: () => isClockSkewError, + isRetryableByTrait: () => isRetryableByTrait, + isServerError: () => isServerError, + isThrottlingError: () => isThrottlingError, + isTransientError: () => isTransientError +}); +module.exports = __toCommonJS(src_exports); + +// src/constants.ts +var CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch" +]; +var THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + // DynamoDB +]; +var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; +var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; +var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; + +// src/index.ts +var isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait"); +var isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError"); +var isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => { + var _a; + return (_a = error.$metadata) == null ? void 0 : _a.clockSkewCorrected; +}, "isClockSkewCorrectedError"); +var isThrottlingError = /* @__PURE__ */ __name((error) => { + var _a, _b; + return ((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? void 0 : _b.throttling) == true; +}, "isThrottlingError"); +var isTransientError = /* @__PURE__ */ __name((error) => { + var _a; + return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0); +}, "isTransientError"); +var isServerError = /* @__PURE__ */ __name((error) => { + var _a; + if (((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) !== void 0) { + const statusCode = error.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { + return true; + } + return false; + } + return false; +}, "isServerError"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + isRetryableByTrait, + isClockSkewError, + isClockSkewCorrectedError, + isThrottlingError, + isTransientError, + isServerError +}); + diff --git a/node_modules/@smithy/service-error-classification/dist-es/constants.js b/node_modules/@smithy/service-error-classification/dist-es/constants.js new file mode 100644 index 0000000..267443b --- /dev/null +++ b/node_modules/@smithy/service-error-classification/dist-es/constants.js @@ -0,0 +1,27 @@ +export const CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch", +]; +export const THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException", +]; +export const TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; +export const TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; +export const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; diff --git a/node_modules/@smithy/service-error-classification/dist-es/index.js b/node_modules/@smithy/service-error-classification/dist-es/index.js new file mode 100644 index 0000000..ae124b9 --- /dev/null +++ b/node_modules/@smithy/service-error-classification/dist-es/index.js @@ -0,0 +1,21 @@ +import { CLOCK_SKEW_ERROR_CODES, NODEJS_TIMEOUT_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, } from "./constants"; +export const isRetryableByTrait = (error) => error.$retryable !== undefined; +export const isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name); +export const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected; +export const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 || + THROTTLING_ERROR_CODES.includes(error.name) || + error.$retryable?.throttling == true; +export const isTransientError = (error) => isClockSkewCorrectedError(error) || + TRANSIENT_ERROR_CODES.includes(error.name) || + NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || + TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0); +export const isServerError = (error) => { + if (error.$metadata?.httpStatusCode !== undefined) { + const statusCode = error.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { + return true; + } + return false; + } + return false; +}; diff --git a/node_modules/@smithy/service-error-classification/dist-types/constants.d.ts b/node_modules/@smithy/service-error-classification/dist-types/constants.d.ts new file mode 100644 index 0000000..f07663b --- /dev/null +++ b/node_modules/@smithy/service-error-classification/dist-types/constants.d.ts @@ -0,0 +1,26 @@ +/** + * Errors encountered when the client clock and server clock cannot agree on the + * current time. + * + * These errors are retryable, assuming the SDK has enabled clock skew + * correction. + */ +export declare const CLOCK_SKEW_ERROR_CODES: string[]; +/** + * Errors that indicate the SDK is being throttled. + * + * These errors are always retryable. + */ +export declare const THROTTLING_ERROR_CODES: string[]; +/** + * Error codes that indicate transient issues + */ +export declare const TRANSIENT_ERROR_CODES: string[]; +/** + * Error codes that indicate transient issues + */ +export declare const TRANSIENT_ERROR_STATUS_CODES: number[]; +/** + * Node.js system error codes that indicate timeout. + */ +export declare const NODEJS_TIMEOUT_ERROR_CODES: string[]; diff --git a/node_modules/@smithy/service-error-classification/dist-types/index.d.ts b/node_modules/@smithy/service-error-classification/dist-types/index.d.ts new file mode 100644 index 0000000..17d3aaf --- /dev/null +++ b/node_modules/@smithy/service-error-classification/dist-types/index.d.ts @@ -0,0 +1,19 @@ +import { SdkError } from "@smithy/types"; +export declare const isRetryableByTrait: (error: SdkError) => boolean; +/** + * @deprecated use isClockSkewCorrectedError. This is only used in deprecated code. + */ +export declare const isClockSkewError: (error: SdkError) => boolean; +/** + * @returns whether the error resulted in a systemClockOffset aka clock skew correction. + */ +export declare const isClockSkewCorrectedError: (error: SdkError) => true | undefined; +export declare const isThrottlingError: (error: SdkError) => boolean; +/** + * Though NODEJS_TIMEOUT_ERROR_CODES are platform specific, they are + * included here because there is an error scenario with unknown root + * cause where the NodeHttpHandler does not decorate the Error with + * the name "TimeoutError" to be checked by the TRANSIENT_ERROR_CODES condition. + */ +export declare const isTransientError: (error: SdkError) => boolean; +export declare const isServerError: (error: SdkError) => boolean; diff --git a/node_modules/@smithy/service-error-classification/dist-types/ts3.4/constants.d.ts b/node_modules/@smithy/service-error-classification/dist-types/ts3.4/constants.d.ts new file mode 100644 index 0000000..74c4858 --- /dev/null +++ b/node_modules/@smithy/service-error-classification/dist-types/ts3.4/constants.d.ts @@ -0,0 +1,26 @@ +/** + * Errors encountered when the client clock and server clock cannot agree on the + * current time. + * + * These errors are retryable, assuming the SDK has enabled clock skew + * correction. + */ +export declare const CLOCK_SKEW_ERROR_CODES: string[]; +/** + * Errors that indicate the SDK is being throttled. + * + * These errors are always retryable. + */ +export declare const THROTTLING_ERROR_CODES: string[]; +/** + * Error codes that indicate transient issues + */ +export declare const TRANSIENT_ERROR_CODES: string[]; +/** + * Error codes that indicate transient issues + */ +export declare const TRANSIENT_ERROR_STATUS_CODES: number[]; +/** + * Node.js system error codes that indicate timeout. + */ +export declare const NODEJS_TIMEOUT_ERROR_CODES: string[]; diff --git a/node_modules/@smithy/service-error-classification/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/service-error-classification/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..8a66fd6 --- /dev/null +++ b/node_modules/@smithy/service-error-classification/dist-types/ts3.4/index.d.ts @@ -0,0 +1,19 @@ +import { SdkError } from "@smithy/types"; +export declare const isRetryableByTrait: (error: SdkError) => boolean; +/** + * @deprecated use isClockSkewCorrectedError. This is only used in deprecated code. + */ +export declare const isClockSkewError: (error: SdkError) => boolean; +/** + * @returns whether the error resulted in a systemClockOffset aka clock skew correction. + */ +export declare const isClockSkewCorrectedError: (error: SdkError) => true | undefined; +export declare const isThrottlingError: (error: SdkError) => boolean; +/** + * Though NODEJS_TIMEOUT_ERROR_CODES are platform specific, they are + * included here because there is an error scenario with unknown root + * cause where the NodeHttpHandler does not decorate the Error with + * the name "TimeoutError" to be checked by the TRANSIENT_ERROR_CODES condition. + */ +export declare const isTransientError: (error: SdkError) => boolean; +export declare const isServerError: (error: SdkError) => boolean; diff --git a/node_modules/@smithy/service-error-classification/package.json b/node_modules/@smithy/service-error-classification/package.json new file mode 100644 index 0000000..c87881d --- /dev/null +++ b/node_modules/@smithy/service-error-classification/package.json @@ -0,0 +1,59 @@ +{ + "name": "@smithy/service-error-classification", + "version": "2.1.5", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline service-error-classification", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/service-error-classification", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/service-error-classification" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + }, + "dependencies": { + "@smithy/types": "^2.12.0" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/LICENSE b/node_modules/@smithy/shared-ini-file-loader/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/README.md b/node_modules/@smithy/shared-ini-file-loader/README.md new file mode 100644 index 0000000..45a4b2e --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/README.md @@ -0,0 +1,105 @@ +# @smithy/shared-ini-file-loader + +[![NPM version](https://img.shields.io/npm/v/@smithy/shared-ini-file-loader/latest.svg)](https://www.npmjs.com/package/@smithy/shared-ini-file-loader) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/shared-ini-file-loader.svg)](https://www.npmjs.com/package/@smithy/shared-ini-file-loader) + +## AWS Shared Configuration File Loader + +This module provides a function that reads from AWS SDK configuration files and +returns a promise that will resolve with a hash of the parsed contents of the +AWS credentials file and of the AWS config file. Given the [sample +files](#sample-files) below, the promise returned by `loadSharedConfigFiles` +would resolve with: + +```javascript +{ + configFile: { + 'default': { + aws_access_key_id: 'foo', + aws_secret_access_key: 'bar', + }, + dev: { + aws_access_key_id: 'foo1', + aws_secret_access_key: 'bar1', + }, + prod: { + aws_access_key_id: 'foo2', + aws_secret_access_key: 'bar2', + }, + 'testing host': { + aws_access_key_id: 'foo4', + aws_secret_access_key: 'bar4', + } + }, + credentialsFile: { + 'default': { + aws_access_key_id: 'foo', + aws_secret_access_key: 'bar', + }, + dev: { + aws_access_key_id: 'foo1', + aws_secret_access_key: 'bar1', + }, + prod: { + aws_access_key_id: 'foo2', + aws_secret_access_key: 'bar2', + } + }, +} +``` + +If a file is not found, its key (`configFile` or `credentialsFile`) will instead +have a value of an empty object. + +## Supported configuration + +You may customize how the files are loaded by providing an options hash to the +`loadSharedConfigFiles` function. The following options are supported: + +- `filepath` - The path to the shared credentials file. If not specified, the + provider will use the value in the `AWS_SHARED_CREDENTIALS_FILE` environment + variable or a default of `~/.aws/credentials`. +- `configFilepath` - The path to the shared config file. If not specified, the + provider will use the value in the `AWS_CONFIG_FILE` environment variable or a + default of `~/.aws/config`. +- `ignoreCache` - The provider will normally cache the contents of the files it + loads. This option will force the provider to reload the files from disk. + Defaults to `false`. + +## Sample files + +### `~/.aws/credentials` + +```ini +[default] +aws_access_key_id=foo +aws_secret_access_key=bar + +[dev] +aws_access_key_id=foo2 +aws_secret_access_key=bar2 + +[prod] +aws_access_key_id=foo3 +aws_secret_access_key=bar3 +``` + +### `~/.aws/config` + +```ini +[default] +aws_access_key_id=foo +aws_secret_access_key=bar + +[profile dev] +aws_access_key_id=foo2 +aws_secret_access_key=bar2 + +[profile prod] +aws_access_key_id=foo3 +aws_secret_access_key=bar3 + +[profile "testing host"] +aws_access_key_id=foo4 +aws_secret_access_key=bar4 +``` diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigData.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigData.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigData.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigFilepath.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigFilepath.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigFilepath.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getCredentialsFilepath.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getCredentialsFilepath.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getCredentialsFilepath.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js new file mode 100644 index 0000000..2a4f737 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getHomeDir = void 0; +const os_1 = require("os"); +const path_1 = require("path"); +const homeDirCache = {}; +const getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; + } + return "DEFAULT"; +}; +const getHomeDir = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); + return homeDirCache[homeDirCacheKey]; +}; +exports.getHomeDir = getHomeDir; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getProfileName.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getProfileName.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getProfileName.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js new file mode 100644 index 0000000..30d97b3 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getSSOTokenFilepath = void 0; +const crypto_1 = require("crypto"); +const path_1 = require("path"); +const getHomeDir_1 = require("./getHomeDir"); +const getSSOTokenFilepath = (id) => { + const hasher = (0, crypto_1.createHash)("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); +}; +exports.getSSOTokenFilepath = getSSOTokenFilepath; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js new file mode 100644 index 0000000..688accb --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getSSOTokenFromFile = void 0; +const fs_1 = require("fs"); +const getSSOTokenFilepath_1 = require("./getSSOTokenFilepath"); +const { readFile } = fs_1.promises; +const getSSOTokenFromFile = async (id) => { + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); +}; +exports.getSSOTokenFromFile = getSSOTokenFromFile; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSsoSessionData.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSsoSessionData.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSsoSessionData.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js new file mode 100644 index 0000000..db64ff7 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js @@ -0,0 +1,190 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, + DEFAULT_PROFILE: () => DEFAULT_PROFILE, + ENV_PROFILE: () => ENV_PROFILE, + getProfileName: () => getProfileName, + loadSharedConfigFiles: () => loadSharedConfigFiles, + loadSsoSessionData: () => loadSsoSessionData, + parseKnownFiles: () => parseKnownFiles +}); +module.exports = __toCommonJS(src_exports); +__reExport(src_exports, require("././getHomeDir"), module.exports); + +// src/getProfileName.ts +var ENV_PROFILE = "AWS_PROFILE"; +var DEFAULT_PROFILE = "default"; +var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); + +// src/index.ts +__reExport(src_exports, require("././getSSOTokenFilepath"), module.exports); +__reExport(src_exports, require("././getSSOTokenFromFile"), module.exports); + +// src/getConfigData.ts +var import_types = require("@smithy/types"); +var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; + } + return Object.values(import_types.IniSectionType).includes(key.substring(0, indexOfSeparator)); +}).reduce( + (acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === import_types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; + }, + { + // Populate default profile, if present. + ...data.default && { default: data.default } + } +), "getConfigData"); + +// src/getConfigFilepath.ts +var import_path = require("path"); +var import_getHomeDir = require("././getHomeDir"); +var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; +var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath"); + +// src/getCredentialsFilepath.ts + +var import_getHomeDir2 = require("././getHomeDir"); +var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; +var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath"); + +// src/parseIni.ts + +var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; +var profileNameBlockList = ["__proto__", "profile __proto__"]; +var parseIni = /* @__PURE__ */ __name((iniData) => { + const map = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = void 0; + currentSubSection = void 0; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(import_types.IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } + } else { + currentSection = sectionName; + } + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); + } + } else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim() + ]; + if (value === "") { + currentSubSection = name; + } else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = void 0; + } + map[currentSection] = map[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map[currentSection][key] = value; + } + } + } + } + return map; +}, "parseIni"); + +// src/loadSharedConfigFiles.ts +var import_slurpFile = require("././slurpFile"); +var swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); +var CONFIG_PREFIX_SEPARATOR = "."; +var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const parsedFiles = await Promise.all([ + (0, import_slurpFile.slurpFile)(configFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).then(getConfigData).catch(swallowError), + (0, import_slurpFile.slurpFile)(filepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).catch(swallowError) + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1] + }; +}, "loadSharedConfigFiles"); + +// src/getSsoSessionData.ts + +var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); + +// src/loadSsoSessionData.ts +var import_slurpFile2 = require("././slurpFile"); +var swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); +var loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); + +// src/mergeConfigFiles.ts +var mergeConfigFiles = /* @__PURE__ */ __name((...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== void 0) { + Object.assign(merged[key], values); + } else { + merged[key] = values; + } + } + } + return merged; +}, "mergeConfigFiles"); + +// src/parseKnownFiles.ts +var parseKnownFiles = /* @__PURE__ */ __name(async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); +}, "parseKnownFiles"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + getHomeDir, + ENV_PROFILE, + DEFAULT_PROFILE, + getProfileName, + getSSOTokenFilepath, + getSSOTokenFromFile, + CONFIG_PREFIX_SEPARATOR, + loadSharedConfigFiles, + loadSsoSessionData, + parseKnownFiles +}); + diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSharedConfigFiles.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSharedConfigFiles.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSharedConfigFiles.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/mergeConfigFiles.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/mergeConfigFiles.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/mergeConfigFiles.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseKnownFiles.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseKnownFiles.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseKnownFiles.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js new file mode 100644 index 0000000..82d7d65 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.slurpFile = void 0; +const fs_1 = require("fs"); +const { readFile } = fs_1.promises; +const filePromisesHash = {}; +const slurpFile = (path, options) => { + if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { + filePromisesHash[path] = readFile(path, "utf8"); + } + return filePromisesHash[path]; +}; +exports.slurpFile = slurpFile; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-cjs/types.js b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/types.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-cjs/types.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js new file mode 100644 index 0000000..4579286 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js @@ -0,0 +1,18 @@ +import { IniSectionType } from "@smithy/types"; +import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles"; +export const getConfigData = (data) => Object.entries(data) + .filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; + } + return Object.values(IniSectionType).includes(key.substring(0, indexOfSeparator)); +}) + .reduce((acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; +}, { + ...(data.default && { default: data.default }), +}); diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigFilepath.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigFilepath.js new file mode 100644 index 0000000..ca07c2d --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigFilepath.js @@ -0,0 +1,4 @@ +import { join } from "path"; +import { getHomeDir } from "./getHomeDir"; +export const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; +export const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || join(getHomeDir(), ".aws", "config"); diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/getCredentialsFilepath.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/getCredentialsFilepath.js new file mode 100644 index 0000000..393c0ae --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/getCredentialsFilepath.js @@ -0,0 +1,4 @@ +import { join } from "path"; +import { getHomeDir } from "./getHomeDir"; +export const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; +export const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || join(getHomeDir(), ".aws", "credentials"); diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/getHomeDir.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/getHomeDir.js new file mode 100644 index 0000000..58772af --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/getHomeDir.js @@ -0,0 +1,22 @@ +import { homedir } from "os"; +import { sep } from "path"; +const homeDirCache = {}; +const getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; + } + return "DEFAULT"; +}; +export const getHomeDir = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = homedir(); + return homeDirCache[homeDirCacheKey]; +}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileName.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileName.js new file mode 100644 index 0000000..acc29f0 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileName.js @@ -0,0 +1,3 @@ +export const ENV_PROFILE = "AWS_PROFILE"; +export const DEFAULT_PROFILE = "default"; +export const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFilepath.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFilepath.js new file mode 100644 index 0000000..a44b4ad --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFilepath.js @@ -0,0 +1,8 @@ +import { createHash } from "crypto"; +import { join } from "path"; +import { getHomeDir } from "./getHomeDir"; +export const getSSOTokenFilepath = (id) => { + const hasher = createHash("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return join(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`); +}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFromFile.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFromFile.js new file mode 100644 index 0000000..42659db --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFromFile.js @@ -0,0 +1,8 @@ +import { promises as fsPromises } from "fs"; +import { getSSOTokenFilepath } from "./getSSOTokenFilepath"; +const { readFile } = fsPromises; +export const getSSOTokenFromFile = async (id) => { + const ssoTokenFilepath = getSSOTokenFilepath(id); + const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); +}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/getSsoSessionData.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/getSsoSessionData.js new file mode 100644 index 0000000..f2df194 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/getSsoSessionData.js @@ -0,0 +1,5 @@ +import { IniSectionType } from "@smithy/types"; +import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles"; +export const getSsoSessionData = (data) => Object.entries(data) + .filter(([key]) => key.startsWith(IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) + .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/index.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/index.js new file mode 100644 index 0000000..3e8b2c7 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/index.js @@ -0,0 +1,8 @@ +export * from "./getHomeDir"; +export * from "./getProfileName"; +export * from "./getSSOTokenFilepath"; +export * from "./getSSOTokenFromFile"; +export * from "./loadSharedConfigFiles"; +export * from "./loadSsoSessionData"; +export * from "./parseKnownFiles"; +export * from "./types"; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js new file mode 100644 index 0000000..5456ec4 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js @@ -0,0 +1,27 @@ +import { getConfigData } from "./getConfigData"; +import { getConfigFilepath } from "./getConfigFilepath"; +import { getCredentialsFilepath } from "./getCredentialsFilepath"; +import { parseIni } from "./parseIni"; +import { slurpFile } from "./slurpFile"; +const swallowError = () => ({}); +export const CONFIG_PREFIX_SEPARATOR = "."; +export const loadSharedConfigFiles = async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const parsedFiles = await Promise.all([ + slurpFile(configFilepath, { + ignoreCache: init.ignoreCache, + }) + .then(parseIni) + .then(getConfigData) + .catch(swallowError), + slurpFile(filepath, { + ignoreCache: init.ignoreCache, + }) + .then(parseIni) + .catch(swallowError), + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1], + }; +}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSsoSessionData.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSsoSessionData.js new file mode 100644 index 0000000..3bd730b --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSsoSessionData.js @@ -0,0 +1,9 @@ +import { getConfigFilepath } from "./getConfigFilepath"; +import { getSsoSessionData } from "./getSsoSessionData"; +import { parseIni } from "./parseIni"; +import { slurpFile } from "./slurpFile"; +const swallowError = () => ({}); +export const loadSsoSessionData = async (init = {}) => slurpFile(init.configFilepath ?? getConfigFilepath()) + .then(parseIni) + .then(getSsoSessionData) + .catch(swallowError); diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/mergeConfigFiles.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/mergeConfigFiles.js new file mode 100644 index 0000000..58576f7 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/mergeConfigFiles.js @@ -0,0 +1,14 @@ +export const mergeConfigFiles = (...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== undefined) { + Object.assign(merged[key], values); + } + else { + merged[key] = values; + } + } + } + return merged; +}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js new file mode 100644 index 0000000..7af4a6a --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js @@ -0,0 +1,52 @@ +import { IniSectionType } from "@smithy/types"; +import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles"; +const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; +const profileNameBlockList = ["__proto__", "profile __proto__"]; +export const parseIni = (iniData) => { + const map = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = undefined; + currentSubSection = undefined; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } + } + else { + currentSection = sectionName; + } + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); + } + } + else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim(), + ]; + if (value === "") { + currentSubSection = name; + } + else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = undefined; + } + map[currentSection] = map[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map[currentSection][key] = value; + } + } + } + } + return map; +}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/parseKnownFiles.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/parseKnownFiles.js new file mode 100644 index 0000000..4920e28 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/parseKnownFiles.js @@ -0,0 +1,6 @@ +import { loadSharedConfigFiles } from "./loadSharedConfigFiles"; +import { mergeConfigFiles } from "./mergeConfigFiles"; +export const parseKnownFiles = async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); +}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/slurpFile.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/slurpFile.js new file mode 100644 index 0000000..7b360cc --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/slurpFile.js @@ -0,0 +1,9 @@ +import { promises as fsPromises } from "fs"; +const { readFile } = fsPromises; +const filePromisesHash = {}; +export const slurpFile = (path, options) => { + if (!filePromisesHash[path] || options?.ignoreCache) { + filePromisesHash[path] = readFile(path, "utf8"); + } + return filePromisesHash[path]; +}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-es/types.js b/node_modules/@smithy/shared-ini-file-loader/dist-es/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-es/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigData.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigData.d.ts new file mode 100644 index 0000000..4259831 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigData.d.ts @@ -0,0 +1,8 @@ +import { ParsedIniData } from "@smithy/types"; +/** + * Returns the config data from parsed ini data. + * * Returns data for `default` + * * Returns profile name without prefix. + * * Returns non-profiles as is. + */ +export declare const getConfigData: (data: ParsedIniData) => ParsedIniData; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigFilepath.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigFilepath.d.ts new file mode 100644 index 0000000..1d123be --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigFilepath.d.ts @@ -0,0 +1,2 @@ +export declare const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; +export declare const getConfigFilepath: () => string; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/getCredentialsFilepath.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/getCredentialsFilepath.d.ts new file mode 100644 index 0000000..26fda4a --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/getCredentialsFilepath.d.ts @@ -0,0 +1,2 @@ +export declare const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; +export declare const getCredentialsFilepath: () => string; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/getHomeDir.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/getHomeDir.d.ts new file mode 100644 index 0000000..5d15bf1 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/getHomeDir.d.ts @@ -0,0 +1,6 @@ +/** + * Get the HOME directory for the current runtime. + * + * @internal + */ +export declare const getHomeDir: () => string; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/getProfileName.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/getProfileName.d.ts new file mode 100644 index 0000000..0cccd92 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/getProfileName.d.ts @@ -0,0 +1,5 @@ +export declare const ENV_PROFILE = "AWS_PROFILE"; +export declare const DEFAULT_PROFILE = "default"; +export declare const getProfileName: (init: { + profile?: string; +}) => string; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFilepath.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFilepath.d.ts new file mode 100644 index 0000000..451303d --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFilepath.d.ts @@ -0,0 +1,4 @@ +/** + * Returns the filepath of the file where SSO token is stored. + */ +export declare const getSSOTokenFilepath: (id: string) => string; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFromFile.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFromFile.d.ts new file mode 100644 index 0000000..5206492 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFromFile.d.ts @@ -0,0 +1,44 @@ +/** + * Cached SSO token retrieved from SSO login flow. + */ +export interface SSOToken { + /** + * A base64 encoded string returned by the sso-oidc service. + */ + accessToken: string; + /** + * The expiration time of the accessToken as an RFC 3339 formatted timestamp. + */ + expiresAt: string; + /** + * The token used to obtain an access token in the event that the accessToken is invalid or expired. + */ + refreshToken?: string; + /** + * The unique identifier string for each client. The client ID generated when performing the registration + * portion of the OIDC authorization flow. This is used to refresh the accessToken. + */ + clientId?: string; + /** + * A secret string generated when performing the registration portion of the OIDC authorization flow. + * This is used to refresh the accessToken. + */ + clientSecret?: string; + /** + * The expiration time of the client registration (clientId and clientSecret) as an RFC 3339 formatted timestamp. + */ + registrationExpiresAt?: string; + /** + * The configured sso_region for the profile that credentials are being resolved for. + */ + region?: string; + /** + * The configured sso_start_url for the profile that credentials are being resolved for. + */ + startUrl?: string; +} +/** + * @param id - can be either a start URL or the SSO session name. + * Returns the SSO token from the file system. + */ +export declare const getSSOTokenFromFile: (id: string) => Promise; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/getSsoSessionData.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/getSsoSessionData.d.ts new file mode 100644 index 0000000..9be020f --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/getSsoSessionData.d.ts @@ -0,0 +1,6 @@ +import { ParsedIniData } from "@smithy/types"; +/** + * Returns the sso-session data from parsed ini data by reading + * ssoSessionName after sso-session prefix including/excluding quotes + */ +export declare const getSsoSessionData: (data: ParsedIniData) => ParsedIniData; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/index.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/index.d.ts new file mode 100644 index 0000000..3e8b2c7 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/index.d.ts @@ -0,0 +1,8 @@ +export * from "./getHomeDir"; +export * from "./getProfileName"; +export * from "./getSSOTokenFilepath"; +export * from "./getSSOTokenFromFile"; +export * from "./loadSharedConfigFiles"; +export * from "./loadSsoSessionData"; +export * from "./parseKnownFiles"; +export * from "./types"; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts new file mode 100644 index 0000000..e82f41e --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts @@ -0,0 +1,22 @@ +import { SharedConfigFiles } from "@smithy/types"; +export interface SharedConfigInit { + /** + * The path at which to locate the ini credentials file. Defaults to the + * value of the `AWS_SHARED_CREDENTIALS_FILE` environment variable (if + * defined) or `~/.aws/credentials` otherwise. + */ + filepath?: string; + /** + * The path at which to locate the ini config file. Defaults to the value of + * the `AWS_CONFIG_FILE` environment variable (if defined) or + * `~/.aws/config` otherwise. + */ + configFilepath?: string; + /** + * Configuration files are normally cached after the first time they are loaded. When this + * property is set, the provider will always reload any configuration files loaded before. + */ + ignoreCache?: boolean; +} +export declare const CONFIG_PREFIX_SEPARATOR = "."; +export declare const loadSharedConfigFiles: (init?: SharedConfigInit) => Promise; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSsoSessionData.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSsoSessionData.d.ts new file mode 100644 index 0000000..c450dcc --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSsoSessionData.d.ts @@ -0,0 +1,10 @@ +import { ParsedIniData } from "@smithy/types"; +export interface SsoSessionInit { + /** + * The path at which to locate the ini config file. Defaults to the value of + * the `AWS_CONFIG_FILE` environment variable (if defined) or + * `~/.aws/config` otherwise. + */ + configFilepath?: string; +} +export declare const loadSsoSessionData: (init?: SsoSessionInit) => Promise; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/mergeConfigFiles.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/mergeConfigFiles.d.ts new file mode 100644 index 0000000..46b8965 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/mergeConfigFiles.d.ts @@ -0,0 +1,7 @@ +import { ParsedIniData } from "@smithy/types"; +/** + * Merge multiple profile config files such that settings each file are kept together + * + * @internal + */ +export declare const mergeConfigFiles: (...files: ParsedIniData[]) => ParsedIniData; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/parseIni.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/parseIni.d.ts new file mode 100644 index 0000000..0ae5851 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/parseIni.d.ts @@ -0,0 +1,2 @@ +import { ParsedIniData } from "@smithy/types"; +export declare const parseIni: (iniData: string) => ParsedIniData; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/parseKnownFiles.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/parseKnownFiles.d.ts new file mode 100644 index 0000000..fe71e1d --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/parseKnownFiles.d.ts @@ -0,0 +1,15 @@ +import { ParsedIniData } from "@smithy/types"; +import { SharedConfigInit } from "./loadSharedConfigFiles"; +export interface SourceProfileInit extends SharedConfigInit { + /** + * The configuration profile to use. + */ + profile?: string; +} +/** + * Load profiles from credentials and config INI files and normalize them into a + * single profile list. + * + * @internal + */ +export declare const parseKnownFiles: (init: SourceProfileInit) => Promise; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/slurpFile.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/slurpFile.d.ts new file mode 100644 index 0000000..a3bc84c --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/slurpFile.d.ts @@ -0,0 +1,5 @@ +interface SlurpFileOptions { + ignoreCache?: boolean; +} +export declare const slurpFile: (path: string, options?: SlurpFileOptions) => Promise; +export {}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigData.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigData.d.ts new file mode 100644 index 0000000..c6b7588 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigData.d.ts @@ -0,0 +1,8 @@ +import { ParsedIniData } from "@smithy/types"; +/** + * Returns the config data from parsed ini data. + * * Returns data for `default` + * * Returns profile name without prefix. + * * Returns non-profiles as is. + */ +export declare const getConfigData: (data: ParsedIniData) => ParsedIniData; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigFilepath.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigFilepath.d.ts new file mode 100644 index 0000000..dc3699b --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigFilepath.d.ts @@ -0,0 +1,2 @@ +export declare const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; +export declare const getConfigFilepath: () => string; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getCredentialsFilepath.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getCredentialsFilepath.d.ts new file mode 100644 index 0000000..f2c95b4 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getCredentialsFilepath.d.ts @@ -0,0 +1,2 @@ +export declare const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; +export declare const getCredentialsFilepath: () => string; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getHomeDir.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getHomeDir.d.ts new file mode 100644 index 0000000..4c1bd7a --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getHomeDir.d.ts @@ -0,0 +1,6 @@ +/** + * Get the HOME directory for the current runtime. + * + * @internal + */ +export declare const getHomeDir: () => string; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getProfileName.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getProfileName.d.ts new file mode 100644 index 0000000..2ce43db --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getProfileName.d.ts @@ -0,0 +1,5 @@ +export declare const ENV_PROFILE = "AWS_PROFILE"; +export declare const DEFAULT_PROFILE = "default"; +export declare const getProfileName: (init: { + profile?: string; +}) => string; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFilepath.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFilepath.d.ts new file mode 100644 index 0000000..8ad16ce --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFilepath.d.ts @@ -0,0 +1,4 @@ +/** + * Returns the filepath of the file where SSO token is stored. + */ +export declare const getSSOTokenFilepath: (id: string) => string; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFromFile.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFromFile.d.ts new file mode 100644 index 0000000..35479a6 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFromFile.d.ts @@ -0,0 +1,44 @@ +/** + * Cached SSO token retrieved from SSO login flow. + */ +export interface SSOToken { + /** + * A base64 encoded string returned by the sso-oidc service. + */ + accessToken: string; + /** + * The expiration time of the accessToken as an RFC 3339 formatted timestamp. + */ + expiresAt: string; + /** + * The token used to obtain an access token in the event that the accessToken is invalid or expired. + */ + refreshToken?: string; + /** + * The unique identifier string for each client. The client ID generated when performing the registration + * portion of the OIDC authorization flow. This is used to refresh the accessToken. + */ + clientId?: string; + /** + * A secret string generated when performing the registration portion of the OIDC authorization flow. + * This is used to refresh the accessToken. + */ + clientSecret?: string; + /** + * The expiration time of the client registration (clientId and clientSecret) as an RFC 3339 formatted timestamp. + */ + registrationExpiresAt?: string; + /** + * The configured sso_region for the profile that credentials are being resolved for. + */ + region?: string; + /** + * The configured sso_start_url for the profile that credentials are being resolved for. + */ + startUrl?: string; +} +/** + * @param id - can be either a start URL or the SSO session name. + * Returns the SSO token from the file system. + */ +export declare const getSSOTokenFromFile: (id: string) => Promise; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSsoSessionData.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSsoSessionData.d.ts new file mode 100644 index 0000000..04a1a99 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSsoSessionData.d.ts @@ -0,0 +1,6 @@ +import { ParsedIniData } from "@smithy/types"; +/** + * Returns the sso-session data from parsed ini data by reading + * ssoSessionName after sso-session prefix including/excluding quotes + */ +export declare const getSsoSessionData: (data: ParsedIniData) => ParsedIniData; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..12ed3bb --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/index.d.ts @@ -0,0 +1,8 @@ +export * from "./getHomeDir"; +export * from "./getProfileName"; +export * from "./getSSOTokenFilepath"; +export * from "./getSSOTokenFromFile"; +export * from "./loadSharedConfigFiles"; +export * from "./loadSsoSessionData"; +export * from "./parseKnownFiles"; +export * from "./types"; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts new file mode 100644 index 0000000..45613c7 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts @@ -0,0 +1,22 @@ +import { SharedConfigFiles } from "@smithy/types"; +export interface SharedConfigInit { + /** + * The path at which to locate the ini credentials file. Defaults to the + * value of the `AWS_SHARED_CREDENTIALS_FILE` environment variable (if + * defined) or `~/.aws/credentials` otherwise. + */ + filepath?: string; + /** + * The path at which to locate the ini config file. Defaults to the value of + * the `AWS_CONFIG_FILE` environment variable (if defined) or + * `~/.aws/config` otherwise. + */ + configFilepath?: string; + /** + * Configuration files are normally cached after the first time they are loaded. When this + * property is set, the provider will always reload any configuration files loaded before. + */ + ignoreCache?: boolean; +} +export declare const CONFIG_PREFIX_SEPARATOR = "."; +export declare const loadSharedConfigFiles: (init?: SharedConfigInit) => Promise; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSsoSessionData.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSsoSessionData.d.ts new file mode 100644 index 0000000..df37f10 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSsoSessionData.d.ts @@ -0,0 +1,10 @@ +import { ParsedIniData } from "@smithy/types"; +export interface SsoSessionInit { + /** + * The path at which to locate the ini config file. Defaults to the value of + * the `AWS_CONFIG_FILE` environment variable (if defined) or + * `~/.aws/config` otherwise. + */ + configFilepath?: string; +} +export declare const loadSsoSessionData: (init?: SsoSessionInit) => Promise; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/mergeConfigFiles.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/mergeConfigFiles.d.ts new file mode 100644 index 0000000..f94e725 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/mergeConfigFiles.d.ts @@ -0,0 +1,7 @@ +import { ParsedIniData } from "@smithy/types"; +/** + * Merge multiple profile config files such that settings each file are kept together + * + * @internal + */ +export declare const mergeConfigFiles: (...files: ParsedIniData[]) => ParsedIniData; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseIni.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseIni.d.ts new file mode 100644 index 0000000..4e58d0e --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseIni.d.ts @@ -0,0 +1,2 @@ +import { ParsedIniData } from "@smithy/types"; +export declare const parseIni: (iniData: string) => ParsedIniData; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseKnownFiles.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseKnownFiles.d.ts new file mode 100644 index 0000000..61ca0b8 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseKnownFiles.d.ts @@ -0,0 +1,15 @@ +import { ParsedIniData } from "@smithy/types"; +import { SharedConfigInit } from "./loadSharedConfigFiles"; +export interface SourceProfileInit extends SharedConfigInit { + /** + * The configuration profile to use. + */ + profile?: string; +} +/** + * Load profiles from credentials and config INI files and normalize them into a + * single profile list. + * + * @internal + */ +export declare const parseKnownFiles: (init: SourceProfileInit) => Promise; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/slurpFile.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/slurpFile.d.ts new file mode 100644 index 0000000..33e7a0c --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/slurpFile.d.ts @@ -0,0 +1,5 @@ +interface SlurpFileOptions { + ignoreCache?: boolean; +} +export declare const slurpFile: (path: string, options?: SlurpFileOptions) => Promise; +export {}; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/types.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/types.d.ts new file mode 100644 index 0000000..ca63085 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/types.d.ts @@ -0,0 +1,13 @@ +import { ParsedIniData as __ParsedIniData, Profile as __Profile, SharedConfigFiles as __SharedConfigFiles } from "@smithy/types"; +/** + * @deprecated Use Profile from "@smithy/types" instead + */ +export type Profile = __Profile; +/** + * @deprecated Use ParsedIniData from "@smithy/types" instead + */ +export type ParsedIniData = __ParsedIniData; +/** + * @deprecated Use SharedConfigFiles from "@smithy/types" instead + */ +export type SharedConfigFiles = __SharedConfigFiles; diff --git a/node_modules/@smithy/shared-ini-file-loader/dist-types/types.d.ts b/node_modules/@smithy/shared-ini-file-loader/dist-types/types.d.ts new file mode 100644 index 0000000..8f92904 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/dist-types/types.d.ts @@ -0,0 +1,13 @@ +import { ParsedIniData as __ParsedIniData, Profile as __Profile, SharedConfigFiles as __SharedConfigFiles } from "@smithy/types"; +/** + * @deprecated Use Profile from "@smithy/types" instead + */ +export type Profile = __Profile; +/** + * @deprecated Use ParsedIniData from "@smithy/types" instead + */ +export type ParsedIniData = __ParsedIniData; +/** + * @deprecated Use SharedConfigFiles from "@smithy/types" instead + */ +export type SharedConfigFiles = __SharedConfigFiles; diff --git a/node_modules/@smithy/shared-ini-file-loader/package.json b/node_modules/@smithy/shared-ini-file-loader/package.json new file mode 100644 index 0000000..e5be8c4 --- /dev/null +++ b/node_modules/@smithy/shared-ini-file-loader/package.json @@ -0,0 +1,72 @@ +{ + "name": "@smithy/shared-ini-file-loader", + "version": "2.4.0", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline shared-ini-file-loader", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "extract:docs": "api-extractor run --local", + "test": "yarn g:jest" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "browser": { + "./dist-es/getSSOTokenFromFile": false, + "./dist-es/slurpFile": false + }, + "react-native": { + "./dist-cjs/getSSOTokenFromFile": false, + "./dist-cjs/slurpFile": false, + "./dist-es/getSSOTokenFromFile": false, + "./dist-es/slurpFile": false + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/shared-ini-file-loader", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/shared-ini-file-loader" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/LICENSE b/node_modules/@smithy/signature-v4/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/signature-v4/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/README.md b/node_modules/@smithy/signature-v4/README.md new file mode 100644 index 0000000..3bc9a17 --- /dev/null +++ b/node_modules/@smithy/signature-v4/README.md @@ -0,0 +1,11 @@ +# @smithy/signature-v4 + +[![NPM version](https://img.shields.io/npm/v/@smithy/signature-v4/latest.svg)](https://www.npmjs.com/package/@smithy/signature-v4) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/signature-v4.svg)](https://www.npmjs.com/package/@smithy/signature-v4) + +This package contains an implementation of the [AWS Signature Version 4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) +authentication scheme. + +It is internal to Smithy-TypeScript generated clients, and not generally intended for standalone usage outside this context. + +For custom usage, inspect the interface of the SignatureV4 class. diff --git a/node_modules/@smithy/signature-v4/dist-cjs/SignatureV4.js b/node_modules/@smithy/signature-v4/dist-cjs/SignatureV4.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/SignatureV4.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/cloneRequest.js b/node_modules/@smithy/signature-v4/dist-cjs/cloneRequest.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/cloneRequest.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/constants.js b/node_modules/@smithy/signature-v4/dist-cjs/constants.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/constants.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/credentialDerivation.js b/node_modules/@smithy/signature-v4/dist-cjs/credentialDerivation.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/credentialDerivation.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalHeaders.js b/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalHeaders.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalHeaders.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalQuery.js b/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalQuery.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalQuery.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/getPayloadHash.js b/node_modules/@smithy/signature-v4/dist-cjs/getPayloadHash.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/getPayloadHash.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/headerUtil.js b/node_modules/@smithy/signature-v4/dist-cjs/headerUtil.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/headerUtil.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/index.js b/node_modules/@smithy/signature-v4/dist-cjs/index.js new file mode 100644 index 0000000..fd7e634 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/index.js @@ -0,0 +1,467 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + SignatureV4: () => SignatureV4, + clearCredentialCache: () => clearCredentialCache, + createScope: () => createScope, + getCanonicalHeaders: () => getCanonicalHeaders, + getCanonicalQuery: () => getCanonicalQuery, + getPayloadHash: () => getPayloadHash, + getSigningKey: () => getSigningKey, + moveHeadersToQuery: () => moveHeadersToQuery, + prepareRequest: () => prepareRequest +}); +module.exports = __toCommonJS(src_exports); + +// src/SignatureV4.ts +var import_eventstream_codec = require("@smithy/eventstream-codec"); + +var import_util_middleware = require("@smithy/util-middleware"); +var import_util_utf83 = require("@smithy/util-utf8"); + +// src/constants.ts +var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; +var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; +var AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; +var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; +var EXPIRES_QUERY_PARAM = "X-Amz-Expires"; +var SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; +var TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; +var AUTH_HEADER = "authorization"; +var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); +var DATE_HEADER = "date"; +var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; +var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); +var SHA256_HEADER = "x-amz-content-sha256"; +var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); +var ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true +}; +var PROXY_HEADER_PATTERN = /^proxy-/; +var SEC_HEADER_PATTERN = /^sec-/; +var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; +var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; +var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; +var MAX_CACHE_SIZE = 50; +var KEY_TYPE_IDENTIFIER = "aws4_request"; +var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + +// src/credentialDerivation.ts +var import_util_hex_encoding = require("@smithy/util-hex-encoding"); +var import_util_utf8 = require("@smithy/util-utf8"); +var signingKeyCache = {}; +var cacheQueue = []; +var createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); +var getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return signingKeyCache[cacheKey] = key; +}, "getSigningKey"); +var clearCredentialCache = /* @__PURE__ */ __name(() => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); +}, "clearCredentialCache"); +var hmac = /* @__PURE__ */ __name((ctor, secret, data) => { + const hash = new ctor(secret); + hash.update((0, import_util_utf8.toUint8Array)(data)); + return hash.digest(); +}, "hmac"); + +// src/getCanonicalHeaders.ts +var getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == void 0) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || (unsignableHeaders == null ? void 0 : unsignableHeaders.has(canonicalHeaderName)) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; +}, "getCanonicalHeaders"); + +// src/getCanonicalQuery.ts +var import_util_uri_escape = require("@smithy/util-uri-escape"); +var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query).sort()) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + keys.push(key); + const value = query[key]; + if (typeof value === "string") { + serialized[key] = `${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value)}`; + } else if (Array.isArray(value)) { + serialized[key] = value.slice(0).reduce( + (encoded, value2) => encoded.concat([`${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value2)}`]), + [] + ).sort().join("&"); + } + } + return keys.map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); +}, "getCanonicalQuery"); + +// src/getPayloadHash.ts +var import_is_array_buffer = require("@smithy/is-array-buffer"); + +var import_util_utf82 = require("@smithy/util-utf8"); +var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == void 0) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } else if (typeof body === "string" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update((0, import_util_utf82.toUint8Array)(body)); + return (0, import_util_hex_encoding.toHex)(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; +}, "getPayloadHash"); + +// src/headerUtil.ts +var hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; +}, "hasHeader"); + +// src/cloneRequest.ts +var cloneRequest = /* @__PURE__ */ __name(({ headers, query, ...rest }) => ({ + ...rest, + headers: { ...headers }, + query: query ? cloneQuery(query) : void 0 +}), "cloneRequest"); +var cloneQuery = /* @__PURE__ */ __name((query) => Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; +}, {}), "cloneQuery"); + +// src/moveHeadersToQuery.ts +var moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => { + var _a; + const { headers, query = {} } = typeof request.clone === "function" ? request.clone() : cloneRequest(request); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !((_a = options.unhoistableHeaders) == null ? void 0 : _a.has(lname))) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request, + headers, + query + }; +}, "moveHeadersToQuery"); + +// src/prepareRequest.ts +var prepareRequest = /* @__PURE__ */ __name((request) => { + request = typeof request.clone === "function" ? request.clone() : cloneRequest(request); + for (const headerName of Object.keys(request.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; + } + } + return request; +}, "prepareRequest"); + +// src/utilDate.ts +var iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); +var toDate = /* @__PURE__ */ __name((time) => { + if (typeof time === "number") { + return new Date(time * 1e3); + } + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1e3); + } + return new Date(time); + } + return time; +}, "toDate"); + +// src/SignatureV4.ts +var _SignatureV4 = class _SignatureV4 { + constructor({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath = true + }) { + this.headerMarshaller = new import_eventstream_codec.HeaderMarshaller(import_util_utf83.toUtf8, import_util_utf83.fromUtf8); + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = (0, import_util_middleware.normalizeProvider)(region); + this.credentialProvider = (0, import_util_middleware.normalizeProvider)(credentials); + } + async presign(originalRequest, options = {}) { + const { + signingDate = /* @__PURE__ */ new Date(), + expiresIn = 3600, + unsignableHeaders, + unhoistableHeaders, + signableHeaders, + signingRegion, + signingService + } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { longDate, shortDate } = formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject( + "Signature version 4 presigned URLs must have an expiration date less than one week in the future" + ); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders }); + if (credentials.sessionToken) { + request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request.query[AMZ_DATE_QUERY_PARAM] = longDate; + request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + request.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders); + request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature( + longDate, + scope, + this.getSigningKey(credentials, region, shortDate, signingService), + this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)) + ); + return request; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } else if (toSign.message) { + return this.signMessage(toSign, options); + } else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? await this.regionProvider(); + const { shortDate, longDate } = formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash = new this.sha256(); + hash.update(headers); + const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { + const promise = this.signEvent( + { + headers: this.headerMarshaller.format(signableMessage.message.headers), + payload: signableMessage.message.body + }, + { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature + } + ); + return promise.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { shortDate } = formatDate(signingDate); + const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash.update((0, import_util_utf83.toUint8Array)(stringToSign)); + return (0, import_util_hex_encoding.toHex)(await hash.digest()); + } + async signRequest(requestToSign, { + signingDate = /* @__PURE__ */ new Date(), + signableHeaders, + unsignableHeaders, + signingRegion, + signingService + } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const request = prepareRequest(requestToSign); + const { longDate, shortDate } = formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request, this.sha256); + if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) { + request.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + const signature = await this.getSignature( + longDate, + scope, + this.getSigningKey(credentials, region, shortDate, signingService), + this.createCanonicalRequest(request, canonicalHeaders, payloadHash) + ); + request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; + return request; + } + createCanonicalRequest(request, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request.method} +${this.getCanonicalPath(request)} +${getCanonicalQuery(request)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest) { + const hash = new this.sha256(); + hash.update((0, import_util_utf83.toUint8Array)(canonicalRequest)); + const hashedRequest = await hash.digest(); + return `${ALGORITHM_IDENTIFIER} +${longDate} +${credentialScope} +${(0, import_util_hex_encoding.toHex)(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path.split("/")) { + if ((pathSegment == null ? void 0 : pathSegment.length) === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${(path == null ? void 0 : path.startsWith("/")) ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && (path == null ? void 0 : path.endsWith("/")) ? "/" : ""}`; + const doubleEncoded = encodeURIComponent(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest); + const hash = new this.sha256(await keyPromise); + hash.update((0, import_util_utf83.toUint8Array)(stringToSign)); + return (0, import_util_hex_encoding.toHex)(await hash.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339) + typeof credentials.accessKeyId !== "string" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339) + typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } + } +}; +__name(_SignatureV4, "SignatureV4"); +var SignatureV4 = _SignatureV4; +var formatDate = /* @__PURE__ */ __name((now) => { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8) + }; +}, "formatDate"); +var getCanonicalHeaderList = /* @__PURE__ */ __name((headers) => Object.keys(headers).sort().join(";"), "getCanonicalHeaderList"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + getCanonicalHeaders, + getCanonicalQuery, + getPayloadHash, + moveHeadersToQuery, + prepareRequest, + SignatureV4, + createScope, + getSigningKey, + clearCredentialCache +}); + diff --git a/node_modules/@smithy/signature-v4/dist-cjs/moveHeadersToQuery.js b/node_modules/@smithy/signature-v4/dist-cjs/moveHeadersToQuery.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/moveHeadersToQuery.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/prepareRequest.js b/node_modules/@smithy/signature-v4/dist-cjs/prepareRequest.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/prepareRequest.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/suite.fixture.js b/node_modules/@smithy/signature-v4/dist-cjs/suite.fixture.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/suite.fixture.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-cjs/utilDate.js b/node_modules/@smithy/signature-v4/dist-cjs/utilDate.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-cjs/utilDate.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js b/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js new file mode 100644 index 0000000..1c7be1f --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js @@ -0,0 +1,190 @@ +import { HeaderMarshaller } from "@smithy/eventstream-codec"; +import { toHex } from "@smithy/util-hex-encoding"; +import { normalizeProvider } from "@smithy/util-middleware"; +import { fromUtf8, toUint8Array, toUtf8 } from "@smithy/util-utf8"; +import { ALGORITHM_IDENTIFIER, ALGORITHM_QUERY_PARAM, AMZ_DATE_HEADER, AMZ_DATE_QUERY_PARAM, AUTH_HEADER, CREDENTIAL_QUERY_PARAM, EVENT_ALGORITHM_IDENTIFIER, EXPIRES_QUERY_PARAM, MAX_PRESIGNED_TTL, SHA256_HEADER, SIGNATURE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, TOKEN_HEADER, TOKEN_QUERY_PARAM, } from "./constants"; +import { createScope, getSigningKey } from "./credentialDerivation"; +import { getCanonicalHeaders } from "./getCanonicalHeaders"; +import { getCanonicalQuery } from "./getCanonicalQuery"; +import { getPayloadHash } from "./getPayloadHash"; +import { hasHeader } from "./headerUtil"; +import { moveHeadersToQuery } from "./moveHeadersToQuery"; +import { prepareRequest } from "./prepareRequest"; +import { iso8601 } from "./utilDate"; +export class SignatureV4 { + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) { + this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8); + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = normalizeProvider(region); + this.credentialProvider = normalizeProvider(credentials); + } + async presign(originalRequest, options = {}) { + const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, signingRegion, signingService, } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? (await this.regionProvider()); + const { longDate, shortDate } = formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject("Signature version 4 presigned URLs" + " must have an expiration date less than one week in" + " the future"); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders }); + if (credentials.sessionToken) { + request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request.query[AMZ_DATE_QUERY_PARAM] = longDate; + request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + request.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders); + request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))); + return request; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } + else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } + else if (toSign.message) { + return this.signMessage(toSign, options); + } + else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? (await this.regionProvider()); + const { shortDate, longDate } = formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash = new this.sha256(); + hash.update(headers); + const hashedHeaders = toHex(await hash.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload, + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = new Date(), signingRegion, signingService }) { + const promise = this.signEvent({ + headers: this.headerMarshaller.format(signableMessage.message.headers), + payload: signableMessage.message.body, + }, { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature, + }); + return promise.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? (await this.regionProvider()); + const { shortDate } = formatDate(signingDate); + const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash.update(toUint8Array(stringToSign)); + return toHex(await hash.digest()); + } + async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? (await this.regionProvider()); + const request = prepareRequest(requestToSign); + const { longDate, shortDate } = formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request, this.sha256); + if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) { + request.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash)); + request.headers[AUTH_HEADER] = + `${ALGORITHM_IDENTIFIER} ` + + `Credential=${credentials.accessKeyId}/${scope}, ` + + `SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, ` + + `Signature=${signature}`; + return request; + } + createCanonicalRequest(request, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request.method} +${this.getCanonicalPath(request)} +${getCanonicalQuery(request)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest) { + const hash = new this.sha256(); + hash.update(toUint8Array(canonicalRequest)); + const hashedRequest = await hash.digest(); + return `${ALGORITHM_IDENTIFIER} +${longDate} +${credentialScope} +${toHex(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path.split("/")) { + if (pathSegment?.length === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } + else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`; + const doubleEncoded = encodeURIComponent(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest); + const hash = new this.sha256(await keyPromise); + hash.update(toUint8Array(stringToSign)); + return toHex(await hash.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || + typeof credentials.accessKeyId !== "string" || + typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } + } +} +const formatDate = (now) => { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8), + }; +}; +const getCanonicalHeaderList = (headers) => Object.keys(headers).sort().join(";"); diff --git a/node_modules/@smithy/signature-v4/dist-es/cloneRequest.js b/node_modules/@smithy/signature-v4/dist-es/cloneRequest.js new file mode 100644 index 0000000..f534646 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/cloneRequest.js @@ -0,0 +1,12 @@ +export const cloneRequest = ({ headers, query, ...rest }) => ({ + ...rest, + headers: { ...headers }, + query: query ? cloneQuery(query) : undefined, +}); +export const cloneQuery = (query) => Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param, + }; +}, {}); diff --git a/node_modules/@smithy/signature-v4/dist-es/constants.js b/node_modules/@smithy/signature-v4/dist-es/constants.js new file mode 100644 index 0000000..602728a --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/constants.js @@ -0,0 +1,43 @@ +export const ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; +export const CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; +export const AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; +export const SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; +export const EXPIRES_QUERY_PARAM = "X-Amz-Expires"; +export const SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; +export const TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; +export const REGION_SET_PARAM = "X-Amz-Region-Set"; +export const AUTH_HEADER = "authorization"; +export const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); +export const DATE_HEADER = "date"; +export const GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; +export const SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); +export const SHA256_HEADER = "x-amz-content-sha256"; +export const TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); +export const HOST_HEADER = "host"; +export const ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true, +}; +export const PROXY_HEADER_PATTERN = /^proxy-/; +export const SEC_HEADER_PATTERN = /^sec-/; +export const UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i]; +export const ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; +export const ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; +export const EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; +export const UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; +export const MAX_CACHE_SIZE = 50; +export const KEY_TYPE_IDENTIFIER = "aws4_request"; +export const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; diff --git a/node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js b/node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js new file mode 100644 index 0000000..b16ab8c --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js @@ -0,0 +1,33 @@ +import { toHex } from "@smithy/util-hex-encoding"; +import { toUint8Array } from "@smithy/util-utf8"; +import { KEY_TYPE_IDENTIFIER, MAX_CACHE_SIZE } from "./constants"; +const signingKeyCache = {}; +const cacheQueue = []; +export const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`; +export const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return (signingKeyCache[cacheKey] = key); +}; +export const clearCredentialCache = () => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); +}; +const hmac = (ctor, secret, data) => { + const hash = new ctor(secret); + hash.update(toUint8Array(data)); + return hash.digest(); +}; diff --git a/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js b/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js new file mode 100644 index 0000000..3321125 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js @@ -0,0 +1,20 @@ +import { ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN } from "./constants"; +export const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == undefined) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || + unsignableHeaders?.has(canonicalHeaderName) || + PROXY_HEADER_PATTERN.test(canonicalHeaderName) || + SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; +}; diff --git a/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js b/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js new file mode 100644 index 0000000..b21ea44 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js @@ -0,0 +1,27 @@ +import { escapeUri } from "@smithy/util-uri-escape"; +import { SIGNATURE_HEADER } from "./constants"; +export const getCanonicalQuery = ({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query).sort()) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + keys.push(key); + const value = query[key]; + if (typeof value === "string") { + serialized[key] = `${escapeUri(key)}=${escapeUri(value)}`; + } + else if (Array.isArray(value)) { + serialized[key] = value + .slice(0) + .reduce((encoded, value) => encoded.concat([`${escapeUri(key)}=${escapeUri(value)}`]), []) + .sort() + .join("&"); + } + } + return keys + .map((key) => serialized[key]) + .filter((serialized) => serialized) + .join("&"); +}; diff --git a/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js b/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js new file mode 100644 index 0000000..cba165c --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js @@ -0,0 +1,20 @@ +import { isArrayBuffer } from "@smithy/is-array-buffer"; +import { toHex } from "@smithy/util-hex-encoding"; +import { toUint8Array } from "@smithy/util-utf8"; +import { SHA256_HEADER, UNSIGNED_PAYLOAD } from "./constants"; +export const getPayloadHash = async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == undefined) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } + else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update(toUint8Array(body)); + return toHex(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; +}; diff --git a/node_modules/@smithy/signature-v4/dist-es/headerUtil.js b/node_modules/@smithy/signature-v4/dist-es/headerUtil.js new file mode 100644 index 0000000..e502cbb --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/headerUtil.js @@ -0,0 +1,26 @@ +export const hasHeader = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; +}; +export const getHeaderValue = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return headers[headerName]; + } + } + return undefined; +}; +export const deleteHeader = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + delete headers[headerName]; + } + } +}; diff --git a/node_modules/@smithy/signature-v4/dist-es/index.js b/node_modules/@smithy/signature-v4/dist-es/index.js new file mode 100644 index 0000000..7bb33c2 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/index.js @@ -0,0 +1,7 @@ +export * from "./SignatureV4"; +export { getCanonicalHeaders } from "./getCanonicalHeaders"; +export { getCanonicalQuery } from "./getCanonicalQuery"; +export { getPayloadHash } from "./getPayloadHash"; +export { moveHeadersToQuery } from "./moveHeadersToQuery"; +export { prepareRequest } from "./prepareRequest"; +export * from "./credentialDerivation"; diff --git a/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js b/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js new file mode 100644 index 0000000..29ef416 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js @@ -0,0 +1,16 @@ +import { cloneRequest } from "./cloneRequest"; +export const moveHeadersToQuery = (request, options = {}) => { + const { headers, query = {} } = typeof request.clone === "function" ? request.clone() : cloneRequest(request); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request, + headers, + query, + }; +}; diff --git a/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js b/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js new file mode 100644 index 0000000..a88008e --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js @@ -0,0 +1,11 @@ +import { cloneRequest } from "./cloneRequest"; +import { GENERATED_HEADERS } from "./constants"; +export const prepareRequest = (request) => { + request = typeof request.clone === "function" ? request.clone() : cloneRequest(request); + for (const headerName of Object.keys(request.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; + } + } + return request; +}; diff --git a/node_modules/@smithy/signature-v4/dist-es/suite.fixture.js b/node_modules/@smithy/signature-v4/dist-es/suite.fixture.js new file mode 100644 index 0000000..bb704a9 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/suite.fixture.js @@ -0,0 +1,399 @@ +export const region = "us-east-1"; +export const service = "service"; +export const credentials = { + accessKeyId: "AKIDEXAMPLE", + secretAccessKey: "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY", +}; +export const signingDate = new Date("2015-08-30T12:36:00Z"); +export const requests = [ + { + name: "get-header-key-duplicate", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "my-header1": "value2,value2,value1", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea", + }, + { + name: "get-header-value-multiline", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "my-header1": "value1,value2,value3", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=ba17b383a53190154eb5fa66a1b836cc297cc0a3d70a5d00705980573d8ff790", + }, + { + name: "get-header-value-order", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "my-header1": "value4,value1,value3,value2", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01", + }, + { + name: "get-header-value-trim", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "my-header1": "value1", + "my-header2": '"a b c"', + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736", + }, + { + name: "get-unreserved", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f", + }, + { + name: "get-utf8", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/ሴ", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8318018e0b0f223aa2bbf98705b62bb787dc9c0e678f255a891fd03141be5d85", + }, + { + name: "get-vanilla", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31", + }, + { + name: "get-vanilla-empty-query-key", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: { + Param1: "value1", + }, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb", + }, + { + name: "get-vanilla-query", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31", + }, + { + name: "get-vanilla-query-order-key-case", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: { + Param2: "value2", + Param1: "value1", + }, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500", + }, + { + name: "get-vanilla-query-unreserved", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: { + "-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz": "-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", + }, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197", + }, + { + name: "get-vanilla-utf8-query", + request: { + protocol: "https:", + method: "GET", + hostname: "example.amazonaws.com", + query: { + ሴ: "bar", + }, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04", + }, + { + name: "post-header-key-case", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b", + }, + { + name: "post-header-key-sort", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "my-header1": "value1", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c", + }, + { + name: "post-header-value-case", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "my-header1": "VALUE1", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d", + }, + { + name: "post-sts-header-after", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b", + }, + { + name: "post-sts-header-before", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + "x-amz-security-token": "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead", + }, + { + name: "post-vanilla", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: {}, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b", + }, + { + name: "post-vanilla-empty-query-value", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: { + Param1: "value1", + }, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11", + }, + { + name: "post-vanilla-query", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: { + Param1: "value1", + }, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11", + }, + { + name: "post-vanilla-query-nonunreserved", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: { + "@#$%^": "", + "+": '/,?><`";:\\|][{}', + }, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=66c82657c86e26fb25238d0e69f011edc4c6df5ae71119d7cb98ed9b87393c1e", + }, + { + name: "post-vanilla-query-space", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: { + p: "", + }, + headers: { + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=e71688addb58a26418614085fb730ba3faa623b461c17f48f2fbdb9361b94a9b", + }, + { + name: "post-x-www-form-urlencoded", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: {}, + headers: { + "content-type": "application/x-www-form-urlencoded", + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + body: "Param1=value1", + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a", + }, + { + name: "post-x-www-form-urlencoded-parameters", + request: { + protocol: "https:", + method: "POST", + hostname: "example.amazonaws.com", + query: {}, + headers: { + "content-type": "application/x-www-form-urlencoded; charset=utf8", + host: "example.amazonaws.com", + "x-amz-date": "20150830T123600Z", + }, + body: "Param1=value1", + path: "/", + }, + authorization: "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe", + }, +]; diff --git a/node_modules/@smithy/signature-v4/dist-es/utilDate.js b/node_modules/@smithy/signature-v4/dist-es/utilDate.js new file mode 100644 index 0000000..4aad623 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-es/utilDate.js @@ -0,0 +1,15 @@ +export const iso8601 = (time) => toDate(time) + .toISOString() + .replace(/\.\d{3}Z$/, "Z"); +export const toDate = (time) => { + if (typeof time === "number") { + return new Date(time * 1000); + } + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1000); + } + return new Date(time); + } + return time; +}; diff --git a/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts b/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts new file mode 100644 index 0000000..0446687 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts @@ -0,0 +1,67 @@ +import { AwsCredentialIdentity, ChecksumConstructor, EventSigner, EventSigningArguments, FormattedEvent, HashConstructor, HttpRequest, MessageSigner, Provider, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments, SignableMessage, SignedMessage, SigningArguments, StringSigner } from "@smithy/types"; +export interface SignatureV4Init { + /** + * The service signing name. + */ + service: string; + /** + * The region name or a function that returns a promise that will be + * resolved with the region name. + */ + region: string | Provider; + /** + * The credentials with which the request should be signed or a function + * that returns a promise that will be resolved with credentials. + */ + credentials: AwsCredentialIdentity | Provider; + /** + * A constructor function for a hash object that will calculate SHA-256 HMAC + * checksums. + */ + sha256?: ChecksumConstructor | HashConstructor; + /** + * Whether to uri-escape the request URI path as part of computing the + * canonical request string. This is required for every AWS service, except + * Amazon S3, as of late 2017. + * + * @default [true] + */ + uriEscapePath?: boolean; + /** + * Whether to calculate a checksum of the request body and include it as + * either a request header (when signing) or as a query string parameter + * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for + * every other AWS service as of late 2017. + * + * @default [true] + */ + applyChecksum?: boolean; +} +export interface SignatureV4CryptoInit { + sha256: ChecksumConstructor | HashConstructor; +} +export declare class SignatureV4 implements RequestPresigner, RequestSigner, StringSigner, EventSigner, MessageSigner { + private readonly service; + private readonly regionProvider; + private readonly credentialProvider; + private readonly sha256; + private readonly uriEscapePath; + private readonly applyChecksum; + private readonly headerMarshaller; + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath, }: SignatureV4Init & SignatureV4CryptoInit); + presign(originalRequest: HttpRequest, options?: RequestPresigningArguments): Promise; + sign(stringToSign: string, options?: SigningArguments): Promise; + sign(event: FormattedEvent, options: EventSigningArguments): Promise; + sign(event: SignableMessage, options: SigningArguments): Promise; + sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise; + private signEvent; + signMessage(signableMessage: SignableMessage, { signingDate, signingRegion, signingService }: SigningArguments): Promise; + private signString; + private signRequest; + private createCanonicalRequest; + private createStringToSign; + private getCanonicalPath; + private getSignature; + private getSigningKey; + private validateResolvedCredentials; +} diff --git a/node_modules/@smithy/signature-v4/dist-types/cloneRequest.d.ts b/node_modules/@smithy/signature-v4/dist-types/cloneRequest.d.ts new file mode 100644 index 0000000..0d7b3b9 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/cloneRequest.d.ts @@ -0,0 +1,6 @@ +import { HttpRequest, QueryParameterBag } from "@smithy/types"; +/** + * @internal + */ +export declare const cloneRequest: ({ headers, query, ...rest }: HttpRequest) => HttpRequest; +export declare const cloneQuery: (query: QueryParameterBag) => QueryParameterBag; diff --git a/node_modules/@smithy/signature-v4/dist-types/constants.d.ts b/node_modules/@smithy/signature-v4/dist-types/constants.d.ts new file mode 100644 index 0000000..ea1cfb5 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/constants.d.ts @@ -0,0 +1,43 @@ +export declare const ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; +export declare const CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; +export declare const AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; +export declare const SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; +export declare const EXPIRES_QUERY_PARAM = "X-Amz-Expires"; +export declare const SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; +export declare const TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; +export declare const REGION_SET_PARAM = "X-Amz-Region-Set"; +export declare const AUTH_HEADER = "authorization"; +export declare const AMZ_DATE_HEADER: string; +export declare const DATE_HEADER = "date"; +export declare const GENERATED_HEADERS: string[]; +export declare const SIGNATURE_HEADER: string; +export declare const SHA256_HEADER = "x-amz-content-sha256"; +export declare const TOKEN_HEADER: string; +export declare const HOST_HEADER = "host"; +export declare const ALWAYS_UNSIGNABLE_HEADERS: { + authorization: boolean; + "cache-control": boolean; + connection: boolean; + expect: boolean; + from: boolean; + "keep-alive": boolean; + "max-forwards": boolean; + pragma: boolean; + referer: boolean; + te: boolean; + trailer: boolean; + "transfer-encoding": boolean; + upgrade: boolean; + "user-agent": boolean; + "x-amzn-trace-id": boolean; +}; +export declare const PROXY_HEADER_PATTERN: RegExp; +export declare const SEC_HEADER_PATTERN: RegExp; +export declare const UNSIGNABLE_PATTERNS: RegExp[]; +export declare const ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; +export declare const ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; +export declare const EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; +export declare const UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; +export declare const MAX_CACHE_SIZE = 50; +export declare const KEY_TYPE_IDENTIFIER = "aws4_request"; +export declare const MAX_PRESIGNED_TTL: number; diff --git a/node_modules/@smithy/signature-v4/dist-types/credentialDerivation.d.ts b/node_modules/@smithy/signature-v4/dist-types/credentialDerivation.d.ts new file mode 100644 index 0000000..73c41a0 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/credentialDerivation.d.ts @@ -0,0 +1,26 @@ +import { AwsCredentialIdentity, ChecksumConstructor, HashConstructor } from "@smithy/types"; +/** + * Create a string describing the scope of credentials used to sign a request. + * + * @param shortDate The current calendar date in the form YYYYMMDD. + * @param region The AWS region in which the service resides. + * @param service The service to which the signed request is being sent. + */ +export declare const createScope: (shortDate: string, region: string, service: string) => string; +/** + * Derive a signing key from its composite parts + * + * @param sha256Constructor A constructor function that can instantiate SHA-256 + * hash objects. + * @param credentials The credentials with which the request will be + * signed. + * @param shortDate The current calendar date in the form YYYYMMDD. + * @param region The AWS region in which the service resides. + * @param service The service to which the signed request is being + * sent. + */ +export declare const getSigningKey: (sha256Constructor: ChecksumConstructor | HashConstructor, credentials: AwsCredentialIdentity, shortDate: string, region: string, service: string) => Promise; +/** + * @internal + */ +export declare const clearCredentialCache: () => void; diff --git a/node_modules/@smithy/signature-v4/dist-types/getCanonicalHeaders.d.ts b/node_modules/@smithy/signature-v4/dist-types/getCanonicalHeaders.d.ts new file mode 100644 index 0000000..2c3329e --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/getCanonicalHeaders.d.ts @@ -0,0 +1,5 @@ +import { HeaderBag, HttpRequest } from "@smithy/types"; +/** + * @private + */ +export declare const getCanonicalHeaders: ({ headers }: HttpRequest, unsignableHeaders?: Set, signableHeaders?: Set) => HeaderBag; diff --git a/node_modules/@smithy/signature-v4/dist-types/getCanonicalQuery.d.ts b/node_modules/@smithy/signature-v4/dist-types/getCanonicalQuery.d.ts new file mode 100644 index 0000000..f7edb05 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/getCanonicalQuery.d.ts @@ -0,0 +1,5 @@ +import { HttpRequest } from "@smithy/types"; +/** + * @private + */ +export declare const getCanonicalQuery: ({ query }: HttpRequest) => string; diff --git a/node_modules/@smithy/signature-v4/dist-types/getPayloadHash.d.ts b/node_modules/@smithy/signature-v4/dist-types/getPayloadHash.d.ts new file mode 100644 index 0000000..a326c59 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/getPayloadHash.d.ts @@ -0,0 +1,5 @@ +import { ChecksumConstructor, HashConstructor, HttpRequest } from "@smithy/types"; +/** + * @private + */ +export declare const getPayloadHash: ({ headers, body }: HttpRequest, hashConstructor: ChecksumConstructor | HashConstructor) => Promise; diff --git a/node_modules/@smithy/signature-v4/dist-types/headerUtil.d.ts b/node_modules/@smithy/signature-v4/dist-types/headerUtil.d.ts new file mode 100644 index 0000000..c0b66eb --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/headerUtil.d.ts @@ -0,0 +1,4 @@ +import { HeaderBag } from "@smithy/types"; +export declare const hasHeader: (soughtHeader: string, headers: HeaderBag) => boolean; +export declare const getHeaderValue: (soughtHeader: string, headers: HeaderBag) => string | undefined; +export declare const deleteHeader: (soughtHeader: string, headers: HeaderBag) => void; diff --git a/node_modules/@smithy/signature-v4/dist-types/index.d.ts b/node_modules/@smithy/signature-v4/dist-types/index.d.ts new file mode 100644 index 0000000..7bb33c2 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/index.d.ts @@ -0,0 +1,7 @@ +export * from "./SignatureV4"; +export { getCanonicalHeaders } from "./getCanonicalHeaders"; +export { getCanonicalQuery } from "./getCanonicalQuery"; +export { getPayloadHash } from "./getPayloadHash"; +export { moveHeadersToQuery } from "./moveHeadersToQuery"; +export { prepareRequest } from "./prepareRequest"; +export * from "./credentialDerivation"; diff --git a/node_modules/@smithy/signature-v4/dist-types/moveHeadersToQuery.d.ts b/node_modules/@smithy/signature-v4/dist-types/moveHeadersToQuery.d.ts new file mode 100644 index 0000000..1816cfc --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/moveHeadersToQuery.d.ts @@ -0,0 +1,9 @@ +import { HttpRequest, QueryParameterBag } from "@smithy/types"; +/** + * @private + */ +export declare const moveHeadersToQuery: (request: HttpRequest, options?: { + unhoistableHeaders?: Set; +}) => HttpRequest & { + query: QueryParameterBag; +}; diff --git a/node_modules/@smithy/signature-v4/dist-types/prepareRequest.d.ts b/node_modules/@smithy/signature-v4/dist-types/prepareRequest.d.ts new file mode 100644 index 0000000..dbc8fde --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/prepareRequest.d.ts @@ -0,0 +1,5 @@ +import { HttpRequest } from "@smithy/types"; +/** + * @private + */ +export declare const prepareRequest: (request: HttpRequest) => HttpRequest; diff --git a/node_modules/@smithy/signature-v4/dist-types/suite.fixture.d.ts b/node_modules/@smithy/signature-v4/dist-types/suite.fixture.d.ts new file mode 100644 index 0000000..383bc35 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/suite.fixture.d.ts @@ -0,0 +1,14 @@ +import { HttpRequest } from "@smithy/types"; +export interface TestCase { + name: string; + request: HttpRequest; + authorization: string; +} +export declare const region = "us-east-1"; +export declare const service = "service"; +export declare const credentials: { + accessKeyId: string; + secretAccessKey: string; +}; +export declare const signingDate: Date; +export declare const requests: Array; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/SignatureV4.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/SignatureV4.d.ts new file mode 100644 index 0000000..68230a4 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/SignatureV4.d.ts @@ -0,0 +1,67 @@ +import { AwsCredentialIdentity, ChecksumConstructor, EventSigner, EventSigningArguments, FormattedEvent, HashConstructor, HttpRequest, MessageSigner, Provider, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments, SignableMessage, SignedMessage, SigningArguments, StringSigner } from "@smithy/types"; +export interface SignatureV4Init { + /** + * The service signing name. + */ + service: string; + /** + * The region name or a function that returns a promise that will be + * resolved with the region name. + */ + region: string | Provider; + /** + * The credentials with which the request should be signed or a function + * that returns a promise that will be resolved with credentials. + */ + credentials: AwsCredentialIdentity | Provider; + /** + * A constructor function for a hash object that will calculate SHA-256 HMAC + * checksums. + */ + sha256?: ChecksumConstructor | HashConstructor; + /** + * Whether to uri-escape the request URI path as part of computing the + * canonical request string. This is required for every AWS service, except + * Amazon S3, as of late 2017. + * + * @default [true] + */ + uriEscapePath?: boolean; + /** + * Whether to calculate a checksum of the request body and include it as + * either a request header (when signing) or as a query string parameter + * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for + * every other AWS service as of late 2017. + * + * @default [true] + */ + applyChecksum?: boolean; +} +export interface SignatureV4CryptoInit { + sha256: ChecksumConstructor | HashConstructor; +} +export declare class SignatureV4 implements RequestPresigner, RequestSigner, StringSigner, EventSigner, MessageSigner { + private readonly service; + private readonly regionProvider; + private readonly credentialProvider; + private readonly sha256; + private readonly uriEscapePath; + private readonly applyChecksum; + private readonly headerMarshaller; + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath, }: SignatureV4Init & SignatureV4CryptoInit); + presign(originalRequest: HttpRequest, options?: RequestPresigningArguments): Promise; + sign(stringToSign: string, options?: SigningArguments): Promise; + sign(event: FormattedEvent, options: EventSigningArguments): Promise; + sign(event: SignableMessage, options: SigningArguments): Promise; + sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise; + private signEvent; + signMessage(signableMessage: SignableMessage, { signingDate, signingRegion, signingService }: SigningArguments): Promise; + private signString; + private signRequest; + private createCanonicalRequest; + private createStringToSign; + private getCanonicalPath; + private getSignature; + private getSigningKey; + private validateResolvedCredentials; +} diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/cloneRequest.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/cloneRequest.d.ts new file mode 100644 index 0000000..e715c2f --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/cloneRequest.d.ts @@ -0,0 +1,6 @@ +import { HttpRequest, QueryParameterBag } from "@smithy/types"; +/** + * @internal + */ +export declare const cloneRequest: ({ headers, query, ...rest }: HttpRequest) => HttpRequest; +export declare const cloneQuery: (query: QueryParameterBag) => QueryParameterBag; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/constants.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/constants.d.ts new file mode 100644 index 0000000..ff54b67 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/constants.d.ts @@ -0,0 +1,43 @@ +export declare const ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; +export declare const CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; +export declare const AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; +export declare const SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; +export declare const EXPIRES_QUERY_PARAM = "X-Amz-Expires"; +export declare const SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; +export declare const TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; +export declare const REGION_SET_PARAM = "X-Amz-Region-Set"; +export declare const AUTH_HEADER = "authorization"; +export declare const AMZ_DATE_HEADER: string; +export declare const DATE_HEADER = "date"; +export declare const GENERATED_HEADERS: string[]; +export declare const SIGNATURE_HEADER: string; +export declare const SHA256_HEADER = "x-amz-content-sha256"; +export declare const TOKEN_HEADER: string; +export declare const HOST_HEADER = "host"; +export declare const ALWAYS_UNSIGNABLE_HEADERS: { + authorization: boolean; + "cache-control": boolean; + connection: boolean; + expect: boolean; + from: boolean; + "keep-alive": boolean; + "max-forwards": boolean; + pragma: boolean; + referer: boolean; + te: boolean; + trailer: boolean; + "transfer-encoding": boolean; + upgrade: boolean; + "user-agent": boolean; + "x-amzn-trace-id": boolean; +}; +export declare const PROXY_HEADER_PATTERN: RegExp; +export declare const SEC_HEADER_PATTERN: RegExp; +export declare const UNSIGNABLE_PATTERNS: RegExp[]; +export declare const ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; +export declare const ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; +export declare const EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; +export declare const UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; +export declare const MAX_CACHE_SIZE = 50; +export declare const KEY_TYPE_IDENTIFIER = "aws4_request"; +export declare const MAX_PRESIGNED_TTL: number; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/credentialDerivation.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/credentialDerivation.d.ts new file mode 100644 index 0000000..e0db94d --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/credentialDerivation.d.ts @@ -0,0 +1,26 @@ +import { AwsCredentialIdentity, ChecksumConstructor, HashConstructor } from "@smithy/types"; +/** + * Create a string describing the scope of credentials used to sign a request. + * + * @param shortDate The current calendar date in the form YYYYMMDD. + * @param region The AWS region in which the service resides. + * @param service The service to which the signed request is being sent. + */ +export declare const createScope: (shortDate: string, region: string, service: string) => string; +/** + * Derive a signing key from its composite parts + * + * @param sha256Constructor A constructor function that can instantiate SHA-256 + * hash objects. + * @param credentials The credentials with which the request will be + * signed. + * @param shortDate The current calendar date in the form YYYYMMDD. + * @param region The AWS region in which the service resides. + * @param service The service to which the signed request is being + * sent. + */ +export declare const getSigningKey: (sha256Constructor: ChecksumConstructor | HashConstructor, credentials: AwsCredentialIdentity, shortDate: string, region: string, service: string) => Promise; +/** + * @internal + */ +export declare const clearCredentialCache: () => void; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/getCanonicalHeaders.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/getCanonicalHeaders.d.ts new file mode 100644 index 0000000..a8f0073 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/getCanonicalHeaders.d.ts @@ -0,0 +1,5 @@ +import { HeaderBag, HttpRequest } from "@smithy/types"; +/** + * @private + */ +export declare const getCanonicalHeaders: ({ headers }: HttpRequest, unsignableHeaders?: Set, signableHeaders?: Set) => HeaderBag; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/getCanonicalQuery.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/getCanonicalQuery.d.ts new file mode 100644 index 0000000..20a6586 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/getCanonicalQuery.d.ts @@ -0,0 +1,5 @@ +import { HttpRequest } from "@smithy/types"; +/** + * @private + */ +export declare const getCanonicalQuery: ({ query }: HttpRequest) => string; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/getPayloadHash.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/getPayloadHash.d.ts new file mode 100644 index 0000000..2caa7ff --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/getPayloadHash.d.ts @@ -0,0 +1,5 @@ +import { ChecksumConstructor, HashConstructor, HttpRequest } from "@smithy/types"; +/** + * @private + */ +export declare const getPayloadHash: ({ headers, body }: HttpRequest, hashConstructor: ChecksumConstructor | HashConstructor) => Promise; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/headerUtil.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/headerUtil.d.ts new file mode 100644 index 0000000..41ca217 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/headerUtil.d.ts @@ -0,0 +1,4 @@ +import { HeaderBag } from "@smithy/types"; +export declare const hasHeader: (soughtHeader: string, headers: HeaderBag) => boolean; +export declare const getHeaderValue: (soughtHeader: string, headers: HeaderBag) => string | undefined; +export declare const deleteHeader: (soughtHeader: string, headers: HeaderBag) => void; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..7f3d9c5 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/index.d.ts @@ -0,0 +1,7 @@ +export * from "./SignatureV4"; +export { getCanonicalHeaders } from "./getCanonicalHeaders"; +export { getCanonicalQuery } from "./getCanonicalQuery"; +export { getPayloadHash } from "./getPayloadHash"; +export { moveHeadersToQuery } from "./moveHeadersToQuery"; +export { prepareRequest } from "./prepareRequest"; +export * from "./credentialDerivation"; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/moveHeadersToQuery.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/moveHeadersToQuery.d.ts new file mode 100644 index 0000000..2d41545 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/moveHeadersToQuery.d.ts @@ -0,0 +1,9 @@ +import { HttpRequest, QueryParameterBag } from "@smithy/types"; +/** + * @private + */ +export declare const moveHeadersToQuery: (request: HttpRequest, options?: { + unhoistableHeaders?: Set; +}) => HttpRequest & { + query: QueryParameterBag; +}; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/prepareRequest.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/prepareRequest.d.ts new file mode 100644 index 0000000..0ff76f3 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/prepareRequest.d.ts @@ -0,0 +1,5 @@ +import { HttpRequest } from "@smithy/types"; +/** + * @private + */ +export declare const prepareRequest: (request: HttpRequest) => HttpRequest; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/suite.fixture.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/suite.fixture.d.ts new file mode 100644 index 0000000..9363eeb --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/suite.fixture.d.ts @@ -0,0 +1,14 @@ +import { HttpRequest } from "@smithy/types"; +export interface TestCase { + name: string; + request: HttpRequest; + authorization: string; +} +export declare const region = "us-east-1"; +export declare const service = "service"; +export declare const credentials: { + accessKeyId: string; + secretAccessKey: string; +}; +export declare const signingDate: Date; +export declare const requests: Array; diff --git a/node_modules/@smithy/signature-v4/dist-types/ts3.4/utilDate.d.ts b/node_modules/@smithy/signature-v4/dist-types/ts3.4/utilDate.d.ts new file mode 100644 index 0000000..9a6f383 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/ts3.4/utilDate.d.ts @@ -0,0 +1,2 @@ +export declare const iso8601: (time: number | string | Date) => string; +export declare const toDate: (time: number | string | Date) => Date; diff --git a/node_modules/@smithy/signature-v4/dist-types/utilDate.d.ts b/node_modules/@smithy/signature-v4/dist-types/utilDate.d.ts new file mode 100644 index 0000000..e8c6a68 --- /dev/null +++ b/node_modules/@smithy/signature-v4/dist-types/utilDate.d.ts @@ -0,0 +1,2 @@ +export declare const iso8601: (time: number | string | Date) => string; +export declare const toDate: (time: number | string | Date) => Date; diff --git a/node_modules/@smithy/signature-v4/package.json b/node_modules/@smithy/signature-v4/package.json new file mode 100644 index 0000000..6d7569b --- /dev/null +++ b/node_modules/@smithy/signature-v4/package.json @@ -0,0 +1,70 @@ +{ + "name": "@smithy/signature-v4", + "version": "2.2.0", + "description": "A standalone implementation of the AWS Signature V4 request signing algorithm", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline signature-v4", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "extract:docs": "api-extractor run --local", + "test": "yarn g:jest --coverage" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-codec": "^2.2.0", + "@smithy/is-array-buffer": "^2.2.0", + "@smithy/types": "^2.12.0", + "@smithy/util-hex-encoding": "^2.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-uri-escape": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@aws-crypto/sha256-js": "3.0.0", + "@smithy/protocol-http": "^3.3.0", + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/signature-v4", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/signature-v4" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/LICENSE b/node_modules/@smithy/smithy-client/LICENSE new file mode 100644 index 0000000..e907b58 --- /dev/null +++ b/node_modules/@smithy/smithy-client/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/smithy-client/README.md b/node_modules/@smithy/smithy-client/README.md new file mode 100644 index 0000000..365cd62 --- /dev/null +++ b/node_modules/@smithy/smithy-client/README.md @@ -0,0 +1,10 @@ +# @smithy/smithy-client + +[![NPM version](https://img.shields.io/npm/v/@smithy/smithy-client/latest.svg)](https://www.npmjs.com/package/@smithy/smithy-client) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/smithy-client.svg)](https://www.npmjs.com/package/@smithy/smithy-client) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/smithy-client/dist-cjs/NoOpLogger.js b/node_modules/@smithy/smithy-client/dist-cjs/NoOpLogger.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/NoOpLogger.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/client.js b/node_modules/@smithy/smithy-client/dist-cjs/client.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/client.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/collect-stream-body.js b/node_modules/@smithy/smithy-client/dist-cjs/collect-stream-body.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/collect-stream-body.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/command.js b/node_modules/@smithy/smithy-client/dist-cjs/command.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/command.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/constants.js b/node_modules/@smithy/smithy-client/dist-cjs/constants.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/constants.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/create-aggregated-client.js b/node_modules/@smithy/smithy-client/dist-cjs/create-aggregated-client.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/create-aggregated-client.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/date-utils.js b/node_modules/@smithy/smithy-client/dist-cjs/date-utils.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/date-utils.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js b/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/defaults-mode.js b/node_modules/@smithy/smithy-client/dist-cjs/defaults-mode.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/defaults-mode.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/emitWarningIfUnsupportedVersion.js b/node_modules/@smithy/smithy-client/dist-cjs/emitWarningIfUnsupportedVersion.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/emitWarningIfUnsupportedVersion.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/exceptions.js b/node_modules/@smithy/smithy-client/dist-cjs/exceptions.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/exceptions.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/extended-encode-uri-component.js b/node_modules/@smithy/smithy-client/dist-cjs/extended-encode-uri-component.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/extended-encode-uri-component.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/extensions/checksum.js b/node_modules/@smithy/smithy-client/dist-cjs/extensions/checksum.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/extensions/checksum.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/extensions/defaultExtensionConfiguration.js b/node_modules/@smithy/smithy-client/dist-cjs/extensions/defaultExtensionConfiguration.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/extensions/defaultExtensionConfiguration.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/extensions/index.js b/node_modules/@smithy/smithy-client/dist-cjs/extensions/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/extensions/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/extensions/retry.js b/node_modules/@smithy/smithy-client/dist-cjs/extensions/retry.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/extensions/retry.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/get-array-if-single-item.js b/node_modules/@smithy/smithy-client/dist-cjs/get-array-if-single-item.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/get-array-if-single-item.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/get-value-from-text-node.js b/node_modules/@smithy/smithy-client/dist-cjs/get-value-from-text-node.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/get-value-from-text-node.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/index.js b/node_modules/@smithy/smithy-client/dist-cjs/index.js new file mode 100644 index 0000000..6d1e298 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/index.js @@ -0,0 +1,1256 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Client: () => Client, + Command: () => Command, + LazyJsonString: () => LazyJsonString, + NoOpLogger: () => NoOpLogger, + SENSITIVE_STRING: () => SENSITIVE_STRING, + ServiceException: () => ServiceException, + StringWrapper: () => StringWrapper, + _json: () => _json, + collectBody: () => collectBody, + convertMap: () => convertMap, + createAggregatedClient: () => createAggregatedClient, + dateToUtcString: () => dateToUtcString, + decorateServiceException: () => decorateServiceException, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + expectBoolean: () => expectBoolean, + expectByte: () => expectByte, + expectFloat32: () => expectFloat32, + expectInt: () => expectInt, + expectInt32: () => expectInt32, + expectLong: () => expectLong, + expectNonNull: () => expectNonNull, + expectNumber: () => expectNumber, + expectObject: () => expectObject, + expectShort: () => expectShort, + expectString: () => expectString, + expectUnion: () => expectUnion, + extendedEncodeURIComponent: () => extendedEncodeURIComponent, + getArrayIfSingleItem: () => getArrayIfSingleItem, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, + getValueFromTextNode: () => getValueFromTextNode, + handleFloat: () => handleFloat, + limitedParseDouble: () => limitedParseDouble, + limitedParseFloat: () => limitedParseFloat, + limitedParseFloat32: () => limitedParseFloat32, + loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, + logger: () => logger, + map: () => map, + parseBoolean: () => parseBoolean, + parseEpochTimestamp: () => parseEpochTimestamp, + parseRfc3339DateTime: () => parseRfc3339DateTime, + parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset, + parseRfc7231DateTime: () => parseRfc7231DateTime, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, + resolvedPath: () => resolvedPath, + serializeFloat: () => serializeFloat, + splitEvery: () => splitEvery, + strictParseByte: () => strictParseByte, + strictParseDouble: () => strictParseDouble, + strictParseFloat: () => strictParseFloat, + strictParseFloat32: () => strictParseFloat32, + strictParseInt: () => strictParseInt, + strictParseInt32: () => strictParseInt32, + strictParseLong: () => strictParseLong, + strictParseShort: () => strictParseShort, + take: () => take, + throwDefaultError: () => throwDefaultError, + withBaseException: () => withBaseException +}); +module.exports = __toCommonJS(src_exports); + +// src/NoOpLogger.ts +var _NoOpLogger = class _NoOpLogger { + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } +}; +__name(_NoOpLogger, "NoOpLogger"); +var NoOpLogger = _NoOpLogger; + +// src/client.ts +var import_middleware_stack = require("@smithy/middleware-stack"); +var _Client = class _Client { + constructor(config) { + this.middlewareStack = (0, import_middleware_stack.constructStack)(); + this.config = config; + } + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + if (callback) { + handler(command).then( + (result) => callback(null, result.output), + (err) => callback(err) + ).catch( + // prevent any errors thrown in the callback from triggering an + // unhandled promise rejection + () => { + } + ); + } else { + return handler(command).then((result) => result.output); + } + } + destroy() { + if (this.config.requestHandler.destroy) + this.config.requestHandler.destroy(); + } +}; +__name(_Client, "Client"); +var Client = _Client; + +// src/collect-stream-body.ts +var import_util_stream = require("@smithy/util-stream"); +var collectBody = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody); + } + if (!streamBody) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); + } + const fromContext = context.streamCollector(streamBody); + return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext); +}, "collectBody"); + +// src/command.ts + +var import_types = require("@smithy/types"); +var _Command = class _Command { + constructor() { + this.middlewareStack = (0, import_middleware_stack.constructStack)(); + } + /** + * Factory for Command ClassBuilder. + * @internal + */ + static classBuilder() { + return new ClassBuilder(); + } + /** + * @internal + */ + resolveMiddlewareWithContext(clientStack, configuration, options, { + middlewareFn, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + smithyContext, + additionalContext, + CommandCtor + }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger: logger2 } = configuration; + const handlerExecutionContext = { + logger: logger2, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [import_types.SMITHY_CONTEXT_KEY]: { + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + return stack.resolve( + (request) => requestHandler.handle(request.request, options || {}), + handlerExecutionContext + ); + } +}; +__name(_Command, "Command"); +var Command = _Command; +var _ClassBuilder = class _ClassBuilder { + constructor() { + this._init = () => { + }; + this._ep = {}; + this._middlewareFn = () => []; + this._commandName = ""; + this._clientName = ""; + this._additionalContext = {}; + this._smithyContext = {}; + this._inputFilterSensitiveLog = (_) => _; + this._outputFilterSensitiveLog = (_) => _; + this._serializer = null; + this._deserializer = null; + } + /** + * Optional init callback. + */ + init(cb) { + this._init = cb; + } + /** + * Set the endpoint parameter instructions. + */ + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + /** + * Add any number of middleware. + */ + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + /** + * Set the initial handler execution context Smithy field. + */ + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext + }; + return this; + } + /** + * Set the initial handler execution context. + */ + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + /** + * Set constant string identifiers for the operation. + */ + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + /** + * Set the input and output sensistive log filters. + */ + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + /** + * Sets the serializer. + */ + ser(serializer) { + this._serializer = serializer; + return this; + } + /** + * Sets the deserializer. + */ + de(deserializer) { + this._deserializer = deserializer; + return this; + } + /** + * @returns a Command class with the classBuilder properties. + */ + build() { + var _a; + const closure = this; + let CommandRef; + return CommandRef = (_a = class extends Command { + /** + * @public + */ + constructor(...[input]) { + super(); + /** + * @internal + */ + // @ts-ignore used in middlewareFn closure. + this.serialize = closure._serializer; + /** + * @internal + */ + // @ts-ignore used in middlewareFn closure. + this.deserialize = closure._deserializer; + this.input = input ?? {}; + closure._init(this); + } + /** + * @public + */ + static getEndpointParameterInstructions() { + return closure._ep; + } + /** + * @internal + */ + resolveMiddleware(stack, configuration, options) { + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog, + outputFilterSensitiveLog: closure._outputFilterSensitiveLog, + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + }, __name(_a, "CommandRef"), _a); + } +}; +__name(_ClassBuilder, "ClassBuilder"); +var ClassBuilder = _ClassBuilder; + +// src/constants.ts +var SENSITIVE_STRING = "***SensitiveInformation***"; + +// src/create-aggregated-client.ts +var createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => { + for (const command of Object.keys(commands)) { + const CommandCtor = commands[command]; + const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) { + const command2 = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command2, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command2, optionsOrCb || {}, cb); + } else { + return this.send(command2, optionsOrCb); + } + }, "methodImpl"); + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client2.prototype[methodName] = methodImpl; + } +}, "createAggregatedClient"); + +// src/parse-utils.ts +var parseBoolean = /* @__PURE__ */ __name((value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); + } +}, "parseBoolean"); +var expectBoolean = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "number") { + if (value === 0 || value === 1) { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (value === 0) { + return false; + } + if (value === 1) { + return true; + } + } + if (typeof value === "string") { + const lower = value.toLowerCase(); + if (lower === "false" || lower === "true") { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (lower === "false") { + return false; + } + if (lower === "true") { + return true; + } + } + if (typeof value === "boolean") { + return value; + } + throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); +}, "expectBoolean"); +var expectNumber = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; + } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); +}, "expectNumber"); +var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); +var expectFloat32 = /* @__PURE__ */ __name((value) => { + const expected = expectNumber(value); + if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; +}, "expectFloat32"); +var expectLong = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); +}, "expectLong"); +var expectInt = expectLong; +var expectInt32 = /* @__PURE__ */ __name((value) => expectSizedInt(value, 32), "expectInt32"); +var expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); +var expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); +var expectSizedInt = /* @__PURE__ */ __name((value, size) => { + const expected = expectLong(value); + if (expected !== void 0 && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; +}, "expectSizedInt"); +var castInt = /* @__PURE__ */ __name((value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } +}, "castInt"); +var expectNonNull = /* @__PURE__ */ __name((value, location) => { + if (value === null || value === void 0) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); + } + throw new TypeError("Expected a non-null value"); + } + return value; +}, "expectNonNull"); +var expectObject = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "object" && !Array.isArray(value)) { + return value; + } + const receivedType = Array.isArray(value) ? "array" : typeof value; + throw new TypeError(`Expected object, got ${receivedType}: ${value}`); +}, "expectObject"); +var expectString = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + return value; + } + if (["boolean", "number", "bigint"].includes(typeof value)) { + logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); + return String(value); + } + throw new TypeError(`Expected string, got ${typeof value}: ${value}`); +}, "expectString"); +var expectUnion = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + const asObject = expectObject(value); + const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k); + if (setKeys.length === 0) { + throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + } + if (setKeys.length > 1) { + throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + } + return asObject; +}, "expectUnion"); +var strictParseDouble = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectNumber(parseNumber(value)); + } + return expectNumber(value); +}, "strictParseDouble"); +var strictParseFloat = strictParseDouble; +var strictParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); + } + return expectFloat32(value); +}, "strictParseFloat32"); +var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; +var parseNumber = /* @__PURE__ */ __name((value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); +}, "parseNumber"); +var limitedParseDouble = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectNumber(value); +}, "limitedParseDouble"); +var handleFloat = limitedParseDouble; +var limitedParseFloat = limitedParseDouble; +var limitedParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectFloat32(value); +}, "limitedParseFloat32"); +var parseFloatString = /* @__PURE__ */ __name((value) => { + switch (value) { + case "NaN": + return NaN; + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + default: + throw new Error(`Unable to parse float value: ${value}`); + } +}, "parseFloatString"); +var strictParseLong = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectLong(parseNumber(value)); + } + return expectLong(value); +}, "strictParseLong"); +var strictParseInt = strictParseLong; +var strictParseInt32 = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectInt32(parseNumber(value)); + } + return expectInt32(value); +}, "strictParseInt32"); +var strictParseShort = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); + } + return expectShort(value); +}, "strictParseShort"); +var strictParseByte = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); + } + return expectByte(value); +}, "strictParseByte"); +var stackTraceWarning = /* @__PURE__ */ __name((message) => { + return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n"); +}, "stackTraceWarning"); +var logger = { + warn: console.warn +}; + +// src/date-utils.ts +var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; +function dateToUtcString(date) { + const year = date.getUTCFullYear(); + const month = date.getUTCMonth(); + const dayOfWeek = date.getUTCDay(); + const dayOfMonthInt = date.getUTCDate(); + const hoursInt = date.getUTCHours(); + const minutesInt = date.getUTCMinutes(); + const secondsInt = date.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; +} +__name(dateToUtcString, "dateToUtcString"); +var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); +var parseRfc3339DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; + const year = strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); +}, "parseRfc3339DateTime"); +var RFC3339_WITH_OFFSET = new RegExp( + /^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/ +); +var parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339_WITH_OFFSET.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; + const year = strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + if (offsetStr.toUpperCase() != "Z") { + date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr)); + } + return date; +}, "parseRfc3339DateTimeWithOffset"); +var IMF_FIXDATE = new RegExp( + /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/ +); +var RFC_850_DATE = new RegExp( + /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/ +); +var ASC_TIME = new RegExp( + /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/ +); +var parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match = IMF_FIXDATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return buildDate( + strictParseShort(stripLeadingZeroes(yearStr)), + parseMonthByShortName(monthStr), + parseDateValue(dayStr, "day", 1, 31), + { hours, minutes, seconds, fractionalMilliseconds } + ); + } + match = RFC_850_DATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return adjustRfc850Year( + buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds + }) + ); + } + match = ASC_TIME.exec(value); + if (match) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; + return buildDate( + strictParseShort(stripLeadingZeroes(yearStr)), + parseMonthByShortName(monthStr), + parseDateValue(dayStr.trimLeft(), "day", 1, 31), + { hours, minutes, seconds, fractionalMilliseconds } + ); + } + throw new TypeError("Invalid RFC-7231 date-time value"); +}, "parseRfc7231DateTime"); +var parseEpochTimestamp = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + let valueAsDouble; + if (typeof value === "number") { + valueAsDouble = value; + } else if (typeof value === "string") { + valueAsDouble = strictParseDouble(value); + } else { + throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + } + if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { + throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + } + return new Date(Math.round(valueAsDouble * 1e3)); +}, "parseEpochTimestamp"); +var buildDate = /* @__PURE__ */ __name((year, month, day, time) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year, adjustedMonth, day); + return new Date( + Date.UTC( + year, + adjustedMonth, + day, + parseDateValue(time.hours, "hour", 0, 23), + parseDateValue(time.minutes, "minute", 0, 59), + // seconds can go up to 60 for leap seconds + parseDateValue(time.seconds, "seconds", 0, 60), + parseMilliseconds(time.fractionalMilliseconds) + ) + ); +}, "buildDate"); +var parseTwoDigitYear = /* @__PURE__ */ __name((value) => { + const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; +}, "parseTwoDigitYear"); +var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; +var adjustRfc850Year = /* @__PURE__ */ __name((input) => { + if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date( + Date.UTC( + input.getUTCFullYear() - 100, + input.getUTCMonth(), + input.getUTCDate(), + input.getUTCHours(), + input.getUTCMinutes(), + input.getUTCSeconds(), + input.getUTCMilliseconds() + ) + ); + } + return input; +}, "adjustRfc850Year"); +var parseMonthByShortName = /* @__PURE__ */ __name((value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; +}, "parseMonthByShortName"); +var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +var validateDayOfMonth = /* @__PURE__ */ __name((year, month, day) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year)) { + maxDays = 29; + } + if (day > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + } +}, "validateDayOfMonth"); +var isLeapYear = /* @__PURE__ */ __name((year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +}, "isLeapYear"); +var parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => { + const dateVal = strictParseByte(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; +}, "parseDateValue"); +var parseMilliseconds = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return 0; + } + return strictParseFloat32("0." + value) * 1e3; +}, "parseMilliseconds"); +var parseOffsetToMilliseconds = /* @__PURE__ */ __name((value) => { + const directionStr = value[0]; + let direction = 1; + if (directionStr == "+") { + direction = 1; + } else if (directionStr == "-") { + direction = -1; + } else { + throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); + } + const hour = Number(value.substring(1, 3)); + const minute = Number(value.substring(4, 6)); + return direction * (hour * 60 + minute) * 60 * 1e3; +}, "parseOffsetToMilliseconds"); +var stripLeadingZeroes = /* @__PURE__ */ __name((value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); +}, "stripLeadingZeroes"); + +// src/exceptions.ts +var _ServiceException = class _ServiceException extends Error { + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, _ServiceException.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } +}; +__name(_ServiceException, "ServiceException"); +var ServiceException = _ServiceException; +var decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { + Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => { + if (exception[k] == void 0 || exception[k] === "") { + exception[k] = v; + } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; +}, "decorateServiceException"); + +// src/default-error-handler.ts +var throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; + const response = new exceptionCtor({ + name: (parsedBody == null ? void 0 : parsedBody.code) || (parsedBody == null ? void 0 : parsedBody.Code) || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata + }); + throw decorateServiceException(response, parsedBody); +}, "throwDefaultError"); +var withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; +}, "withBaseException"); +var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] +}), "deserializeMetadata"); + +// src/defaults-mode.ts +var loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100 + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 3e4 + }; + default: + return {}; + } +}, "loadConfigsForDefaultMode"); + +// src/emitWarningIfUnsupportedVersion.ts +var warningEmitted = false; +var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 14) { + warningEmitted = true; + } +}, "emitWarningIfUnsupportedVersion"); + +// src/extensions/checksum.ts + +var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in import_types.AlgorithmId) { + const algorithmId = import_types.AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + } + }; +}, "getChecksumConfiguration"); +var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; +}, "resolveChecksumRuntimeConfig"); + +// src/extensions/retry.ts +var getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let _retryStrategy = runtimeConfig.retryStrategy; + return { + setRetryStrategy(retryStrategy) { + _retryStrategy = retryStrategy; + }, + retryStrategy() { + return _retryStrategy; + } + }; +}, "getRetryConfiguration"); +var resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; +}, "resolveRetryRuntimeConfig"); + +// src/extensions/defaultExtensionConfiguration.ts +var getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + ...getChecksumConfiguration(runtimeConfig), + ...getRetryConfiguration(runtimeConfig) + }; +}, "getDefaultExtensionConfiguration"); +var getDefaultClientConfiguration = getDefaultExtensionConfiguration; +var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + ...resolveChecksumRuntimeConfig(config), + ...resolveRetryRuntimeConfig(config) + }; +}, "resolveDefaultRuntimeConfig"); + +// src/extended-encode-uri-component.ts +function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +__name(extendedEncodeURIComponent, "extendedEncodeURIComponent"); + +// src/get-array-if-single-item.ts +var getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem"); + +// src/get-value-from-text-node.ts +var getValueFromTextNode = /* @__PURE__ */ __name((obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } + } + return obj; +}, "getValueFromTextNode"); + +// src/lazy-json.ts +var StringWrapper = /* @__PURE__ */ __name(function() { + const Class = Object.getPrototypeOf(this).constructor; + const Constructor = Function.bind.apply(String, [null, ...arguments]); + const instance = new Constructor(); + Object.setPrototypeOf(instance, Class.prototype); + return instance; +}, "StringWrapper"); +StringWrapper.prototype = Object.create(String.prototype, { + constructor: { + value: StringWrapper, + enumerable: false, + writable: true, + configurable: true + } +}); +Object.setPrototypeOf(StringWrapper, String); +var _LazyJsonString = class _LazyJsonString extends StringWrapper { + deserializeJSON() { + return JSON.parse(super.toString()); + } + toJSON() { + return super.toString(); + } + static fromObject(object) { + if (object instanceof _LazyJsonString) { + return object; + } else if (object instanceof String || typeof object === "string") { + return new _LazyJsonString(object); + } + return new _LazyJsonString(JSON.stringify(object)); + } +}; +__name(_LazyJsonString, "LazyJsonString"); +var LazyJsonString = _LazyJsonString; + +// src/object-mapping.ts +function map(arg0, arg1, arg2) { + let target; + let filter; + let instructions; + if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { + target = {}; + instructions = arg0; + } else { + target = arg0; + if (typeof arg1 === "function") { + filter = arg1; + instructions = arg2; + return mapWithFilter(target, filter, instructions); + } else { + instructions = arg1; + } + } + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; + } + applyInstruction(target, null, instructions, key); + } + return target; +} +__name(map, "map"); +var convertMap = /* @__PURE__ */ __name((target) => { + const output = {}; + for (const [k, v] of Object.entries(target || {})) { + output[k] = [, v]; + } + return output; +}, "convertMap"); +var take = /* @__PURE__ */ __name((source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; +}, "take"); +var mapWithFilter = /* @__PURE__ */ __name((target, filter, instructions) => { + return map( + target, + Object.entries(instructions).reduce( + (_instructions, [key, value]) => { + if (Array.isArray(value)) { + _instructions[key] = value; + } else { + if (typeof value === "function") { + _instructions[key] = [filter, value()]; + } else { + _instructions[key] = [filter, value]; + } + } + return _instructions; + }, + {} + ) + ); +}, "mapWithFilter"); +var applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; + } + const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { + target[targetKey] = valueFn(source[sourceKey]); + } + return; + } + let [filter, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter === void 0 && (_value = value()) != null; + const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed) { + target[targetKey] = _value; + } else if (customFilterPassed) { + target[targetKey] = value(); + } + } else { + const defaultFilterPassed = filter === void 0 && value != null; + const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; + } + } +}, "applyInstruction"); +var nonNullish = /* @__PURE__ */ __name((_) => _ != null, "nonNullish"); +var pass = /* @__PURE__ */ __name((_) => _, "pass"); + +// src/resolve-path.ts +var resolvedPath = /* @__PURE__ */ __name((resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { + if (input != null && input[memberName] !== void 0) { + const labelValue = labelValueProvider(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: " + memberName + "."); + } + resolvedPath2 = resolvedPath2.replace( + uriLabel, + isGreedyLabel ? labelValue.split("/").map((segment) => extendedEncodeURIComponent(segment)).join("/") : extendedEncodeURIComponent(labelValue) + ); + } else { + throw new Error("No value provided for input HTTP label: " + memberName + "."); + } + return resolvedPath2; +}, "resolvedPath"); + +// src/ser-utils.ts +var serializeFloat = /* @__PURE__ */ __name((value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } +}, "serializeFloat"); + +// src/serde-json.ts +var _json = /* @__PURE__ */ __name((obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_) => _ != null).map(_json); + } + if (typeof obj === "object") { + const target = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; + } + target[key] = _json(obj[key]); + } + return target; + } + return obj; +}, "_json"); + +// src/split-every.ts +function splitEvery(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i = 0; i < segments.length; i++) { + if (currentSegment === "") { + currentSegment = segments[i]; + } else { + currentSegment += delimiter + segments[i]; + } + if ((i + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; + } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; +} +__name(splitEvery, "splitEvery"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + NoOpLogger, + Client, + collectBody, + Command, + SENSITIVE_STRING, + createAggregatedClient, + dateToUtcString, + parseRfc3339DateTime, + parseRfc3339DateTimeWithOffset, + parseRfc7231DateTime, + parseEpochTimestamp, + throwDefaultError, + withBaseException, + loadConfigsForDefaultMode, + emitWarningIfUnsupportedVersion, + getDefaultExtensionConfiguration, + getDefaultClientConfiguration, + resolveDefaultRuntimeConfig, + ServiceException, + decorateServiceException, + extendedEncodeURIComponent, + getArrayIfSingleItem, + getValueFromTextNode, + StringWrapper, + LazyJsonString, + map, + convertMap, + take, + parseBoolean, + expectBoolean, + expectNumber, + expectFloat32, + expectLong, + expectInt, + expectInt32, + expectShort, + expectByte, + expectNonNull, + expectObject, + expectString, + expectUnion, + strictParseDouble, + strictParseFloat, + strictParseFloat32, + limitedParseDouble, + handleFloat, + limitedParseFloat, + limitedParseFloat32, + strictParseLong, + strictParseInt, + strictParseInt32, + strictParseShort, + strictParseByte, + logger, + resolvedPath, + serializeFloat, + _json, + splitEvery +}); + diff --git a/node_modules/@smithy/smithy-client/dist-cjs/lazy-json.js b/node_modules/@smithy/smithy-client/dist-cjs/lazy-json.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/lazy-json.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/object-mapping.js b/node_modules/@smithy/smithy-client/dist-cjs/object-mapping.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/object-mapping.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/parse-utils.js b/node_modules/@smithy/smithy-client/dist-cjs/parse-utils.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/parse-utils.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/resolve-path.js b/node_modules/@smithy/smithy-client/dist-cjs/resolve-path.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/resolve-path.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/ser-utils.js b/node_modules/@smithy/smithy-client/dist-cjs/ser-utils.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/ser-utils.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/serde-json.js b/node_modules/@smithy/smithy-client/dist-cjs/serde-json.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/serde-json.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-cjs/split-every.js b/node_modules/@smithy/smithy-client/dist-cjs/split-every.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-cjs/split-every.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js b/node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js new file mode 100644 index 0000000..73cd076 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js @@ -0,0 +1,7 @@ +export class NoOpLogger { + trace() { } + debug() { } + info() { } + warn() { } + error() { } +} diff --git a/node_modules/@smithy/smithy-client/dist-es/client.js b/node_modules/@smithy/smithy-client/dist-es/client.js new file mode 100644 index 0000000..c811198 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/client.js @@ -0,0 +1,24 @@ +import { constructStack } from "@smithy/middleware-stack"; +export class Client { + constructor(config) { + this.middlewareStack = constructStack(); + this.config = config; + } + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + if (callback) { + handler(command) + .then((result) => callback(null, result.output), (err) => callback(err)) + .catch(() => { }); + } + else { + return handler(command).then((result) => result.output); + } + } + destroy() { + if (this.config.requestHandler.destroy) + this.config.requestHandler.destroy(); + } +} diff --git a/node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js b/node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js new file mode 100644 index 0000000..b6a5c0b --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js @@ -0,0 +1,11 @@ +import { Uint8ArrayBlobAdapter } from "@smithy/util-stream"; +export const collectBody = async (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Uint8ArrayBlobAdapter.mutate(streamBody); + } + if (!streamBody) { + return Uint8ArrayBlobAdapter.mutate(new Uint8Array()); + } + const fromContext = context.streamCollector(streamBody); + return Uint8ArrayBlobAdapter.mutate(await fromContext); +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/command.js b/node_modules/@smithy/smithy-client/dist-es/command.js new file mode 100644 index 0000000..89acb01 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/command.js @@ -0,0 +1,114 @@ +import { constructStack } from "@smithy/middleware-stack"; +import { SMITHY_CONTEXT_KEY } from "@smithy/types"; +export class Command { + constructor() { + this.middlewareStack = constructStack(); + } + static classBuilder() { + return new ClassBuilder(); + } + resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + ...smithyContext, + }, + ...additionalContext, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } +} +class ClassBuilder { + constructor() { + this._init = () => { }; + this._ep = {}; + this._middlewareFn = () => []; + this._commandName = ""; + this._clientName = ""; + this._additionalContext = {}; + this._smithyContext = {}; + this._inputFilterSensitiveLog = (_) => _; + this._outputFilterSensitiveLog = (_) => _; + this._serializer = null; + this._deserializer = null; + } + init(cb) { + this._init = cb; + } + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext, + }; + return this; + } + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + ser(serializer) { + this._serializer = serializer; + return this; + } + de(deserializer) { + this._deserializer = deserializer; + return this; + } + build() { + const closure = this; + let CommandRef; + return (CommandRef = class extends Command { + static getEndpointParameterInstructions() { + return closure._ep; + } + constructor(...[input]) { + super(); + this.serialize = closure._serializer; + this.deserialize = closure._deserializer; + this.input = input ?? {}; + closure._init(this); + } + resolveMiddleware(stack, configuration, options) { + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog, + outputFilterSensitiveLog: closure._outputFilterSensitiveLog, + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext, + }); + } + }); + } +} diff --git a/node_modules/@smithy/smithy-client/dist-es/constants.js b/node_modules/@smithy/smithy-client/dist-es/constants.js new file mode 100644 index 0000000..9b193d7 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/constants.js @@ -0,0 +1 @@ +export const SENSITIVE_STRING = "***SensitiveInformation***"; diff --git a/node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js b/node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js new file mode 100644 index 0000000..44cf4dc --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js @@ -0,0 +1,21 @@ +export const createAggregatedClient = (commands, Client) => { + for (const command of Object.keys(commands)) { + const CommandCtor = commands[command]; + const methodImpl = async function (args, optionsOrCb, cb) { + const command = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + }; + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client.prototype[methodName] = methodImpl; + } +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/date-utils.js b/node_modules/@smithy/smithy-client/dist-es/date-utils.js new file mode 100644 index 0000000..e3293b2 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/date-utils.js @@ -0,0 +1,187 @@ +import { strictParseByte, strictParseDouble, strictParseFloat32, strictParseShort } from "./parse-utils"; +const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; +export function dateToUtcString(date) { + const year = date.getUTCFullYear(); + const month = date.getUTCMonth(); + const dayOfWeek = date.getUTCDay(); + const dayOfMonthInt = date.getUTCDate(); + const hoursInt = date.getUTCHours(); + const minutesInt = date.getUTCMinutes(); + const secondsInt = date.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; +} +const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); +export const parseRfc3339DateTime = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; + const year = strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); +}; +const RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/); +export const parseRfc3339DateTimeWithOffset = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339_WITH_OFFSET.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; + const year = strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + if (offsetStr.toUpperCase() != "Z") { + date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr)); + } + return date; +}; +const IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); +const RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); +const ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/); +export const parseRfc7231DateTime = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match = IMF_FIXDATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + match = RFC_850_DATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds, + })); + } + match = ASC_TIME.exec(value); + if (match) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + throw new TypeError("Invalid RFC-7231 date-time value"); +}; +export const parseEpochTimestamp = (value) => { + if (value === null || value === undefined) { + return undefined; + } + let valueAsDouble; + if (typeof value === "number") { + valueAsDouble = value; + } + else if (typeof value === "string") { + valueAsDouble = strictParseDouble(value); + } + else { + throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + } + if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { + throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + } + return new Date(Math.round(valueAsDouble * 1000)); +}; +const buildDate = (year, month, day, time) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year, adjustedMonth, day); + return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds))); +}; +const parseTwoDigitYear = (value) => { + const thisYear = new Date().getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; +}; +const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000; +const adjustRfc850Year = (input) => { + if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); + } + return input; +}; +const parseMonthByShortName = (value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; +}; +const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +const validateDayOfMonth = (year, month, day) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year)) { + maxDays = 29; + } + if (day > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + } +}; +const isLeapYear = (year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +}; +const parseDateValue = (value, type, lower, upper) => { + const dateVal = strictParseByte(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; +}; +const parseMilliseconds = (value) => { + if (value === null || value === undefined) { + return 0; + } + return strictParseFloat32("0." + value) * 1000; +}; +const parseOffsetToMilliseconds = (value) => { + const directionStr = value[0]; + let direction = 1; + if (directionStr == "+") { + direction = 1; + } + else if (directionStr == "-") { + direction = -1; + } + else { + throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); + } + const hour = Number(value.substring(1, 3)); + const minute = Number(value.substring(4, 6)); + return direction * (hour * 60 + minute) * 60 * 1000; +}; +const stripLeadingZeroes = (value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/default-error-handler.js b/node_modules/@smithy/smithy-client/dist-es/default-error-handler.js new file mode 100644 index 0000000..7da1091 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/default-error-handler.js @@ -0,0 +1,22 @@ +import { decorateServiceException } from "./exceptions"; +export const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined; + const response = new exceptionCtor({ + name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata, + }); + throw decorateServiceException(response, parsedBody); +}; +export const withBaseException = (ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; +}; +const deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); diff --git a/node_modules/@smithy/smithy-client/dist-es/defaults-mode.js b/node_modules/@smithy/smithy-client/dist-es/defaults-mode.js new file mode 100644 index 0000000..f19079c --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/defaults-mode.js @@ -0,0 +1,26 @@ +export const loadConfigsForDefaultMode = (mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100, + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100, + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100, + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 30000, + }; + default: + return {}; + } +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js b/node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js new file mode 100644 index 0000000..993b965 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js @@ -0,0 +1,6 @@ +let warningEmitted = false; +export const emitWarningIfUnsupportedVersion = (version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 14) { + warningEmitted = true; + } +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/exceptions.js b/node_modules/@smithy/smithy-client/dist-es/exceptions.js new file mode 100644 index 0000000..e7d3ab4 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/exceptions.js @@ -0,0 +1,22 @@ +export class ServiceException extends Error { + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, ServiceException.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } +} +export const decorateServiceException = (exception, additions = {}) => { + Object.entries(additions) + .filter(([, v]) => v !== undefined) + .forEach(([k, v]) => { + if (exception[k] == undefined || exception[k] === "") { + exception[k] = v; + } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js b/node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js new file mode 100644 index 0000000..5baeaf5 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js @@ -0,0 +1,5 @@ +export function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} diff --git a/node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js b/node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js new file mode 100644 index 0000000..b091924 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js @@ -0,0 +1,31 @@ +import { AlgorithmId } from "@smithy/types"; +export { AlgorithmId }; +export const getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in AlgorithmId) { + const algorithmId = AlgorithmId[id]; + if (runtimeConfig[algorithmId] === undefined) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId], + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + }, + }; +}; +export const resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js b/node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js new file mode 100644 index 0000000..52a70eb --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js @@ -0,0 +1,15 @@ +import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from "./checksum"; +import { getRetryConfiguration, resolveRetryRuntimeConfig } from "./retry"; +export const getDefaultExtensionConfiguration = (runtimeConfig) => { + return { + ...getChecksumConfiguration(runtimeConfig), + ...getRetryConfiguration(runtimeConfig), + }; +}; +export const getDefaultClientConfiguration = getDefaultExtensionConfiguration; +export const resolveDefaultRuntimeConfig = (config) => { + return { + ...resolveChecksumRuntimeConfig(config), + ...resolveRetryRuntimeConfig(config), + }; +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/extensions/index.js b/node_modules/@smithy/smithy-client/dist-es/extensions/index.js new file mode 100644 index 0000000..f1b8074 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/extensions/index.js @@ -0,0 +1 @@ +export * from "./defaultExtensionConfiguration"; diff --git a/node_modules/@smithy/smithy-client/dist-es/extensions/retry.js b/node_modules/@smithy/smithy-client/dist-es/extensions/retry.js new file mode 100644 index 0000000..bf8e5de --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/extensions/retry.js @@ -0,0 +1,16 @@ +export const getRetryConfiguration = (runtimeConfig) => { + let _retryStrategy = runtimeConfig.retryStrategy; + return { + setRetryStrategy(retryStrategy) { + _retryStrategy = retryStrategy; + }, + retryStrategy() { + return _retryStrategy; + }, + }; +}; +export const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js b/node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js new file mode 100644 index 0000000..25d9432 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js @@ -0,0 +1 @@ +export const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; diff --git a/node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js b/node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js new file mode 100644 index 0000000..aa0f827 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js @@ -0,0 +1,12 @@ +export const getValueFromTextNode = (obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) { + obj[key] = obj[key][textNodeName]; + } + else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } + } + return obj; +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/index.js b/node_modules/@smithy/smithy-client/dist-es/index.js new file mode 100644 index 0000000..b9be4f3 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/index.js @@ -0,0 +1,22 @@ +export * from "./NoOpLogger"; +export * from "./client"; +export * from "./collect-stream-body"; +export * from "./command"; +export * from "./constants"; +export * from "./create-aggregated-client"; +export * from "./date-utils"; +export * from "./default-error-handler"; +export * from "./defaults-mode"; +export * from "./emitWarningIfUnsupportedVersion"; +export * from "./extensions"; +export * from "./exceptions"; +export * from "./extended-encode-uri-component"; +export * from "./get-array-if-single-item"; +export * from "./get-value-from-text-node"; +export * from "./lazy-json"; +export * from "./object-mapping"; +export * from "./parse-utils"; +export * from "./resolve-path"; +export * from "./ser-utils"; +export * from "./serde-json"; +export * from "./split-every"; diff --git a/node_modules/@smithy/smithy-client/dist-es/lazy-json.js b/node_modules/@smithy/smithy-client/dist-es/lazy-json.js new file mode 100644 index 0000000..cff1a7e --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/lazy-json.js @@ -0,0 +1,33 @@ +export const StringWrapper = function () { + const Class = Object.getPrototypeOf(this).constructor; + const Constructor = Function.bind.apply(String, [null, ...arguments]); + const instance = new Constructor(); + Object.setPrototypeOf(instance, Class.prototype); + return instance; +}; +StringWrapper.prototype = Object.create(String.prototype, { + constructor: { + value: StringWrapper, + enumerable: false, + writable: true, + configurable: true, + }, +}); +Object.setPrototypeOf(StringWrapper, String); +export class LazyJsonString extends StringWrapper { + deserializeJSON() { + return JSON.parse(super.toString()); + } + toJSON() { + return super.toString(); + } + static fromObject(object) { + if (object instanceof LazyJsonString) { + return object; + } + else if (object instanceof String || typeof object === "string") { + return new LazyJsonString(object); + } + return new LazyJsonString(JSON.stringify(object)); + } +} diff --git a/node_modules/@smithy/smithy-client/dist-es/object-mapping.js b/node_modules/@smithy/smithy-client/dist-es/object-mapping.js new file mode 100644 index 0000000..84a1f26 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/object-mapping.js @@ -0,0 +1,92 @@ +export function map(arg0, arg1, arg2) { + let target; + let filter; + let instructions; + if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { + target = {}; + instructions = arg0; + } + else { + target = arg0; + if (typeof arg1 === "function") { + filter = arg1; + instructions = arg2; + return mapWithFilter(target, filter, instructions); + } + else { + instructions = arg1; + } + } + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; + } + applyInstruction(target, null, instructions, key); + } + return target; +} +export const convertMap = (target) => { + const output = {}; + for (const [k, v] of Object.entries(target || {})) { + output[k] = [, v]; + } + return output; +}; +export const take = (source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; +}; +const mapWithFilter = (target, filter, instructions) => { + return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => { + if (Array.isArray(value)) { + _instructions[key] = value; + } + else { + if (typeof value === "function") { + _instructions[key] = [filter, value()]; + } + else { + _instructions[key] = [filter, value]; + } + } + return _instructions; + }, {})); +}; +const applyInstruction = (target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; + } + const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if ((typeof filter === "function" && filter(source[sourceKey])) || (typeof filter !== "function" && !!filter)) { + target[targetKey] = valueFn(source[sourceKey]); + } + return; + } + let [filter, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter === undefined && (_value = value()) != null; + const customFilterPassed = (typeof filter === "function" && !!filter(void 0)) || (typeof filter !== "function" && !!filter); + if (defaultFilterPassed) { + target[targetKey] = _value; + } + else if (customFilterPassed) { + target[targetKey] = value(); + } + } + else { + const defaultFilterPassed = filter === undefined && value != null; + const customFilterPassed = (typeof filter === "function" && !!filter(value)) || (typeof filter !== "function" && !!filter); + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; + } + } +}; +const nonNullish = (_) => _ != null; +const pass = (_) => _; diff --git a/node_modules/@smithy/smithy-client/dist-es/parse-utils.js b/node_modules/@smithy/smithy-client/dist-es/parse-utils.js new file mode 100644 index 0000000..209db79 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/parse-utils.js @@ -0,0 +1,230 @@ +export const parseBoolean = (value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); + } +}; +export const expectBoolean = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "number") { + if (value === 0 || value === 1) { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (value === 0) { + return false; + } + if (value === 1) { + return true; + } + } + if (typeof value === "string") { + const lower = value.toLowerCase(); + if (lower === "false" || lower === "true") { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (lower === "false") { + return false; + } + if (lower === "true") { + return true; + } + } + if (typeof value === "boolean") { + return value; + } + throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); +}; +export const expectNumber = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; + } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); +}; +const MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); +export const expectFloat32 = (value) => { + const expected = expectNumber(value); + if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; +}; +export const expectLong = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); +}; +export const expectInt = expectLong; +export const expectInt32 = (value) => expectSizedInt(value, 32); +export const expectShort = (value) => expectSizedInt(value, 16); +export const expectByte = (value) => expectSizedInt(value, 8); +const expectSizedInt = (value, size) => { + const expected = expectLong(value); + if (expected !== undefined && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; +}; +const castInt = (value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } +}; +export const expectNonNull = (value, location) => { + if (value === null || value === undefined) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); + } + throw new TypeError("Expected a non-null value"); + } + return value; +}; +export const expectObject = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "object" && !Array.isArray(value)) { + return value; + } + const receivedType = Array.isArray(value) ? "array" : typeof value; + throw new TypeError(`Expected object, got ${receivedType}: ${value}`); +}; +export const expectString = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "string") { + return value; + } + if (["boolean", "number", "bigint"].includes(typeof value)) { + logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); + return String(value); + } + throw new TypeError(`Expected string, got ${typeof value}: ${value}`); +}; +export const expectUnion = (value) => { + if (value === null || value === undefined) { + return undefined; + } + const asObject = expectObject(value); + const setKeys = Object.entries(asObject) + .filter(([, v]) => v != null) + .map(([k]) => k); + if (setKeys.length === 0) { + throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + } + if (setKeys.length > 1) { + throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + } + return asObject; +}; +export const strictParseDouble = (value) => { + if (typeof value == "string") { + return expectNumber(parseNumber(value)); + } + return expectNumber(value); +}; +export const strictParseFloat = strictParseDouble; +export const strictParseFloat32 = (value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); + } + return expectFloat32(value); +}; +const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; +const parseNumber = (value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); +}; +export const limitedParseDouble = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectNumber(value); +}; +export const handleFloat = limitedParseDouble; +export const limitedParseFloat = limitedParseDouble; +export const limitedParseFloat32 = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectFloat32(value); +}; +const parseFloatString = (value) => { + switch (value) { + case "NaN": + return NaN; + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + default: + throw new Error(`Unable to parse float value: ${value}`); + } +}; +export const strictParseLong = (value) => { + if (typeof value === "string") { + return expectLong(parseNumber(value)); + } + return expectLong(value); +}; +export const strictParseInt = strictParseLong; +export const strictParseInt32 = (value) => { + if (typeof value === "string") { + return expectInt32(parseNumber(value)); + } + return expectInt32(value); +}; +export const strictParseShort = (value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); + } + return expectShort(value); +}; +export const strictParseByte = (value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); + } + return expectByte(value); +}; +const stackTraceWarning = (message) => { + return String(new TypeError(message).stack || message) + .split("\n") + .slice(0, 5) + .filter((s) => !s.includes("stackTraceWarning")) + .join("\n"); +}; +export const logger = { + warn: console.warn, +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/resolve-path.js b/node_modules/@smithy/smithy-client/dist-es/resolve-path.js new file mode 100644 index 0000000..8483e01 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/resolve-path.js @@ -0,0 +1,19 @@ +import { extendedEncodeURIComponent } from "./extended-encode-uri-component"; +export const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { + if (input != null && input[memberName] !== undefined) { + const labelValue = labelValueProvider(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: " + memberName + "."); + } + resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel + ? labelValue + .split("/") + .map((segment) => extendedEncodeURIComponent(segment)) + .join("/") + : extendedEncodeURIComponent(labelValue)); + } + else { + throw new Error("No value provided for input HTTP label: " + memberName + "."); + } + return resolvedPath; +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/ser-utils.js b/node_modules/@smithy/smithy-client/dist-es/ser-utils.js new file mode 100644 index 0000000..91e5f30 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/ser-utils.js @@ -0,0 +1,13 @@ +export const serializeFloat = (value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/serde-json.js b/node_modules/@smithy/smithy-client/dist-es/serde-json.js new file mode 100644 index 0000000..babb7c1 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/serde-json.js @@ -0,0 +1,19 @@ +export const _json = (obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_) => _ != null).map(_json); + } + if (typeof obj === "object") { + const target = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; + } + target[key] = _json(obj[key]); + } + return target; + } + return obj; +}; diff --git a/node_modules/@smithy/smithy-client/dist-es/split-every.js b/node_modules/@smithy/smithy-client/dist-es/split-every.js new file mode 100644 index 0000000..1d78dca --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-es/split-every.js @@ -0,0 +1,27 @@ +export function splitEvery(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i = 0; i < segments.length; i++) { + if (currentSegment === "") { + currentSegment = segments[i]; + } + else { + currentSegment += delimiter + segments[i]; + } + if ((i + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; + } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; +} diff --git a/node_modules/@smithy/smithy-client/dist-types/NoOpLogger.d.ts b/node_modules/@smithy/smithy-client/dist-types/NoOpLogger.d.ts new file mode 100644 index 0000000..93ebff4 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/NoOpLogger.d.ts @@ -0,0 +1,11 @@ +import { Logger } from "@smithy/types"; +/** + * @internal + */ +export declare class NoOpLogger implements Logger { + trace(): void; + debug(): void; + info(): void; + warn(): void; + error(): void; +} diff --git a/node_modules/@smithy/smithy-client/dist-types/client.d.ts b/node_modules/@smithy/smithy-client/dist-types/client.d.ts new file mode 100644 index 0000000..11b1557 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/client.d.ts @@ -0,0 +1,32 @@ +import { Client as IClient, Command, FetchHttpHandlerOptions, MetadataBearer, MiddlewareStack, NodeHttpHandlerOptions, RequestHandler } from "@smithy/types"; +/** + * @public + */ +export interface SmithyConfiguration { + requestHandler: RequestHandler | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record; + /** + * The API version set internally by the SDK, and is + * not planned to be used by customer code. + * @internal + */ + readonly apiVersion: string; +} +/** + * @internal + */ +export type SmithyResolvedConfiguration = { + requestHandler: RequestHandler; + readonly apiVersion: string; +}; +/** + * @public + */ +export declare class Client> implements IClient { + middlewareStack: MiddlewareStack; + readonly config: ResolvedClientConfiguration; + constructor(config: ResolvedClientConfiguration); + send(command: Command>, options?: HandlerOptions): Promise; + send(command: Command>, cb: (err: any, data?: OutputType) => void): void; + send(command: Command>, options: HandlerOptions, cb: (err: any, data?: OutputType) => void): void; + destroy(): void; +} diff --git a/node_modules/@smithy/smithy-client/dist-types/collect-stream-body.d.ts b/node_modules/@smithy/smithy-client/dist-types/collect-stream-body.d.ts new file mode 100644 index 0000000..b555804 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/collect-stream-body.d.ts @@ -0,0 +1,10 @@ +import { SerdeContext } from "@smithy/types"; +import { Uint8ArrayBlobAdapter } from "@smithy/util-stream"; +/** + * @internal + * + * Collect low-level response body stream to Uint8Array. + */ +export declare const collectBody: (streamBody: any, context: { + streamCollector: SerdeContext["streamCollector"]; +}) => Promise; diff --git a/node_modules/@smithy/smithy-client/dist-types/command.d.ts b/node_modules/@smithy/smithy-client/dist-types/command.d.ts new file mode 100644 index 0000000..3625b88 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/command.d.ts @@ -0,0 +1,113 @@ +import type { EndpointParameterInstructions } from "@smithy/middleware-endpoint"; +import type { Command as ICommand, Handler, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, Logger, MetadataBearer, MiddlewareStack as IMiddlewareStack, OptionalParameter, Pluggable, RequestHandler, SerdeContext } from "@smithy/types"; +/** + * @public + */ +export declare abstract class Command implements ICommand { + abstract input: Input; + readonly middlewareStack: IMiddlewareStack; + /** + * Factory for Command ClassBuilder. + * @internal + */ + static classBuilder; + }, SI extends object = any, SO extends MetadataBearer = any>(): ClassBuilder; + abstract resolveMiddleware(stack: IMiddlewareStack, configuration: ResolvedClientConfiguration, options: any): Handler; + /** + * @internal + */ + resolveMiddlewareWithContext(clientStack: IMiddlewareStack, configuration: { + logger: Logger; + requestHandler: RequestHandler; + }, options: any, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }: ResolveMiddlewareContextArgs): import("@smithy/types").InitializeHandler; +} +/** + * @internal + */ +type ResolveMiddlewareContextArgs = { + middlewareFn: (CommandCtor: any, clientStack: any, config: any, options: any) => Pluggable[]; + clientName: string; + commandName: string; + smithyContext: Record; + additionalContext: HandlerExecutionContext; + inputFilterSensitiveLog: (_: any) => any; + outputFilterSensitiveLog: (_: any) => any; + CommandCtor: any; +}; +/** + * @internal + */ +declare class ClassBuilder; +}, SI extends object = any, SO extends MetadataBearer = any> { + private _init; + private _ep; + private _middlewareFn; + private _commandName; + private _clientName; + private _additionalContext; + private _smithyContext; + private _inputFilterSensitiveLog; + private _outputFilterSensitiveLog; + private _serializer; + private _deserializer; + /** + * Optional init callback. + */ + init(cb: (_: Command) => void): void; + /** + * Set the endpoint parameter instructions. + */ + ep(endpointParameterInstructions: EndpointParameterInstructions): ClassBuilder; + /** + * Add any number of middleware. + */ + m(middlewareSupplier: (CommandCtor: any, clientStack: any, config: any, options: any) => Pluggable[]): ClassBuilder; + /** + * Set the initial handler execution context Smithy field. + */ + s(service: string, operation: string, smithyContext?: Record): ClassBuilder; + /** + * Set the initial handler execution context. + */ + c(additionalContext?: HandlerExecutionContext): ClassBuilder; + /** + * Set constant string identifiers for the operation. + */ + n(clientName: string, commandName: string): ClassBuilder; + /** + * Set the input and output sensistive log filters. + */ + f(inputFilter?: (_: any) => any, outputFilter?: (_: any) => any): ClassBuilder; + /** + * Sets the serializer. + */ + ser(serializer: (input: I, context?: SerdeContext | any) => Promise): ClassBuilder; + /** + * Sets the deserializer. + */ + de(deserializer: (output: IHttpResponse, context?: SerdeContext | any) => Promise): ClassBuilder; + /** + * @returns a Command class with the classBuilder properties. + */ + build(): { + new (input: I): CommandImpl; + new (...[input]: OptionalParameter): CommandImpl; + getEndpointParameterInstructions(): EndpointParameterInstructions; + }; +} +/** + * A concrete implementation of ICommand with no abstract members. + * @public + */ +export interface CommandImpl; +}, SI extends object = any, SO extends MetadataBearer = any> extends Command { + readonly input: I; + resolveMiddleware(stack: IMiddlewareStack, configuration: C, options: any): Handler; +} +export {}; diff --git a/node_modules/@smithy/smithy-client/dist-types/constants.d.ts b/node_modules/@smithy/smithy-client/dist-types/constants.d.ts new file mode 100644 index 0000000..c17e1c8 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/constants.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const SENSITIVE_STRING = "***SensitiveInformation***"; diff --git a/node_modules/@smithy/smithy-client/dist-types/create-aggregated-client.d.ts b/node_modules/@smithy/smithy-client/dist-types/create-aggregated-client.d.ts new file mode 100644 index 0000000..00e23d8 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/create-aggregated-client.d.ts @@ -0,0 +1,9 @@ +import { Client } from "./client"; +/** + * @internal + * + * @param commands - command lookup container. + * @param client - client instance on which to add aggregated methods. + * @returns an aggregated client with dynamically created methods. + */ +export declare const createAggregatedClient: (commands: Record, Client: new (...args: any) => Client) => void; diff --git a/node_modules/@smithy/smithy-client/dist-types/date-utils.d.ts b/node_modules/@smithy/smithy-client/dist-types/date-utils.d.ts new file mode 100644 index 0000000..99c55f4 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/date-utils.d.ts @@ -0,0 +1,73 @@ +/** + * @internal + * + * Builds a proper UTC HttpDate timestamp from a Date object + * since not all environments will have this as the expected + * format. + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString} + * - Prior to ECMAScript 2018, the format of the return value + * - varied according to the platform. The most common return + * - value was an RFC-1123 formatted date stamp, which is a + * - slightly updated version of RFC-822 date stamps. + */ +export declare function dateToUtcString(date: Date): string; +/** + * @internal + * + * Parses a value into a Date. Returns undefined if the input is null or + * undefined, throws an error if the input is not a string that can be parsed + * as an RFC 3339 date. + * + * Input strings must conform to RFC3339 section 5.6, and cannot have a UTC + * offset. Fractional precision is supported. + * + * @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14} + * + * @param value - the value to parse + * @returns a Date or undefined + */ +export declare const parseRfc3339DateTime: (value: unknown) => Date | undefined; +/** + * @internal + * + * Parses a value into a Date. Returns undefined if the input is null or + * undefined, throws an error if the input is not a string that can be parsed + * as an RFC 3339 date. + * + * Input strings must conform to RFC3339 section 5.6, and can have a UTC + * offset. Fractional precision is supported. + * + * @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14} + * + * @param value - the value to parse + * @returns a Date or undefined + */ +export declare const parseRfc3339DateTimeWithOffset: (value: unknown) => Date | undefined; +/** + * @internal + * + * Parses a value into a Date. Returns undefined if the input is null or + * undefined, throws an error if the input is not a string that can be parsed + * as an RFC 7231 IMF-fixdate or obs-date. + * + * Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported. + * + * @see {@link https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1} + * + * @param value - the value to parse + * @returns a Date or undefined + */ +export declare const parseRfc7231DateTime: (value: unknown) => Date | undefined; +/** + * @internal + * + * Parses a value into a Date. Returns undefined if the input is null or + * undefined, throws an error if the input is not a number or a parseable string. + * + * Input strings must be an integer or floating point number. Fractional seconds are supported. + * + * @param value - the value to parse + * @returns a Date or undefined + */ +export declare const parseEpochTimestamp: (value: unknown) => Date | undefined; diff --git a/node_modules/@smithy/smithy-client/dist-types/default-error-handler.d.ts b/node_modules/@smithy/smithy-client/dist-types/default-error-handler.d.ts new file mode 100644 index 0000000..fd4b52d --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/default-error-handler.d.ts @@ -0,0 +1,13 @@ +/** + * Always throws an error with the given `exceptionCtor` and other arguments. + * This is only called from an error handling code path. + * + * @internal + */ +export declare const throwDefaultError: ({ output, parsedBody, exceptionCtor, errorCode }: any) => never; +/** + * @internal + * + * Creates {@link throwDefaultError} with bound ExceptionCtor. + */ +export declare const withBaseException: (ExceptionCtor: new (...args: any) => any) => any; diff --git a/node_modules/@smithy/smithy-client/dist-types/defaults-mode.d.ts b/node_modules/@smithy/smithy-client/dist-types/defaults-mode.d.ts new file mode 100644 index 0000000..1ddb6f0 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/defaults-mode.d.ts @@ -0,0 +1,28 @@ +/** + * @internal + */ +export declare const loadConfigsForDefaultMode: (mode: ResolvedDefaultsMode) => DefaultsModeConfigs; +/** + * Option determining how certain default configuration options are resolved in the SDK. It can be one of the value listed below: + * * `"standard"`:

The STANDARD mode provides the latest recommended default values that should be safe to run in most scenarios

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

+ * * `"in-region"`:

The IN_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services from within the same AWS region

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

+ * * `"cross-region"`:

The CROSS_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services in a different region

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

+ * * `"mobile"`:

The MOBILE mode builds on the standard mode and includes optimization tailored for mobile applications

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

+ * * `"auto"`:

The AUTO mode is an experimental mode that builds on the standard mode. The SDK will attempt to discover the execution environment to determine the appropriate settings automatically.

Note that the auto detection is heuristics-based and does not guarantee 100% accuracy. STANDARD mode will be used if the execution environment cannot be determined. The auto detection might query EC2 Instance Metadata service, which might introduce latency. Therefore we recommend choosing an explicit defaults_mode instead if startup latency is critical to your application

+ * * `"legacy"`:

The LEGACY mode provides default settings that vary per SDK and were used prior to establishment of defaults_mode

+ * + * @defaultValue "legacy" + */ +export type DefaultsMode = "standard" | "in-region" | "cross-region" | "mobile" | "auto" | "legacy"; +/** + * @internal + */ +export type ResolvedDefaultsMode = Exclude; +/** + * @internal + */ +export interface DefaultsModeConfigs { + retryMode?: string; + connectionTimeout?: number; + requestTimeout?: number; +} diff --git a/node_modules/@smithy/smithy-client/dist-types/emitWarningIfUnsupportedVersion.d.ts b/node_modules/@smithy/smithy-client/dist-types/emitWarningIfUnsupportedVersion.d.ts new file mode 100644 index 0000000..8fc02ce --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/emitWarningIfUnsupportedVersion.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + * + * Emits warning if the provided Node.js version string is pending deprecation. + * + * @param version - The Node.js version string. + */ +export declare const emitWarningIfUnsupportedVersion: (version: string) => void; diff --git a/node_modules/@smithy/smithy-client/dist-types/exceptions.d.ts b/node_modules/@smithy/smithy-client/dist-types/exceptions.d.ts new file mode 100644 index 0000000..eed4e2a --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/exceptions.d.ts @@ -0,0 +1,34 @@ +import { HttpResponse, MetadataBearer, ResponseMetadata, RetryableTrait, SmithyException } from "@smithy/types"; +/** + * The type of the exception class constructor parameter. The returned type contains the properties + * in the `ExceptionType` but not in the `BaseExceptionType`. If the `BaseExceptionType` contains + * `$metadata` and `message` properties, it's also included in the returned type. + * @internal + */ +export type ExceptionOptionType = Omit>; +/** + * @public + */ +export interface ServiceExceptionOptions extends SmithyException, MetadataBearer { + message?: string; +} +/** + * @public + * + * Base exception class for the exceptions from the server-side. + */ +export declare class ServiceException extends Error implements SmithyException, MetadataBearer { + readonly $fault: "client" | "server"; + $response?: HttpResponse; + $retryable?: RetryableTrait; + $metadata: ResponseMetadata; + constructor(options: ServiceExceptionOptions); +} +/** + * This method inject unmodeled member to a deserialized SDK exception, + * and load the error message from different possible keys('message', + * 'Message'). + * + * @internal + */ +export declare const decorateServiceException: (exception: E, additions?: Record) => E; diff --git a/node_modules/@smithy/smithy-client/dist-types/extended-encode-uri-component.d.ts b/node_modules/@smithy/smithy-client/dist-types/extended-encode-uri-component.d.ts new file mode 100644 index 0000000..403e9ae --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/extended-encode-uri-component.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + * + * Function that wraps encodeURIComponent to encode additional characters + * to fully adhere to RFC 3986. + */ +export declare function extendedEncodeURIComponent(str: string): string; diff --git a/node_modules/@smithy/smithy-client/dist-types/extensions/checksum.d.ts b/node_modules/@smithy/smithy-client/dist-types/extensions/checksum.d.ts new file mode 100644 index 0000000..9f8e16f --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/extensions/checksum.d.ts @@ -0,0 +1,25 @@ +import type { ChecksumAlgorithm, ChecksumConfiguration, ChecksumConstructor, HashConstructor } from "@smithy/types"; +import { AlgorithmId } from "@smithy/types"; +export { AlgorithmId, ChecksumAlgorithm, ChecksumConfiguration }; +/** + * @internal + */ +export type PartialChecksumRuntimeConfigType = Partial<{ + sha256: ChecksumConstructor | HashConstructor; + md5: ChecksumConstructor | HashConstructor; + crc32: ChecksumConstructor | HashConstructor; + crc32c: ChecksumConstructor | HashConstructor; + sha1: ChecksumConstructor | HashConstructor; +}>; +/** + * @internal + */ +export declare const getChecksumConfiguration: (runtimeConfig: PartialChecksumRuntimeConfigType) => { + _checksumAlgorithms: ChecksumAlgorithm[]; + addChecksumAlgorithm(algo: ChecksumAlgorithm): void; + checksumAlgorithms(): ChecksumAlgorithm[]; +}; +/** + * @internal + */ +export declare const resolveChecksumRuntimeConfig: (clientConfig: ChecksumConfiguration) => PartialChecksumRuntimeConfigType; diff --git a/node_modules/@smithy/smithy-client/dist-types/extensions/defaultExtensionConfiguration.d.ts b/node_modules/@smithy/smithy-client/dist-types/extensions/defaultExtensionConfiguration.d.ts new file mode 100644 index 0000000..ec3e8a6 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/extensions/defaultExtensionConfiguration.d.ts @@ -0,0 +1,38 @@ +import type { DefaultExtensionConfiguration } from "@smithy/types"; +import { PartialChecksumRuntimeConfigType } from "./checksum"; +import { PartialRetryRuntimeConfigType } from "./retry"; +/** + * @internal + */ +export type DefaultExtensionRuntimeConfigType = PartialRetryRuntimeConfigType & PartialChecksumRuntimeConfigType; +/** + * @internal + * + * Helper function to resolve default extension configuration from runtime config + */ +export declare const getDefaultExtensionConfiguration: (runtimeConfig: DefaultExtensionRuntimeConfigType) => { + setRetryStrategy(retryStrategy: import("@smithy/types").Provider): void; + retryStrategy(): import("@smithy/types").Provider; + _checksumAlgorithms: import("@smithy/types").ChecksumAlgorithm[]; + addChecksumAlgorithm(algo: import("@smithy/types").ChecksumAlgorithm): void; + checksumAlgorithms(): import("@smithy/types").ChecksumAlgorithm[]; +}; +/** + * @deprecated use getDefaultExtensionConfiguration + * @internal + * + * Helper function to resolve default extension configuration from runtime config + */ +export declare const getDefaultClientConfiguration: (runtimeConfig: DefaultExtensionRuntimeConfigType) => { + setRetryStrategy(retryStrategy: import("@smithy/types").Provider): void; + retryStrategy(): import("@smithy/types").Provider; + _checksumAlgorithms: import("@smithy/types").ChecksumAlgorithm[]; + addChecksumAlgorithm(algo: import("@smithy/types").ChecksumAlgorithm): void; + checksumAlgorithms(): import("@smithy/types").ChecksumAlgorithm[]; +}; +/** + * @internal + * + * Helper function to resolve runtime config from default extension configuration + */ +export declare const resolveDefaultRuntimeConfig: (config: DefaultExtensionConfiguration) => DefaultExtensionRuntimeConfigType; diff --git a/node_modules/@smithy/smithy-client/dist-types/extensions/index.d.ts b/node_modules/@smithy/smithy-client/dist-types/extensions/index.d.ts new file mode 100644 index 0000000..f1b8074 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/extensions/index.d.ts @@ -0,0 +1 @@ +export * from "./defaultExtensionConfiguration"; diff --git a/node_modules/@smithy/smithy-client/dist-types/extensions/retry.d.ts b/node_modules/@smithy/smithy-client/dist-types/extensions/retry.d.ts new file mode 100644 index 0000000..c46843d --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/extensions/retry.d.ts @@ -0,0 +1,15 @@ +import { Provider, RetryStrategy, RetryStrategyConfiguration, RetryStrategyV2 } from "@smithy/types"; +export type PartialRetryRuntimeConfigType = Partial<{ + retryStrategy: Provider; +}>; +/** + * @internal + */ +export declare const getRetryConfiguration: (runtimeConfig: PartialRetryRuntimeConfigType) => { + setRetryStrategy(retryStrategy: Provider): void; + retryStrategy(): Provider; +}; +/** + * @internal + */ +export declare const resolveRetryRuntimeConfig: (retryStrategyConfiguration: RetryStrategyConfiguration) => PartialRetryRuntimeConfigType; diff --git a/node_modules/@smithy/smithy-client/dist-types/get-array-if-single-item.d.ts b/node_modules/@smithy/smithy-client/dist-types/get-array-if-single-item.d.ts new file mode 100644 index 0000000..6468b91 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/get-array-if-single-item.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + * + * The XML parser will set one K:V for a member that could + * return multiple entries but only has one. + */ +export declare const getArrayIfSingleItem: (mayBeArray: T) => T | T[]; diff --git a/node_modules/@smithy/smithy-client/dist-types/get-value-from-text-node.d.ts b/node_modules/@smithy/smithy-client/dist-types/get-value-from-text-node.d.ts new file mode 100644 index 0000000..7163e5a --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/get-value-from-text-node.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + * + * Recursively parses object and populates value is node from + * "#text" key if it's available + */ +export declare const getValueFromTextNode: (obj: any) => any; diff --git a/node_modules/@smithy/smithy-client/dist-types/index.d.ts b/node_modules/@smithy/smithy-client/dist-types/index.d.ts new file mode 100644 index 0000000..996345f --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/index.d.ts @@ -0,0 +1,23 @@ +export * from "./NoOpLogger"; +export * from "./client"; +export * from "./collect-stream-body"; +export * from "./command"; +export * from "./constants"; +export * from "./create-aggregated-client"; +export * from "./date-utils"; +export * from "./default-error-handler"; +export * from "./defaults-mode"; +export * from "./emitWarningIfUnsupportedVersion"; +export * from "./extensions"; +export * from "./exceptions"; +export * from "./extended-encode-uri-component"; +export * from "./get-array-if-single-item"; +export * from "./get-value-from-text-node"; +export * from "./lazy-json"; +export * from "./object-mapping"; +export * from "./parse-utils"; +export * from "./resolve-path"; +export * from "./ser-utils"; +export * from "./serde-json"; +export * from "./split-every"; +export type { DocumentType, SdkError, SmithyException } from "@smithy/types"; diff --git a/node_modules/@smithy/smithy-client/dist-types/lazy-json.d.ts b/node_modules/@smithy/smithy-client/dist-types/lazy-json.d.ts new file mode 100644 index 0000000..f7571a7 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/lazy-json.d.ts @@ -0,0 +1,24 @@ +/** + * Lazy String holder for JSON typed contents. + */ +interface StringWrapper { + new (arg: any): String; +} +/** + * Because of https://github.com/microsoft/tslib/issues/95, + * TS 'extends' shim doesn't support extending native types like String. + * So here we create StringWrapper that duplicate everything from String + * class including its prototype chain. So we can extend from here. + * + * @internal + */ +export declare const StringWrapper: StringWrapper; +/** + * @internal + */ +export declare class LazyJsonString extends StringWrapper { + deserializeJSON(): any; + toJSON(): string; + static fromObject(object: any): LazyJsonString; +} +export {}; diff --git a/node_modules/@smithy/smithy-client/dist-types/object-mapping.d.ts b/node_modules/@smithy/smithy-client/dist-types/object-mapping.d.ts new file mode 100644 index 0000000..97e28e5 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/object-mapping.d.ts @@ -0,0 +1,162 @@ +/** + * @internal + * + * A set of instructions for multiple keys. + * The aim is to provide a concise yet readable way to map and filter values + * onto a target object. + * + * @example + * ```javascript + * const example: ObjectMappingInstructions = { + * lazyValue1: [, () => 1], + * lazyValue2: [, () => 2], + * lazyValue3: [, () => 3], + * lazyConditionalValue1: [() => true, () => 4], + * lazyConditionalValue2: [() => true, () => 5], + * lazyConditionalValue3: [true, () => 6], + * lazyConditionalValue4: [false, () => 44], + * lazyConditionalValue5: [() => false, () => 55], + * lazyConditionalValue6: ["", () => 66], + * simpleValue1: [, 7], + * simpleValue2: [, 8], + * simpleValue3: [, 9], + * conditionalValue1: [() => true, 10], + * conditionalValue2: [() => true, 11], + * conditionalValue3: [{}, 12], + * conditionalValue4: [false, 110], + * conditionalValue5: [() => false, 121], + * conditionalValue6: ["", 132], + * }; + * + * const exampleResult: Record = { + * lazyValue1: 1, + * lazyValue2: 2, + * lazyValue3: 3, + * lazyConditionalValue1: 4, + * lazyConditionalValue2: 5, + * lazyConditionalValue3: 6, + * simpleValue1: 7, + * simpleValue2: 8, + * simpleValue3: 9, + * conditionalValue1: 10, + * conditionalValue2: 11, + * conditionalValue3: 12, + * }; + * ``` + */ +export type ObjectMappingInstructions = Record; +/** + * @internal + * + * A variant of the object mapping instruction for the `take` function. + * In this case, the source value is provided to the value function, turning it + * from a supplier into a mapper. + */ +export type SourceMappingInstructions = Record; +/** + * @internal + * + * An instruction set for assigning a value to a target object. + */ +export type ObjectMappingInstruction = LazyValueInstruction | ConditionalLazyValueInstruction | SimpleValueInstruction | ConditionalValueInstruction | UnfilteredValue; +/** + * @internal + * + * non-array + */ +export type UnfilteredValue = any; +/** + * @internal + */ +export type LazyValueInstruction = [FilterStatus, ValueSupplier]; +/** + * @internal + */ +export type ConditionalLazyValueInstruction = [FilterStatusSupplier, ValueSupplier]; +/** + * @internal + */ +export type SimpleValueInstruction = [FilterStatus, Value]; +/** + * @internal + */ +export type ConditionalValueInstruction = [ValueFilteringFunction, Value]; +/** + * @internal + */ +export type SourceMappingInstruction = [(ValueFilteringFunction | FilterStatus)?, ValueMapper?, string?]; +/** + * @internal + * + * Filter is considered passed if + * 1. It is a boolean true. + * 2. It is not undefined and is itself truthy. + * 3. It is undefined and the corresponding _value_ is neither null nor undefined. + */ +export type FilterStatus = boolean | unknown | void; +/** + * @internal + * + * Supplies the filter check but not against any value as input. + */ +export type FilterStatusSupplier = () => boolean; +/** + * @internal + * + * Filter check with the given value. + */ +export type ValueFilteringFunction = (value: any) => boolean; +/** + * @internal + * + * Supplies the value for lazy evaluation. + */ +export type ValueSupplier = () => any; +/** + * @internal + * + * A function that maps the source value to the target value. + * Defaults to pass-through with nullish check. + */ +export type ValueMapper = (value: any) => any; +/** + * @internal + * + * A non-function value. + */ +export type Value = any; +/** + * @internal + * Internal/Private, for codegen use only. + * + * Transfer a set of keys from [instructions] to [target]. + * + * For each instruction in the record, the target key will be the instruction key. + * The target assignment will be conditional on the instruction's filter. + * The target assigned value will be supplied by the instructions as an evaluable function or non-function value. + * + * @see ObjectMappingInstructions for an example. + */ +export declare function map(target: any, filter: (value: any) => boolean, instructions: Record): typeof target; +/** + * @internal + */ +export declare function map(instructions: ObjectMappingInstructions): any; +/** + * @internal + */ +export declare function map(target: any, instructions: ObjectMappingInstructions): typeof target; +/** + * Convert a regular object `{ k: v }` to `{ k: [, v] }` mapping instruction set with default + * filter. + * + * @internal + */ +export declare const convertMap: (target: any) => Record; +/** + * @param source - original object with data. + * @param instructions - how to map the data. + * @returns new object mapped from the source object. + * @internal + */ +export declare const take: (source: any, instructions: SourceMappingInstructions) => any; diff --git a/node_modules/@smithy/smithy-client/dist-types/parse-utils.d.ts b/node_modules/@smithy/smithy-client/dist-types/parse-utils.d.ts new file mode 100644 index 0000000..b5ded6f --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/parse-utils.d.ts @@ -0,0 +1,270 @@ +/** + * @internal + * + * Give an input string, strictly parses a boolean value. + * + * @param value - The boolean string to parse. + * @returns true for "true", false for "false", otherwise an error is thrown. + */ +export declare const parseBoolean: (value: string) => boolean; +/** + * @internal + * + * Asserts a value is a boolean and returns it. + * Casts strings and numbers with a warning if there is evidence that they were + * intended to be booleans. + * + * @param value - A value that is expected to be a boolean. + * @returns The value if it's a boolean, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectBoolean: (value: any) => boolean | undefined; +/** + * @internal + * + * Asserts a value is a number and returns it. + * Casts strings with a warning if the string is a parseable number. + * This is to unblock slight API definition/implementation inconsistencies. + * + * @param value - A value that is expected to be a number. + * @returns The value if it's a number, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectNumber: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is a 32-bit float and returns it. + * + * @param value - A value that is expected to be a 32-bit float. + * @returns The value if it's a float, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectFloat32: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is an integer and returns it. + * + * @param value - A value that is expected to be an integer. + * @returns The value if it's an integer, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectLong: (value: any) => number | undefined; +/** + * @internal + * + * @deprecated Use expectLong + */ +export declare const expectInt: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is a 32-bit integer and returns it. + * + * @param value - A value that is expected to be an integer. + * @returns The value if it's an integer, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectInt32: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is a 16-bit integer and returns it. + * + * @param value - A value that is expected to be an integer. + * @returns The value if it's an integer, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectShort: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is an 8-bit integer and returns it. + * + * @param value - A value that is expected to be an integer. + * @returns The value if it's an integer, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectByte: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is not null or undefined and returns it, or throws an error. + * + * @param value - A value that is expected to be defined + * @param location - The location where we're expecting to find a defined object (optional) + * @returns The value if it's not undefined, otherwise throws an error + */ +export declare const expectNonNull: (value: T | null | undefined, location?: string) => T; +/** + * @internal + * + * Asserts a value is an JSON-like object and returns it. This is expected to be used + * with values parsed from JSON (arrays, objects, numbers, strings, booleans). + * + * @param value - A value that is expected to be an object + * @returns The value if it's an object, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectObject: (value: any) => Record | undefined; +/** + * @internal + * + * Asserts a value is a string and returns it. + * Numbers and boolean will be cast to strings with a warning. + * + * @param value - A value that is expected to be a string. + * @returns The value if it's a string, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectString: (value: any) => string | undefined; +/** + * @internal + * + * Asserts a value is a JSON-like object with only one non-null/non-undefined key and + * returns it. + * + * @param value - A value that is expected to be an object with exactly one non-null, + * non-undefined key. + * @returns the value if it's a union, undefined if it's null/undefined, otherwise + * an error is thrown. + */ +export declare const expectUnion: (value: unknown) => Record | undefined; +/** + * @internal + * + * Parses a value into a double. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by the standard + * parseFloat with one exception: NaN may only be explicitly set as the string + * "NaN", any implicit Nan values will result in an error being thrown. If any + * other type is provided, an exception will be thrown. + * + * @param value - A number or string representation of a double. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseDouble: (value: string | number) => number | undefined; +/** + * @internal + * + * @deprecated Use strictParseDouble + */ +export declare const strictParseFloat: (value: string | number) => number | undefined; +/** + * @internal + * + * Parses a value into a float. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by the standard + * parseFloat with one exception: NaN may only be explicitly set as the string + * "NaN", any implicit Nan values will result in an error being thrown. If any + * other type is provided, an exception will be thrown. + * + * @param value - A number or string representation of a float. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseFloat32: (value: string | number) => number | undefined; +/** + * @internal + * + * Asserts a value is a number and returns it. If the value is a string + * representation of a non-numeric number type (NaN, Infinity, -Infinity), + * the value will be parsed. Any other string value will result in an exception + * being thrown. Null or undefined will be returned as undefined. Any other + * type will result in an exception being thrown. + * + * @param value - A number or string representation of a non-numeric float. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const limitedParseDouble: (value: string | number) => number | undefined; +/** + * @internal + * + * @deprecated Use limitedParseDouble + */ +export declare const handleFloat: (value: string | number) => number | undefined; +/** + * @internal + * + * @deprecated Use limitedParseDouble + */ +export declare const limitedParseFloat: (value: string | number) => number | undefined; +/** + * @internal + * + * Asserts a value is a 32-bit float and returns it. If the value is a string + * representation of a non-numeric number type (NaN, Infinity, -Infinity), + * the value will be parsed. Any other string value will result in an exception + * being thrown. Null or undefined will be returned as undefined. Any other + * type will result in an exception being thrown. + * + * @param value - A number or string representation of a non-numeric float. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const limitedParseFloat32: (value: string | number) => number | undefined; +/** + * @internal + * + * Parses a value into an integer. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by parseFloat + * and the result will be asserted to be an integer. If the parsed value is not + * an integer, or the raw value is any type other than a string or number, an + * exception will be thrown. + * + * @param value - A number or string representation of an integer. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseLong: (value: string | number) => number | undefined; +/** + * @internal + * + * @deprecated Use strictParseLong + */ +export declare const strictParseInt: (value: string | number) => number | undefined; +/** + * @internal + * + * Parses a value into a 32-bit integer. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by parseFloat + * and the result will be asserted to be an integer. If the parsed value is not + * an integer, or the raw value is any type other than a string or number, an + * exception will be thrown. + * + * @param value - A number or string representation of a 32-bit integer. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseInt32: (value: string | number) => number | undefined; +/** + * @internal + * + * Parses a value into a 16-bit integer. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by parseFloat + * and the result will be asserted to be an integer. If the parsed value is not + * an integer, or the raw value is any type other than a string or number, an + * exception will be thrown. + * + * @param value - A number or string representation of a 16-bit integer. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseShort: (value: string | number) => number | undefined; +/** + * @internal + * + * Parses a value into an 8-bit integer. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by parseFloat + * and the result will be asserted to be an integer. If the parsed value is not + * an integer, or the raw value is any type other than a string or number, an + * exception will be thrown. + * + * @param value - A number or string representation of an 8-bit integer. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseByte: (value: string | number) => number | undefined; +/** + * @internal + */ +export declare const logger: { + warn: { + (...data: any[]): void; + (message?: any, ...optionalParams: any[]): void; + }; +}; diff --git a/node_modules/@smithy/smithy-client/dist-types/resolve-path.d.ts b/node_modules/@smithy/smithy-client/dist-types/resolve-path.d.ts new file mode 100644 index 0000000..03386d6 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/resolve-path.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const resolvedPath: (resolvedPath: string, input: unknown, memberName: string, labelValueProvider: () => string | undefined, uriLabel: string, isGreedyLabel: boolean) => string; diff --git a/node_modules/@smithy/smithy-client/dist-types/ser-utils.d.ts b/node_modules/@smithy/smithy-client/dist-types/ser-utils.d.ts new file mode 100644 index 0000000..c9ee840 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ser-utils.d.ts @@ -0,0 +1,9 @@ +/** + * @internal + * + * Serializes a number, turning non-numeric values into strings. + * + * @param value - The number to serialize. + * @returns A number, or a string if the given number was non-numeric. + */ +export declare const serializeFloat: (value: number) => string | number; diff --git a/node_modules/@smithy/smithy-client/dist-types/serde-json.d.ts b/node_modules/@smithy/smithy-client/dist-types/serde-json.d.ts new file mode 100644 index 0000000..76e0c05 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/serde-json.d.ts @@ -0,0 +1,10 @@ +/** + * @internal + * + * Maps an object through the default JSON serde behavior. + * This means removing nullish fields and un-sparsifying lists. + * + * @param obj - to be checked. + * @returns same object with default serde behavior applied. + */ +export declare const _json: (obj: any) => any; diff --git a/node_modules/@smithy/smithy-client/dist-types/split-every.d.ts b/node_modules/@smithy/smithy-client/dist-types/split-every.d.ts new file mode 100644 index 0000000..45a0229 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/split-every.d.ts @@ -0,0 +1,11 @@ +/** + * @internal + * + * Given an input string, splits based on the delimiter after a given + * number of delimiters has been encountered. + * + * @param value - The input string to split. + * @param delimiter - The delimiter to split on. + * @param numDelimiters - The number of delimiters to have encountered to split. + */ +export declare function splitEvery(value: string, delimiter: string, numDelimiters: number): Array; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/NoOpLogger.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/NoOpLogger.d.ts new file mode 100644 index 0000000..a9a1062 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/NoOpLogger.d.ts @@ -0,0 +1,11 @@ +import { Logger } from "@smithy/types"; +/** + * @internal + */ +export declare class NoOpLogger implements Logger { + trace(): void; + debug(): void; + info(): void; + warn(): void; + error(): void; +} diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/client.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/client.d.ts new file mode 100644 index 0000000..bb71119 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/client.d.ts @@ -0,0 +1,32 @@ +import { Client as IClient, Command, FetchHttpHandlerOptions, MetadataBearer, MiddlewareStack, NodeHttpHandlerOptions, RequestHandler } from "@smithy/types"; +/** + * @public + */ +export interface SmithyConfiguration { + requestHandler: RequestHandler | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record; + /** + * The API version set internally by the SDK, and is + * not planned to be used by customer code. + * @internal + */ + readonly apiVersion: string; +} +/** + * @internal + */ +export type SmithyResolvedConfiguration = { + requestHandler: RequestHandler; + readonly apiVersion: string; +}; +/** + * @public + */ +export declare class Client> implements IClient { + middlewareStack: MiddlewareStack; + readonly config: ResolvedClientConfiguration; + constructor(config: ResolvedClientConfiguration); + send(command: Command>, options?: HandlerOptions): Promise; + send(command: Command>, cb: (err: any, data?: OutputType) => void): void; + send(command: Command>, options: HandlerOptions, cb: (err: any, data?: OutputType) => void): void; + destroy(): void; +} diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/collect-stream-body.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/collect-stream-body.d.ts new file mode 100644 index 0000000..9c5f471 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/collect-stream-body.d.ts @@ -0,0 +1,10 @@ +import { SerdeContext } from "@smithy/types"; +import { Uint8ArrayBlobAdapter } from "@smithy/util-stream"; +/** + * @internal + * + * Collect low-level response body stream to Uint8Array. + */ +export declare const collectBody: (streamBody: any, context: { + streamCollector: SerdeContext["streamCollector"]; +}) => Promise; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/command.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/command.d.ts new file mode 100644 index 0000000..8b42ff6 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/command.d.ts @@ -0,0 +1,113 @@ +import { EndpointParameterInstructions } from "@smithy/middleware-endpoint"; +import { Command as ICommand, Handler, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, Logger, MetadataBearer, MiddlewareStack as IMiddlewareStack, OptionalParameter, Pluggable, RequestHandler, SerdeContext } from "@smithy/types"; +/** + * @public + */ +export declare abstract class Command implements ICommand { + abstract input: Input; + readonly middlewareStack: IMiddlewareStack; + /** + * Factory for Command ClassBuilder. + * @internal + */ + static classBuilder; + }, SI extends object = any, SO extends MetadataBearer = any>(): ClassBuilder; + abstract resolveMiddleware(stack: IMiddlewareStack, configuration: ResolvedClientConfiguration, options: any): Handler; + /** + * @internal + */ + resolveMiddlewareWithContext(clientStack: IMiddlewareStack, configuration: { + logger: Logger; + requestHandler: RequestHandler; + }, options: any, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }: ResolveMiddlewareContextArgs): import("@smithy/types").InitializeHandler; +} +/** + * @internal + */ +type ResolveMiddlewareContextArgs = { + middlewareFn: (CommandCtor: any, clientStack: any, config: any, options: any) => Pluggable[]; + clientName: string; + commandName: string; + smithyContext: Record; + additionalContext: HandlerExecutionContext; + inputFilterSensitiveLog: (_: any) => any; + outputFilterSensitiveLog: (_: any) => any; + CommandCtor: any; +}; +/** + * @internal + */ +declare class ClassBuilder; +}, SI extends object = any, SO extends MetadataBearer = any> { + private _init; + private _ep; + private _middlewareFn; + private _commandName; + private _clientName; + private _additionalContext; + private _smithyContext; + private _inputFilterSensitiveLog; + private _outputFilterSensitiveLog; + private _serializer; + private _deserializer; + /** + * Optional init callback. + */ + init(cb: (_: Command) => void): void; + /** + * Set the endpoint parameter instructions. + */ + ep(endpointParameterInstructions: EndpointParameterInstructions): ClassBuilder; + /** + * Add any number of middleware. + */ + m(middlewareSupplier: (CommandCtor: any, clientStack: any, config: any, options: any) => Pluggable[]): ClassBuilder; + /** + * Set the initial handler execution context Smithy field. + */ + s(service: string, operation: string, smithyContext?: Record): ClassBuilder; + /** + * Set the initial handler execution context. + */ + c(additionalContext?: HandlerExecutionContext): ClassBuilder; + /** + * Set constant string identifiers for the operation. + */ + n(clientName: string, commandName: string): ClassBuilder; + /** + * Set the input and output sensistive log filters. + */ + f(inputFilter?: (_: any) => any, outputFilter?: (_: any) => any): ClassBuilder; + /** + * Sets the serializer. + */ + ser(serializer: (input: I, context?: SerdeContext | any) => Promise): ClassBuilder; + /** + * Sets the deserializer. + */ + de(deserializer: (output: IHttpResponse, context?: SerdeContext | any) => Promise): ClassBuilder; + /** + * @returns a Command class with the classBuilder properties. + */ + build(): { + new (input: I): CommandImpl; + new (...[input]: OptionalParameter): CommandImpl; + getEndpointParameterInstructions(): EndpointParameterInstructions; + }; +} +/** + * A concrete implementation of ICommand with no abstract members. + * @public + */ +export interface CommandImpl; +}, SI extends object = any, SO extends MetadataBearer = any> extends Command { + readonly input: I; + resolveMiddleware(stack: IMiddlewareStack, configuration: C, options: any): Handler; +} +export {}; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/constants.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/constants.d.ts new file mode 100644 index 0000000..eab978f --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/constants.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const SENSITIVE_STRING = "***SensitiveInformation***"; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/create-aggregated-client.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/create-aggregated-client.d.ts new file mode 100644 index 0000000..ded1999 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/create-aggregated-client.d.ts @@ -0,0 +1,9 @@ +import { Client } from "./client"; +/** + * @internal + * + * @param commands - command lookup container. + * @param client - client instance on which to add aggregated methods. + * @returns an aggregated client with dynamically created methods. + */ +export declare const createAggregatedClient: (commands: Record, Client: new (...args: any) => Client) => void; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/date-utils.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/date-utils.d.ts new file mode 100644 index 0000000..41071c2 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/date-utils.d.ts @@ -0,0 +1,73 @@ +/** + * @internal + * + * Builds a proper UTC HttpDate timestamp from a Date object + * since not all environments will have this as the expected + * format. + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString} + * - Prior to ECMAScript 2018, the format of the return value + * - varied according to the platform. The most common return + * - value was an RFC-1123 formatted date stamp, which is a + * - slightly updated version of RFC-822 date stamps. + */ +export declare function dateToUtcString(date: Date): string; +/** + * @internal + * + * Parses a value into a Date. Returns undefined if the input is null or + * undefined, throws an error if the input is not a string that can be parsed + * as an RFC 3339 date. + * + * Input strings must conform to RFC3339 section 5.6, and cannot have a UTC + * offset. Fractional precision is supported. + * + * @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14} + * + * @param value - the value to parse + * @returns a Date or undefined + */ +export declare const parseRfc3339DateTime: (value: unknown) => Date | undefined; +/** + * @internal + * + * Parses a value into a Date. Returns undefined if the input is null or + * undefined, throws an error if the input is not a string that can be parsed + * as an RFC 3339 date. + * + * Input strings must conform to RFC3339 section 5.6, and can have a UTC + * offset. Fractional precision is supported. + * + * @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14} + * + * @param value - the value to parse + * @returns a Date or undefined + */ +export declare const parseRfc3339DateTimeWithOffset: (value: unknown) => Date | undefined; +/** + * @internal + * + * Parses a value into a Date. Returns undefined if the input is null or + * undefined, throws an error if the input is not a string that can be parsed + * as an RFC 7231 IMF-fixdate or obs-date. + * + * Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported. + * + * @see {@link https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1} + * + * @param value - the value to parse + * @returns a Date or undefined + */ +export declare const parseRfc7231DateTime: (value: unknown) => Date | undefined; +/** + * @internal + * + * Parses a value into a Date. Returns undefined if the input is null or + * undefined, throws an error if the input is not a number or a parseable string. + * + * Input strings must be an integer or floating point number. Fractional seconds are supported. + * + * @param value - the value to parse + * @returns a Date or undefined + */ +export declare const parseEpochTimestamp: (value: unknown) => Date | undefined; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/default-error-handler.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/default-error-handler.d.ts new file mode 100644 index 0000000..e9852ba --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/default-error-handler.d.ts @@ -0,0 +1,13 @@ +/** + * Always throws an error with the given `exceptionCtor` and other arguments. + * This is only called from an error handling code path. + * + * @internal + */ +export declare const throwDefaultError: ({ output, parsedBody, exceptionCtor, errorCode }: any) => never; +/** + * @internal + * + * Creates {@link throwDefaultError} with bound ExceptionCtor. + */ +export declare const withBaseException: (ExceptionCtor: new (...args: any) => any) => any; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/defaults-mode.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/defaults-mode.d.ts new file mode 100644 index 0000000..c8a89ed --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/defaults-mode.d.ts @@ -0,0 +1,28 @@ +/** + * @internal + */ +export declare const loadConfigsForDefaultMode: (mode: ResolvedDefaultsMode) => DefaultsModeConfigs; +/** + * Option determining how certain default configuration options are resolved in the SDK. It can be one of the value listed below: + * * `"standard"`:

The STANDARD mode provides the latest recommended default values that should be safe to run in most scenarios

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

+ * * `"in-region"`:

The IN_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services from within the same AWS region

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

+ * * `"cross-region"`:

The CROSS_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services in a different region

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

+ * * `"mobile"`:

The MOBILE mode builds on the standard mode and includes optimization tailored for mobile applications

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

+ * * `"auto"`:

The AUTO mode is an experimental mode that builds on the standard mode. The SDK will attempt to discover the execution environment to determine the appropriate settings automatically.

Note that the auto detection is heuristics-based and does not guarantee 100% accuracy. STANDARD mode will be used if the execution environment cannot be determined. The auto detection might query EC2 Instance Metadata service, which might introduce latency. Therefore we recommend choosing an explicit defaults_mode instead if startup latency is critical to your application

+ * * `"legacy"`:

The LEGACY mode provides default settings that vary per SDK and were used prior to establishment of defaults_mode

+ * + * @defaultValue "legacy" + */ +export type DefaultsMode = "standard" | "in-region" | "cross-region" | "mobile" | "auto" | "legacy"; +/** + * @internal + */ +export type ResolvedDefaultsMode = Exclude; +/** + * @internal + */ +export interface DefaultsModeConfigs { + retryMode?: string; + connectionTimeout?: number; + requestTimeout?: number; +} diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/emitWarningIfUnsupportedVersion.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/emitWarningIfUnsupportedVersion.d.ts new file mode 100644 index 0000000..f0284ef --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/emitWarningIfUnsupportedVersion.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + * + * Emits warning if the provided Node.js version string is pending deprecation. + * + * @param version - The Node.js version string. + */ +export declare const emitWarningIfUnsupportedVersion: (version: string) => void; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/exceptions.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/exceptions.d.ts new file mode 100644 index 0000000..4a8f57a --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/exceptions.d.ts @@ -0,0 +1,34 @@ +import { HttpResponse, MetadataBearer, ResponseMetadata, RetryableTrait, SmithyException } from "@smithy/types"; +/** + * The type of the exception class constructor parameter. The returned type contains the properties + * in the `ExceptionType` but not in the `BaseExceptionType`. If the `BaseExceptionType` contains + * `$metadata` and `message` properties, it's also included in the returned type. + * @internal + */ +export type ExceptionOptionType = Pick>>; +/** + * @public + */ +export interface ServiceExceptionOptions extends SmithyException, MetadataBearer { + message?: string; +} +/** + * @public + * + * Base exception class for the exceptions from the server-side. + */ +export declare class ServiceException extends Error implements SmithyException, MetadataBearer { + readonly $fault: "client" | "server"; + $response?: HttpResponse; + $retryable?: RetryableTrait; + $metadata: ResponseMetadata; + constructor(options: ServiceExceptionOptions); +} +/** + * This method inject unmodeled member to a deserialized SDK exception, + * and load the error message from different possible keys('message', + * 'Message'). + * + * @internal + */ +export declare const decorateServiceException: (exception: E, additions?: Record) => E; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/extended-encode-uri-component.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/extended-encode-uri-component.d.ts new file mode 100644 index 0000000..98c3802 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/extended-encode-uri-component.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + * + * Function that wraps encodeURIComponent to encode additional characters + * to fully adhere to RFC 3986. + */ +export declare function extendedEncodeURIComponent(str: string): string; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/checksum.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/checksum.d.ts new file mode 100644 index 0000000..92a5493 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/checksum.d.ts @@ -0,0 +1,25 @@ +import { ChecksumAlgorithm, ChecksumConfiguration, ChecksumConstructor, HashConstructor } from "@smithy/types"; +import { AlgorithmId } from "@smithy/types"; +export { AlgorithmId, ChecksumAlgorithm, ChecksumConfiguration }; +/** + * @internal + */ +export type PartialChecksumRuntimeConfigType = Partial<{ + sha256: ChecksumConstructor | HashConstructor; + md5: ChecksumConstructor | HashConstructor; + crc32: ChecksumConstructor | HashConstructor; + crc32c: ChecksumConstructor | HashConstructor; + sha1: ChecksumConstructor | HashConstructor; +}>; +/** + * @internal + */ +export declare const getChecksumConfiguration: (runtimeConfig: PartialChecksumRuntimeConfigType) => { + _checksumAlgorithms: ChecksumAlgorithm[]; + addChecksumAlgorithm(algo: ChecksumAlgorithm): void; + checksumAlgorithms(): ChecksumAlgorithm[]; +}; +/** + * @internal + */ +export declare const resolveChecksumRuntimeConfig: (clientConfig: ChecksumConfiguration) => PartialChecksumRuntimeConfigType; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts new file mode 100644 index 0000000..4ea1866 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts @@ -0,0 +1,38 @@ +import { DefaultExtensionConfiguration } from "@smithy/types"; +import { PartialChecksumRuntimeConfigType } from "./checksum"; +import { PartialRetryRuntimeConfigType } from "./retry"; +/** + * @internal + */ +export type DefaultExtensionRuntimeConfigType = PartialRetryRuntimeConfigType & PartialChecksumRuntimeConfigType; +/** + * @internal + * + * Helper function to resolve default extension configuration from runtime config + */ +export declare const getDefaultExtensionConfiguration: (runtimeConfig: DefaultExtensionRuntimeConfigType) => { + setRetryStrategy(retryStrategy: import("@smithy/types").Provider): void; + retryStrategy(): import("@smithy/types").Provider; + _checksumAlgorithms: import("@smithy/types").ChecksumAlgorithm[]; + addChecksumAlgorithm(algo: import("@smithy/types").ChecksumAlgorithm): void; + checksumAlgorithms(): import("@smithy/types").ChecksumAlgorithm[]; +}; +/** + * @deprecated use getDefaultExtensionConfiguration + * @internal + * + * Helper function to resolve default extension configuration from runtime config + */ +export declare const getDefaultClientConfiguration: (runtimeConfig: DefaultExtensionRuntimeConfigType) => { + setRetryStrategy(retryStrategy: import("@smithy/types").Provider): void; + retryStrategy(): import("@smithy/types").Provider; + _checksumAlgorithms: import("@smithy/types").ChecksumAlgorithm[]; + addChecksumAlgorithm(algo: import("@smithy/types").ChecksumAlgorithm): void; + checksumAlgorithms(): import("@smithy/types").ChecksumAlgorithm[]; +}; +/** + * @internal + * + * Helper function to resolve runtime config from default extension configuration + */ +export declare const resolveDefaultRuntimeConfig: (config: DefaultExtensionConfiguration) => DefaultExtensionRuntimeConfigType; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/index.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/index.d.ts new file mode 100644 index 0000000..04e3c83 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/index.d.ts @@ -0,0 +1 @@ +export * from "./defaultExtensionConfiguration"; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/retry.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/retry.d.ts new file mode 100644 index 0000000..12fbaa5 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/retry.d.ts @@ -0,0 +1,15 @@ +import { Provider, RetryStrategy, RetryStrategyConfiguration, RetryStrategyV2 } from "@smithy/types"; +export type PartialRetryRuntimeConfigType = Partial<{ + retryStrategy: Provider; +}>; +/** + * @internal + */ +export declare const getRetryConfiguration: (runtimeConfig: PartialRetryRuntimeConfigType) => { + setRetryStrategy(retryStrategy: Provider): void; + retryStrategy(): Provider; +}; +/** + * @internal + */ +export declare const resolveRetryRuntimeConfig: (retryStrategyConfiguration: RetryStrategyConfiguration) => PartialRetryRuntimeConfigType; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/get-array-if-single-item.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/get-array-if-single-item.d.ts new file mode 100644 index 0000000..dbbd280 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/get-array-if-single-item.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + * + * The XML parser will set one K:V for a member that could + * return multiple entries but only has one. + */ +export declare const getArrayIfSingleItem: (mayBeArray: T) => T | T[]; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/get-value-from-text-node.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/get-value-from-text-node.d.ts new file mode 100644 index 0000000..d56771e --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/get-value-from-text-node.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + * + * Recursively parses object and populates value is node from + * "#text" key if it's available + */ +export declare const getValueFromTextNode: (obj: any) => any; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..c410488 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/index.d.ts @@ -0,0 +1,23 @@ +export * from "./NoOpLogger"; +export * from "./client"; +export * from "./collect-stream-body"; +export * from "./command"; +export * from "./constants"; +export * from "./create-aggregated-client"; +export * from "./date-utils"; +export * from "./default-error-handler"; +export * from "./defaults-mode"; +export * from "./emitWarningIfUnsupportedVersion"; +export * from "./extensions"; +export * from "./exceptions"; +export * from "./extended-encode-uri-component"; +export * from "./get-array-if-single-item"; +export * from "./get-value-from-text-node"; +export * from "./lazy-json"; +export * from "./object-mapping"; +export * from "./parse-utils"; +export * from "./resolve-path"; +export * from "./ser-utils"; +export * from "./serde-json"; +export * from "./split-every"; +export { DocumentType, SdkError, SmithyException } from "@smithy/types"; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/lazy-json.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/lazy-json.d.ts new file mode 100644 index 0000000..f1cd159 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/lazy-json.d.ts @@ -0,0 +1,24 @@ +/** + * Lazy String holder for JSON typed contents. + */ +interface StringWrapper { + new (arg: any): String; +} +/** + * Because of https://github.com/microsoft/tslib/issues/95, + * TS 'extends' shim doesn't support extending native types like String. + * So here we create StringWrapper that duplicate everything from String + * class including its prototype chain. So we can extend from here. + * + * @internal + */ +export declare const StringWrapper: StringWrapper; +/** + * @internal + */ +export declare class LazyJsonString extends StringWrapper { + deserializeJSON(): any; + toJSON(): string; + static fromObject(object: any): LazyJsonString; +} +export {}; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/object-mapping.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/object-mapping.d.ts new file mode 100644 index 0000000..d658c16 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/object-mapping.d.ts @@ -0,0 +1,178 @@ +/** + * @internal + * + * A set of instructions for multiple keys. + * The aim is to provide a concise yet readable way to map and filter values + * onto a target object. + * + * @example + * ```javascript + * const example: ObjectMappingInstructions = { + * lazyValue1: [, () => 1], + * lazyValue2: [, () => 2], + * lazyValue3: [, () => 3], + * lazyConditionalValue1: [() => true, () => 4], + * lazyConditionalValue2: [() => true, () => 5], + * lazyConditionalValue3: [true, () => 6], + * lazyConditionalValue4: [false, () => 44], + * lazyConditionalValue5: [() => false, () => 55], + * lazyConditionalValue6: ["", () => 66], + * simpleValue1: [, 7], + * simpleValue2: [, 8], + * simpleValue3: [, 9], + * conditionalValue1: [() => true, 10], + * conditionalValue2: [() => true, 11], + * conditionalValue3: [{}, 12], + * conditionalValue4: [false, 110], + * conditionalValue5: [() => false, 121], + * conditionalValue6: ["", 132], + * }; + * + * const exampleResult: Record = { + * lazyValue1: 1, + * lazyValue2: 2, + * lazyValue3: 3, + * lazyConditionalValue1: 4, + * lazyConditionalValue2: 5, + * lazyConditionalValue3: 6, + * simpleValue1: 7, + * simpleValue2: 8, + * simpleValue3: 9, + * conditionalValue1: 10, + * conditionalValue2: 11, + * conditionalValue3: 12, + * }; + * ``` + */ +export type ObjectMappingInstructions = Record; +/** + * @internal + * + * A variant of the object mapping instruction for the `take` function. + * In this case, the source value is provided to the value function, turning it + * from a supplier into a mapper. + */ +export type SourceMappingInstructions = Record; +/** + * @internal + * + * An instruction set for assigning a value to a target object. + */ +export type ObjectMappingInstruction = LazyValueInstruction | ConditionalLazyValueInstruction | SimpleValueInstruction | ConditionalValueInstruction | UnfilteredValue; +/** + * @internal + * + * non-array + */ +export type UnfilteredValue = any; +/** + * @internal + */ +export type LazyValueInstruction = [ + FilterStatus, + ValueSupplier +]; +/** + * @internal + */ +export type ConditionalLazyValueInstruction = [ + FilterStatusSupplier, + ValueSupplier +]; +/** + * @internal + */ +export type SimpleValueInstruction = [ + FilterStatus, + Value +]; +/** + * @internal + */ +export type ConditionalValueInstruction = [ + ValueFilteringFunction, + Value +]; +/** + * @internal + */ +export type SourceMappingInstruction = [ + (ValueFilteringFunction | FilterStatus)?, + ValueMapper?, + string? +]; +/** + * @internal + * + * Filter is considered passed if + * 1. It is a boolean true. + * 2. It is not undefined and is itself truthy. + * 3. It is undefined and the corresponding _value_ is neither null nor undefined. + */ +export type FilterStatus = boolean | unknown | void; +/** + * @internal + * + * Supplies the filter check but not against any value as input. + */ +export type FilterStatusSupplier = () => boolean; +/** + * @internal + * + * Filter check with the given value. + */ +export type ValueFilteringFunction = (value: any) => boolean; +/** + * @internal + * + * Supplies the value for lazy evaluation. + */ +export type ValueSupplier = () => any; +/** + * @internal + * + * A function that maps the source value to the target value. + * Defaults to pass-through with nullish check. + */ +export type ValueMapper = (value: any) => any; +/** + * @internal + * + * A non-function value. + */ +export type Value = any; +/** + * @internal + * Internal/Private, for codegen use only. + * + * Transfer a set of keys from [instructions] to [target]. + * + * For each instruction in the record, the target key will be the instruction key. + * The target assignment will be conditional on the instruction's filter. + * The target assigned value will be supplied by the instructions as an evaluable function or non-function value. + * + * @see ObjectMappingInstructions for an example. + */ +export declare function map(target: any, filter: (value: any) => boolean, instructions: Record): typeof target; +/** + * @internal + */ +export declare function map(instructions: ObjectMappingInstructions): any; +/** + * @internal + */ +export declare function map(target: any, instructions: ObjectMappingInstructions): typeof target; +/** + * Convert a regular object `{ k: v }` to `{ k: [, v] }` mapping instruction set with default + * filter. + * + * @internal + */ +export declare const convertMap: (target: any) => Record; +/** + * @param source - original object with data. + * @param instructions - how to map the data. + * @returns new object mapped from the source object. + * @internal + */ +export declare const take: (source: any, instructions: SourceMappingInstructions) => any; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/parse-utils.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/parse-utils.d.ts new file mode 100644 index 0000000..e4c8aef --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/parse-utils.d.ts @@ -0,0 +1,270 @@ +/** + * @internal + * + * Give an input string, strictly parses a boolean value. + * + * @param value - The boolean string to parse. + * @returns true for "true", false for "false", otherwise an error is thrown. + */ +export declare const parseBoolean: (value: string) => boolean; +/** + * @internal + * + * Asserts a value is a boolean and returns it. + * Casts strings and numbers with a warning if there is evidence that they were + * intended to be booleans. + * + * @param value - A value that is expected to be a boolean. + * @returns The value if it's a boolean, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectBoolean: (value: any) => boolean | undefined; +/** + * @internal + * + * Asserts a value is a number and returns it. + * Casts strings with a warning if the string is a parseable number. + * This is to unblock slight API definition/implementation inconsistencies. + * + * @param value - A value that is expected to be a number. + * @returns The value if it's a number, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectNumber: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is a 32-bit float and returns it. + * + * @param value - A value that is expected to be a 32-bit float. + * @returns The value if it's a float, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectFloat32: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is an integer and returns it. + * + * @param value - A value that is expected to be an integer. + * @returns The value if it's an integer, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectLong: (value: any) => number | undefined; +/** + * @internal + * + * @deprecated Use expectLong + */ +export declare const expectInt: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is a 32-bit integer and returns it. + * + * @param value - A value that is expected to be an integer. + * @returns The value if it's an integer, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectInt32: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is a 16-bit integer and returns it. + * + * @param value - A value that is expected to be an integer. + * @returns The value if it's an integer, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectShort: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is an 8-bit integer and returns it. + * + * @param value - A value that is expected to be an integer. + * @returns The value if it's an integer, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectByte: (value: any) => number | undefined; +/** + * @internal + * + * Asserts a value is not null or undefined and returns it, or throws an error. + * + * @param value - A value that is expected to be defined + * @param location - The location where we're expecting to find a defined object (optional) + * @returns The value if it's not undefined, otherwise throws an error + */ +export declare const expectNonNull: (value: T | null | undefined, location?: string) => T; +/** + * @internal + * + * Asserts a value is an JSON-like object and returns it. This is expected to be used + * with values parsed from JSON (arrays, objects, numbers, strings, booleans). + * + * @param value - A value that is expected to be an object + * @returns The value if it's an object, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectObject: (value: any) => Record | undefined; +/** + * @internal + * + * Asserts a value is a string and returns it. + * Numbers and boolean will be cast to strings with a warning. + * + * @param value - A value that is expected to be a string. + * @returns The value if it's a string, undefined if it's null/undefined, + * otherwise an error is thrown. + */ +export declare const expectString: (value: any) => string | undefined; +/** + * @internal + * + * Asserts a value is a JSON-like object with only one non-null/non-undefined key and + * returns it. + * + * @param value - A value that is expected to be an object with exactly one non-null, + * non-undefined key. + * @returns the value if it's a union, undefined if it's null/undefined, otherwise + * an error is thrown. + */ +export declare const expectUnion: (value: unknown) => Record | undefined; +/** + * @internal + * + * Parses a value into a double. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by the standard + * parseFloat with one exception: NaN may only be explicitly set as the string + * "NaN", any implicit Nan values will result in an error being thrown. If any + * other type is provided, an exception will be thrown. + * + * @param value - A number or string representation of a double. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseDouble: (value: string | number) => number | undefined; +/** + * @internal + * + * @deprecated Use strictParseDouble + */ +export declare const strictParseFloat: (value: string | number) => number | undefined; +/** + * @internal + * + * Parses a value into a float. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by the standard + * parseFloat with one exception: NaN may only be explicitly set as the string + * "NaN", any implicit Nan values will result in an error being thrown. If any + * other type is provided, an exception will be thrown. + * + * @param value - A number or string representation of a float. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseFloat32: (value: string | number) => number | undefined; +/** + * @internal + * + * Asserts a value is a number and returns it. If the value is a string + * representation of a non-numeric number type (NaN, Infinity, -Infinity), + * the value will be parsed. Any other string value will result in an exception + * being thrown. Null or undefined will be returned as undefined. Any other + * type will result in an exception being thrown. + * + * @param value - A number or string representation of a non-numeric float. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const limitedParseDouble: (value: string | number) => number | undefined; +/** + * @internal + * + * @deprecated Use limitedParseDouble + */ +export declare const handleFloat: (value: string | number) => number | undefined; +/** + * @internal + * + * @deprecated Use limitedParseDouble + */ +export declare const limitedParseFloat: (value: string | number) => number | undefined; +/** + * @internal + * + * Asserts a value is a 32-bit float and returns it. If the value is a string + * representation of a non-numeric number type (NaN, Infinity, -Infinity), + * the value will be parsed. Any other string value will result in an exception + * being thrown. Null or undefined will be returned as undefined. Any other + * type will result in an exception being thrown. + * + * @param value - A number or string representation of a non-numeric float. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const limitedParseFloat32: (value: string | number) => number | undefined; +/** + * @internal + * + * Parses a value into an integer. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by parseFloat + * and the result will be asserted to be an integer. If the parsed value is not + * an integer, or the raw value is any type other than a string or number, an + * exception will be thrown. + * + * @param value - A number or string representation of an integer. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseLong: (value: string | number) => number | undefined; +/** + * @internal + * + * @deprecated Use strictParseLong + */ +export declare const strictParseInt: (value: string | number) => number | undefined; +/** + * @internal + * + * Parses a value into a 32-bit integer. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by parseFloat + * and the result will be asserted to be an integer. If the parsed value is not + * an integer, or the raw value is any type other than a string or number, an + * exception will be thrown. + * + * @param value - A number or string representation of a 32-bit integer. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseInt32: (value: string | number) => number | undefined; +/** + * @internal + * + * Parses a value into a 16-bit integer. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by parseFloat + * and the result will be asserted to be an integer. If the parsed value is not + * an integer, or the raw value is any type other than a string or number, an + * exception will be thrown. + * + * @param value - A number or string representation of a 16-bit integer. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseShort: (value: string | number) => number | undefined; +/** + * @internal + * + * Parses a value into an 8-bit integer. If the value is null or undefined, undefined + * will be returned. If the value is a string, it will be parsed by parseFloat + * and the result will be asserted to be an integer. If the parsed value is not + * an integer, or the raw value is any type other than a string or number, an + * exception will be thrown. + * + * @param value - A number or string representation of an 8-bit integer. + * @returns The value as a number, or undefined if it's null/undefined. + */ +export declare const strictParseByte: (value: string | number) => number | undefined; +/** + * @internal + */ +export declare const logger: { + warn: { + (...data: any[]): void; + (message?: any, ...optionalParams: any[]): void; + }; +}; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/resolve-path.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/resolve-path.d.ts new file mode 100644 index 0000000..4c4c443 --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/resolve-path.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const resolvedPath: (resolvedPath: string, input: unknown, memberName: string, labelValueProvider: () => string | undefined, uriLabel: string, isGreedyLabel: boolean) => string; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/ser-utils.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/ser-utils.d.ts new file mode 100644 index 0000000..ccc74ff --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/ser-utils.d.ts @@ -0,0 +1,9 @@ +/** + * @internal + * + * Serializes a number, turning non-numeric values into strings. + * + * @param value - The number to serialize. + * @returns A number, or a string if the given number was non-numeric. + */ +export declare const serializeFloat: (value: number) => string | number; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/serde-json.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/serde-json.d.ts new file mode 100644 index 0000000..932b63d --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/serde-json.d.ts @@ -0,0 +1,10 @@ +/** + * @internal + * + * Maps an object through the default JSON serde behavior. + * This means removing nullish fields and un-sparsifying lists. + * + * @param obj - to be checked. + * @returns same object with default serde behavior applied. + */ +export declare const _json: (obj: any) => any; diff --git a/node_modules/@smithy/smithy-client/dist-types/ts3.4/split-every.d.ts b/node_modules/@smithy/smithy-client/dist-types/ts3.4/split-every.d.ts new file mode 100644 index 0000000..2280f3e --- /dev/null +++ b/node_modules/@smithy/smithy-client/dist-types/ts3.4/split-every.d.ts @@ -0,0 +1,11 @@ +/** + * @internal + * + * Given an input string, splits based on the delimiter after a given + * number of delimiters has been encountered. + * + * @param value - The input string to split. + * @param delimiter - The delimiter to split on. + * @param numDelimiters - The number of delimiters to have encountered to split. + */ +export declare function splitEvery(value: string, delimiter: string, numDelimiters: number): Array; diff --git a/node_modules/@smithy/smithy-client/package.json b/node_modules/@smithy/smithy-client/package.json new file mode 100644 index 0000000..1cc5c4e --- /dev/null +++ b/node_modules/@smithy/smithy-client/package.json @@ -0,0 +1,66 @@ +{ + "name": "@smithy/smithy-client", + "version": "2.5.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline smithy-client", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "extract:docs": "api-extractor run --local", + "test": "yarn g:jest --passWithNoTests" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "@smithy/util-stream": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/smithy-client", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/smithy-client" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/types/LICENSE b/node_modules/@smithy/types/LICENSE new file mode 100644 index 0000000..e907b58 --- /dev/null +++ b/node_modules/@smithy/types/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/types/README.md b/node_modules/@smithy/types/README.md new file mode 100644 index 0000000..fa78e08 --- /dev/null +++ b/node_modules/@smithy/types/README.md @@ -0,0 +1,80 @@ +# @smithy/types + +[![NPM version](https://img.shields.io/npm/v/@smithy/types/latest.svg)](https://www.npmjs.com/package/@smithy/types) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/types.svg)](https://www.npmjs.com/package/@smithy/types) + +## Usage + +This package is mostly used internally by generated clients. +Some public components have independent applications. + +--- + +### Scenario: Removing `| undefined` from input and output structures + +Generated shapes' members are unioned with `undefined` for +input shapes, and are `?` (optional) for output shapes. + +- for inputs, this defers the validation to the service. +- for outputs, this strongly suggests that you should runtime-check the output data. + +If you would like to skip these steps, use the `AssertiveClient` or +`UncheckedClient` type helpers. + +Using AWS S3 as an example: + +```ts +import { S3 } from "@aws-sdk/client-s3"; +import type { AssertiveClient, UncheckedClient } from "@smithy/types"; + +const s3a = new S3({}) as AssertiveClient; +const s3b = new S3({}) as UncheckedClient; + +// AssertiveClient enforces required inputs are not undefined +// and required outputs are not undefined. +const get = await s3a.getObject({ + Bucket: "", + Key: "", +}); + +// UncheckedClient makes output fields non-nullable. +// You should still perform type checks as you deem +// necessary, but the SDK will no longer prompt you +// with nullability errors. +const body = await ( + await s3b.getObject({ + Bucket: "", + Key: "", + }) +).Body.transformToString(); +``` + +### Scenario: Narrowing a smithy-typescript generated client's output payload blob types + +This is mostly relevant to operations with streaming bodies such as within +the S3Client in the AWS SDK for JavaScript v3. + +Because blob payload types are platform dependent, you may wish to indicate in your application that a client is running in a specific +environment. This narrows the blob payload types. + +```typescript +import { GetObjectCommand, S3Client } from "@aws-sdk/client-s3"; +import type { NodeJsClient, SdkStream, StreamingBlobPayloadOutputTypes } from "@smithy/types"; +import type { IncomingMessage } from "node:http"; + +// default client init. +const s3Default = new S3Client({}); + +// client init with type narrowing. +const s3NarrowType = new S3Client({}) as NodeJsClient; + +// The default type of blob payloads is a wide union type including multiple possible +// request handlers. +const body1: StreamingBlobPayloadOutputTypes = (await s3Default.send(new GetObjectCommand({ Key: "", Bucket: "" }))) + .Body!; + +// This is of the narrower type SdkStream representing +// blob payload responses using specifically the node:http request handler. +const body2: SdkStream = (await s3NarrowType.send(new GetObjectCommand({ Key: "", Bucket: "" }))) + .Body!; +``` diff --git a/node_modules/@smithy/types/dist-cjs/abort.js b/node_modules/@smithy/types/dist-cjs/abort.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/abort.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/auth/HttpApiKeyAuth.js b/node_modules/@smithy/types/dist-cjs/auth/HttpApiKeyAuth.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/auth/HttpApiKeyAuth.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/auth/HttpAuthScheme.js b/node_modules/@smithy/types/dist-cjs/auth/HttpAuthScheme.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/auth/HttpAuthScheme.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/auth/HttpAuthSchemeProvider.js b/node_modules/@smithy/types/dist-cjs/auth/HttpAuthSchemeProvider.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/auth/HttpAuthSchemeProvider.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/auth/HttpSigner.js b/node_modules/@smithy/types/dist-cjs/auth/HttpSigner.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/auth/HttpSigner.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/auth/IdentityProviderConfig.js b/node_modules/@smithy/types/dist-cjs/auth/IdentityProviderConfig.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/auth/IdentityProviderConfig.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/auth/auth.js b/node_modules/@smithy/types/dist-cjs/auth/auth.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/auth/auth.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/auth/index.js b/node_modules/@smithy/types/dist-cjs/auth/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/auth/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js b/node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/checksum.js b/node_modules/@smithy/types/dist-cjs/checksum.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/checksum.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/client.js b/node_modules/@smithy/types/dist-cjs/client.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/client.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/command.js b/node_modules/@smithy/types/dist-cjs/command.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/command.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/connection/config.js b/node_modules/@smithy/types/dist-cjs/connection/config.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/connection/config.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/connection/index.js b/node_modules/@smithy/types/dist-cjs/connection/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/connection/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/connection/manager.js b/node_modules/@smithy/types/dist-cjs/connection/manager.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/connection/manager.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/connection/pool.js b/node_modules/@smithy/types/dist-cjs/connection/pool.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/connection/pool.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/crypto.js b/node_modules/@smithy/types/dist-cjs/crypto.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/crypto.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/downlevel-ts3.4/transform/type-transform.js b/node_modules/@smithy/types/dist-cjs/downlevel-ts3.4/transform/type-transform.js new file mode 100644 index 0000000..8817412 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/downlevel-ts3.4/transform/type-transform.js @@ -0,0 +1 @@ +module.exports = require("../../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/encode.js b/node_modules/@smithy/types/dist-cjs/encode.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/encode.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/endpoint.js b/node_modules/@smithy/types/dist-cjs/endpoint.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/endpoint.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js b/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js b/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js b/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js b/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/endpoints/index.js b/node_modules/@smithy/types/dist-cjs/endpoints/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/endpoints/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/endpoints/shared.js b/node_modules/@smithy/types/dist-cjs/endpoints/shared.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/endpoints/shared.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/eventStream.js b/node_modules/@smithy/types/dist-cjs/eventStream.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/eventStream.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/extensions/checksum.js b/node_modules/@smithy/types/dist-cjs/extensions/checksum.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/extensions/checksum.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js b/node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js b/node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/extensions/index.js b/node_modules/@smithy/types/dist-cjs/extensions/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/extensions/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/extensions/retry.js b/node_modules/@smithy/types/dist-cjs/extensions/retry.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/extensions/retry.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/externals-check/browser-externals-check.js b/node_modules/@smithy/types/dist-cjs/externals-check/browser-externals-check.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/externals-check/browser-externals-check.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/http.js b/node_modules/@smithy/types/dist-cjs/http.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/http.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/http/httpHandlerInitialization.js b/node_modules/@smithy/types/dist-cjs/http/httpHandlerInitialization.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/http/httpHandlerInitialization.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/identity/apiKeyIdentity.js b/node_modules/@smithy/types/dist-cjs/identity/apiKeyIdentity.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/identity/apiKeyIdentity.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js b/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/identity/identity.js b/node_modules/@smithy/types/dist-cjs/identity/identity.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/identity/identity.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/identity/index.js b/node_modules/@smithy/types/dist-cjs/identity/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/identity/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/identity/tokenIdentity.js b/node_modules/@smithy/types/dist-cjs/identity/tokenIdentity.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/identity/tokenIdentity.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/index.js b/node_modules/@smithy/types/dist-cjs/index.js new file mode 100644 index 0000000..b22a90a --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/index.js @@ -0,0 +1,149 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AlgorithmId: () => AlgorithmId, + EndpointURLScheme: () => EndpointURLScheme, + FieldPosition: () => FieldPosition, + HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation, + HttpAuthLocation: () => HttpAuthLocation, + IniSectionType: () => IniSectionType, + RequestHandlerProtocol: () => RequestHandlerProtocol, + SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig +}); +module.exports = __toCommonJS(src_exports); + +// src/auth/auth.ts +var HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => { + HttpAuthLocation2["HEADER"] = "header"; + HttpAuthLocation2["QUERY"] = "query"; + return HttpAuthLocation2; +})(HttpAuthLocation || {}); + +// src/auth/HttpApiKeyAuth.ts +var HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => { + HttpApiKeyAuthLocation2["HEADER"] = "header"; + HttpApiKeyAuthLocation2["QUERY"] = "query"; + return HttpApiKeyAuthLocation2; +})(HttpApiKeyAuthLocation || {}); + +// src/endpoint.ts +var EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => { + EndpointURLScheme2["HTTP"] = "http"; + EndpointURLScheme2["HTTPS"] = "https"; + return EndpointURLScheme2; +})(EndpointURLScheme || {}); + +// src/extensions/checksum.ts +var AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => { + AlgorithmId2["MD5"] = "md5"; + AlgorithmId2["CRC32"] = "crc32"; + AlgorithmId2["CRC32C"] = "crc32c"; + AlgorithmId2["SHA1"] = "sha1"; + AlgorithmId2["SHA256"] = "sha256"; + return AlgorithmId2; +})(AlgorithmId || {}); +var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== void 0) { + checksumAlgorithms.push({ + algorithmId: () => "sha256" /* SHA256 */, + checksumConstructor: () => runtimeConfig.sha256 + }); + } + if (runtimeConfig.md5 != void 0) { + checksumAlgorithms.push({ + algorithmId: () => "md5" /* MD5 */, + checksumConstructor: () => runtimeConfig.md5 + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + } + }; +}, "getChecksumConfiguration"); +var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; +}, "resolveChecksumRuntimeConfig"); + +// src/extensions/defaultClientConfiguration.ts +var getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + ...getChecksumConfiguration(runtimeConfig) + }; +}, "getDefaultClientConfiguration"); +var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + ...resolveChecksumRuntimeConfig(config) + }; +}, "resolveDefaultRuntimeConfig"); + +// src/http.ts +var FieldPosition = /* @__PURE__ */ ((FieldPosition2) => { + FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; + FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; + return FieldPosition2; +})(FieldPosition || {}); + +// src/middleware.ts +var SMITHY_CONTEXT_KEY = "__smithy_context"; + +// src/profile.ts +var IniSectionType = /* @__PURE__ */ ((IniSectionType2) => { + IniSectionType2["PROFILE"] = "profile"; + IniSectionType2["SSO_SESSION"] = "sso-session"; + IniSectionType2["SERVICES"] = "services"; + return IniSectionType2; +})(IniSectionType || {}); + +// src/transfer.ts +var RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => { + RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; + return RequestHandlerProtocol2; +})(RequestHandlerProtocol || {}); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + HttpAuthLocation, + HttpApiKeyAuthLocation, + EndpointURLScheme, + AlgorithmId, + getDefaultClientConfiguration, + resolveDefaultRuntimeConfig, + FieldPosition, + SMITHY_CONTEXT_KEY, + IniSectionType, + RequestHandlerProtocol +}); + diff --git a/node_modules/@smithy/types/dist-cjs/logger.js b/node_modules/@smithy/types/dist-cjs/logger.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/logger.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/middleware.js b/node_modules/@smithy/types/dist-cjs/middleware.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/middleware.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/pagination.js b/node_modules/@smithy/types/dist-cjs/pagination.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/pagination.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/profile.js b/node_modules/@smithy/types/dist-cjs/profile.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/profile.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/response.js b/node_modules/@smithy/types/dist-cjs/response.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/response.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/retry.js b/node_modules/@smithy/types/dist-cjs/retry.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/retry.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/serde.js b/node_modules/@smithy/types/dist-cjs/serde.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/serde.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/shapes.js b/node_modules/@smithy/types/dist-cjs/shapes.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/shapes.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/signature.js b/node_modules/@smithy/types/dist-cjs/signature.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/signature.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/stream.js b/node_modules/@smithy/types/dist-cjs/stream.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/stream.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js b/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js b/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js b/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/transfer.js b/node_modules/@smithy/types/dist-cjs/transfer.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/transfer.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/transform/client-method-transforms.js b/node_modules/@smithy/types/dist-cjs/transform/client-method-transforms.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/transform/client-method-transforms.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js b/node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/transform/exact.js b/node_modules/@smithy/types/dist-cjs/transform/exact.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/transform/exact.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/transform/no-undefined.js b/node_modules/@smithy/types/dist-cjs/transform/no-undefined.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/transform/no-undefined.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/transform/type-transform.js b/node_modules/@smithy/types/dist-cjs/transform/type-transform.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/transform/type-transform.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/uri.js b/node_modules/@smithy/types/dist-cjs/uri.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/uri.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/util.js b/node_modules/@smithy/types/dist-cjs/util.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/util.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-cjs/waiter.js b/node_modules/@smithy/types/dist-cjs/waiter.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/types/dist-cjs/waiter.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/types/dist-es/abort.js b/node_modules/@smithy/types/dist-es/abort.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/abort.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js b/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js new file mode 100644 index 0000000..4c02f24 --- /dev/null +++ b/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js @@ -0,0 +1,5 @@ +export var HttpApiKeyAuthLocation; +(function (HttpApiKeyAuthLocation) { + HttpApiKeyAuthLocation["HEADER"] = "header"; + HttpApiKeyAuthLocation["QUERY"] = "query"; +})(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {})); diff --git a/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js b/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js b/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/auth/HttpSigner.js b/node_modules/@smithy/types/dist-es/auth/HttpSigner.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/auth/HttpSigner.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js b/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/auth/auth.js b/node_modules/@smithy/types/dist-es/auth/auth.js new file mode 100644 index 0000000..bd3b2df --- /dev/null +++ b/node_modules/@smithy/types/dist-es/auth/auth.js @@ -0,0 +1,5 @@ +export var HttpAuthLocation; +(function (HttpAuthLocation) { + HttpAuthLocation["HEADER"] = "header"; + HttpAuthLocation["QUERY"] = "query"; +})(HttpAuthLocation || (HttpAuthLocation = {})); diff --git a/node_modules/@smithy/types/dist-es/auth/index.js b/node_modules/@smithy/types/dist-es/auth/index.js new file mode 100644 index 0000000..7436030 --- /dev/null +++ b/node_modules/@smithy/types/dist-es/auth/index.js @@ -0,0 +1,6 @@ +export * from "./auth"; +export * from "./HttpApiKeyAuth"; +export * from "./HttpAuthScheme"; +export * from "./HttpAuthSchemeProvider"; +export * from "./HttpSigner"; +export * from "./IdentityProviderConfig"; diff --git a/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js b/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/checksum.js b/node_modules/@smithy/types/dist-es/checksum.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/checksum.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/client.js b/node_modules/@smithy/types/dist-es/client.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/client.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/command.js b/node_modules/@smithy/types/dist-es/command.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/command.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/connection/config.js b/node_modules/@smithy/types/dist-es/connection/config.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/connection/config.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/connection/index.js b/node_modules/@smithy/types/dist-es/connection/index.js new file mode 100644 index 0000000..c6c3ea8 --- /dev/null +++ b/node_modules/@smithy/types/dist-es/connection/index.js @@ -0,0 +1,3 @@ +export * from "./config"; +export * from "./manager"; +export * from "./pool"; diff --git a/node_modules/@smithy/types/dist-es/connection/manager.js b/node_modules/@smithy/types/dist-es/connection/manager.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/connection/manager.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/connection/pool.js b/node_modules/@smithy/types/dist-es/connection/pool.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/connection/pool.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/crypto.js b/node_modules/@smithy/types/dist-es/crypto.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/crypto.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js b/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/encode.js b/node_modules/@smithy/types/dist-es/encode.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/encode.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/endpoint.js b/node_modules/@smithy/types/dist-es/endpoint.js new file mode 100644 index 0000000..4ae601f --- /dev/null +++ b/node_modules/@smithy/types/dist-es/endpoint.js @@ -0,0 +1,5 @@ +export var EndpointURLScheme; +(function (EndpointURLScheme) { + EndpointURLScheme["HTTP"] = "http"; + EndpointURLScheme["HTTPS"] = "https"; +})(EndpointURLScheme || (EndpointURLScheme = {})); diff --git a/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js b/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js b/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js b/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js b/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/endpoints/index.js b/node_modules/@smithy/types/dist-es/endpoints/index.js new file mode 100644 index 0000000..64d85cf --- /dev/null +++ b/node_modules/@smithy/types/dist-es/endpoints/index.js @@ -0,0 +1,5 @@ +export * from "./EndpointRuleObject"; +export * from "./ErrorRuleObject"; +export * from "./RuleSetObject"; +export * from "./shared"; +export * from "./TreeRuleObject"; diff --git a/node_modules/@smithy/types/dist-es/endpoints/shared.js b/node_modules/@smithy/types/dist-es/endpoints/shared.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/endpoints/shared.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/eventStream.js b/node_modules/@smithy/types/dist-es/eventStream.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/eventStream.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/extensions/checksum.js b/node_modules/@smithy/types/dist-es/extensions/checksum.js new file mode 100644 index 0000000..49bd37c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/extensions/checksum.js @@ -0,0 +1,39 @@ +export var AlgorithmId; +(function (AlgorithmId) { + AlgorithmId["MD5"] = "md5"; + AlgorithmId["CRC32"] = "crc32"; + AlgorithmId["CRC32C"] = "crc32c"; + AlgorithmId["SHA1"] = "sha1"; + AlgorithmId["SHA256"] = "sha256"; +})(AlgorithmId || (AlgorithmId = {})); +export const getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== undefined) { + checksumAlgorithms.push({ + algorithmId: () => AlgorithmId.SHA256, + checksumConstructor: () => runtimeConfig.sha256, + }); + } + if (runtimeConfig.md5 != undefined) { + checksumAlgorithms.push({ + algorithmId: () => AlgorithmId.MD5, + checksumConstructor: () => runtimeConfig.md5, + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + }, + }; +}; +export const resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; +}; diff --git a/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js b/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js new file mode 100644 index 0000000..c8eff6d --- /dev/null +++ b/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js @@ -0,0 +1,11 @@ +import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from "./checksum"; +export const getDefaultClientConfiguration = (runtimeConfig) => { + return { + ...getChecksumConfiguration(runtimeConfig), + }; +}; +export const resolveDefaultRuntimeConfig = (config) => { + return { + ...resolveChecksumRuntimeConfig(config), + }; +}; diff --git a/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js b/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/extensions/index.js b/node_modules/@smithy/types/dist-es/extensions/index.js new file mode 100644 index 0000000..0fa92d9 --- /dev/null +++ b/node_modules/@smithy/types/dist-es/extensions/index.js @@ -0,0 +1,3 @@ +export * from "./defaultClientConfiguration"; +export * from "./defaultExtensionConfiguration"; +export { AlgorithmId } from "./checksum"; diff --git a/node_modules/@smithy/types/dist-es/extensions/retry.js b/node_modules/@smithy/types/dist-es/extensions/retry.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/extensions/retry.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js b/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/http.js b/node_modules/@smithy/types/dist-es/http.js new file mode 100644 index 0000000..27b22f0 --- /dev/null +++ b/node_modules/@smithy/types/dist-es/http.js @@ -0,0 +1,5 @@ +export var FieldPosition; +(function (FieldPosition) { + FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; + FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; +})(FieldPosition || (FieldPosition = {})); diff --git a/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js b/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js b/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js b/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/identity/identity.js b/node_modules/@smithy/types/dist-es/identity/identity.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/identity/identity.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/identity/index.js b/node_modules/@smithy/types/dist-es/identity/index.js new file mode 100644 index 0000000..3360320 --- /dev/null +++ b/node_modules/@smithy/types/dist-es/identity/index.js @@ -0,0 +1,4 @@ +export * from "./apiKeyIdentity"; +export * from "./awsCredentialIdentity"; +export * from "./identity"; +export * from "./tokenIdentity"; diff --git a/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js b/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/index.js b/node_modules/@smithy/types/dist-es/index.js new file mode 100644 index 0000000..17c2c94 --- /dev/null +++ b/node_modules/@smithy/types/dist-es/index.js @@ -0,0 +1,36 @@ +export * from "./abort"; +export * from "./auth"; +export * from "./blob/blob-payload-input-types"; +export * from "./checksum"; +export * from "./client"; +export * from "./command"; +export * from "./connection"; +export * from "./crypto"; +export * from "./encode"; +export * from "./endpoint"; +export * from "./endpoints"; +export * from "./eventStream"; +export * from "./extensions"; +export * from "./http"; +export * from "./http/httpHandlerInitialization"; +export * from "./identity"; +export * from "./logger"; +export * from "./middleware"; +export * from "./pagination"; +export * from "./profile"; +export * from "./response"; +export * from "./retry"; +export * from "./serde"; +export * from "./shapes"; +export * from "./signature"; +export * from "./stream"; +export * from "./streaming-payload/streaming-blob-common-types"; +export * from "./streaming-payload/streaming-blob-payload-input-types"; +export * from "./streaming-payload/streaming-blob-payload-output-types"; +export * from "./transfer"; +export * from "./transform/client-payload-blob-type-narrow"; +export * from "./transform/no-undefined"; +export * from "./transform/type-transform"; +export * from "./uri"; +export * from "./util"; +export * from "./waiter"; diff --git a/node_modules/@smithy/types/dist-es/logger.js b/node_modules/@smithy/types/dist-es/logger.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/logger.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/middleware.js b/node_modules/@smithy/types/dist-es/middleware.js new file mode 100644 index 0000000..7d0d050 --- /dev/null +++ b/node_modules/@smithy/types/dist-es/middleware.js @@ -0,0 +1 @@ +export const SMITHY_CONTEXT_KEY = "__smithy_context"; diff --git a/node_modules/@smithy/types/dist-es/pagination.js b/node_modules/@smithy/types/dist-es/pagination.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/pagination.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/profile.js b/node_modules/@smithy/types/dist-es/profile.js new file mode 100644 index 0000000..9d56c8d --- /dev/null +++ b/node_modules/@smithy/types/dist-es/profile.js @@ -0,0 +1,6 @@ +export var IniSectionType; +(function (IniSectionType) { + IniSectionType["PROFILE"] = "profile"; + IniSectionType["SSO_SESSION"] = "sso-session"; + IniSectionType["SERVICES"] = "services"; +})(IniSectionType || (IniSectionType = {})); diff --git a/node_modules/@smithy/types/dist-es/response.js b/node_modules/@smithy/types/dist-es/response.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/response.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/retry.js b/node_modules/@smithy/types/dist-es/retry.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/retry.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/serde.js b/node_modules/@smithy/types/dist-es/serde.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/serde.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/shapes.js b/node_modules/@smithy/types/dist-es/shapes.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/shapes.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/signature.js b/node_modules/@smithy/types/dist-es/signature.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/signature.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/stream.js b/node_modules/@smithy/types/dist-es/stream.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/stream.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js b/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js b/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js b/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/transfer.js b/node_modules/@smithy/types/dist-es/transfer.js new file mode 100644 index 0000000..f776151 --- /dev/null +++ b/node_modules/@smithy/types/dist-es/transfer.js @@ -0,0 +1,6 @@ +export var RequestHandlerProtocol; +(function (RequestHandlerProtocol) { + RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; +})(RequestHandlerProtocol || (RequestHandlerProtocol = {})); diff --git a/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js b/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js b/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/transform/exact.js b/node_modules/@smithy/types/dist-es/transform/exact.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/transform/exact.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/transform/no-undefined.js b/node_modules/@smithy/types/dist-es/transform/no-undefined.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/transform/no-undefined.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/transform/type-transform.js b/node_modules/@smithy/types/dist-es/transform/type-transform.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/transform/type-transform.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/uri.js b/node_modules/@smithy/types/dist-es/uri.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/uri.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/util.js b/node_modules/@smithy/types/dist-es/util.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/util.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-es/waiter.js b/node_modules/@smithy/types/dist-es/waiter.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/types/dist-es/waiter.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/types/dist-types/abort.d.ts b/node_modules/@smithy/types/dist-types/abort.d.ts new file mode 100644 index 0000000..c9d7f03 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/abort.d.ts @@ -0,0 +1,49 @@ +/** + * @public + */ +export interface AbortHandler { + (this: AbortSignal, ev: any): any; +} +/** + * @public + * + * Holders of an AbortSignal object may query if the associated operation has + * been aborted and register an onabort handler. + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export interface AbortSignal { + /** + * Whether the action represented by this signal has been cancelled. + */ + readonly aborted: boolean; + /** + * A function to be invoked when the action represented by this signal has + * been cancelled. + */ + onabort: AbortHandler | Function | null; +} +/** + * @public + * + * The AWS SDK uses a Controller/Signal model to allow for cooperative + * cancellation of asynchronous operations. When initiating such an operation, + * the caller can create an AbortController and then provide linked signal to + * subtasks. This allows a single source to communicate to multiple consumers + * that an action has been aborted without dictating how that cancellation + * should be handled. + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortController + */ +export interface AbortController { + /** + * An object that reports whether the action associated with this + * `AbortController` has been cancelled. + */ + readonly signal: AbortSignal; + /** + * Declares the operation associated with this AbortController to have been + * cancelled. + */ + abort(): void; +} diff --git a/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts b/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts new file mode 100644 index 0000000..5d74340 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + */ +export declare enum HttpApiKeyAuthLocation { + HEADER = "header", + QUERY = "query" +} diff --git a/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts b/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts new file mode 100644 index 0000000..c5be532 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts @@ -0,0 +1,49 @@ +import { Identity, IdentityProvider } from "../identity/identity"; +import { HandlerExecutionContext } from "../middleware"; +import { HttpSigner } from "./HttpSigner"; +import { IdentityProviderConfig } from "./IdentityProviderConfig"; +/** + * ID for {@link HttpAuthScheme} + * @internal + */ +export type HttpAuthSchemeId = string; +/** + * Interface that defines an HttpAuthScheme + * @internal + */ +export interface HttpAuthScheme { + /** + * ID for an HttpAuthScheme, typically the absolute shape ID of a Smithy auth trait. + */ + schemeId: HttpAuthSchemeId; + /** + * Gets the IdentityProvider corresponding to an HttpAuthScheme. + */ + identityProvider(config: IdentityProviderConfig): IdentityProvider | undefined; + /** + * HttpSigner corresponding to an HttpAuthScheme. + */ + signer: HttpSigner; +} +/** + * Interface that defines the identity and signing properties when selecting + * an HttpAuthScheme. + * @internal + */ +export interface HttpAuthOption { + schemeId: HttpAuthSchemeId; + identityProperties?: Record; + signingProperties?: Record; + propertiesExtractor?: (config: TConfig, context: TContext) => { + identityProperties?: Record; + signingProperties?: Record; + }; +} +/** + * @internal + */ +export interface SelectedHttpAuthScheme { + httpAuthOption: HttpAuthOption; + identity: Identity; + signer: HttpSigner; +} diff --git a/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts b/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts new file mode 100644 index 0000000..710dc8f --- /dev/null +++ b/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts @@ -0,0 +1,20 @@ +import { HandlerExecutionContext } from "../middleware"; +import { HttpAuthOption } from "./HttpAuthScheme"; +/** + * @internal + */ +export interface HttpAuthSchemeParameters { + operation?: string; +} +/** + * @internal + */ +export interface HttpAuthSchemeProvider { + (authParameters: TParameters): HttpAuthOption[]; +} +/** + * @internal + */ +export interface HttpAuthSchemeParametersProvider { + (config: TConfig, context: TContext, input: TInput): Promise; +} diff --git a/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts b/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts new file mode 100644 index 0000000..ea2969c --- /dev/null +++ b/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts @@ -0,0 +1,41 @@ +import { HttpRequest, HttpResponse } from "../http"; +import { Identity } from "../identity/identity"; +/** + * @internal + */ +export interface ErrorHandler { + (signingProperties: Record): (error: E) => never; +} +/** + * @internal + */ +export interface SuccessHandler { + (httpResponse: HttpResponse | unknown, signingProperties: Record): void; +} +/** + * Interface to sign identity and signing properties. + * @internal + */ +export interface HttpSigner { + /** + * Signs an HttpRequest with an identity and signing properties. + * @param httpRequest request to sign + * @param identity identity to sing the request with + * @param signingProperties property bag for signing + * @returns signed request in a promise + */ + sign(httpRequest: HttpRequest, identity: Identity, signingProperties: Record): Promise; + /** + * Handler that executes after the {@link HttpSigner.sign} invocation and corresponding + * middleware throws an error. + * The error handler is expected to throw the error it receives, so the return type of the error handler is `never`. + * @internal + */ + errorHandler?: ErrorHandler; + /** + * Handler that executes after the {@link HttpSigner.sign} invocation and corresponding + * middleware succeeds. + * @internal + */ + successHandler?: SuccessHandler; +} diff --git a/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts b/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts new file mode 100644 index 0000000..663d2ec --- /dev/null +++ b/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts @@ -0,0 +1,14 @@ +import { Identity, IdentityProvider } from "../identity/identity"; +import { HttpAuthSchemeId } from "./HttpAuthScheme"; +/** + * Interface to get an IdentityProvider for a specified HttpAuthScheme + * @internal + */ +export interface IdentityProviderConfig { + /** + * Get the IdentityProvider for a specified HttpAuthScheme. + * @param schemeId schemeId of the HttpAuthScheme + * @returns IdentityProvider or undefined if HttpAuthScheme is not found + */ + getIdentityProvider(schemeId: HttpAuthSchemeId): IdentityProvider | undefined; +} diff --git a/node_modules/@smithy/types/dist-types/auth/auth.d.ts b/node_modules/@smithy/types/dist-types/auth/auth.d.ts new file mode 100644 index 0000000..2aaabbc --- /dev/null +++ b/node_modules/@smithy/types/dist-types/auth/auth.d.ts @@ -0,0 +1,57 @@ +/** + * @internal + * + * Authentication schemes represent a way that the service will authenticate the customer’s identity. + */ +export interface AuthScheme { + /** + * @example "sigv4a" or "sigv4" + */ + name: "sigv4" | "sigv4a" | string; + /** + * @example "s3" + */ + signingName: string; + /** + * @example "us-east-1" + */ + signingRegion: string; + /** + * @example ["*"] + * @example ["us-west-2", "us-east-1"] + */ + signingRegionSet?: string[]; + /** + * @deprecated this field was renamed to signingRegion. + */ + signingScope?: never; + properties: Record; +} +/** + * @internal + * @deprecated + */ +export interface HttpAuthDefinition { + /** + * Defines the location of where the Auth is serialized. + */ + in: HttpAuthLocation; + /** + * Defines the name of the HTTP header or query string parameter + * that contains the Auth. + */ + name: string; + /** + * Defines the security scheme to use on the `Authorization` header value. + * This can only be set if the "in" property is set to {@link HttpAuthLocation.HEADER}. + */ + scheme?: string; +} +/** + * @internal + * @deprecated + */ +export declare enum HttpAuthLocation { + HEADER = "header", + QUERY = "query" +} diff --git a/node_modules/@smithy/types/dist-types/auth/index.d.ts b/node_modules/@smithy/types/dist-types/auth/index.d.ts new file mode 100644 index 0000000..7436030 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/auth/index.d.ts @@ -0,0 +1,6 @@ +export * from "./auth"; +export * from "./HttpApiKeyAuth"; +export * from "./HttpAuthScheme"; +export * from "./HttpAuthSchemeProvider"; +export * from "./HttpSigner"; +export * from "./IdentityProviderConfig"; diff --git a/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts b/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts new file mode 100644 index 0000000..8d8fba8 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts @@ -0,0 +1,41 @@ +/// +/// +import { Readable } from "stream"; +import type { BlobOptionalType, ReadableStreamOptionalType } from "../externals-check/browser-externals-check"; +/** + * @public + * + * A union of types that can be used as inputs for the service model + * "blob" type when it represents the request's entire payload or body. + * + * For example, in Lambda::invoke, the payload is modeled as a blob type + * and this union applies to it. + * In contrast, in Lambda::createFunction the Zip file option is a blob type, + * but is not the (entire) payload and this union does not apply. + * + * Note: not all types are signable by the standard SignatureV4 signer when + * used as the request body. For example, in Node.js a Readable stream + * is not signable by the default signer. + * They are included in the union because it may work in some cases, + * but the expected types are primarily string and Uint8Array. + * + * Additional details may be found in the internal + * function "getPayloadHash" in the SignatureV4 module. + */ +export type BlobPayloadInputTypes = string | ArrayBuffer | ArrayBufferView | Uint8Array | NodeJsRuntimeBlobTypes | BrowserRuntimeBlobTypes; +/** + * @public + * + * Additional blob types for the Node.js environment. + */ +export type NodeJsRuntimeBlobTypes = Readable | Buffer; +/** + * @public + * + * Additional blob types for the browser environment. + */ +export type BrowserRuntimeBlobTypes = BlobOptionalType | ReadableStreamOptionalType; +/** + * @deprecated renamed to BlobPayloadInputTypes. + */ +export type BlobTypes = BlobPayloadInputTypes; diff --git a/node_modules/@smithy/types/dist-types/checksum.d.ts b/node_modules/@smithy/types/dist-types/checksum.d.ts new file mode 100644 index 0000000..1906009 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/checksum.d.ts @@ -0,0 +1,63 @@ +import { SourceData } from "./crypto"; +/** + * @public + * + * An object that provides a checksum of data provided in chunks to `update`. + * The checksum may be performed incrementally as chunks are received or all + * at once when the checksum is finalized, depending on the underlying + * implementation. + * + * It's recommended to compute checksum incrementally to avoid reading the + * entire payload in memory. + * + * A class that implements this interface may accept an optional secret key in its + * constructor while computing checksum value, when using HMAC. If provided, + * this secret key would be used when computing checksum. + */ +export interface Checksum { + /** + * Constant length of the digest created by the algorithm in bytes. + */ + digestLength?: number; + /** + * Creates a new checksum object that contains a deep copy of the internal + * state of the current `Checksum` object. + */ + copy?(): Checksum; + /** + * Returns the digest of all of the data passed. + */ + digest(): Promise; + /** + * Allows marking a checksum for checksums that support the ability + * to mark and reset. + * + * @param readLimit - The maximum limit of bytes that can be read + * before the mark position becomes invalid. + */ + mark?(readLimit: number): void; + /** + * Resets the checksum to its initial value. + */ + reset(): void; + /** + * Adds a chunk of data for which checksum needs to be computed. + * This can be called many times with new data as it is streamed. + * + * Implementations may override this method which passes second param + * which makes Checksum object stateless. + * + * @param chunk - The buffer to update checksum with. + */ + update(chunk: Uint8Array): void; +} +/** + * @public + * + * A constructor for a Checksum that may be used to calculate an HMAC. Implementing + * classes should not directly hold the provided key in memory beyond the + * lexical scope of the constructor. + */ +export interface ChecksumConstructor { + new (secret?: SourceData): Checksum; +} diff --git a/node_modules/@smithy/types/dist-types/client.d.ts b/node_modules/@smithy/types/dist-types/client.d.ts new file mode 100644 index 0000000..1b35e86 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/client.d.ts @@ -0,0 +1,44 @@ +import { Command } from "./command"; +import { MiddlewareStack } from "./middleware"; +import { MetadataBearer } from "./response"; +import { OptionalParameter } from "./util"; +/** + * @public + * + * A type which checks if the client configuration is optional. + * If all entries of the client configuration are optional, it allows client creation without passing any config. + */ +export type CheckOptionalClientConfig = OptionalParameter; +/** + * @public + * + * function definition for different overrides of client's 'send' function. + */ +export interface InvokeFunction { + (command: Command, options?: any): Promise; + (command: Command, cb: (err: any, data?: OutputType) => void): void; + (command: Command, options: any, cb: (err: any, data?: OutputType) => void): void; + (command: Command, options?: any, cb?: (err: any, data?: OutputType) => void): Promise | void; +} +/** + * @public + * + * Signature that appears on aggregated clients' methods. + */ +export interface InvokeMethod { + (input: InputType, options?: any): Promise; + (input: InputType, cb: (err: any, data?: OutputType) => void): void; + (input: InputType, options: any, cb: (err: any, data?: OutputType) => void): void; + (input: InputType, options?: any, cb?: (err: any, data?: OutputType) => void): Promise | void; +} +/** + * A general interface for service clients, idempotent to browser or node clients + * This type corresponds to SmithyClient(https://github.com/aws/aws-sdk-js-v3/blob/main/packages/smithy-client/src/client.ts). + * It's provided for using without importing the SmithyClient class. + */ +export interface Client { + readonly config: ResolvedClientConfiguration; + middlewareStack: MiddlewareStack; + send: InvokeFunction; + destroy: () => void; +} diff --git a/node_modules/@smithy/types/dist-types/command.d.ts b/node_modules/@smithy/types/dist-types/command.d.ts new file mode 100644 index 0000000..ee07d2f --- /dev/null +++ b/node_modules/@smithy/types/dist-types/command.d.ts @@ -0,0 +1,10 @@ +import { Handler, MiddlewareStack } from "./middleware"; +import { MetadataBearer } from "./response"; +/** + * @public + */ +export interface Command { + readonly input: InputType; + readonly middlewareStack: MiddlewareStack; + resolveMiddleware(stack: MiddlewareStack, configuration: ResolvedConfiguration, options: any): Handler; +} diff --git a/node_modules/@smithy/types/dist-types/connection/config.d.ts b/node_modules/@smithy/types/dist-types/connection/config.d.ts new file mode 100644 index 0000000..dec31d4 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/connection/config.d.ts @@ -0,0 +1,7 @@ +export interface ConnectConfiguration { + /** + * The maximum time in milliseconds that the connection phase of a request + * may take before the connection attempt is abandoned. + */ + requestTimeout?: number; +} diff --git a/node_modules/@smithy/types/dist-types/connection/index.d.ts b/node_modules/@smithy/types/dist-types/connection/index.d.ts new file mode 100644 index 0000000..c6c3ea8 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/connection/index.d.ts @@ -0,0 +1,3 @@ +export * from "./config"; +export * from "./manager"; +export * from "./pool"; diff --git a/node_modules/@smithy/types/dist-types/connection/manager.d.ts b/node_modules/@smithy/types/dist-types/connection/manager.d.ts new file mode 100644 index 0000000..a9f378d --- /dev/null +++ b/node_modules/@smithy/types/dist-types/connection/manager.d.ts @@ -0,0 +1,28 @@ +import { RequestContext } from "../transfer"; +import { ConnectConfiguration } from "./config"; +export interface ConnectionManagerConfiguration { + /** + * Maximum number of allowed concurrent requests per connection. + */ + maxConcurrency?: number; + /** + * Disables concurrent requests per connection. + */ + disableConcurrency?: boolean; +} +export interface ConnectionManager { + /** + * Retrieves a connection from the connection pool if available, + * otherwise establish a new connection + */ + lease(requestContext: RequestContext, connectionConfiguration: ConnectConfiguration): T; + /** + * Releases the connection back to the pool making it potentially + * re-usable by other requests. + */ + release(requestContext: RequestContext, connection: T): void; + /** + * Destroys the connection manager. All connections will be closed. + */ + destroy(): void; +} diff --git a/node_modules/@smithy/types/dist-types/connection/pool.d.ts b/node_modules/@smithy/types/dist-types/connection/pool.d.ts new file mode 100644 index 0000000..00d6434 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/connection/pool.d.ts @@ -0,0 +1,24 @@ +export interface ConnectionPool { + /** + * Retrieve the first connection in the pool + */ + poll(): T | void; + /** + * Release the connection back to the pool making it potentially + * re-usable by other requests. + */ + offerLast(connection: T): void; + /** + * Removes the connection from the pool, and destroys it. + */ + destroy(connection: T): void; + /** + * Implements the iterable protocol and allows arrays to be consumed + * by most syntaxes expecting iterables, such as the spread syntax + * and for...of loops + */ + [Symbol.iterator](): Iterator; +} +export interface CacheKey { + destination: string; +} diff --git a/node_modules/@smithy/types/dist-types/crypto.d.ts b/node_modules/@smithy/types/dist-types/crypto.d.ts new file mode 100644 index 0000000..874320e --- /dev/null +++ b/node_modules/@smithy/types/dist-types/crypto.d.ts @@ -0,0 +1,60 @@ +/** + * @public + */ +export type SourceData = string | ArrayBuffer | ArrayBufferView; +/** + * @public + * + * An object that provides a hash of data provided in chunks to `update`. The + * hash may be performed incrementally as chunks are received or all at once + * when the hash is finalized, depending on the underlying implementation. + * + * @deprecated use {@link Checksum} + */ +export interface Hash { + /** + * Adds a chunk of data to the hash. If a buffer is provided, the `encoding` + * argument will be ignored. If a string is provided without a specified + * encoding, implementations must assume UTF-8 encoding. + * + * Not all encodings are supported on all platforms, though all must support + * UTF-8. + */ + update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void; + /** + * Finalizes the hash and provides a promise that will be fulfilled with the + * raw bytes of the calculated hash. + */ + digest(): Promise; +} +/** + * @public + * + * A constructor for a hash that may be used to calculate an HMAC. Implementing + * classes should not directly hold the provided key in memory beyond the + * lexical scope of the constructor. + * + * @deprecated use {@link ChecksumConstructor} + */ +export interface HashConstructor { + new (secret?: SourceData): Hash; +} +/** + * @public + * + * A function that calculates the hash of a data stream. Determining the hash + * will consume the stream, so only replayable streams should be provided to an + * implementation of this interface. + */ +export interface StreamHasher { + (hashCtor: HashConstructor, stream: StreamType): Promise; +} +/** + * @public + * + * A function that returns a promise fulfilled with bytes from a + * cryptographically secure pseudorandom number generator. + */ +export interface randomValues { + (byteLength: number): Promise; +} diff --git a/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts b/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts new file mode 100644 index 0000000..312ae6e --- /dev/null +++ b/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts @@ -0,0 +1,25 @@ +/** + * @public + * + * Transforms any members of the object T having type FromType + * to ToType. This applies only to exact type matches. + * + * This is for the case where FromType is a union and only those fields + * matching the same union should be transformed. + */ +export type Transform = RecursiveTransformExact; +/** + * @internal + * + * Returns ToType if T matches exactly with FromType. + */ +type TransformExact = [T] extends [FromType] ? ([FromType] extends [T] ? ToType : T) : T; +/** + * @internal + * + * Applies TransformExact to members of an object recursively. + */ +type RecursiveTransformExact = T extends Function ? T : T extends object ? { + [key in keyof T]: [T[key]] extends [FromType] ? [FromType] extends [T[key]] ? ToType : RecursiveTransformExact : RecursiveTransformExact; +} : TransformExact; +export {}; diff --git a/node_modules/@smithy/types/dist-types/encode.d.ts b/node_modules/@smithy/types/dist-types/encode.d.ts new file mode 100644 index 0000000..2efc3ac --- /dev/null +++ b/node_modules/@smithy/types/dist-types/encode.d.ts @@ -0,0 +1,19 @@ +import { Message } from "./eventStream"; +export interface MessageEncoder { + encode(message: Message): Uint8Array; +} +export interface MessageDecoder { + decode(message: ArrayBufferView): Message; + feed(message: ArrayBufferView): void; + endOfStream(): void; + getMessage(): AvailableMessage; + getAvailableMessages(): AvailableMessages; +} +export interface AvailableMessage { + getMessage(): Message | undefined; + isEndOfStream(): boolean; +} +export interface AvailableMessages { + getMessages(): Message[]; + isEndOfStream(): boolean; +} diff --git a/node_modules/@smithy/types/dist-types/endpoint.d.ts b/node_modules/@smithy/types/dist-types/endpoint.d.ts new file mode 100644 index 0000000..3f13b65 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/endpoint.d.ts @@ -0,0 +1,77 @@ +import { AuthScheme } from "./auth/auth"; +/** + * @public + */ +export interface EndpointPartition { + name: string; + dnsSuffix: string; + dualStackDnsSuffix: string; + supportsFIPS: boolean; + supportsDualStack: boolean; +} +/** + * @public + */ +export interface EndpointARN { + partition: string; + service: string; + region: string; + accountId: string; + resourceId: Array; +} +/** + * @public + */ +export declare enum EndpointURLScheme { + HTTP = "http", + HTTPS = "https" +} +/** + * @public + */ +export interface EndpointURL { + /** + * The URL scheme such as http or https. + */ + scheme: EndpointURLScheme; + /** + * The authority is the host and optional port component of the URL. + */ + authority: string; + /** + * The parsed path segment of the URL. + * This value is as-is as provided by the user. + */ + path: string; + /** + * The parsed path segment of the URL. + * This value is guranteed to start and end with a "/". + */ + normalizedPath: string; + /** + * A boolean indicating whether the authority is an IP address. + */ + isIp: boolean; +} +/** + * @public + */ +export type EndpointObjectProperty = string | boolean | { + [key: string]: EndpointObjectProperty; +} | EndpointObjectProperty[]; +/** + * @public + */ +export interface EndpointV2 { + url: URL; + properties?: { + authSchemes?: AuthScheme[]; + } & Record; + headers?: Record; +} +/** + * @public + */ +export type EndpointParameters = { + [name: string]: undefined | string | boolean; +}; diff --git a/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts b/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts new file mode 100644 index 0000000..c743b7f --- /dev/null +++ b/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts @@ -0,0 +1,15 @@ +import { EndpointObjectProperty } from "../endpoint"; +import { ConditionObject, Expression } from "./shared"; +export type EndpointObjectProperties = Record; +export type EndpointObjectHeaders = Record; +export type EndpointObject = { + url: Expression; + properties?: EndpointObjectProperties; + headers?: EndpointObjectHeaders; +}; +export type EndpointRuleObject = { + type: "endpoint"; + conditions?: ConditionObject[]; + endpoint: EndpointObject; + documentation?: string; +}; diff --git a/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts b/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts new file mode 100644 index 0000000..c19697c --- /dev/null +++ b/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts @@ -0,0 +1,7 @@ +import { ConditionObject, Expression } from "./shared"; +export type ErrorRuleObject = { + type: "error"; + conditions?: ConditionObject[]; + error: Expression; + documentation?: string; +}; diff --git a/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts b/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts new file mode 100644 index 0000000..1a5d019 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts @@ -0,0 +1,19 @@ +import { RuleSetRules } from "./TreeRuleObject"; +export type DeprecatedObject = { + message?: string; + since?: string; +}; +export type ParameterObject = { + type: "String" | "string" | "Boolean" | "boolean"; + default?: string | boolean; + required?: boolean; + documentation?: string; + builtIn?: string; + deprecated?: DeprecatedObject; +}; +export type RuleSetObject = { + version: string; + serviceId?: string; + parameters: Record; + rules: RuleSetRules; +}; diff --git a/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts b/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts new file mode 100644 index 0000000..8c7e68e --- /dev/null +++ b/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts @@ -0,0 +1,10 @@ +import { EndpointRuleObject } from "./EndpointRuleObject"; +import { ErrorRuleObject } from "./ErrorRuleObject"; +import { ConditionObject } from "./shared"; +export type RuleSetRules = Array; +export type TreeRuleObject = { + type: "tree"; + conditions?: ConditionObject[]; + rules: RuleSetRules; + documentation?: string; +}; diff --git a/node_modules/@smithy/types/dist-types/endpoints/index.d.ts b/node_modules/@smithy/types/dist-types/endpoints/index.d.ts new file mode 100644 index 0000000..64d85cf --- /dev/null +++ b/node_modules/@smithy/types/dist-types/endpoints/index.d.ts @@ -0,0 +1,5 @@ +export * from "./EndpointRuleObject"; +export * from "./ErrorRuleObject"; +export * from "./RuleSetObject"; +export * from "./shared"; +export * from "./TreeRuleObject"; diff --git a/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts b/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts new file mode 100644 index 0000000..ef31eb8 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts @@ -0,0 +1,25 @@ +import { Logger } from "../logger"; +export type ReferenceObject = { + ref: string; +}; +export type FunctionObject = { + fn: string; + argv: FunctionArgv; +}; +export type FunctionArgv = Array; +export type FunctionReturn = string | boolean | number | { + [key: string]: FunctionReturn; +}; +export type ConditionObject = FunctionObject & { + assign?: string; +}; +export type Expression = string | ReferenceObject | FunctionObject; +export type EndpointParams = Record; +export type EndpointResolverOptions = { + endpointParams: EndpointParams; + logger?: Logger; +}; +export type ReferenceRecord = Record; +export type EvaluateOptions = EndpointResolverOptions & { + referenceRecord: ReferenceRecord; +}; diff --git a/node_modules/@smithy/types/dist-types/eventStream.d.ts b/node_modules/@smithy/types/dist-types/eventStream.d.ts new file mode 100644 index 0000000..d9598ff --- /dev/null +++ b/node_modules/@smithy/types/dist-types/eventStream.d.ts @@ -0,0 +1,108 @@ +import { HttpRequest } from "./http"; +import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext } from "./middleware"; +import { MetadataBearer } from "./response"; +/** + * @public + * + * An event stream message. The headers and body properties will always be + * defined, with empty headers represented as an object with no keys and an + * empty body represented as a zero-length Uint8Array. + */ +export interface Message { + headers: MessageHeaders; + body: Uint8Array; +} +/** + * @public + */ +export type MessageHeaders = Record; +type HeaderValue = { + type: K; + value: V; +}; +export type BooleanHeaderValue = HeaderValue<"boolean", boolean>; +export type ByteHeaderValue = HeaderValue<"byte", number>; +export type ShortHeaderValue = HeaderValue<"short", number>; +export type IntegerHeaderValue = HeaderValue<"integer", number>; +export type LongHeaderValue = HeaderValue<"long", Int64>; +export type BinaryHeaderValue = HeaderValue<"binary", Uint8Array>; +export type StringHeaderValue = HeaderValue<"string", string>; +export type TimestampHeaderValue = HeaderValue<"timestamp", Date>; +export type UuidHeaderValue = HeaderValue<"uuid", string>; +/** + * @public + */ +export type MessageHeaderValue = BooleanHeaderValue | ByteHeaderValue | ShortHeaderValue | IntegerHeaderValue | LongHeaderValue | BinaryHeaderValue | StringHeaderValue | TimestampHeaderValue | UuidHeaderValue; +/** + * @public + */ +export interface Int64 { + readonly bytes: Uint8Array; + valueOf: () => number; + toString: () => string; +} +/** + * @public + * + * Util functions for serializing or deserializing event stream + */ +export interface EventStreamSerdeContext { + eventStreamMarshaller: EventStreamMarshaller; +} +/** + * @public + * + * A function which deserializes binary event stream message into modeled shape. + */ +export interface EventStreamMarshallerDeserFn { + (body: StreamType, deserializer: (input: Record) => Promise): AsyncIterable; +} +/** + * @public + * + * A function that serializes modeled shape into binary stream message. + */ +export interface EventStreamMarshallerSerFn { + (input: AsyncIterable, serializer: (event: T) => Message): StreamType; +} +/** + * @public + * + * An interface which provides functions for serializing and deserializing binary event stream + * to/from corresponsing modeled shape. + */ +export interface EventStreamMarshaller { + deserialize: EventStreamMarshallerDeserFn; + serialize: EventStreamMarshallerSerFn; +} +/** + * @public + */ +export interface EventStreamRequestSigner { + sign(request: HttpRequest): Promise; +} +/** + * @public + */ +export interface EventStreamPayloadHandler { + handle: (next: FinalizeHandler, args: FinalizeHandlerArguments, context?: HandlerExecutionContext) => Promise>; +} +/** + * @public + */ +export interface EventStreamPayloadHandlerProvider { + (options: any): EventStreamPayloadHandler; +} +/** + * @public + */ +export interface EventStreamSerdeProvider { + (options: any): EventStreamMarshaller; +} +/** + * @public + */ +export interface EventStreamSignerProvider { + (options: any): EventStreamRequestSigner; +} +export {}; diff --git a/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts b/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts new file mode 100644 index 0000000..38217e2 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts @@ -0,0 +1,55 @@ +import { ChecksumConstructor } from "../checksum"; +import { HashConstructor } from "../crypto"; +/** + * @internal + */ +export declare enum AlgorithmId { + MD5 = "md5", + CRC32 = "crc32", + CRC32C = "crc32c", + SHA1 = "sha1", + SHA256 = "sha256" +} +/** + * @internal + */ +export interface ChecksumAlgorithm { + algorithmId(): AlgorithmId; + checksumConstructor(): ChecksumConstructor | HashConstructor; +} +/** + * @deprecated unused. + */ +type ChecksumConfigurationLegacy = { + [other in string | number]: any; +}; +/** + * @internal + */ +export interface ChecksumConfiguration extends ChecksumConfigurationLegacy { + addChecksumAlgorithm(algo: ChecksumAlgorithm): void; + checksumAlgorithms(): ChecksumAlgorithm[]; +} +/** + * @deprecated will be removed for implicit type. + */ +type GetChecksumConfigurationType = (runtimeConfig: Partial<{ + sha256: ChecksumConstructor | HashConstructor; + md5: ChecksumConstructor | HashConstructor; +}>) => ChecksumConfiguration; +/** + * @internal + * @deprecated will be moved to smithy-client. + */ +export declare const getChecksumConfiguration: GetChecksumConfigurationType; +/** + * @deprecated will be removed for implicit type. + */ +type ResolveChecksumRuntimeConfigType = (clientConfig: ChecksumConfiguration) => any; +/** + * @internal + * + * @deprecated will be moved to smithy-client. + */ +export declare const resolveChecksumRuntimeConfig: ResolveChecksumRuntimeConfigType; +export {}; diff --git a/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts b/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts new file mode 100644 index 0000000..12eb924 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts @@ -0,0 +1,33 @@ +import { ChecksumConfiguration } from "./checksum"; +/** + * @deprecated will be replaced by DefaultExtensionConfiguration. + * @internal + * + * Default client configuration consisting various configurations for modifying a service client + */ +export interface DefaultClientConfiguration extends ChecksumConfiguration { +} +/** + * @deprecated will be removed for implicit type. + */ +type GetDefaultConfigurationType = (runtimeConfig: any) => DefaultClientConfiguration; +/** + * @deprecated moving to @smithy/smithy-client. + * @internal + * + * Helper function to resolve default client configuration from runtime config + * + */ +export declare const getDefaultClientConfiguration: GetDefaultConfigurationType; +/** + * @deprecated will be removed for implicit type. + */ +type ResolveDefaultRuntimeConfigType = (clientConfig: DefaultClientConfiguration) => any; +/** + * @deprecated moving to @smithy/smithy-client. + * @internal + * + * Helper function to resolve runtime config from default client configuration + */ +export declare const resolveDefaultRuntimeConfig: ResolveDefaultRuntimeConfigType; +export {}; diff --git a/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts b/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts new file mode 100644 index 0000000..0e6fa0d --- /dev/null +++ b/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts @@ -0,0 +1,9 @@ +import { ChecksumConfiguration } from "./checksum"; +import { RetryStrategyConfiguration } from "./retry"; +/** + * @internal + * + * Default extension configuration consisting various configurations for modifying a service client + */ +export interface DefaultExtensionConfiguration extends ChecksumConfiguration, RetryStrategyConfiguration { +} diff --git a/node_modules/@smithy/types/dist-types/extensions/index.d.ts b/node_modules/@smithy/types/dist-types/extensions/index.d.ts new file mode 100644 index 0000000..cce65a1 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/extensions/index.d.ts @@ -0,0 +1,4 @@ +export * from "./defaultClientConfiguration"; +export * from "./defaultExtensionConfiguration"; +export { AlgorithmId, ChecksumAlgorithm, ChecksumConfiguration } from "./checksum"; +export { RetryStrategyConfiguration } from "./retry"; diff --git a/node_modules/@smithy/types/dist-types/extensions/retry.d.ts b/node_modules/@smithy/types/dist-types/extensions/retry.d.ts new file mode 100644 index 0000000..8b91f1c --- /dev/null +++ b/node_modules/@smithy/types/dist-types/extensions/retry.d.ts @@ -0,0 +1,18 @@ +import { RetryStrategyV2 } from "../retry"; +import { Provider, RetryStrategy } from "../util"; +/** + * A configuration interface with methods called by runtime extension + * @internal + */ +export interface RetryStrategyConfiguration { + /** + * Set retry strategy used for all http requests + * @param retryStrategy + */ + setRetryStrategy(retryStrategy: Provider): void; + /** + * Get retry strategy used for all http requests + * @param retryStrategy + */ + retryStrategy(): Provider; +} diff --git a/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts b/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts new file mode 100644 index 0000000..0de7f8f --- /dev/null +++ b/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts @@ -0,0 +1,35 @@ +import type { Exact } from "../transform/exact"; +/** + * @public + * + * A checked type that resolves to Blob if it is defined as more than a stub, otherwise + * resolves to 'never' so as not to widen the type of unions containing Blob + * excessively. + */ +export type BlobOptionalType = BlobDefined extends true ? Blob : Unavailable; +/** + * @public + * + * A checked type that resolves to ReadableStream if it is defined as more than a stub, otherwise + * resolves to 'never' so as not to widen the type of unions containing ReadableStream + * excessively. + */ +export type ReadableStreamOptionalType = ReadableStreamDefined extends true ? ReadableStream : Unavailable; +/** + * @public + * + * Indicates a type is unavailable if it resolves to this. + */ +export type Unavailable = never; +/** + * @internal + * + * Whether the global types define more than a stub for ReadableStream. + */ +export type ReadableStreamDefined = Exact extends true ? false : true; +/** + * @internal + * + * Whether the global types define more than a stub for Blob. + */ +export type BlobDefined = Exact extends true ? false : true; diff --git a/node_modules/@smithy/types/dist-types/http.d.ts b/node_modules/@smithy/types/dist-types/http.d.ts new file mode 100644 index 0000000..9e3acf5 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/http.d.ts @@ -0,0 +1,105 @@ +import { AbortSignal } from "./abort"; +import { URI } from "./uri"; +/** + * @public + * + * @deprecated use {@link EndpointV2} from `@smithy/types`. + */ +export interface Endpoint { + protocol: string; + hostname: string; + port?: number; + path: string; + query?: QueryParameterBag; +} +/** + * @public + * + * Interface an HTTP request class. Contains + * addressing information in addition to standard message properties. + */ +export interface HttpRequest extends HttpMessage, URI { + method: string; +} +/** + * @public + * + * Represents an HTTP message as received in reply to a request. Contains a + * numeric status code in addition to standard message properties. + */ +export interface HttpResponse extends HttpMessage { + statusCode: number; +} +/** + * @public + * + * Represents an HTTP message with headers and an optional static or streaming + * body. bode: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream; + */ +export interface HttpMessage { + headers: HeaderBag; + body?: any; +} +/** + * @public + * + * A mapping of query parameter names to strings or arrays of strings, with the + * second being used when a parameter contains a list of values. Value can be set + * to null when query is not in key-value pairs shape + */ +export type QueryParameterBag = Record | null>; +export type FieldOptions = { + name: string; + kind?: FieldPosition; + values?: string[]; +}; +export declare enum FieldPosition { + HEADER = 0, + TRAILER = 1 +} +/** + * @public + * + * A mapping of header names to string values. Multiple values for the same + * header should be represented as a single string with values separated by + * `, `. + * + * Keys should be considered case insensitive, even if this is not enforced by a + * particular implementation. For example, given the following HeaderBag, where + * keys differ only in case: + * + * ```json + * { + * 'x-request-date': '2000-01-01T00:00:00Z', + * 'X-Request-Date': '2001-01-01T00:00:00Z' + * } + * ``` + * + * The SDK may at any point during processing remove one of the object + * properties in favor of the other. The headers may or may not be combined, and + * the SDK will not deterministically select which header candidate to use. + */ +export type HeaderBag = Record; +/** + * @public + * + * Represents an HTTP message with headers and an optional static or streaming + * body. bode: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream; + */ +export interface HttpMessage { + headers: HeaderBag; + body?: any; +} +/** + * @public + * + * Represents the options that may be passed to an Http Handler. + */ +export interface HttpHandlerOptions { + abortSignal?: AbortSignal; + /** + * The maximum time in milliseconds that the connection phase of a request + * may take before the connection attempt is abandoned. + */ + requestTimeout?: number; +} diff --git a/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts b/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts new file mode 100644 index 0000000..bbe285b --- /dev/null +++ b/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts @@ -0,0 +1,79 @@ +/// +/// +import type { Agent as hAgent, AgentOptions as hAgentOptions } from "http"; +import type { Agent as hsAgent, AgentOptions as hsAgentOptions } from "https"; +/** + * + * This type represents an alternate client constructor option for the entry + * "requestHandler". Instead of providing an instance of a requestHandler, the user + * may provide the requestHandler's constructor options for either the + * NodeHttpHandler or FetchHttpHandler. + * + * For other RequestHandlers like HTTP2 or WebSocket, + * constructor parameter passthrough is not currently available. + * + * @public + */ +export type RequestHandlerParams = NodeHttpHandlerOptions | FetchHttpHandlerOptions; +/** + * Represents the http options that can be passed to a node http client. + * @public + */ +export interface NodeHttpHandlerOptions { + /** + * The maximum time in milliseconds that the connection phase of a request + * may take before the connection attempt is abandoned. + * + * Defaults to 0, which disables the timeout. + */ + connectionTimeout?: number; + /** + * The number of milliseconds a request can take before automatically being terminated. + * Defaults to 0, which disables the timeout. + */ + requestTimeout?: number; + /** + * Delay before the NodeHttpHandler checks for socket exhaustion, + * and emits a warning if the active sockets and enqueued request count is greater than + * 2x the maxSockets count. + * + * Defaults to connectionTimeout + requestTimeout or 3000ms if those are not set. + */ + socketAcquisitionWarningTimeout?: number; + /** + * @deprecated Use {@link requestTimeout} + * + * The maximum time in milliseconds that a socket may remain idle before it + * is closed. + */ + socketTimeout?: number; + /** + * You can pass http.Agent or its constructor options. + */ + httpAgent?: hAgent | hAgentOptions; + /** + * You can pass https.Agent or its constructor options. + */ + httpsAgent?: hsAgent | hsAgentOptions; +} +/** + * Represents the http options that can be passed to a browser http client. + * @public + */ +export interface FetchHttpHandlerOptions { + /** + * The number of milliseconds a request can take before being automatically + * terminated. + */ + requestTimeout?: number; + /** + * Whether to allow the request to outlive the page. Default value is false. + * + * There may be limitations to the payload size, number of concurrent requests, + * request duration etc. when using keepalive in browsers. + * + * These may change over time, so look for up to date information about + * these limitations before enabling keepalive. + */ + keepAlive?: boolean; +} diff --git a/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts b/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts new file mode 100644 index 0000000..27750d4 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts @@ -0,0 +1,14 @@ +import { Identity, IdentityProvider } from "../identity/identity"; +/** + * @public + */ +export interface ApiKeyIdentity extends Identity { + /** + * The literal API Key + */ + readonly apiKey: string; +} +/** + * @public + */ +export type ApiKeyIdentityProvider = IdentityProvider; diff --git a/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts b/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts new file mode 100644 index 0000000..8f24d27 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts @@ -0,0 +1,27 @@ +import { Identity, IdentityProvider } from "./identity"; +/** + * @public + */ +export interface AwsCredentialIdentity extends Identity { + /** + * AWS access key ID + */ + readonly accessKeyId: string; + /** + * AWS secret access key + */ + readonly secretAccessKey: string; + /** + * A security or session token to use with these credentials. Usually + * present for temporary credentials. + */ + readonly sessionToken?: string; + /** + * AWS credential scope for this set of credentials. + */ + readonly credentialScope?: string; +} +/** + * @public + */ +export type AwsCredentialIdentityProvider = IdentityProvider; diff --git a/node_modules/@smithy/types/dist-types/identity/identity.d.ts b/node_modules/@smithy/types/dist-types/identity/identity.d.ts new file mode 100644 index 0000000..c6fd0d1 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/identity/identity.d.ts @@ -0,0 +1,15 @@ +/** + * @public + */ +export interface Identity { + /** + * A `Date` when the identity or credential will no longer be accepted. + */ + readonly expiration?: Date; +} +/** + * @public + */ +export interface IdentityProvider { + (identityProperties?: Record): Promise; +} diff --git a/node_modules/@smithy/types/dist-types/identity/index.d.ts b/node_modules/@smithy/types/dist-types/identity/index.d.ts new file mode 100644 index 0000000..3360320 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/identity/index.d.ts @@ -0,0 +1,4 @@ +export * from "./apiKeyIdentity"; +export * from "./awsCredentialIdentity"; +export * from "./identity"; +export * from "./tokenIdentity"; diff --git a/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts b/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts new file mode 100644 index 0000000..84a74ff --- /dev/null +++ b/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts @@ -0,0 +1,14 @@ +import { Identity, IdentityProvider } from "../identity/identity"; +/** + * @internal + */ +export interface TokenIdentity extends Identity { + /** + * The literal token string + */ + readonly token: string; +} +/** + * @internal + */ +export type TokenIdentityProvider = IdentityProvider; diff --git a/node_modules/@smithy/types/dist-types/index.d.ts b/node_modules/@smithy/types/dist-types/index.d.ts new file mode 100644 index 0000000..17c2c94 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/index.d.ts @@ -0,0 +1,36 @@ +export * from "./abort"; +export * from "./auth"; +export * from "./blob/blob-payload-input-types"; +export * from "./checksum"; +export * from "./client"; +export * from "./command"; +export * from "./connection"; +export * from "./crypto"; +export * from "./encode"; +export * from "./endpoint"; +export * from "./endpoints"; +export * from "./eventStream"; +export * from "./extensions"; +export * from "./http"; +export * from "./http/httpHandlerInitialization"; +export * from "./identity"; +export * from "./logger"; +export * from "./middleware"; +export * from "./pagination"; +export * from "./profile"; +export * from "./response"; +export * from "./retry"; +export * from "./serde"; +export * from "./shapes"; +export * from "./signature"; +export * from "./stream"; +export * from "./streaming-payload/streaming-blob-common-types"; +export * from "./streaming-payload/streaming-blob-payload-input-types"; +export * from "./streaming-payload/streaming-blob-payload-output-types"; +export * from "./transfer"; +export * from "./transform/client-payload-blob-type-narrow"; +export * from "./transform/no-undefined"; +export * from "./transform/type-transform"; +export * from "./uri"; +export * from "./util"; +export * from "./waiter"; diff --git a/node_modules/@smithy/types/dist-types/logger.d.ts b/node_modules/@smithy/types/dist-types/logger.d.ts new file mode 100644 index 0000000..f66a664 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/logger.d.ts @@ -0,0 +1,13 @@ +/** + * @public + * + * Represents a logger object that is available in HandlerExecutionContext + * throughout the middleware stack. + */ +export interface Logger { + trace?: (...content: any[]) => void; + debug: (...content: any[]) => void; + info: (...content: any[]) => void; + warn: (...content: any[]) => void; + error: (...content: any[]) => void; +} diff --git a/node_modules/@smithy/types/dist-types/middleware.d.ts b/node_modules/@smithy/types/dist-types/middleware.d.ts new file mode 100644 index 0000000..7a3fa89 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/middleware.d.ts @@ -0,0 +1,510 @@ +import { AuthScheme, HttpAuthDefinition } from "./auth/auth"; +import { EndpointV2 } from "./endpoint"; +import { Logger } from "./logger"; +import { UserAgent } from "./util"; +/** + * @public + */ +export interface InitializeHandlerArguments { + /** + * User input to a command. Reflects the userland representation of the + * union of data types the command can effectively handle. + */ + input: Input; +} +/** + * @public + */ +export interface InitializeHandlerOutput extends DeserializeHandlerOutput { + output: Output; +} +/** + * @public + */ +export interface SerializeHandlerArguments extends InitializeHandlerArguments { + /** + * The user input serialized as a request object. The request object is unknown, + * so you cannot modify it directly. When work with request, you need to guard its + * type to e.g. HttpRequest with 'instanceof' operand + * + * During the build phase of the execution of a middleware stack, a built + * request may or may not be available. + */ + request?: unknown; +} +/** + * @public + */ +export interface SerializeHandlerOutput extends InitializeHandlerOutput { +} +/** + * @public + */ +export interface BuildHandlerArguments extends FinalizeHandlerArguments { +} +/** + * @public + */ +export interface BuildHandlerOutput extends InitializeHandlerOutput { +} +/** + * @public + */ +export interface FinalizeHandlerArguments extends SerializeHandlerArguments { + /** + * The user input serialized as a request. + */ + request: unknown; +} +/** + * @public + */ +export interface FinalizeHandlerOutput extends InitializeHandlerOutput { +} +/** + * @public + */ +export interface DeserializeHandlerArguments extends FinalizeHandlerArguments { +} +/** + * @public + */ +export interface DeserializeHandlerOutput { + /** + * The raw response object from runtime is deserialized to structured output object. + * The response object is unknown so you cannot modify it directly. When work with + * response, you need to guard its type to e.g. HttpResponse with 'instanceof' operand. + * + * During the deserialize phase of the execution of a middleware stack, a deserialized + * response may or may not be available + */ + response: unknown; + output?: Output; +} +/** + * @public + */ +export interface InitializeHandler { + /** + * Asynchronously converts an input object into an output object. + * + * @param args - An object containing a input to the command as well as any + * associated or previously generated execution artifacts. + */ + (args: InitializeHandlerArguments): Promise>; +} +/** + * @public + */ +export type Handler = InitializeHandler; +/** + * @public + */ +export interface SerializeHandler { + /** + * Asynchronously converts an input object into an output object. + * + * @param args - An object containing a input to the command as well as any + * associated or previously generated execution artifacts. + */ + (args: SerializeHandlerArguments): Promise>; +} +/** + * @public + */ +export interface FinalizeHandler { + /** + * Asynchronously converts an input object into an output object. + * + * @param args - An object containing a input to the command as well as any + * associated or previously generated execution artifacts. + */ + (args: FinalizeHandlerArguments): Promise>; +} +/** + * @public + */ +export interface BuildHandler { + (args: BuildHandlerArguments): Promise>; +} +/** + * @public + */ +export interface DeserializeHandler { + (args: DeserializeHandlerArguments): Promise>; +} +/** + * @public + * + * A factory function that creates functions implementing the `Handler` + * interface. + */ +export interface InitializeMiddleware { + /** + * @param next - The handler to invoke after this middleware has operated on + * the user input and before this middleware operates on the output. + * + * @param context - Invariant data and functions for use by the handler. + */ + (next: InitializeHandler, context: HandlerExecutionContext): InitializeHandler; +} +/** + * @public + * + * A factory function that creates functions implementing the `BuildHandler` + * interface. + */ +export interface SerializeMiddleware { + /** + * @param next - The handler to invoke after this middleware has operated on + * the user input and before this middleware operates on the output. + * + * @param context - Invariant data and functions for use by the handler. + */ + (next: SerializeHandler, context: HandlerExecutionContext): SerializeHandler; +} +/** + * @public + * + * A factory function that creates functions implementing the `FinalizeHandler` + * interface. + */ +export interface FinalizeRequestMiddleware { + /** + * @param next - The handler to invoke after this middleware has operated on + * the user input and before this middleware operates on the output. + * + * @param context - Invariant data and functions for use by the handler. + */ + (next: FinalizeHandler, context: HandlerExecutionContext): FinalizeHandler; +} +/** + * @public + */ +export interface BuildMiddleware { + (next: BuildHandler, context: HandlerExecutionContext): BuildHandler; +} +/** + * @public + */ +export interface DeserializeMiddleware { + (next: DeserializeHandler, context: HandlerExecutionContext): DeserializeHandler; +} +/** + * @public + */ +export type MiddlewareType = InitializeMiddleware | SerializeMiddleware | BuildMiddleware | FinalizeRequestMiddleware | DeserializeMiddleware; +/** + * @public + * + * A factory function that creates the terminal handler atop which a middleware + * stack sits. + */ +export interface Terminalware { + (context: HandlerExecutionContext): DeserializeHandler; +} +/** + * @public + */ +export type Step = "initialize" | "serialize" | "build" | "finalizeRequest" | "deserialize"; +/** + * @public + */ +export type Priority = "high" | "normal" | "low"; +/** + * @public + */ +export interface HandlerOptions { + /** + * Handlers are ordered using a "step" that describes the stage of command + * execution at which the handler will be executed. The available steps are: + * + * - initialize: The input is being prepared. Examples of typical + * initialization tasks include injecting default options computing + * derived parameters. + * - serialize: The input is complete and ready to be serialized. Examples + * of typical serialization tasks include input validation and building + * an HTTP request from user input. + * - build: The input has been serialized into an HTTP request, but that + * request may require further modification. Any request alterations + * will be applied to all retries. Examples of typical build tasks + * include injecting HTTP headers that describe a stable aspect of the + * request, such as `Content-Length` or a body checksum. + * - finalizeRequest: The request is being prepared to be sent over the wire. The + * request in this stage should already be semantically complete and + * should therefore only be altered as match the recipient's + * expectations. Examples of typical finalization tasks include request + * signing and injecting hop-by-hop headers. + * - deserialize: The response has arrived, the middleware here will deserialize + * the raw response object to structured response + * + * Unlike initialization and build handlers, which are executed once + * per operation execution, finalization and deserialize handlers will be + * executed foreach HTTP request sent. + * + * @defaultValue 'initialize' + */ + step?: Step; + /** + * A list of strings to any that identify the general purpose or important + * characteristics of a given handler. + */ + tags?: Array; + /** + * A unique name to refer to a middleware + */ + name?: string; + /** + * @internal + * Aliases allows for middleware to be found by multiple names besides {@link HandlerOptions.name}. + * This allows for references to replaced middleware to continue working, e.g. replacing + * multiple auth-specific middleware with a single generic auth middleware. + */ + aliases?: Array; + /** + * A flag to override the existing middleware with the same name. Without + * setting it, adding middleware with duplicated name will throw an exception. + * @internal + */ + override?: boolean; +} +/** + * @public + */ +export interface AbsoluteLocation { + /** + * By default middleware will be added to individual step in un-guaranteed order. + * In the case that + * + * @defaultValue 'normal' + */ + priority?: Priority; +} +/** + * @public + */ +export type Relation = "before" | "after"; +/** + * @public + */ +export interface RelativeLocation { + /** + * Specify the relation to be before or after a know middleware. + */ + relation: Relation; + /** + * A known middleware name to indicate inserting middleware's location. + */ + toMiddleware: string; +} +/** + * @public + */ +export type RelativeMiddlewareOptions = RelativeLocation & Omit; +/** + * @public + */ +export interface InitializeHandlerOptions extends HandlerOptions { + step?: "initialize"; +} +/** + * @public + */ +export interface SerializeHandlerOptions extends HandlerOptions { + step: "serialize"; +} +/** + * @public + */ +export interface BuildHandlerOptions extends HandlerOptions { + step: "build"; +} +/** + * @public + */ +export interface FinalizeRequestHandlerOptions extends HandlerOptions { + step: "finalizeRequest"; +} +/** + * @public + */ +export interface DeserializeHandlerOptions extends HandlerOptions { + step: "deserialize"; +} +/** + * @public + * + * A stack storing middleware. It can be resolved into a handler. It supports 2 + * approaches for adding middleware: + * 1. Adding middleware to specific step with `add()`. The order of middleware + * added into same step is determined by order of adding them. If one middleware + * needs to be executed at the front of the step or at the end of step, set + * `priority` options to `high` or `low`. + * 2. Adding middleware to location relative to known middleware with `addRelativeTo()`. + * This is useful when given middleware must be executed before or after specific + * middleware(`toMiddleware`). You can add a middleware relatively to another + * middleware which also added relatively. But eventually, this relative middleware + * chain **must** be 'anchored' by a middleware that added using `add()` API + * with absolute `step` and `priority`. This mothod will throw if specified + * `toMiddleware` is not found. + */ +export interface MiddlewareStack extends Pluggable { + /** + * Add middleware to the stack to be executed during the "initialize" step, + * optionally specifying a priority, tags and name + */ + add(middleware: InitializeMiddleware, options?: InitializeHandlerOptions & AbsoluteLocation): void; + /** + * Add middleware to the stack to be executed during the "serialize" step, + * optionally specifying a priority, tags and name + */ + add(middleware: SerializeMiddleware, options: SerializeHandlerOptions & AbsoluteLocation): void; + /** + * Add middleware to the stack to be executed during the "build" step, + * optionally specifying a priority, tags and name + */ + add(middleware: BuildMiddleware, options: BuildHandlerOptions & AbsoluteLocation): void; + /** + * Add middleware to the stack to be executed during the "finalizeRequest" step, + * optionally specifying a priority, tags and name + */ + add(middleware: FinalizeRequestMiddleware, options: FinalizeRequestHandlerOptions & AbsoluteLocation): void; + /** + * Add middleware to the stack to be executed during the "deserialize" step, + * optionally specifying a priority, tags and name + */ + add(middleware: DeserializeMiddleware, options: DeserializeHandlerOptions & AbsoluteLocation): void; + /** + * Add middleware to a stack position before or after a known middleware,optionally + * specifying name and tags. + */ + addRelativeTo(middleware: MiddlewareType, options: RelativeMiddlewareOptions): void; + /** + * Apply a customization function to mutate the middleware stack, often + * used for customizations that requires mutating multiple middleware. + */ + use(pluggable: Pluggable): void; + /** + * Create a shallow clone of this stack. Step bindings and handler priorities + * and tags are preserved in the copy. + */ + clone(): MiddlewareStack; + /** + * Removes middleware from the stack. + * + * If a string is provided, it will be treated as middleware name. If a middleware + * is inserted with the given name, it will be removed. + * + * If a middleware class is provided, all usages thereof will be removed. + */ + remove(toRemove: MiddlewareType | string): boolean; + /** + * Removes middleware that contains given tag + * + * Multiple middleware will potentially be removed + */ + removeByTag(toRemove: string): boolean; + /** + * Create a stack containing the middlewares in this stack as well as the + * middlewares in the `from` stack. Neither source is modified, and step + * bindings and handler priorities and tags are preserved in the copy. + */ + concat(from: MiddlewareStack): MiddlewareStack; + /** + * Returns a list of the current order of middleware in the stack. + * This does not execute the middleware functions, nor does it + * provide a reference to the stack itself. + */ + identify(): string[]; + /** + * @internal + * + * When an operation is called using this stack, + * it will log its list of middleware to the console using + * the identify function. + * + * @param toggle - set whether to log on resolve. + * If no argument given, returns the current value. + */ + identifyOnResolve(toggle?: boolean): boolean; + /** + * Builds a single handler function from zero or more middleware classes and + * a core handler. The core handler is meant to send command objects to AWS + * services and return promises that will resolve with the operation result + * or be rejected with an error. + * + * When a composed handler is invoked, the arguments will pass through all + * middleware in a defined order, and the return from the innermost handler + * will pass through all middleware in the reverse of that order. + */ + resolve(handler: DeserializeHandler, context: HandlerExecutionContext): InitializeHandler; +} +/** + * @internal + */ +export declare const SMITHY_CONTEXT_KEY = "__smithy_context"; +/** + * @public + * + * Data and helper objects that are not expected to change from one execution of + * a composed handler to another. + */ +export interface HandlerExecutionContext { + /** + * A logger that may be invoked by any handler during execution of an + * operation. + */ + logger?: Logger; + /** + * Name of the service the operation is being sent to. + */ + clientName?: string; + /** + * Name of the operation being executed. + */ + commandName?: string; + /** + * Additional user agent that inferred by middleware. It can be used to save + * the internal user agent sections without overriding the `customUserAgent` + * config in clients. + */ + userAgent?: UserAgent; + /** + * Resolved by the endpointMiddleware function of `@smithy/middleware-endpoint` + * in the serialization stage. + */ + endpointV2?: EndpointV2; + /** + * Set at the same time as endpointV2. + */ + authSchemes?: AuthScheme[]; + /** + * The current auth configuration that has been set by any auth middleware and + * that will prevent from being set more than once. + */ + currentAuthConfig?: HttpAuthDefinition; + /** + * Used by DynamoDbDocumentClient. + */ + dynamoDbDocumentClientOptions?: Partial<{ + overrideInputFilterSensitiveLog(...args: any[]): string | void; + overrideOutputFilterSensitiveLog(...args: any[]): string | void; + }>; + /** + * @internal + * Context for Smithy properties + */ + [SMITHY_CONTEXT_KEY]?: Record; + [key: string]: any; +} +/** + * @public + */ +export interface Pluggable { + /** + * A function that mutate the passed in middleware stack. Functions implementing + * this interface can add, remove, modify existing middleware stack from clients + * or commands + */ + applyToStack: (stack: MiddlewareStack) => void; +} diff --git a/node_modules/@smithy/types/dist-types/pagination.d.ts b/node_modules/@smithy/types/dist-types/pagination.d.ts new file mode 100644 index 0000000..0d304dd --- /dev/null +++ b/node_modules/@smithy/types/dist-types/pagination.d.ts @@ -0,0 +1,26 @@ +import { Client } from "./client"; +/** + * @public + * + * Expected type definition of a paginator. + */ +export type Paginator = AsyncGenerator; +/** + * @public + * + * Expected paginator configuration passed to an operation. Services will extend + * this interface definition and may type client further. + */ +export interface PaginationConfiguration { + client: Client; + pageSize?: number; + startingToken?: any; + /** + * For some APIs, such as CloudWatchLogs events, the next page token will always + * be present. + * + * When true, this config field will have the paginator stop when the token doesn't change + * instead of when it is not present. + */ + stopOnSameToken?: boolean; +} diff --git a/node_modules/@smithy/types/dist-types/profile.d.ts b/node_modules/@smithy/types/dist-types/profile.d.ts new file mode 100644 index 0000000..b7885d9 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/profile.d.ts @@ -0,0 +1,30 @@ +/** + * @public + */ +export declare enum IniSectionType { + PROFILE = "profile", + SSO_SESSION = "sso-session", + SERVICES = "services" +} +/** + * @public + */ +export type IniSection = Record; +/** + * @public + * + * @deprecated Please use {@link IniSection} + */ +export interface Profile extends IniSection { +} +/** + * @public + */ +export type ParsedIniData = Record; +/** + * @public + */ +export interface SharedConfigFiles { + credentialsFile: ParsedIniData; + configFile: ParsedIniData; +} diff --git a/node_modules/@smithy/types/dist-types/response.d.ts b/node_modules/@smithy/types/dist-types/response.d.ts new file mode 100644 index 0000000..afcfe8f --- /dev/null +++ b/node_modules/@smithy/types/dist-types/response.d.ts @@ -0,0 +1,40 @@ +/** + * @public + */ +export interface ResponseMetadata { + /** + * The status code of the last HTTP response received for this operation. + */ + httpStatusCode?: number; + /** + * A unique identifier for the last request sent for this operation. Often + * requested by AWS service teams to aid in debugging. + */ + requestId?: string; + /** + * A secondary identifier for the last request sent. Used for debugging. + */ + extendedRequestId?: string; + /** + * A tertiary identifier for the last request sent. Used for debugging. + */ + cfId?: string; + /** + * The number of times this operation was attempted. + */ + attempts?: number; + /** + * The total amount of time (in milliseconds) that was spent waiting between + * retry attempts. + */ + totalRetryDelay?: number; +} +/** + * @public + */ +export interface MetadataBearer { + /** + * Metadata pertaining to this request. + */ + $metadata: ResponseMetadata; +} diff --git a/node_modules/@smithy/types/dist-types/retry.d.ts b/node_modules/@smithy/types/dist-types/retry.d.ts new file mode 100644 index 0000000..7bb5881 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/retry.d.ts @@ -0,0 +1,133 @@ +import { SdkError } from "./shapes"; +/** + * @public + */ +export type RetryErrorType = +/** + * This is a connection level error such as a socket timeout, socket connect + * error, tls negotiation timeout etc... + * Typically these should never be applied for non-idempotent request types + * since in this scenario, it's impossible to know whether the operation had + * a side effect on the server. + */ +"TRANSIENT" +/** + * This is an error where the server explicitly told the client to back off, + * such as a 429 or 503 Http error. + */ + | "THROTTLING" +/** + * This is a server error that isn't explicitly throttling but is considered + * by the client to be something that should be retried. + */ + | "SERVER_ERROR" +/** + * Doesn't count against any budgets. This could be something like a 401 + * challenge in Http. + */ + | "CLIENT_ERROR"; +/** + * @public + */ +export interface RetryErrorInfo { + /** + * The error thrown during the initial request, if available. + */ + error?: SdkError; + errorType: RetryErrorType; + /** + * Protocol hint. This could come from Http's 'retry-after' header or + * something from MQTT or any other protocol that has the ability to convey + * retry info from a peer. + * + * The Date after which a retry should be attempted. + */ + retryAfterHint?: Date; +} +/** + * @public + */ +export interface RetryBackoffStrategy { + /** + * @returns the number of milliseconds to wait before retrying an action. + */ + computeNextBackoffDelay(retryAttempt: number): number; +} +/** + * @public + */ +export interface StandardRetryBackoffStrategy extends RetryBackoffStrategy { + /** + * Sets the delayBase used to compute backoff delays. + * @param delayBase - + */ + setDelayBase(delayBase: number): void; +} +/** + * @public + */ +export interface RetryStrategyOptions { + backoffStrategy: RetryBackoffStrategy; + maxRetriesBase: number; +} +/** + * @public + */ +export interface RetryToken { + /** + * @returns the current count of retry. + */ + getRetryCount(): number; + /** + * @returns the number of milliseconds to wait before retrying an action. + */ + getRetryDelay(): number; +} +/** + * @public + */ +export interface StandardRetryToken extends RetryToken { + /** + * @returns the cost of the last retry attempt. + */ + getRetryCost(): number | undefined; +} +/** + * @public + */ +export interface RetryStrategyV2 { + /** + * Called before any retries (for the first call to the operation). It either + * returns a retry token or an error upon the failure to acquire a token prior. + * + * tokenScope is arbitrary and out of scope for this component. However, + * adding it here offers us a lot of future flexibility for outage detection. + * For example, it could be "us-east-1" on a shared retry strategy, or + * "us-west-2-c:dynamodb". + */ + acquireInitialRetryToken(retryTokenScope: string): Promise; + /** + * After a failed operation call, this function is invoked to refresh the + * retryToken returned by acquireInitialRetryToken(). This function can + * either choose to allow another retry and send a new or updated token, + * or reject the retry attempt and report the error either in an exception + * or returning an error. + */ + refreshRetryTokenForRetry(tokenToRenew: RetryToken, errorInfo: RetryErrorInfo): Promise; + /** + * Upon successful completion of the operation, this function is called + * to record that the operation was successful. + */ + recordSuccess(token: RetryToken): void; +} +/** + * @public + */ +export type ExponentialBackoffJitterType = "DEFAULT" | "NONE" | "FULL" | "DECORRELATED"; +/** + * @public + */ +export interface ExponentialBackoffStrategyOptions { + jitterType: ExponentialBackoffJitterType; + backoffScaleValue?: number; +} diff --git a/node_modules/@smithy/types/dist-types/serde.d.ts b/node_modules/@smithy/types/dist-types/serde.d.ts new file mode 100644 index 0000000..28680b7 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/serde.d.ts @@ -0,0 +1,111 @@ +import { Endpoint } from "./http"; +import { RequestHandler } from "./transfer"; +import { Decoder, Encoder, Provider } from "./util"; +/** + * @public + * + * Interface for object requires an Endpoint set. + */ +export interface EndpointBearer { + endpoint: Provider; +} +/** + * @public + */ +export interface StreamCollector { + /** + * A function that converts a stream into an array of bytes. + * + * @param stream - The low-level native stream from browser or Nodejs runtime + */ + (stream: any): Promise; +} +/** + * @public + * + * Request and Response serde util functions and settings for AWS services + */ +export interface SerdeContext extends SerdeFunctions, EndpointBearer { + requestHandler: RequestHandler; + disableHostPrefix: boolean; +} +/** + * @public + * + * Serde functions from the client config. + */ +export interface SerdeFunctions { + base64Encoder: Encoder; + base64Decoder: Decoder; + utf8Encoder: Encoder; + utf8Decoder: Decoder; + streamCollector: StreamCollector; +} +/** + * @public + */ +export interface RequestSerializer { + /** + * Converts the provided `input` into a request object + * + * @param input - The user input to serialize. + * + * @param context - Context containing runtime-specific util functions. + */ + (input: any, context: Context): Promise; +} +/** + * @public + */ +export interface ResponseDeserializer { + /** + * Converts the output of an operation into JavaScript types. + * + * @param output - The HTTP response received from the service + * + * @param context - context containing runtime-specific util functions. + */ + (output: ResponseType, context: Context): Promise; +} +/** + * The interface contains mix-in utility functions to transfer the runtime-specific + * stream implementation to specified format. Each stream can ONLY be transformed + * once. + */ +export interface SdkStreamMixin { + transformToByteArray: () => Promise; + transformToString: (encoding?: string) => Promise; + transformToWebStream: () => ReadableStream; +} +/** + * @public + * + * The type describing a runtime-specific stream implementation with mix-in + * utility functions. + */ +export type SdkStream = BaseStream & SdkStreamMixin; +/** + * @public + * + * Indicates that the member of type T with + * key StreamKey have been extended + * with the SdkStreamMixin helper methods. + */ +export type WithSdkStreamMixin = { + [key in keyof T]: key extends StreamKey ? SdkStream : T[key]; +}; +/** + * Interface for internal function to inject stream utility functions + * implementation + * + * @internal + */ +export interface SdkStreamMixinInjector { + (stream: unknown): SdkStreamMixin; +} +/** + * @internal + */ +export interface SdkStreamSerdeContext { + sdkStreamMixin: SdkStreamMixinInjector; +} diff --git a/node_modules/@smithy/types/dist-types/shapes.d.ts b/node_modules/@smithy/types/dist-types/shapes.d.ts new file mode 100644 index 0000000..268b39c --- /dev/null +++ b/node_modules/@smithy/types/dist-types/shapes.d.ts @@ -0,0 +1,81 @@ +import { HttpResponse } from "./http"; +import { MetadataBearer } from "./response"; +/** + * @public + * + * A document type represents an untyped JSON-like value. + * + * Not all protocols support document types, and the serialization format of a + * document type is protocol specific. All JSON protocols SHOULD support + * document types and they SHOULD serialize document types inline as normal + * JSON values. + */ +export type DocumentType = null | boolean | number | string | DocumentType[] | { + [prop: string]: DocumentType; +}; +/** + * @public + * + * A structure shape with the error trait. + * https://smithy.io/2.0/spec/behavior-traits.html#smithy-api-retryable-trait + */ +export interface RetryableTrait { + /** + * Indicates that the error is a retryable throttling error. + */ + readonly throttling?: boolean; +} +/** + * @public + * + * Type that is implemented by all Smithy shapes marked with the + * error trait. + * @deprecated + */ +export interface SmithyException { + /** + * The shape ID name of the exception. + */ + readonly name: string; + /** + * Whether the client or server are at fault. + */ + readonly $fault: "client" | "server"; + /** + * The service that encountered the exception. + */ + readonly $service?: string; + /** + * Indicates that an error MAY be retried by the client. + */ + readonly $retryable?: RetryableTrait; + /** + * Reference to low-level HTTP response object. + */ + readonly $response?: HttpResponse; +} +/** + * @public + * + * @deprecated See {@link https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/} + * + * This type should not be used in your application. + * Users of the AWS SDK for JavaScript v3 service clients should prefer to + * use the specific Exception classes corresponding to each operation. + * These can be found as code in the deserializer for the operation's Command class, + * or as declarations in the service model file in codegen/sdk-codegen/aws-models. + * + * If no exceptions are enumerated by a particular Command operation, + * the base exception for the service should be used. Each client exports + * a base ServiceException prefixed with the service name. + */ +export type SdkError = Error & Partial & Partial & { + $metadata?: Partial["$metadata"] & { + /** + * If present, will have value of true and indicates that the error resulted in a + * correction of the clock skew, a.k.a. config.systemClockOffset. + * This is specific to AWS SDK and sigv4. + */ + readonly clockSkewCorrected?: true; + }; +}; diff --git a/node_modules/@smithy/types/dist-types/signature.d.ts b/node_modules/@smithy/types/dist-types/signature.d.ts new file mode 100644 index 0000000..6ac7578 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/signature.d.ts @@ -0,0 +1,150 @@ +import { Message } from "./eventStream"; +import { HttpRequest } from "./http"; +/** + * @public + * + * A `Date` object, a unix (epoch) timestamp in seconds, or a string that can be + * understood by the JavaScript `Date` constructor. + */ +export type DateInput = number | string | Date; +/** + * @public + */ +export interface SigningArguments { + /** + * The date and time to be used as signature metadata. This value should be + * a Date object, a unix (epoch) timestamp, or a string that can be + * understood by the JavaScript `Date` constructor.If not supplied, the + * value returned by `new Date()` will be used. + */ + signingDate?: DateInput; + /** + * The service signing name. It will override the service name of the signer + * in current invocation + */ + signingService?: string; + /** + * The region name to sign the request. It will override the signing region of the + * signer in current invocation + */ + signingRegion?: string; +} +/** + * @public + */ +export interface RequestSigningArguments extends SigningArguments { + /** + * A set of strings whose members represents headers that cannot be signed. + * All headers in the provided request will have their names converted to + * lower case and then checked for existence in the unsignableHeaders set. + */ + unsignableHeaders?: Set; + /** + * A set of strings whose members represents headers that should be signed. + * Any values passed here will override those provided via unsignableHeaders, + * allowing them to be signed. + * + * All headers in the provided request will have their names converted to + * lower case before signing. + */ + signableHeaders?: Set; +} +/** + * @public + */ +export interface RequestPresigningArguments extends RequestSigningArguments { + /** + * The number of seconds before the presigned URL expires + */ + expiresIn?: number; + /** + * A set of strings whose representing headers that should not be hoisted + * to presigned request's query string. If not supplied, the presigner + * moves all the AWS-specific headers (starting with `x-amz-`) to the request + * query string. If supplied, these headers remain in the presigned request's + * header. + * All headers in the provided request will have their names converted to + * lower case and then checked for existence in the unhoistableHeaders set. + */ + unhoistableHeaders?: Set; +} +/** + * @public + */ +export interface EventSigningArguments extends SigningArguments { + priorSignature: string; +} +/** + * @public + */ +export interface RequestPresigner { + /** + * Signs a request for future use. + * + * The request will be valid until either the provided `expiration` time has + * passed or the underlying credentials have expired. + * + * @param requestToSign - The request that should be signed. + * @param options - Additional signing options. + */ + presign(requestToSign: HttpRequest, options?: RequestPresigningArguments): Promise; +} +/** + * @public + * + * An object that signs request objects with AWS credentials using one of the + * AWS authentication protocols. + */ +export interface RequestSigner { + /** + * Sign the provided request for immediate dispatch. + */ + sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise; +} +/** + * @public + */ +export interface StringSigner { + /** + * Sign the provided `stringToSign` for use outside of the context of + * request signing. Typical uses include signed policy generation. + */ + sign(stringToSign: string, options?: SigningArguments): Promise; +} +/** + * @public + */ +export interface FormattedEvent { + headers: Uint8Array; + payload: Uint8Array; +} +/** + * @public + */ +export interface EventSigner { + /** + * Sign the individual event of the event stream. + */ + sign(event: FormattedEvent, options: EventSigningArguments): Promise; +} +/** + * @public + */ +export interface SignableMessage { + message: Message; + priorSignature: string; +} +/** + * @public + */ +export interface SignedMessage { + message: Message; + signature: string; +} +/** + * @public + */ +export interface MessageSigner { + signMessage(message: SignableMessage, args: SigningArguments): Promise; + sign(event: SignableMessage, options: SigningArguments): Promise; +} diff --git a/node_modules/@smithy/types/dist-types/stream.d.ts b/node_modules/@smithy/types/dist-types/stream.d.ts new file mode 100644 index 0000000..f305dd9 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/stream.d.ts @@ -0,0 +1,22 @@ +import { ChecksumConstructor } from "./checksum"; +import { HashConstructor, StreamHasher } from "./crypto"; +import { BodyLengthCalculator, Encoder } from "./util"; +/** + * @public + */ +export interface GetAwsChunkedEncodingStreamOptions { + base64Encoder?: Encoder; + bodyLengthChecker: BodyLengthCalculator; + checksumAlgorithmFn?: ChecksumConstructor | HashConstructor; + checksumLocationName?: string; + streamHasher?: StreamHasher; +} +/** + * @public + * + * A function that returns Readable Stream which follows aws-chunked encoding stream. + * It optionally adds checksum if options are provided. + */ +export interface GetAwsChunkedEncodingStream { + (readableStream: StreamType, options: GetAwsChunkedEncodingStreamOptions): StreamType; +} diff --git a/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts b/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts new file mode 100644 index 0000000..92c52da --- /dev/null +++ b/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts @@ -0,0 +1,33 @@ +/// +import type { Readable } from "stream"; +import type { BlobOptionalType, ReadableStreamOptionalType } from "../externals-check/browser-externals-check"; +/** + * @public + * + * This is the union representing the modeled blob type with streaming trait + * in a generic format that does not relate to HTTP input or output payloads. + * + * Note: the non-streaming blob type is represented by Uint8Array, but because + * the streaming blob type is always in the request/response paylod, it has + * historically been handled with different types. + * + * @see https://smithy.io/2.0/spec/simple-types.html#blob + * + * For compatibility with its historical representation, it must contain at least + * Readble (Node.js), Blob (browser), and ReadableStream (browser). + * + * @see StreamingPayloadInputTypes for FAQ about mixing types from multiple environments. + */ +export type StreamingBlobTypes = NodeJsRuntimeStreamingBlobTypes | BrowserRuntimeStreamingBlobTypes; +/** + * @public + * + * Node.js streaming blob type. + */ +export type NodeJsRuntimeStreamingBlobTypes = Readable; +/** + * @public + * + * Browser streaming blob types. + */ +export type BrowserRuntimeStreamingBlobTypes = ReadableStreamOptionalType | BlobOptionalType; diff --git a/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts b/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts new file mode 100644 index 0000000..812681c --- /dev/null +++ b/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts @@ -0,0 +1,62 @@ +/// +/// +import type { Readable } from "stream"; +import type { BlobOptionalType, ReadableStreamOptionalType } from "../externals-check/browser-externals-check"; +/** + * @public + * + * This union represents a superset of the compatible types you + * can use for streaming payload inputs. + * + * FAQ: + * Why does the type union mix mutually exclusive runtime types, namely + * Node.js and browser types? + * + * There are several reasons: + * 1. For backwards compatibility. + * 2. As a convenient compromise solution so that users in either environment may use the types + * without customization. + * 3. The SDK does not have static type information about the exact implementation + * of the HTTP RequestHandler being used in your client(s) (e.g. fetch, XHR, node:http, or node:http2), + * given that it is chosen at runtime. There are multiple possible request handlers + * in both the Node.js and browser runtime environments. + * + * Rather than restricting the type to a known common format (Uint8Array, for example) + * which doesn't include a universal streaming format in the currently supported Node.js versions, + * the type declaration is widened to multiple possible formats. + * It is up to the user to ultimately select a compatible format with the + * runtime and HTTP handler implementation they are using. + * + * Usage: + * The typical solution we expect users to have is to manually narrow the + * type when needed, picking the appropriate one out of the union according to the + * runtime environment and specific request handler. + * There is also the type utility "NodeJsClient", "BrowserClient" and more + * exported from this package. These can be applied at the client level + * to pre-narrow these streaming payload blobs. For usage see the readme.md + * in the root of the @smithy/types NPM package. + */ +export type StreamingBlobPayloadInputTypes = NodeJsRuntimeStreamingBlobPayloadInputTypes | BrowserRuntimeStreamingBlobPayloadInputTypes; +/** + * @public + * + * Streaming payload input types in the Node.js environment. + * These are derived from the types compatible with the request body used by node:http. + * + * Note: not all types are signable by the standard SignatureV4 signer when + * used as the request body. For example, in Node.js a Readable stream + * is not signable by the default signer. + * They are included in the union because it may be intended in some cases, + * but the expected types are primarily string, Uint8Array, and Buffer. + * + * Additional details may be found in the internal + * function "getPayloadHash" in the SignatureV4 module. + */ +export type NodeJsRuntimeStreamingBlobPayloadInputTypes = string | Uint8Array | Buffer | Readable; +/** + * @public + * + * Streaming payload input types in the browser environment. + * These are derived from the types compatible with fetch's Request.body. + */ +export type BrowserRuntimeStreamingBlobPayloadInputTypes = string | Uint8Array | ReadableStreamOptionalType | BlobOptionalType; diff --git a/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts b/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts new file mode 100644 index 0000000..b64a878 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts @@ -0,0 +1,53 @@ +/// +/// +import type { IncomingMessage } from "http"; +import type { Readable } from "stream"; +import type { BlobOptionalType, ReadableStreamOptionalType } from "../externals-check/browser-externals-check"; +import type { SdkStream } from "../serde"; +/** + * @public + * + * This union represents a superset of the types you may receive + * in streaming payload outputs. + * + * @see StreamingPayloadInputTypes for FAQ about mixing types from multiple environments. + * + * To highlight the upstream docs about the SdkStream mixin: + * + * The interface contains mix-in (via Object.assign) methods to transform the runtime-specific + * stream implementation to specified format. Each stream can ONLY be transformed + * once. + * + * The available methods are described on the SdkStream type via SdkStreamMixin. + */ +export type StreamingBlobPayloadOutputTypes = NodeJsRuntimeStreamingBlobPayloadOutputTypes | BrowserRuntimeStreamingBlobPayloadOutputTypes; +/** + * @public + * + * Streaming payload output types in the Node.js environment. + * + * This is by default the IncomingMessage type from node:http responses when + * using the default node-http-handler in Node.js environments. + * + * It can be other Readable types like node:http2's ClientHttp2Stream + * such as when using the node-http2-handler. + * + * The SdkStreamMixin adds methods on this type to help transform (collect) it to + * other formats. + */ +export type NodeJsRuntimeStreamingBlobPayloadOutputTypes = SdkStream; +/** + * @public + * + * Streaming payload output types in the browser environment. + * + * This is by default fetch's Response.body type (ReadableStream) when using + * the default fetch-http-handler in browser-like environments. + * + * It may be a Blob, such as when using the XMLHttpRequest handler + * and receiving an arraybuffer response body. + * + * The SdkStreamMixin adds methods on this type to help transform (collect) it to + * other formats. + */ +export type BrowserRuntimeStreamingBlobPayloadOutputTypes = SdkStream; diff --git a/node_modules/@smithy/types/dist-types/transfer.d.ts b/node_modules/@smithy/types/dist-types/transfer.d.ts new file mode 100644 index 0000000..f9c6f33 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/transfer.d.ts @@ -0,0 +1,33 @@ +/** + * @public + */ +export type RequestHandlerOutput = { + response: ResponseType; +}; +/** + * @public + */ +export interface RequestHandler { + /** + * metadata contains information of a handler. For example + * 'h2' refers this handler is for handling HTTP/2 requests, + * whereas 'h1' refers handling HTTP1 requests + */ + metadata?: RequestHandlerMetadata; + destroy?: () => void; + handle: (request: RequestType, handlerOptions?: HandlerOptions) => Promise>; +} +/** + * @public + */ +export interface RequestHandlerMetadata { + handlerProtocol: RequestHandlerProtocol | string; +} +export declare enum RequestHandlerProtocol { + HTTP_0_9 = "http/0.9", + HTTP_1_0 = "http/1.0", + TDS_8_0 = "tds/8.0" +} +export interface RequestContext { + destination: URL; +} diff --git a/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts b/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts new file mode 100644 index 0000000..4b7a010 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts @@ -0,0 +1,26 @@ +import type { Command } from "../command"; +import type { MetadataBearer } from "../response"; +import type { StreamingBlobPayloadOutputTypes } from "../streaming-payload/streaming-blob-payload-output-types"; +import type { Transform } from "./type-transform"; +/** + * @internal + * + * Narrowed version of InvokeFunction used in Client::send. + */ +export interface NarrowedInvokeFunction { + (command: Command, options?: HttpHandlerOptions): Promise>; + (command: Command, cb: (err: unknown, data?: Transform) => void): void; + (command: Command, options: HttpHandlerOptions, cb: (err: unknown, data?: Transform) => void): void; + (command: Command, options?: HttpHandlerOptions, cb?: (err: unknown, data?: Transform) => void): Promise> | void; +} +/** + * @internal + * + * Narrowed version of InvokeMethod used in aggregated Client methods. + */ +export interface NarrowedInvokeMethod { + (input: InputType, options?: HttpHandlerOptions): Promise>; + (input: InputType, cb: (err: unknown, data?: Transform) => void): void; + (input: InputType, options: HttpHandlerOptions, cb: (err: unknown, data?: Transform) => void): void; + (input: InputType, options?: HttpHandlerOptions, cb?: (err: unknown, data?: OutputType) => void): Promise> | void; +} diff --git a/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts b/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts new file mode 100644 index 0000000..37cd611 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts @@ -0,0 +1,73 @@ +/// +/// +import type { IncomingMessage } from "http"; +import type { ClientHttp2Stream } from "http2"; +import type { InvokeFunction, InvokeMethod } from "../client"; +import type { HttpHandlerOptions } from "../http"; +import type { SdkStream } from "../serde"; +import type { BrowserRuntimeStreamingBlobPayloadInputTypes, NodeJsRuntimeStreamingBlobPayloadInputTypes, StreamingBlobPayloadInputTypes } from "../streaming-payload/streaming-blob-payload-input-types"; +import type { NarrowedInvokeFunction, NarrowedInvokeMethod } from "./client-method-transforms"; +import type { Transform } from "./type-transform"; +/** + * @public + * + * Creates a type with a given client type that narrows payload blob output + * types to SdkStream. + * + * This can be used for clients with the NodeHttpHandler requestHandler, + * the default in Node.js when not using HTTP2. + * + * Usage example: + * ```typescript + * const client = new YourClient({}) as NodeJsClient; + * ``` + */ +export type NodeJsClient = NarrowPayloadBlobTypes, ClientType>; +/** + * @public + * Variant of NodeJsClient for node:http2. + */ +export type NodeJsHttp2Client = NarrowPayloadBlobTypes, ClientType>; +/** + * @public + * + * Creates a type with a given client type that narrows payload blob output + * types to SdkStream. + * + * This can be used for clients with the FetchHttpHandler requestHandler, + * which is the default in browser environments. + * + * Usage example: + * ```typescript + * const client = new YourClient({}) as BrowserClient; + * ``` + */ +export type BrowserClient = NarrowPayloadBlobTypes, ClientType>; +/** + * @public + * + * Variant of BrowserClient for XMLHttpRequest. + */ +export type BrowserXhrClient = NarrowPayloadBlobTypes, ClientType>; +/** + * @public + * + * @deprecated use NarrowPayloadBlobTypes. + * + * Narrow a given Client's blob payload outputs to the given type T. + */ +export type NarrowPayloadBlobOutputType = { + [key in keyof ClientType]: [ClientType[key]] extends [ + InvokeFunction + ] ? NarrowedInvokeFunction : [ClientType[key]] extends [InvokeMethod] ? NarrowedInvokeMethod : ClientType[key]; +}; +/** + * @public + * + * Narrow a Client's blob payload input and output types to I and O. + */ +export type NarrowPayloadBlobTypes = { + [key in keyof ClientType]: [ClientType[key]] extends [ + InvokeFunction + ] ? NarrowedInvokeFunction, OutputTypes, ConfigType> : [ClientType[key]] extends [InvokeMethod] ? NarrowedInvokeMethod, FunctionOutputTypes> : ClientType[key]; +}; diff --git a/node_modules/@smithy/types/dist-types/transform/exact.d.ts b/node_modules/@smithy/types/dist-types/transform/exact.d.ts new file mode 100644 index 0000000..c8a15d8 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/transform/exact.d.ts @@ -0,0 +1,6 @@ +/** + * @internal + * + * Checks that A and B extend each other. + */ +export type Exact = [A] extends [B] ? ([B] extends [A] ? true : false) : false; diff --git a/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts b/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts new file mode 100644 index 0000000..b097ff5 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts @@ -0,0 +1,62 @@ +import type { InvokeFunction, InvokeMethod } from "../client"; +/** + * @public + * + * This type is intended as a type helper for generated clients. + * When initializing client, cast it to this type by passing + * the client constructor type as the type parameter. + * + * It will then recursively remove "undefined" as a union type from all + * input and output shapes' members. Note, this does not affect + * any member that is optional (?) such as outputs with no required members. + * + * @example + * ```ts + * const client = new Client({}) as AssertiveClient; + * ``` + */ +export type AssertiveClient = NarrowClientIOTypes; +/** + * @public + * + * This is similar to AssertiveClient but additionally changes all + * output types to (recursive) Required so as to bypass all output nullability guards. + */ +export type UncheckedClient = UncheckedClientOutputTypes; +/** + * @internal + * + * Excludes undefined recursively. + */ +export type NoUndefined = T extends Function ? T : [T] extends [object] ? { + [key in keyof T]: NoUndefined; +} : Exclude; +/** + * @internal + * + * Excludes undefined and optional recursively. + */ +export type RecursiveRequired = T extends Function ? T : [T] extends [object] ? { + [key in keyof T]-?: RecursiveRequired; +} : Exclude; +/** + * @internal + * + * Removes undefined from unions. + */ +type NarrowClientIOTypes = { + [key in keyof ClientType]: [ClientType[key]] extends [ + InvokeFunction + ] ? InvokeFunction, NoUndefined, ConfigType> : [ClientType[key]] extends [InvokeMethod] ? InvokeMethod, NoUndefined> : ClientType[key]; +}; +/** + * @internal + * + * Removes undefined from unions and adds yolo output types. + */ +type UncheckedClientOutputTypes = { + [key in keyof ClientType]: [ClientType[key]] extends [ + InvokeFunction + ] ? InvokeFunction, RecursiveRequired, ConfigType> : [ClientType[key]] extends [InvokeMethod] ? InvokeMethod, RecursiveRequired> : ClientType[key]; +}; +export {}; diff --git a/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts b/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts new file mode 100644 index 0000000..90373fb --- /dev/null +++ b/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts @@ -0,0 +1,34 @@ +/** + * @public + * + * Transforms any members of the object T having type FromType + * to ToType. This applies only to exact type matches. + * + * This is for the case where FromType is a union and only those fields + * matching the same union should be transformed. + */ +export type Transform = ConditionalRecursiveTransformExact; +/** + * @internal + * + * Returns ToType if T matches exactly with FromType. + */ +type TransformExact = [T] extends [FromType] ? ([FromType] extends [T] ? ToType : T) : T; +/** + * @internal + * + * Applies TransformExact to members of an object recursively. + */ +type RecursiveTransformExact = T extends Function ? T : T extends object ? { + [key in keyof T]: [T[key]] extends [FromType] ? [FromType] extends [T[key]] ? ToType : ConditionalRecursiveTransformExact : ConditionalRecursiveTransformExact; +} : TransformExact; +/** + * @internal + * + * Same as RecursiveTransformExact but does not assign to an object + * unless there is a matching transformed member. + */ +type ConditionalRecursiveTransformExact = [T] extends [ + RecursiveTransformExact +] ? [RecursiveTransformExact] extends [T] ? T : RecursiveTransformExact : RecursiveTransformExact; +export {}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts new file mode 100644 index 0000000..374cf93 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts @@ -0,0 +1,49 @@ +/** + * @public + */ +export interface AbortHandler { + (this: AbortSignal, ev: any): any; +} +/** + * @public + * + * Holders of an AbortSignal object may query if the associated operation has + * been aborted and register an onabort handler. + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export interface AbortSignal { + /** + * Whether the action represented by this signal has been cancelled. + */ + readonly aborted: boolean; + /** + * A function to be invoked when the action represented by this signal has + * been cancelled. + */ + onabort: AbortHandler | Function | null; +} +/** + * @public + * + * The AWS SDK uses a Controller/Signal model to allow for cooperative + * cancellation of asynchronous operations. When initiating such an operation, + * the caller can create an AbortController and then provide linked signal to + * subtasks. This allows a single source to communicate to multiple consumers + * that an action has been aborted without dictating how that cancellation + * should be handled. + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortController + */ +export interface AbortController { + /** + * An object that reports whether the action associated with this + * `AbortController` has been cancelled. + */ + readonly signal: AbortSignal; + /** + * Declares the operation associated with this AbortController to have been + * cancelled. + */ + abort(): void; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts new file mode 100644 index 0000000..380c8fc --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts @@ -0,0 +1,7 @@ +/** + * @internal + */ +export declare enum HttpApiKeyAuthLocation { + HEADER = "header", + QUERY = "query" +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts new file mode 100644 index 0000000..e0d939e --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts @@ -0,0 +1,49 @@ +import { Identity, IdentityProvider } from "../identity/identity"; +import { HandlerExecutionContext } from "../middleware"; +import { HttpSigner } from "./HttpSigner"; +import { IdentityProviderConfig } from "./IdentityProviderConfig"; +/** + * ID for {@link HttpAuthScheme} + * @internal + */ +export type HttpAuthSchemeId = string; +/** + * Interface that defines an HttpAuthScheme + * @internal + */ +export interface HttpAuthScheme { + /** + * ID for an HttpAuthScheme, typically the absolute shape ID of a Smithy auth trait. + */ + schemeId: HttpAuthSchemeId; + /** + * Gets the IdentityProvider corresponding to an HttpAuthScheme. + */ + identityProvider(config: IdentityProviderConfig): IdentityProvider | undefined; + /** + * HttpSigner corresponding to an HttpAuthScheme. + */ + signer: HttpSigner; +} +/** + * Interface that defines the identity and signing properties when selecting + * an HttpAuthScheme. + * @internal + */ +export interface HttpAuthOption { + schemeId: HttpAuthSchemeId; + identityProperties?: Record; + signingProperties?: Record; + propertiesExtractor?: (config: TConfig, context: TContext) => { + identityProperties?: Record; + signingProperties?: Record; + }; +} +/** + * @internal + */ +export interface SelectedHttpAuthScheme { + httpAuthOption: HttpAuthOption; + identity: Identity; + signer: HttpSigner; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts new file mode 100644 index 0000000..d417aaf --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts @@ -0,0 +1,20 @@ +import { HandlerExecutionContext } from "../middleware"; +import { HttpAuthOption } from "./HttpAuthScheme"; +/** + * @internal + */ +export interface HttpAuthSchemeParameters { + operation?: string; +} +/** + * @internal + */ +export interface HttpAuthSchemeProvider { + (authParameters: TParameters): HttpAuthOption[]; +} +/** + * @internal + */ +export interface HttpAuthSchemeParametersProvider { + (config: TConfig, context: TContext, input: TInput): Promise; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts new file mode 100644 index 0000000..7abcf84 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts @@ -0,0 +1,41 @@ +import { HttpRequest, HttpResponse } from "../http"; +import { Identity } from "../identity/identity"; +/** + * @internal + */ +export interface ErrorHandler { + (signingProperties: Record): (error: E) => never; +} +/** + * @internal + */ +export interface SuccessHandler { + (httpResponse: HttpResponse | unknown, signingProperties: Record): void; +} +/** + * Interface to sign identity and signing properties. + * @internal + */ +export interface HttpSigner { + /** + * Signs an HttpRequest with an identity and signing properties. + * @param httpRequest request to sign + * @param identity identity to sing the request with + * @param signingProperties property bag for signing + * @returns signed request in a promise + */ + sign(httpRequest: HttpRequest, identity: Identity, signingProperties: Record): Promise; + /** + * Handler that executes after the {@link HttpSigner.sign} invocation and corresponding + * middleware throws an error. + * The error handler is expected to throw the error it receives, so the return type of the error handler is `never`. + * @internal + */ + errorHandler?: ErrorHandler; + /** + * Handler that executes after the {@link HttpSigner.sign} invocation and corresponding + * middleware succeeds. + * @internal + */ + successHandler?: SuccessHandler; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts new file mode 100644 index 0000000..6a50f65 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts @@ -0,0 +1,14 @@ +import { Identity, IdentityProvider } from "../identity/identity"; +import { HttpAuthSchemeId } from "./HttpAuthScheme"; +/** + * Interface to get an IdentityProvider for a specified HttpAuthScheme + * @internal + */ +export interface IdentityProviderConfig { + /** + * Get the IdentityProvider for a specified HttpAuthScheme. + * @param schemeId schemeId of the HttpAuthScheme + * @returns IdentityProvider or undefined if HttpAuthScheme is not found + */ + getIdentityProvider(schemeId: HttpAuthSchemeId): IdentityProvider | undefined; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts new file mode 100644 index 0000000..8241fe3 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts @@ -0,0 +1,57 @@ +/** + * @internal + * + * Authentication schemes represent a way that the service will authenticate the customer’s identity. + */ +export interface AuthScheme { + /** + * @example "sigv4a" or "sigv4" + */ + name: "sigv4" | "sigv4a" | string; + /** + * @example "s3" + */ + signingName: string; + /** + * @example "us-east-1" + */ + signingRegion: string; + /** + * @example ["*"] + * @example ["us-west-2", "us-east-1"] + */ + signingRegionSet?: string[]; + /** + * @deprecated this field was renamed to signingRegion. + */ + signingScope?: never; + properties: Record; +} +/** + * @internal + * @deprecated + */ +export interface HttpAuthDefinition { + /** + * Defines the location of where the Auth is serialized. + */ + in: HttpAuthLocation; + /** + * Defines the name of the HTTP header or query string parameter + * that contains the Auth. + */ + name: string; + /** + * Defines the security scheme to use on the `Authorization` header value. + * This can only be set if the "in" property is set to {@link HttpAuthLocation.HEADER}. + */ + scheme?: string; +} +/** + * @internal + * @deprecated + */ +export declare enum HttpAuthLocation { + HEADER = "header", + QUERY = "query" +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts new file mode 100644 index 0000000..fbb845d --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts @@ -0,0 +1,6 @@ +export * from "./auth"; +export * from "./HttpApiKeyAuth"; +export * from "./HttpAuthScheme"; +export * from "./HttpAuthSchemeProvider"; +export * from "./HttpSigner"; +export * from "./IdentityProviderConfig"; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts new file mode 100644 index 0000000..833814c --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts @@ -0,0 +1,40 @@ +/// +import { Readable } from "stream"; +import { BlobOptionalType, ReadableStreamOptionalType } from "../externals-check/browser-externals-check"; +/** + * @public + * + * A union of types that can be used as inputs for the service model + * "blob" type when it represents the request's entire payload or body. + * + * For example, in Lambda::invoke, the payload is modeled as a blob type + * and this union applies to it. + * In contrast, in Lambda::createFunction the Zip file option is a blob type, + * but is not the (entire) payload and this union does not apply. + * + * Note: not all types are signable by the standard SignatureV4 signer when + * used as the request body. For example, in Node.js a Readable stream + * is not signable by the default signer. + * They are included in the union because it may work in some cases, + * but the expected types are primarily string and Uint8Array. + * + * Additional details may be found in the internal + * function "getPayloadHash" in the SignatureV4 module. + */ +export type BlobPayloadInputTypes = string | ArrayBuffer | ArrayBufferView | Uint8Array | NodeJsRuntimeBlobTypes | BrowserRuntimeBlobTypes; +/** + * @public + * + * Additional blob types for the Node.js environment. + */ +export type NodeJsRuntimeBlobTypes = Readable | Buffer; +/** + * @public + * + * Additional blob types for the browser environment. + */ +export type BrowserRuntimeBlobTypes = BlobOptionalType | ReadableStreamOptionalType; +/** + * @deprecated renamed to BlobPayloadInputTypes. + */ +export type BlobTypes = BlobPayloadInputTypes; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts new file mode 100644 index 0000000..dbfff0c --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts @@ -0,0 +1,63 @@ +import { SourceData } from "./crypto"; +/** + * @public + * + * An object that provides a checksum of data provided in chunks to `update`. + * The checksum may be performed incrementally as chunks are received or all + * at once when the checksum is finalized, depending on the underlying + * implementation. + * + * It's recommended to compute checksum incrementally to avoid reading the + * entire payload in memory. + * + * A class that implements this interface may accept an optional secret key in its + * constructor while computing checksum value, when using HMAC. If provided, + * this secret key would be used when computing checksum. + */ +export interface Checksum { + /** + * Constant length of the digest created by the algorithm in bytes. + */ + digestLength?: number; + /** + * Creates a new checksum object that contains a deep copy of the internal + * state of the current `Checksum` object. + */ + copy?(): Checksum; + /** + * Returns the digest of all of the data passed. + */ + digest(): Promise; + /** + * Allows marking a checksum for checksums that support the ability + * to mark and reset. + * + * @param readLimit - The maximum limit of bytes that can be read + * before the mark position becomes invalid. + */ + mark?(readLimit: number): void; + /** + * Resets the checksum to its initial value. + */ + reset(): void; + /** + * Adds a chunk of data for which checksum needs to be computed. + * This can be called many times with new data as it is streamed. + * + * Implementations may override this method which passes second param + * which makes Checksum object stateless. + * + * @param chunk - The buffer to update checksum with. + */ + update(chunk: Uint8Array): void; +} +/** + * @public + * + * A constructor for a Checksum that may be used to calculate an HMAC. Implementing + * classes should not directly hold the provided key in memory beyond the + * lexical scope of the constructor. + */ +export interface ChecksumConstructor { + new (secret?: SourceData): Checksum; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts new file mode 100644 index 0000000..ed2a1a2 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts @@ -0,0 +1,44 @@ +import { Command } from "./command"; +import { MiddlewareStack } from "./middleware"; +import { MetadataBearer } from "./response"; +import { OptionalParameter } from "./util"; +/** + * @public + * + * A type which checks if the client configuration is optional. + * If all entries of the client configuration are optional, it allows client creation without passing any config. + */ +export type CheckOptionalClientConfig = OptionalParameter; +/** + * @public + * + * function definition for different overrides of client's 'send' function. + */ +export interface InvokeFunction { + (command: Command, options?: any): Promise; + (command: Command, cb: (err: any, data?: OutputType) => void): void; + (command: Command, options: any, cb: (err: any, data?: OutputType) => void): void; + (command: Command, options?: any, cb?: (err: any, data?: OutputType) => void): Promise | void; +} +/** + * @public + * + * Signature that appears on aggregated clients' methods. + */ +export interface InvokeMethod { + (input: InputType, options?: any): Promise; + (input: InputType, cb: (err: any, data?: OutputType) => void): void; + (input: InputType, options: any, cb: (err: any, data?: OutputType) => void): void; + (input: InputType, options?: any, cb?: (err: any, data?: OutputType) => void): Promise | void; +} +/** + * A general interface for service clients, idempotent to browser or node clients + * This type corresponds to SmithyClient(https://github.com/aws/aws-sdk-js-v3/blob/main/packages/smithy-client/src/client.ts). + * It's provided for using without importing the SmithyClient class. + */ +export interface Client { + readonly config: ResolvedClientConfiguration; + middlewareStack: MiddlewareStack; + send: InvokeFunction; + destroy: () => void; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts new file mode 100644 index 0000000..8d1d6b5 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts @@ -0,0 +1,10 @@ +import { Handler, MiddlewareStack } from "./middleware"; +import { MetadataBearer } from "./response"; +/** + * @public + */ +export interface Command { + readonly input: InputType; + readonly middlewareStack: MiddlewareStack; + resolveMiddleware(stack: MiddlewareStack, configuration: ResolvedConfiguration, options: any): Handler; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts new file mode 100644 index 0000000..a7d5137 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts @@ -0,0 +1,7 @@ +export interface ConnectConfiguration { + /** + * The maximum time in milliseconds that the connection phase of a request + * may take before the connection attempt is abandoned. + */ + requestTimeout?: number; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts new file mode 100644 index 0000000..eaacf8b --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts @@ -0,0 +1,3 @@ +export * from "./config"; +export * from "./manager"; +export * from "./pool"; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts new file mode 100644 index 0000000..1fed805 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts @@ -0,0 +1,28 @@ +import { RequestContext } from "../transfer"; +import { ConnectConfiguration } from "./config"; +export interface ConnectionManagerConfiguration { + /** + * Maximum number of allowed concurrent requests per connection. + */ + maxConcurrency?: number; + /** + * Disables concurrent requests per connection. + */ + disableConcurrency?: boolean; +} +export interface ConnectionManager { + /** + * Retrieves a connection from the connection pool if available, + * otherwise establish a new connection + */ + lease(requestContext: RequestContext, connectionConfiguration: ConnectConfiguration): T; + /** + * Releases the connection back to the pool making it potentially + * re-usable by other requests. + */ + release(requestContext: RequestContext, connection: T): void; + /** + * Destroys the connection manager. All connections will be closed. + */ + destroy(): void; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts new file mode 100644 index 0000000..7bb6e0c --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts @@ -0,0 +1,24 @@ +export interface ConnectionPool { + /** + * Retrieve the first connection in the pool + */ + poll(): T | void; + /** + * Release the connection back to the pool making it potentially + * re-usable by other requests. + */ + offerLast(connection: T): void; + /** + * Removes the connection from the pool, and destroys it. + */ + destroy(connection: T): void; + /** + * Implements the iterable protocol and allows arrays to be consumed + * by most syntaxes expecting iterables, such as the spread syntax + * and for...of loops + */ + [Symbol.iterator](): Iterator; +} +export interface CacheKey { + destination: string; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts new file mode 100644 index 0000000..467ec86 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts @@ -0,0 +1,60 @@ +/** + * @public + */ +export type SourceData = string | ArrayBuffer | ArrayBufferView; +/** + * @public + * + * An object that provides a hash of data provided in chunks to `update`. The + * hash may be performed incrementally as chunks are received or all at once + * when the hash is finalized, depending on the underlying implementation. + * + * @deprecated use {@link Checksum} + */ +export interface Hash { + /** + * Adds a chunk of data to the hash. If a buffer is provided, the `encoding` + * argument will be ignored. If a string is provided without a specified + * encoding, implementations must assume UTF-8 encoding. + * + * Not all encodings are supported on all platforms, though all must support + * UTF-8. + */ + update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void; + /** + * Finalizes the hash and provides a promise that will be fulfilled with the + * raw bytes of the calculated hash. + */ + digest(): Promise; +} +/** + * @public + * + * A constructor for a hash that may be used to calculate an HMAC. Implementing + * classes should not directly hold the provided key in memory beyond the + * lexical scope of the constructor. + * + * @deprecated use {@link ChecksumConstructor} + */ +export interface HashConstructor { + new (secret?: SourceData): Hash; +} +/** + * @public + * + * A function that calculates the hash of a data stream. Determining the hash + * will consume the stream, so only replayable streams should be provided to an + * implementation of this interface. + */ +export interface StreamHasher { + (hashCtor: HashConstructor, stream: StreamType): Promise; +} +/** + * @public + * + * A function that returns a promise fulfilled with bytes from a + * cryptographically secure pseudorandom number generator. + */ +export interface randomValues { + (byteLength: number): Promise; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts new file mode 100644 index 0000000..547303f --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts @@ -0,0 +1,41 @@ +/** + * @public + * + * Transforms any members of the object T having type FromType + * to ToType. This applies only to exact type matches. + * + * This is for the case where FromType is a union and only those fields + * matching the same union should be transformed. + */ +export type Transform = RecursiveTransformExact; +/** + * @internal + * + * Returns ToType if T matches exactly with FromType. + */ +type TransformExact = [ + T +] extends [ + FromType +] ? ([ + FromType +] extends [ + T +] ? ToType : T) : T; +/** + * @internal + * + * Applies TransformExact to members of an object recursively. + */ +type RecursiveTransformExact = T extends Function ? T : T extends object ? { + [key in keyof T]: [ + T[key] + ] extends [ + FromType + ] ? [ + FromType + ] extends [ + T[key] + ] ? ToType : RecursiveTransformExact : RecursiveTransformExact; +} : TransformExact; +export {}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts new file mode 100644 index 0000000..1b71553 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts @@ -0,0 +1,19 @@ +import { Message } from "./eventStream"; +export interface MessageEncoder { + encode(message: Message): Uint8Array; +} +export interface MessageDecoder { + decode(message: ArrayBufferView): Message; + feed(message: ArrayBufferView): void; + endOfStream(): void; + getMessage(): AvailableMessage; + getAvailableMessages(): AvailableMessages; +} +export interface AvailableMessage { + getMessage(): Message | undefined; + isEndOfStream(): boolean; +} +export interface AvailableMessages { + getMessages(): Message[]; + isEndOfStream(): boolean; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts new file mode 100644 index 0000000..2183e56 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts @@ -0,0 +1,77 @@ +import { AuthScheme } from "./auth/auth"; +/** + * @public + */ +export interface EndpointPartition { + name: string; + dnsSuffix: string; + dualStackDnsSuffix: string; + supportsFIPS: boolean; + supportsDualStack: boolean; +} +/** + * @public + */ +export interface EndpointARN { + partition: string; + service: string; + region: string; + accountId: string; + resourceId: Array; +} +/** + * @public + */ +export declare enum EndpointURLScheme { + HTTP = "http", + HTTPS = "https" +} +/** + * @public + */ +export interface EndpointURL { + /** + * The URL scheme such as http or https. + */ + scheme: EndpointURLScheme; + /** + * The authority is the host and optional port component of the URL. + */ + authority: string; + /** + * The parsed path segment of the URL. + * This value is as-is as provided by the user. + */ + path: string; + /** + * The parsed path segment of the URL. + * This value is guranteed to start and end with a "/". + */ + normalizedPath: string; + /** + * A boolean indicating whether the authority is an IP address. + */ + isIp: boolean; +} +/** + * @public + */ +export type EndpointObjectProperty = string | boolean | { + [key: string]: EndpointObjectProperty; +} | EndpointObjectProperty[]; +/** + * @public + */ +export interface EndpointV2 { + url: URL; + properties?: { + authSchemes?: AuthScheme[]; + } & Record; + headers?: Record; +} +/** + * @public + */ +export type EndpointParameters = { + [name: string]: undefined | string | boolean; +}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts new file mode 100644 index 0000000..5d78b5a --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts @@ -0,0 +1,15 @@ +import { EndpointObjectProperty } from "../endpoint"; +import { ConditionObject, Expression } from "./shared"; +export type EndpointObjectProperties = Record; +export type EndpointObjectHeaders = Record; +export type EndpointObject = { + url: Expression; + properties?: EndpointObjectProperties; + headers?: EndpointObjectHeaders; +}; +export type EndpointRuleObject = { + type: "endpoint"; + conditions?: ConditionObject[]; + endpoint: EndpointObject; + documentation?: string; +}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts new file mode 100644 index 0000000..c111698 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts @@ -0,0 +1,7 @@ +import { ConditionObject, Expression } from "./shared"; +export type ErrorRuleObject = { + type: "error"; + conditions?: ConditionObject[]; + error: Expression; + documentation?: string; +}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts new file mode 100644 index 0000000..756c156 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts @@ -0,0 +1,19 @@ +import { RuleSetRules } from "./TreeRuleObject"; +export type DeprecatedObject = { + message?: string; + since?: string; +}; +export type ParameterObject = { + type: "String" | "string" | "Boolean" | "boolean"; + default?: string | boolean; + required?: boolean; + documentation?: string; + builtIn?: string; + deprecated?: DeprecatedObject; +}; +export type RuleSetObject = { + version: string; + serviceId?: string; + parameters: Record; + rules: RuleSetRules; +}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts new file mode 100644 index 0000000..e0c7f87 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts @@ -0,0 +1,10 @@ +import { EndpointRuleObject } from "./EndpointRuleObject"; +import { ErrorRuleObject } from "./ErrorRuleObject"; +import { ConditionObject } from "./shared"; +export type RuleSetRules = Array; +export type TreeRuleObject = { + type: "tree"; + conditions?: ConditionObject[]; + rules: RuleSetRules; + documentation?: string; +}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts new file mode 100644 index 0000000..8a29789 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts @@ -0,0 +1,5 @@ +export * from "./EndpointRuleObject"; +export * from "./ErrorRuleObject"; +export * from "./RuleSetObject"; +export * from "./shared"; +export * from "./TreeRuleObject"; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts new file mode 100644 index 0000000..7c5fa23 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts @@ -0,0 +1,25 @@ +import { Logger } from "../logger"; +export type ReferenceObject = { + ref: string; +}; +export type FunctionObject = { + fn: string; + argv: FunctionArgv; +}; +export type FunctionArgv = Array; +export type FunctionReturn = string | boolean | number | { + [key: string]: FunctionReturn; +}; +export type ConditionObject = FunctionObject & { + assign?: string; +}; +export type Expression = string | ReferenceObject | FunctionObject; +export type EndpointParams = Record; +export type EndpointResolverOptions = { + endpointParams: EndpointParams; + logger?: Logger; +}; +export type ReferenceRecord = Record; +export type EvaluateOptions = EndpointResolverOptions & { + referenceRecord: ReferenceRecord; +}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts new file mode 100644 index 0000000..b6ab7ee --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts @@ -0,0 +1,108 @@ +import { HttpRequest } from "./http"; +import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext } from "./middleware"; +import { MetadataBearer } from "./response"; +/** + * @public + * + * An event stream message. The headers and body properties will always be + * defined, with empty headers represented as an object with no keys and an + * empty body represented as a zero-length Uint8Array. + */ +export interface Message { + headers: MessageHeaders; + body: Uint8Array; +} +/** + * @public + */ +export type MessageHeaders = Record; +type HeaderValue = { + type: K; + value: V; +}; +export type BooleanHeaderValue = HeaderValue<"boolean", boolean>; +export type ByteHeaderValue = HeaderValue<"byte", number>; +export type ShortHeaderValue = HeaderValue<"short", number>; +export type IntegerHeaderValue = HeaderValue<"integer", number>; +export type LongHeaderValue = HeaderValue<"long", Int64>; +export type BinaryHeaderValue = HeaderValue<"binary", Uint8Array>; +export type StringHeaderValue = HeaderValue<"string", string>; +export type TimestampHeaderValue = HeaderValue<"timestamp", Date>; +export type UuidHeaderValue = HeaderValue<"uuid", string>; +/** + * @public + */ +export type MessageHeaderValue = BooleanHeaderValue | ByteHeaderValue | ShortHeaderValue | IntegerHeaderValue | LongHeaderValue | BinaryHeaderValue | StringHeaderValue | TimestampHeaderValue | UuidHeaderValue; +/** + * @public + */ +export interface Int64 { + readonly bytes: Uint8Array; + valueOf: () => number; + toString: () => string; +} +/** + * @public + * + * Util functions for serializing or deserializing event stream + */ +export interface EventStreamSerdeContext { + eventStreamMarshaller: EventStreamMarshaller; +} +/** + * @public + * + * A function which deserializes binary event stream message into modeled shape. + */ +export interface EventStreamMarshallerDeserFn { + (body: StreamType, deserializer: (input: Record) => Promise): AsyncIterable; +} +/** + * @public + * + * A function that serializes modeled shape into binary stream message. + */ +export interface EventStreamMarshallerSerFn { + (input: AsyncIterable, serializer: (event: T) => Message): StreamType; +} +/** + * @public + * + * An interface which provides functions for serializing and deserializing binary event stream + * to/from corresponsing modeled shape. + */ +export interface EventStreamMarshaller { + deserialize: EventStreamMarshallerDeserFn; + serialize: EventStreamMarshallerSerFn; +} +/** + * @public + */ +export interface EventStreamRequestSigner { + sign(request: HttpRequest): Promise; +} +/** + * @public + */ +export interface EventStreamPayloadHandler { + handle: (next: FinalizeHandler, args: FinalizeHandlerArguments, context?: HandlerExecutionContext) => Promise>; +} +/** + * @public + */ +export interface EventStreamPayloadHandlerProvider { + (options: any): EventStreamPayloadHandler; +} +/** + * @public + */ +export interface EventStreamSerdeProvider { + (options: any): EventStreamMarshaller; +} +/** + * @public + */ +export interface EventStreamSignerProvider { + (options: any): EventStreamRequestSigner; +} +export {}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts new file mode 100644 index 0000000..ebd733d --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts @@ -0,0 +1,55 @@ +import { ChecksumConstructor } from "../checksum"; +import { HashConstructor } from "../crypto"; +/** + * @internal + */ +export declare enum AlgorithmId { + MD5 = "md5", + CRC32 = "crc32", + CRC32C = "crc32c", + SHA1 = "sha1", + SHA256 = "sha256" +} +/** + * @internal + */ +export interface ChecksumAlgorithm { + algorithmId(): AlgorithmId; + checksumConstructor(): ChecksumConstructor | HashConstructor; +} +/** + * @deprecated unused. + */ +type ChecksumConfigurationLegacy = { + [other in string | number]: any; +}; +/** + * @internal + */ +export interface ChecksumConfiguration extends ChecksumConfigurationLegacy { + addChecksumAlgorithm(algo: ChecksumAlgorithm): void; + checksumAlgorithms(): ChecksumAlgorithm[]; +} +/** + * @deprecated will be removed for implicit type. + */ +type GetChecksumConfigurationType = (runtimeConfig: Partial<{ + sha256: ChecksumConstructor | HashConstructor; + md5: ChecksumConstructor | HashConstructor; +}>) => ChecksumConfiguration; +/** + * @internal + * @deprecated will be moved to smithy-client. + */ +export declare const getChecksumConfiguration: GetChecksumConfigurationType; +/** + * @deprecated will be removed for implicit type. + */ +type ResolveChecksumRuntimeConfigType = (clientConfig: ChecksumConfiguration) => any; +/** + * @internal + * + * @deprecated will be moved to smithy-client. + */ +export declare const resolveChecksumRuntimeConfig: ResolveChecksumRuntimeConfigType; +export {}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts new file mode 100644 index 0000000..40458b4 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts @@ -0,0 +1,33 @@ +import { ChecksumConfiguration } from "./checksum"; +/** + * @deprecated will be replaced by DefaultExtensionConfiguration. + * @internal + * + * Default client configuration consisting various configurations for modifying a service client + */ +export interface DefaultClientConfiguration extends ChecksumConfiguration { +} +/** + * @deprecated will be removed for implicit type. + */ +type GetDefaultConfigurationType = (runtimeConfig: any) => DefaultClientConfiguration; +/** + * @deprecated moving to @smithy/smithy-client. + * @internal + * + * Helper function to resolve default client configuration from runtime config + * + */ +export declare const getDefaultClientConfiguration: GetDefaultConfigurationType; +/** + * @deprecated will be removed for implicit type. + */ +type ResolveDefaultRuntimeConfigType = (clientConfig: DefaultClientConfiguration) => any; +/** + * @deprecated moving to @smithy/smithy-client. + * @internal + * + * Helper function to resolve runtime config from default client configuration + */ +export declare const resolveDefaultRuntimeConfig: ResolveDefaultRuntimeConfigType; +export {}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts new file mode 100644 index 0000000..55f5137 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts @@ -0,0 +1,9 @@ +import { ChecksumConfiguration } from "./checksum"; +import { RetryStrategyConfiguration } from "./retry"; +/** + * @internal + * + * Default extension configuration consisting various configurations for modifying a service client + */ +export interface DefaultExtensionConfiguration extends ChecksumConfiguration, RetryStrategyConfiguration { +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts new file mode 100644 index 0000000..55edb16 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts @@ -0,0 +1,4 @@ +export * from "./defaultClientConfiguration"; +export * from "./defaultExtensionConfiguration"; +export { AlgorithmId, ChecksumAlgorithm, ChecksumConfiguration } from "./checksum"; +export { RetryStrategyConfiguration } from "./retry"; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts new file mode 100644 index 0000000..3471d08 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts @@ -0,0 +1,18 @@ +import { RetryStrategyV2 } from "../retry"; +import { Provider, RetryStrategy } from "../util"; +/** + * A configuration interface with methods called by runtime extension + * @internal + */ +export interface RetryStrategyConfiguration { + /** + * Set retry strategy used for all http requests + * @param retryStrategy + */ + setRetryStrategy(retryStrategy: Provider): void; + /** + * Get retry strategy used for all http requests + * @param retryStrategy + */ + retryStrategy(): Provider; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts new file mode 100644 index 0000000..b709d7f --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts @@ -0,0 +1,35 @@ +import { Exact } from "../transform/exact"; +/** + * @public + * + * A checked type that resolves to Blob if it is defined as more than a stub, otherwise + * resolves to 'never' so as not to widen the type of unions containing Blob + * excessively. + */ +export type BlobOptionalType = BlobDefined extends true ? Blob : Unavailable; +/** + * @public + * + * A checked type that resolves to ReadableStream if it is defined as more than a stub, otherwise + * resolves to 'never' so as not to widen the type of unions containing ReadableStream + * excessively. + */ +export type ReadableStreamOptionalType = ReadableStreamDefined extends true ? ReadableStream : Unavailable; +/** + * @public + * + * Indicates a type is unavailable if it resolves to this. + */ +export type Unavailable = never; +/** + * @internal + * + * Whether the global types define more than a stub for ReadableStream. + */ +export type ReadableStreamDefined = Exact extends true ? false : true; +/** + * @internal + * + * Whether the global types define more than a stub for Blob. + */ +export type BlobDefined = Exact extends true ? false : true; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts new file mode 100644 index 0000000..8b156eb --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts @@ -0,0 +1,105 @@ +import { AbortSignal } from "./abort"; +import { URI } from "./uri"; +/** + * @public + * + * @deprecated use {@link EndpointV2} from `@smithy/types`. + */ +export interface Endpoint { + protocol: string; + hostname: string; + port?: number; + path: string; + query?: QueryParameterBag; +} +/** + * @public + * + * Interface an HTTP request class. Contains + * addressing information in addition to standard message properties. + */ +export interface HttpRequest extends HttpMessage, URI { + method: string; +} +/** + * @public + * + * Represents an HTTP message as received in reply to a request. Contains a + * numeric status code in addition to standard message properties. + */ +export interface HttpResponse extends HttpMessage { + statusCode: number; +} +/** + * @public + * + * Represents an HTTP message with headers and an optional static or streaming + * body. bode: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream; + */ +export interface HttpMessage { + headers: HeaderBag; + body?: any; +} +/** + * @public + * + * A mapping of query parameter names to strings or arrays of strings, with the + * second being used when a parameter contains a list of values. Value can be set + * to null when query is not in key-value pairs shape + */ +export type QueryParameterBag = Record | null>; +export type FieldOptions = { + name: string; + kind?: FieldPosition; + values?: string[]; +}; +export declare enum FieldPosition { + HEADER = 0, + TRAILER = 1 +} +/** + * @public + * + * A mapping of header names to string values. Multiple values for the same + * header should be represented as a single string with values separated by + * `, `. + * + * Keys should be considered case insensitive, even if this is not enforced by a + * particular implementation. For example, given the following HeaderBag, where + * keys differ only in case: + * + * ```json + * { + * 'x-request-date': '2000-01-01T00:00:00Z', + * 'X-Request-Date': '2001-01-01T00:00:00Z' + * } + * ``` + * + * The SDK may at any point during processing remove one of the object + * properties in favor of the other. The headers may or may not be combined, and + * the SDK will not deterministically select which header candidate to use. + */ +export type HeaderBag = Record; +/** + * @public + * + * Represents an HTTP message with headers and an optional static or streaming + * body. bode: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream; + */ +export interface HttpMessage { + headers: HeaderBag; + body?: any; +} +/** + * @public + * + * Represents the options that may be passed to an Http Handler. + */ +export interface HttpHandlerOptions { + abortSignal?: AbortSignal; + /** + * The maximum time in milliseconds that the connection phase of a request + * may take before the connection attempt is abandoned. + */ + requestTimeout?: number; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts new file mode 100644 index 0000000..a610650 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts @@ -0,0 +1,78 @@ +/// +import { Agent as hAgent, AgentOptions as hAgentOptions } from "http"; +import { Agent as hsAgent, AgentOptions as hsAgentOptions } from "https"; +/** + * + * This type represents an alternate client constructor option for the entry + * "requestHandler". Instead of providing an instance of a requestHandler, the user + * may provide the requestHandler's constructor options for either the + * NodeHttpHandler or FetchHttpHandler. + * + * For other RequestHandlers like HTTP2 or WebSocket, + * constructor parameter passthrough is not currently available. + * + * @public + */ +export type RequestHandlerParams = NodeHttpHandlerOptions | FetchHttpHandlerOptions; +/** + * Represents the http options that can be passed to a node http client. + * @public + */ +export interface NodeHttpHandlerOptions { + /** + * The maximum time in milliseconds that the connection phase of a request + * may take before the connection attempt is abandoned. + * + * Defaults to 0, which disables the timeout. + */ + connectionTimeout?: number; + /** + * The number of milliseconds a request can take before automatically being terminated. + * Defaults to 0, which disables the timeout. + */ + requestTimeout?: number; + /** + * Delay before the NodeHttpHandler checks for socket exhaustion, + * and emits a warning if the active sockets and enqueued request count is greater than + * 2x the maxSockets count. + * + * Defaults to connectionTimeout + requestTimeout or 3000ms if those are not set. + */ + socketAcquisitionWarningTimeout?: number; + /** + * @deprecated Use {@link requestTimeout} + * + * The maximum time in milliseconds that a socket may remain idle before it + * is closed. + */ + socketTimeout?: number; + /** + * You can pass http.Agent or its constructor options. + */ + httpAgent?: hAgent | hAgentOptions; + /** + * You can pass https.Agent or its constructor options. + */ + httpsAgent?: hsAgent | hsAgentOptions; +} +/** + * Represents the http options that can be passed to a browser http client. + * @public + */ +export interface FetchHttpHandlerOptions { + /** + * The number of milliseconds a request can take before being automatically + * terminated. + */ + requestTimeout?: number; + /** + * Whether to allow the request to outlive the page. Default value is false. + * + * There may be limitations to the payload size, number of concurrent requests, + * request duration etc. when using keepalive in browsers. + * + * These may change over time, so look for up to date information about + * these limitations before enabling keepalive. + */ + keepAlive?: boolean; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts new file mode 100644 index 0000000..4aee7a2 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts @@ -0,0 +1,14 @@ +import { Identity, IdentityProvider } from "../identity/identity"; +/** + * @public + */ +export interface ApiKeyIdentity extends Identity { + /** + * The literal API Key + */ + readonly apiKey: string; +} +/** + * @public + */ +export type ApiKeyIdentityProvider = IdentityProvider; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts new file mode 100644 index 0000000..aa5ae55 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts @@ -0,0 +1,27 @@ +import { Identity, IdentityProvider } from "./identity"; +/** + * @public + */ +export interface AwsCredentialIdentity extends Identity { + /** + * AWS access key ID + */ + readonly accessKeyId: string; + /** + * AWS secret access key + */ + readonly secretAccessKey: string; + /** + * A security or session token to use with these credentials. Usually + * present for temporary credentials. + */ + readonly sessionToken?: string; + /** + * AWS credential scope for this set of credentials. + */ + readonly credentialScope?: string; +} +/** + * @public + */ +export type AwsCredentialIdentityProvider = IdentityProvider; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts new file mode 100644 index 0000000..eaa7e5d --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts @@ -0,0 +1,15 @@ +/** + * @public + */ +export interface Identity { + /** + * A `Date` when the identity or credential will no longer be accepted. + */ + readonly expiration?: Date; +} +/** + * @public + */ +export interface IdentityProvider { + (identityProperties?: Record): Promise; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts new file mode 100644 index 0000000..031a0fe --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts @@ -0,0 +1,4 @@ +export * from "./apiKeyIdentity"; +export * from "./awsCredentialIdentity"; +export * from "./identity"; +export * from "./tokenIdentity"; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts new file mode 100644 index 0000000..33783eb --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts @@ -0,0 +1,14 @@ +import { Identity, IdentityProvider } from "../identity/identity"; +/** + * @internal + */ +export interface TokenIdentity extends Identity { + /** + * The literal token string + */ + readonly token: string; +} +/** + * @internal + */ +export type TokenIdentityProvider = IdentityProvider; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..4bdb1f7 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts @@ -0,0 +1,36 @@ +export * from "./abort"; +export * from "./auth"; +export * from "./blob/blob-payload-input-types"; +export * from "./checksum"; +export * from "./client"; +export * from "./command"; +export * from "./connection"; +export * from "./crypto"; +export * from "./encode"; +export * from "./endpoint"; +export * from "./endpoints"; +export * from "./eventStream"; +export * from "./extensions"; +export * from "./http"; +export * from "./http/httpHandlerInitialization"; +export * from "./identity"; +export * from "./logger"; +export * from "./middleware"; +export * from "./pagination"; +export * from "./profile"; +export * from "./response"; +export * from "./retry"; +export * from "./serde"; +export * from "./shapes"; +export * from "./signature"; +export * from "./stream"; +export * from "./streaming-payload/streaming-blob-common-types"; +export * from "./streaming-payload/streaming-blob-payload-input-types"; +export * from "./streaming-payload/streaming-blob-payload-output-types"; +export * from "./transfer"; +export * from "./transform/client-payload-blob-type-narrow"; +export * from "./transform/no-undefined"; +export * from "./transform/type-transform"; +export * from "./uri"; +export * from "./util"; +export * from "./waiter"; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts new file mode 100644 index 0000000..cc69a11 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts @@ -0,0 +1,13 @@ +/** + * @public + * + * Represents a logger object that is available in HandlerExecutionContext + * throughout the middleware stack. + */ +export interface Logger { + trace?: (...content: any[]) => void; + debug: (...content: any[]) => void; + info: (...content: any[]) => void; + warn: (...content: any[]) => void; + error: (...content: any[]) => void; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts new file mode 100644 index 0000000..1296c81 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts @@ -0,0 +1,510 @@ +import { AuthScheme, HttpAuthDefinition } from "./auth/auth"; +import { EndpointV2 } from "./endpoint"; +import { Logger } from "./logger"; +import { UserAgent } from "./util"; +/** + * @public + */ +export interface InitializeHandlerArguments { + /** + * User input to a command. Reflects the userland representation of the + * union of data types the command can effectively handle. + */ + input: Input; +} +/** + * @public + */ +export interface InitializeHandlerOutput extends DeserializeHandlerOutput { + output: Output; +} +/** + * @public + */ +export interface SerializeHandlerArguments extends InitializeHandlerArguments { + /** + * The user input serialized as a request object. The request object is unknown, + * so you cannot modify it directly. When work with request, you need to guard its + * type to e.g. HttpRequest with 'instanceof' operand + * + * During the build phase of the execution of a middleware stack, a built + * request may or may not be available. + */ + request?: unknown; +} +/** + * @public + */ +export interface SerializeHandlerOutput extends InitializeHandlerOutput { +} +/** + * @public + */ +export interface BuildHandlerArguments extends FinalizeHandlerArguments { +} +/** + * @public + */ +export interface BuildHandlerOutput extends InitializeHandlerOutput { +} +/** + * @public + */ +export interface FinalizeHandlerArguments extends SerializeHandlerArguments { + /** + * The user input serialized as a request. + */ + request: unknown; +} +/** + * @public + */ +export interface FinalizeHandlerOutput extends InitializeHandlerOutput { +} +/** + * @public + */ +export interface DeserializeHandlerArguments extends FinalizeHandlerArguments { +} +/** + * @public + */ +export interface DeserializeHandlerOutput { + /** + * The raw response object from runtime is deserialized to structured output object. + * The response object is unknown so you cannot modify it directly. When work with + * response, you need to guard its type to e.g. HttpResponse with 'instanceof' operand. + * + * During the deserialize phase of the execution of a middleware stack, a deserialized + * response may or may not be available + */ + response: unknown; + output?: Output; +} +/** + * @public + */ +export interface InitializeHandler { + /** + * Asynchronously converts an input object into an output object. + * + * @param args - An object containing a input to the command as well as any + * associated or previously generated execution artifacts. + */ + (args: InitializeHandlerArguments): Promise>; +} +/** + * @public + */ +export type Handler = InitializeHandler; +/** + * @public + */ +export interface SerializeHandler { + /** + * Asynchronously converts an input object into an output object. + * + * @param args - An object containing a input to the command as well as any + * associated or previously generated execution artifacts. + */ + (args: SerializeHandlerArguments): Promise>; +} +/** + * @public + */ +export interface FinalizeHandler { + /** + * Asynchronously converts an input object into an output object. + * + * @param args - An object containing a input to the command as well as any + * associated or previously generated execution artifacts. + */ + (args: FinalizeHandlerArguments): Promise>; +} +/** + * @public + */ +export interface BuildHandler { + (args: BuildHandlerArguments): Promise>; +} +/** + * @public + */ +export interface DeserializeHandler { + (args: DeserializeHandlerArguments): Promise>; +} +/** + * @public + * + * A factory function that creates functions implementing the `Handler` + * interface. + */ +export interface InitializeMiddleware { + /** + * @param next - The handler to invoke after this middleware has operated on + * the user input and before this middleware operates on the output. + * + * @param context - Invariant data and functions for use by the handler. + */ + (next: InitializeHandler, context: HandlerExecutionContext): InitializeHandler; +} +/** + * @public + * + * A factory function that creates functions implementing the `BuildHandler` + * interface. + */ +export interface SerializeMiddleware { + /** + * @param next - The handler to invoke after this middleware has operated on + * the user input and before this middleware operates on the output. + * + * @param context - Invariant data and functions for use by the handler. + */ + (next: SerializeHandler, context: HandlerExecutionContext): SerializeHandler; +} +/** + * @public + * + * A factory function that creates functions implementing the `FinalizeHandler` + * interface. + */ +export interface FinalizeRequestMiddleware { + /** + * @param next - The handler to invoke after this middleware has operated on + * the user input and before this middleware operates on the output. + * + * @param context - Invariant data and functions for use by the handler. + */ + (next: FinalizeHandler, context: HandlerExecutionContext): FinalizeHandler; +} +/** + * @public + */ +export interface BuildMiddleware { + (next: BuildHandler, context: HandlerExecutionContext): BuildHandler; +} +/** + * @public + */ +export interface DeserializeMiddleware { + (next: DeserializeHandler, context: HandlerExecutionContext): DeserializeHandler; +} +/** + * @public + */ +export type MiddlewareType = InitializeMiddleware | SerializeMiddleware | BuildMiddleware | FinalizeRequestMiddleware | DeserializeMiddleware; +/** + * @public + * + * A factory function that creates the terminal handler atop which a middleware + * stack sits. + */ +export interface Terminalware { + (context: HandlerExecutionContext): DeserializeHandler; +} +/** + * @public + */ +export type Step = "initialize" | "serialize" | "build" | "finalizeRequest" | "deserialize"; +/** + * @public + */ +export type Priority = "high" | "normal" | "low"; +/** + * @public + */ +export interface HandlerOptions { + /** + * Handlers are ordered using a "step" that describes the stage of command + * execution at which the handler will be executed. The available steps are: + * + * - initialize: The input is being prepared. Examples of typical + * initialization tasks include injecting default options computing + * derived parameters. + * - serialize: The input is complete and ready to be serialized. Examples + * of typical serialization tasks include input validation and building + * an HTTP request from user input. + * - build: The input has been serialized into an HTTP request, but that + * request may require further modification. Any request alterations + * will be applied to all retries. Examples of typical build tasks + * include injecting HTTP headers that describe a stable aspect of the + * request, such as `Content-Length` or a body checksum. + * - finalizeRequest: The request is being prepared to be sent over the wire. The + * request in this stage should already be semantically complete and + * should therefore only be altered as match the recipient's + * expectations. Examples of typical finalization tasks include request + * signing and injecting hop-by-hop headers. + * - deserialize: The response has arrived, the middleware here will deserialize + * the raw response object to structured response + * + * Unlike initialization and build handlers, which are executed once + * per operation execution, finalization and deserialize handlers will be + * executed foreach HTTP request sent. + * + * @defaultValue 'initialize' + */ + step?: Step; + /** + * A list of strings to any that identify the general purpose or important + * characteristics of a given handler. + */ + tags?: Array; + /** + * A unique name to refer to a middleware + */ + name?: string; + /** + * @internal + * Aliases allows for middleware to be found by multiple names besides {@link HandlerOptions.name}. + * This allows for references to replaced middleware to continue working, e.g. replacing + * multiple auth-specific middleware with a single generic auth middleware. + */ + aliases?: Array; + /** + * A flag to override the existing middleware with the same name. Without + * setting it, adding middleware with duplicated name will throw an exception. + * @internal + */ + override?: boolean; +} +/** + * @public + */ +export interface AbsoluteLocation { + /** + * By default middleware will be added to individual step in un-guaranteed order. + * In the case that + * + * @defaultValue 'normal' + */ + priority?: Priority; +} +/** + * @public + */ +export type Relation = "before" | "after"; +/** + * @public + */ +export interface RelativeLocation { + /** + * Specify the relation to be before or after a know middleware. + */ + relation: Relation; + /** + * A known middleware name to indicate inserting middleware's location. + */ + toMiddleware: string; +} +/** + * @public + */ +export type RelativeMiddlewareOptions = RelativeLocation & Pick>; +/** + * @public + */ +export interface InitializeHandlerOptions extends HandlerOptions { + step?: "initialize"; +} +/** + * @public + */ +export interface SerializeHandlerOptions extends HandlerOptions { + step: "serialize"; +} +/** + * @public + */ +export interface BuildHandlerOptions extends HandlerOptions { + step: "build"; +} +/** + * @public + */ +export interface FinalizeRequestHandlerOptions extends HandlerOptions { + step: "finalizeRequest"; +} +/** + * @public + */ +export interface DeserializeHandlerOptions extends HandlerOptions { + step: "deserialize"; +} +/** + * @public + * + * A stack storing middleware. It can be resolved into a handler. It supports 2 + * approaches for adding middleware: + * 1. Adding middleware to specific step with `add()`. The order of middleware + * added into same step is determined by order of adding them. If one middleware + * needs to be executed at the front of the step or at the end of step, set + * `priority` options to `high` or `low`. + * 2. Adding middleware to location relative to known middleware with `addRelativeTo()`. + * This is useful when given middleware must be executed before or after specific + * middleware(`toMiddleware`). You can add a middleware relatively to another + * middleware which also added relatively. But eventually, this relative middleware + * chain **must** be 'anchored' by a middleware that added using `add()` API + * with absolute `step` and `priority`. This mothod will throw if specified + * `toMiddleware` is not found. + */ +export interface MiddlewareStack extends Pluggable { + /** + * Add middleware to the stack to be executed during the "initialize" step, + * optionally specifying a priority, tags and name + */ + add(middleware: InitializeMiddleware, options?: InitializeHandlerOptions & AbsoluteLocation): void; + /** + * Add middleware to the stack to be executed during the "serialize" step, + * optionally specifying a priority, tags and name + */ + add(middleware: SerializeMiddleware, options: SerializeHandlerOptions & AbsoluteLocation): void; + /** + * Add middleware to the stack to be executed during the "build" step, + * optionally specifying a priority, tags and name + */ + add(middleware: BuildMiddleware, options: BuildHandlerOptions & AbsoluteLocation): void; + /** + * Add middleware to the stack to be executed during the "finalizeRequest" step, + * optionally specifying a priority, tags and name + */ + add(middleware: FinalizeRequestMiddleware, options: FinalizeRequestHandlerOptions & AbsoluteLocation): void; + /** + * Add middleware to the stack to be executed during the "deserialize" step, + * optionally specifying a priority, tags and name + */ + add(middleware: DeserializeMiddleware, options: DeserializeHandlerOptions & AbsoluteLocation): void; + /** + * Add middleware to a stack position before or after a known middleware,optionally + * specifying name and tags. + */ + addRelativeTo(middleware: MiddlewareType, options: RelativeMiddlewareOptions): void; + /** + * Apply a customization function to mutate the middleware stack, often + * used for customizations that requires mutating multiple middleware. + */ + use(pluggable: Pluggable): void; + /** + * Create a shallow clone of this stack. Step bindings and handler priorities + * and tags are preserved in the copy. + */ + clone(): MiddlewareStack; + /** + * Removes middleware from the stack. + * + * If a string is provided, it will be treated as middleware name. If a middleware + * is inserted with the given name, it will be removed. + * + * If a middleware class is provided, all usages thereof will be removed. + */ + remove(toRemove: MiddlewareType | string): boolean; + /** + * Removes middleware that contains given tag + * + * Multiple middleware will potentially be removed + */ + removeByTag(toRemove: string): boolean; + /** + * Create a stack containing the middlewares in this stack as well as the + * middlewares in the `from` stack. Neither source is modified, and step + * bindings and handler priorities and tags are preserved in the copy. + */ + concat(from: MiddlewareStack): MiddlewareStack; + /** + * Returns a list of the current order of middleware in the stack. + * This does not execute the middleware functions, nor does it + * provide a reference to the stack itself. + */ + identify(): string[]; + /** + * @internal + * + * When an operation is called using this stack, + * it will log its list of middleware to the console using + * the identify function. + * + * @param toggle - set whether to log on resolve. + * If no argument given, returns the current value. + */ + identifyOnResolve(toggle?: boolean): boolean; + /** + * Builds a single handler function from zero or more middleware classes and + * a core handler. The core handler is meant to send command objects to AWS + * services and return promises that will resolve with the operation result + * or be rejected with an error. + * + * When a composed handler is invoked, the arguments will pass through all + * middleware in a defined order, and the return from the innermost handler + * will pass through all middleware in the reverse of that order. + */ + resolve(handler: DeserializeHandler, context: HandlerExecutionContext): InitializeHandler; +} +/** + * @internal + */ +export declare const SMITHY_CONTEXT_KEY = "__smithy_context"; +/** + * @public + * + * Data and helper objects that are not expected to change from one execution of + * a composed handler to another. + */ +export interface HandlerExecutionContext { + /** + * A logger that may be invoked by any handler during execution of an + * operation. + */ + logger?: Logger; + /** + * Name of the service the operation is being sent to. + */ + clientName?: string; + /** + * Name of the operation being executed. + */ + commandName?: string; + /** + * Additional user agent that inferred by middleware. It can be used to save + * the internal user agent sections without overriding the `customUserAgent` + * config in clients. + */ + userAgent?: UserAgent; + /** + * Resolved by the endpointMiddleware function of `@smithy/middleware-endpoint` + * in the serialization stage. + */ + endpointV2?: EndpointV2; + /** + * Set at the same time as endpointV2. + */ + authSchemes?: AuthScheme[]; + /** + * The current auth configuration that has been set by any auth middleware and + * that will prevent from being set more than once. + */ + currentAuthConfig?: HttpAuthDefinition; + /** + * Used by DynamoDbDocumentClient. + */ + dynamoDbDocumentClientOptions?: Partial<{ + overrideInputFilterSensitiveLog(...args: any[]): string | void; + overrideOutputFilterSensitiveLog(...args: any[]): string | void; + }>; + /** + * @internal + * Context for Smithy properties + */ + [SMITHY_CONTEXT_KEY]?: Record; + [key: string]: any; +} +/** + * @public + */ +export interface Pluggable { + /** + * A function that mutate the passed in middleware stack. Functions implementing + * this interface can add, remove, modify existing middleware stack from clients + * or commands + */ + applyToStack: (stack: MiddlewareStack) => void; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts new file mode 100644 index 0000000..247c713 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts @@ -0,0 +1,26 @@ +import { Client } from "./client"; +/** + * @public + * + * Expected type definition of a paginator. + */ +export type Paginator = AsyncGenerator; +/** + * @public + * + * Expected paginator configuration passed to an operation. Services will extend + * this interface definition and may type client further. + */ +export interface PaginationConfiguration { + client: Client; + pageSize?: number; + startingToken?: any; + /** + * For some APIs, such as CloudWatchLogs events, the next page token will always + * be present. + * + * When true, this config field will have the paginator stop when the token doesn't change + * instead of when it is not present. + */ + stopOnSameToken?: boolean; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts new file mode 100644 index 0000000..1b3dba7 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts @@ -0,0 +1,30 @@ +/** + * @public + */ +export declare enum IniSectionType { + PROFILE = "profile", + SSO_SESSION = "sso-session", + SERVICES = "services" +} +/** + * @public + */ +export type IniSection = Record; +/** + * @public + * + * @deprecated Please use {@link IniSection} + */ +export interface Profile extends IniSection { +} +/** + * @public + */ +export type ParsedIniData = Record; +/** + * @public + */ +export interface SharedConfigFiles { + credentialsFile: ParsedIniData; + configFile: ParsedIniData; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts new file mode 100644 index 0000000..3d8a45a --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts @@ -0,0 +1,40 @@ +/** + * @public + */ +export interface ResponseMetadata { + /** + * The status code of the last HTTP response received for this operation. + */ + httpStatusCode?: number; + /** + * A unique identifier for the last request sent for this operation. Often + * requested by AWS service teams to aid in debugging. + */ + requestId?: string; + /** + * A secondary identifier for the last request sent. Used for debugging. + */ + extendedRequestId?: string; + /** + * A tertiary identifier for the last request sent. Used for debugging. + */ + cfId?: string; + /** + * The number of times this operation was attempted. + */ + attempts?: number; + /** + * The total amount of time (in milliseconds) that was spent waiting between + * retry attempts. + */ + totalRetryDelay?: number; +} +/** + * @public + */ +export interface MetadataBearer { + /** + * Metadata pertaining to this request. + */ + $metadata: ResponseMetadata; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts new file mode 100644 index 0000000..8436c9a --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts @@ -0,0 +1,133 @@ +import { SdkError } from "./shapes"; +/** + * @public + */ +export type RetryErrorType = +/** + * This is a connection level error such as a socket timeout, socket connect + * error, tls negotiation timeout etc... + * Typically these should never be applied for non-idempotent request types + * since in this scenario, it's impossible to know whether the operation had + * a side effect on the server. + */ +"TRANSIENT" +/** + * This is an error where the server explicitly told the client to back off, + * such as a 429 or 503 Http error. + */ + | "THROTTLING" +/** + * This is a server error that isn't explicitly throttling but is considered + * by the client to be something that should be retried. + */ + | "SERVER_ERROR" +/** + * Doesn't count against any budgets. This could be something like a 401 + * challenge in Http. + */ + | "CLIENT_ERROR"; +/** + * @public + */ +export interface RetryErrorInfo { + /** + * The error thrown during the initial request, if available. + */ + error?: SdkError; + errorType: RetryErrorType; + /** + * Protocol hint. This could come from Http's 'retry-after' header or + * something from MQTT or any other protocol that has the ability to convey + * retry info from a peer. + * + * The Date after which a retry should be attempted. + */ + retryAfterHint?: Date; +} +/** + * @public + */ +export interface RetryBackoffStrategy { + /** + * @returns the number of milliseconds to wait before retrying an action. + */ + computeNextBackoffDelay(retryAttempt: number): number; +} +/** + * @public + */ +export interface StandardRetryBackoffStrategy extends RetryBackoffStrategy { + /** + * Sets the delayBase used to compute backoff delays. + * @param delayBase - + */ + setDelayBase(delayBase: number): void; +} +/** + * @public + */ +export interface RetryStrategyOptions { + backoffStrategy: RetryBackoffStrategy; + maxRetriesBase: number; +} +/** + * @public + */ +export interface RetryToken { + /** + * @returns the current count of retry. + */ + getRetryCount(): number; + /** + * @returns the number of milliseconds to wait before retrying an action. + */ + getRetryDelay(): number; +} +/** + * @public + */ +export interface StandardRetryToken extends RetryToken { + /** + * @returns the cost of the last retry attempt. + */ + getRetryCost(): number | undefined; +} +/** + * @public + */ +export interface RetryStrategyV2 { + /** + * Called before any retries (for the first call to the operation). It either + * returns a retry token or an error upon the failure to acquire a token prior. + * + * tokenScope is arbitrary and out of scope for this component. However, + * adding it here offers us a lot of future flexibility for outage detection. + * For example, it could be "us-east-1" on a shared retry strategy, or + * "us-west-2-c:dynamodb". + */ + acquireInitialRetryToken(retryTokenScope: string): Promise; + /** + * After a failed operation call, this function is invoked to refresh the + * retryToken returned by acquireInitialRetryToken(). This function can + * either choose to allow another retry and send a new or updated token, + * or reject the retry attempt and report the error either in an exception + * or returning an error. + */ + refreshRetryTokenForRetry(tokenToRenew: RetryToken, errorInfo: RetryErrorInfo): Promise; + /** + * Upon successful completion of the operation, this function is called + * to record that the operation was successful. + */ + recordSuccess(token: RetryToken): void; +} +/** + * @public + */ +export type ExponentialBackoffJitterType = "DEFAULT" | "NONE" | "FULL" | "DECORRELATED"; +/** + * @public + */ +export interface ExponentialBackoffStrategyOptions { + jitterType: ExponentialBackoffJitterType; + backoffScaleValue?: number; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts new file mode 100644 index 0000000..b035808 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts @@ -0,0 +1,111 @@ +import { Endpoint } from "./http"; +import { RequestHandler } from "./transfer"; +import { Decoder, Encoder, Provider } from "./util"; +/** + * @public + * + * Interface for object requires an Endpoint set. + */ +export interface EndpointBearer { + endpoint: Provider; +} +/** + * @public + */ +export interface StreamCollector { + /** + * A function that converts a stream into an array of bytes. + * + * @param stream - The low-level native stream from browser or Nodejs runtime + */ + (stream: any): Promise; +} +/** + * @public + * + * Request and Response serde util functions and settings for AWS services + */ +export interface SerdeContext extends SerdeFunctions, EndpointBearer { + requestHandler: RequestHandler; + disableHostPrefix: boolean; +} +/** + * @public + * + * Serde functions from the client config. + */ +export interface SerdeFunctions { + base64Encoder: Encoder; + base64Decoder: Decoder; + utf8Encoder: Encoder; + utf8Decoder: Decoder; + streamCollector: StreamCollector; +} +/** + * @public + */ +export interface RequestSerializer { + /** + * Converts the provided `input` into a request object + * + * @param input - The user input to serialize. + * + * @param context - Context containing runtime-specific util functions. + */ + (input: any, context: Context): Promise; +} +/** + * @public + */ +export interface ResponseDeserializer { + /** + * Converts the output of an operation into JavaScript types. + * + * @param output - The HTTP response received from the service + * + * @param context - context containing runtime-specific util functions. + */ + (output: ResponseType, context: Context): Promise; +} +/** + * The interface contains mix-in utility functions to transfer the runtime-specific + * stream implementation to specified format. Each stream can ONLY be transformed + * once. + */ +export interface SdkStreamMixin { + transformToByteArray: () => Promise; + transformToString: (encoding?: string) => Promise; + transformToWebStream: () => ReadableStream; +} +/** + * @public + * + * The type describing a runtime-specific stream implementation with mix-in + * utility functions. + */ +export type SdkStream = BaseStream & SdkStreamMixin; +/** + * @public + * + * Indicates that the member of type T with + * key StreamKey have been extended + * with the SdkStreamMixin helper methods. + */ +export type WithSdkStreamMixin = { + [key in keyof T]: key extends StreamKey ? SdkStream : T[key]; +}; +/** + * Interface for internal function to inject stream utility functions + * implementation + * + * @internal + */ +export interface SdkStreamMixinInjector { + (stream: unknown): SdkStreamMixin; +} +/** + * @internal + */ +export interface SdkStreamSerdeContext { + sdkStreamMixin: SdkStreamMixinInjector; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts new file mode 100644 index 0000000..634a328 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts @@ -0,0 +1,81 @@ +import { HttpResponse } from "./http"; +import { MetadataBearer } from "./response"; +/** + * @public + * + * A document type represents an untyped JSON-like value. + * + * Not all protocols support document types, and the serialization format of a + * document type is protocol specific. All JSON protocols SHOULD support + * document types and they SHOULD serialize document types inline as normal + * JSON values. + */ +export type DocumentType = null | boolean | number | string | DocumentType[] | { + [prop: string]: DocumentType; +}; +/** + * @public + * + * A structure shape with the error trait. + * https://smithy.io/2.0/spec/behavior-traits.html#smithy-api-retryable-trait + */ +export interface RetryableTrait { + /** + * Indicates that the error is a retryable throttling error. + */ + readonly throttling?: boolean; +} +/** + * @public + * + * Type that is implemented by all Smithy shapes marked with the + * error trait. + * @deprecated + */ +export interface SmithyException { + /** + * The shape ID name of the exception. + */ + readonly name: string; + /** + * Whether the client or server are at fault. + */ + readonly $fault: "client" | "server"; + /** + * The service that encountered the exception. + */ + readonly $service?: string; + /** + * Indicates that an error MAY be retried by the client. + */ + readonly $retryable?: RetryableTrait; + /** + * Reference to low-level HTTP response object. + */ + readonly $response?: HttpResponse; +} +/** + * @public + * + * @deprecated See {@link https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/} + * + * This type should not be used in your application. + * Users of the AWS SDK for JavaScript v3 service clients should prefer to + * use the specific Exception classes corresponding to each operation. + * These can be found as code in the deserializer for the operation's Command class, + * or as declarations in the service model file in codegen/sdk-codegen/aws-models. + * + * If no exceptions are enumerated by a particular Command operation, + * the base exception for the service should be used. Each client exports + * a base ServiceException prefixed with the service name. + */ +export type SdkError = Error & Partial & Partial & { + $metadata?: Partial["$metadata"] & { + /** + * If present, will have value of true and indicates that the error resulted in a + * correction of the clock skew, a.k.a. config.systemClockOffset. + * This is specific to AWS SDK and sigv4. + */ + readonly clockSkewCorrected?: true; + }; +}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts new file mode 100644 index 0000000..6cbbfa7 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts @@ -0,0 +1,150 @@ +import { Message } from "./eventStream"; +import { HttpRequest } from "./http"; +/** + * @public + * + * A `Date` object, a unix (epoch) timestamp in seconds, or a string that can be + * understood by the JavaScript `Date` constructor. + */ +export type DateInput = number | string | Date; +/** + * @public + */ +export interface SigningArguments { + /** + * The date and time to be used as signature metadata. This value should be + * a Date object, a unix (epoch) timestamp, or a string that can be + * understood by the JavaScript `Date` constructor.If not supplied, the + * value returned by `new Date()` will be used. + */ + signingDate?: DateInput; + /** + * The service signing name. It will override the service name of the signer + * in current invocation + */ + signingService?: string; + /** + * The region name to sign the request. It will override the signing region of the + * signer in current invocation + */ + signingRegion?: string; +} +/** + * @public + */ +export interface RequestSigningArguments extends SigningArguments { + /** + * A set of strings whose members represents headers that cannot be signed. + * All headers in the provided request will have their names converted to + * lower case and then checked for existence in the unsignableHeaders set. + */ + unsignableHeaders?: Set; + /** + * A set of strings whose members represents headers that should be signed. + * Any values passed here will override those provided via unsignableHeaders, + * allowing them to be signed. + * + * All headers in the provided request will have their names converted to + * lower case before signing. + */ + signableHeaders?: Set; +} +/** + * @public + */ +export interface RequestPresigningArguments extends RequestSigningArguments { + /** + * The number of seconds before the presigned URL expires + */ + expiresIn?: number; + /** + * A set of strings whose representing headers that should not be hoisted + * to presigned request's query string. If not supplied, the presigner + * moves all the AWS-specific headers (starting with `x-amz-`) to the request + * query string. If supplied, these headers remain in the presigned request's + * header. + * All headers in the provided request will have their names converted to + * lower case and then checked for existence in the unhoistableHeaders set. + */ + unhoistableHeaders?: Set; +} +/** + * @public + */ +export interface EventSigningArguments extends SigningArguments { + priorSignature: string; +} +/** + * @public + */ +export interface RequestPresigner { + /** + * Signs a request for future use. + * + * The request will be valid until either the provided `expiration` time has + * passed or the underlying credentials have expired. + * + * @param requestToSign - The request that should be signed. + * @param options - Additional signing options. + */ + presign(requestToSign: HttpRequest, options?: RequestPresigningArguments): Promise; +} +/** + * @public + * + * An object that signs request objects with AWS credentials using one of the + * AWS authentication protocols. + */ +export interface RequestSigner { + /** + * Sign the provided request for immediate dispatch. + */ + sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise; +} +/** + * @public + */ +export interface StringSigner { + /** + * Sign the provided `stringToSign` for use outside of the context of + * request signing. Typical uses include signed policy generation. + */ + sign(stringToSign: string, options?: SigningArguments): Promise; +} +/** + * @public + */ +export interface FormattedEvent { + headers: Uint8Array; + payload: Uint8Array; +} +/** + * @public + */ +export interface EventSigner { + /** + * Sign the individual event of the event stream. + */ + sign(event: FormattedEvent, options: EventSigningArguments): Promise; +} +/** + * @public + */ +export interface SignableMessage { + message: Message; + priorSignature: string; +} +/** + * @public + */ +export interface SignedMessage { + message: Message; + signature: string; +} +/** + * @public + */ +export interface MessageSigner { + signMessage(message: SignableMessage, args: SigningArguments): Promise; + sign(event: SignableMessage, options: SigningArguments): Promise; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts new file mode 100644 index 0000000..1e2b85d --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts @@ -0,0 +1,22 @@ +import { ChecksumConstructor } from "./checksum"; +import { HashConstructor, StreamHasher } from "./crypto"; +import { BodyLengthCalculator, Encoder } from "./util"; +/** + * @public + */ +export interface GetAwsChunkedEncodingStreamOptions { + base64Encoder?: Encoder; + bodyLengthChecker: BodyLengthCalculator; + checksumAlgorithmFn?: ChecksumConstructor | HashConstructor; + checksumLocationName?: string; + streamHasher?: StreamHasher; +} +/** + * @public + * + * A function that returns Readable Stream which follows aws-chunked encoding stream. + * It optionally adds checksum if options are provided. + */ +export interface GetAwsChunkedEncodingStream { + (readableStream: StreamType, options: GetAwsChunkedEncodingStreamOptions): StreamType; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts new file mode 100644 index 0000000..27088db --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts @@ -0,0 +1,33 @@ +/// +import { Readable } from "stream"; +import { BlobOptionalType, ReadableStreamOptionalType } from "../externals-check/browser-externals-check"; +/** + * @public + * + * This is the union representing the modeled blob type with streaming trait + * in a generic format that does not relate to HTTP input or output payloads. + * + * Note: the non-streaming blob type is represented by Uint8Array, but because + * the streaming blob type is always in the request/response paylod, it has + * historically been handled with different types. + * + * @see https://smithy.io/2.0/spec/simple-types.html#blob + * + * For compatibility with its historical representation, it must contain at least + * Readble (Node.js), Blob (browser), and ReadableStream (browser). + * + * @see StreamingPayloadInputTypes for FAQ about mixing types from multiple environments. + */ +export type StreamingBlobTypes = NodeJsRuntimeStreamingBlobTypes | BrowserRuntimeStreamingBlobTypes; +/** + * @public + * + * Node.js streaming blob type. + */ +export type NodeJsRuntimeStreamingBlobTypes = Readable; +/** + * @public + * + * Browser streaming blob types. + */ +export type BrowserRuntimeStreamingBlobTypes = ReadableStreamOptionalType | BlobOptionalType; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts new file mode 100644 index 0000000..46e3709 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts @@ -0,0 +1,61 @@ +/// +import { Readable } from "stream"; +import { BlobOptionalType, ReadableStreamOptionalType } from "../externals-check/browser-externals-check"; +/** + * @public + * + * This union represents a superset of the compatible types you + * can use for streaming payload inputs. + * + * FAQ: + * Why does the type union mix mutually exclusive runtime types, namely + * Node.js and browser types? + * + * There are several reasons: + * 1. For backwards compatibility. + * 2. As a convenient compromise solution so that users in either environment may use the types + * without customization. + * 3. The SDK does not have static type information about the exact implementation + * of the HTTP RequestHandler being used in your client(s) (e.g. fetch, XHR, node:http, or node:http2), + * given that it is chosen at runtime. There are multiple possible request handlers + * in both the Node.js and browser runtime environments. + * + * Rather than restricting the type to a known common format (Uint8Array, for example) + * which doesn't include a universal streaming format in the currently supported Node.js versions, + * the type declaration is widened to multiple possible formats. + * It is up to the user to ultimately select a compatible format with the + * runtime and HTTP handler implementation they are using. + * + * Usage: + * The typical solution we expect users to have is to manually narrow the + * type when needed, picking the appropriate one out of the union according to the + * runtime environment and specific request handler. + * There is also the type utility "NodeJsClient", "BrowserClient" and more + * exported from this package. These can be applied at the client level + * to pre-narrow these streaming payload blobs. For usage see the readme.md + * in the root of the @smithy/types NPM package. + */ +export type StreamingBlobPayloadInputTypes = NodeJsRuntimeStreamingBlobPayloadInputTypes | BrowserRuntimeStreamingBlobPayloadInputTypes; +/** + * @public + * + * Streaming payload input types in the Node.js environment. + * These are derived from the types compatible with the request body used by node:http. + * + * Note: not all types are signable by the standard SignatureV4 signer when + * used as the request body. For example, in Node.js a Readable stream + * is not signable by the default signer. + * They are included in the union because it may be intended in some cases, + * but the expected types are primarily string, Uint8Array, and Buffer. + * + * Additional details may be found in the internal + * function "getPayloadHash" in the SignatureV4 module. + */ +export type NodeJsRuntimeStreamingBlobPayloadInputTypes = string | Uint8Array | Buffer | Readable; +/** + * @public + * + * Streaming payload input types in the browser environment. + * These are derived from the types compatible with fetch's Request.body. + */ +export type BrowserRuntimeStreamingBlobPayloadInputTypes = string | Uint8Array | ReadableStreamOptionalType | BlobOptionalType; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts new file mode 100644 index 0000000..e344a46 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts @@ -0,0 +1,52 @@ +/// +import { IncomingMessage } from "http"; +import { Readable } from "stream"; +import { BlobOptionalType, ReadableStreamOptionalType } from "../externals-check/browser-externals-check"; +import { SdkStream } from "../serde"; +/** + * @public + * + * This union represents a superset of the types you may receive + * in streaming payload outputs. + * + * @see StreamingPayloadInputTypes for FAQ about mixing types from multiple environments. + * + * To highlight the upstream docs about the SdkStream mixin: + * + * The interface contains mix-in (via Object.assign) methods to transform the runtime-specific + * stream implementation to specified format. Each stream can ONLY be transformed + * once. + * + * The available methods are described on the SdkStream type via SdkStreamMixin. + */ +export type StreamingBlobPayloadOutputTypes = NodeJsRuntimeStreamingBlobPayloadOutputTypes | BrowserRuntimeStreamingBlobPayloadOutputTypes; +/** + * @public + * + * Streaming payload output types in the Node.js environment. + * + * This is by default the IncomingMessage type from node:http responses when + * using the default node-http-handler in Node.js environments. + * + * It can be other Readable types like node:http2's ClientHttp2Stream + * such as when using the node-http2-handler. + * + * The SdkStreamMixin adds methods on this type to help transform (collect) it to + * other formats. + */ +export type NodeJsRuntimeStreamingBlobPayloadOutputTypes = SdkStream; +/** + * @public + * + * Streaming payload output types in the browser environment. + * + * This is by default fetch's Response.body type (ReadableStream) when using + * the default fetch-http-handler in browser-like environments. + * + * It may be a Blob, such as when using the XMLHttpRequest handler + * and receiving an arraybuffer response body. + * + * The SdkStreamMixin adds methods on this type to help transform (collect) it to + * other formats. + */ +export type BrowserRuntimeStreamingBlobPayloadOutputTypes = SdkStream; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts new file mode 100644 index 0000000..c6ac2e1 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts @@ -0,0 +1,33 @@ +/** + * @public + */ +export type RequestHandlerOutput = { + response: ResponseType; +}; +/** + * @public + */ +export interface RequestHandler { + /** + * metadata contains information of a handler. For example + * 'h2' refers this handler is for handling HTTP/2 requests, + * whereas 'h1' refers handling HTTP1 requests + */ + metadata?: RequestHandlerMetadata; + destroy?: () => void; + handle: (request: RequestType, handlerOptions?: HandlerOptions) => Promise>; +} +/** + * @public + */ +export interface RequestHandlerMetadata { + handlerProtocol: RequestHandlerProtocol | string; +} +export declare enum RequestHandlerProtocol { + HTTP_0_9 = "http/0.9", + HTTP_1_0 = "http/1.0", + TDS_8_0 = "tds/8.0" +} +export interface RequestContext { + destination: URL; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts new file mode 100644 index 0000000..691270b --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts @@ -0,0 +1,26 @@ +import { Command } from "../command"; +import { MetadataBearer } from "../response"; +import { StreamingBlobPayloadOutputTypes } from "../streaming-payload/streaming-blob-payload-output-types"; +import { Transform } from "./type-transform"; +/** + * @internal + * + * Narrowed version of InvokeFunction used in Client::send. + */ +export interface NarrowedInvokeFunction { + (command: Command, options?: HttpHandlerOptions): Promise>; + (command: Command, cb: (err: unknown, data?: Transform) => void): void; + (command: Command, options: HttpHandlerOptions, cb: (err: unknown, data?: Transform) => void): void; + (command: Command, options?: HttpHandlerOptions, cb?: (err: unknown, data?: Transform) => void): Promise> | void; +} +/** + * @internal + * + * Narrowed version of InvokeMethod used in aggregated Client methods. + */ +export interface NarrowedInvokeMethod { + (input: InputType, options?: HttpHandlerOptions): Promise>; + (input: InputType, cb: (err: unknown, data?: Transform) => void): void; + (input: InputType, options: HttpHandlerOptions, cb: (err: unknown, data?: Transform) => void): void; + (input: InputType, options?: HttpHandlerOptions, cb?: (err: unknown, data?: OutputType) => void): Promise> | void; +} diff --git a/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts new file mode 100644 index 0000000..b27d582 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts @@ -0,0 +1,84 @@ +/// +import { IncomingMessage } from "http"; +import { ClientHttp2Stream } from "http2"; +import { InvokeFunction, InvokeMethod } from "../client"; +import { HttpHandlerOptions } from "../http"; +import { SdkStream } from "../serde"; +import { BrowserRuntimeStreamingBlobPayloadInputTypes, NodeJsRuntimeStreamingBlobPayloadInputTypes, StreamingBlobPayloadInputTypes } from "../streaming-payload/streaming-blob-payload-input-types"; +import { NarrowedInvokeFunction, NarrowedInvokeMethod } from "./client-method-transforms"; +import { Transform } from "./type-transform"; +/** + * @public + * + * Creates a type with a given client type that narrows payload blob output + * types to SdkStream. + * + * This can be used for clients with the NodeHttpHandler requestHandler, + * the default in Node.js when not using HTTP2. + * + * Usage example: + * ```typescript + * const client = new YourClient({}) as NodeJsClient; + * ``` + */ +export type NodeJsClient = NarrowPayloadBlobTypes, ClientType>; +/** + * @public + * Variant of NodeJsClient for node:http2. + */ +export type NodeJsHttp2Client = NarrowPayloadBlobTypes, ClientType>; +/** + * @public + * + * Creates a type with a given client type that narrows payload blob output + * types to SdkStream. + * + * This can be used for clients with the FetchHttpHandler requestHandler, + * which is the default in browser environments. + * + * Usage example: + * ```typescript + * const client = new YourClient({}) as BrowserClient; + * ``` + */ +export type BrowserClient = NarrowPayloadBlobTypes, ClientType>; +/** + * @public + * + * Variant of BrowserClient for XMLHttpRequest. + */ +export type BrowserXhrClient = NarrowPayloadBlobTypes, ClientType>; +/** + * @public + * + * @deprecated use NarrowPayloadBlobTypes. + * + * Narrow a given Client's blob payload outputs to the given type T. + */ +export type NarrowPayloadBlobOutputType = { + [key in keyof ClientType]: [ + ClientType[key] + ] extends [ + InvokeFunction + ] ? NarrowedInvokeFunction : [ + ClientType[key] + ] extends [ + InvokeMethod + ] ? NarrowedInvokeMethod : ClientType[key]; +}; +/** + * @public + * + * Narrow a Client's blob payload input and output types to I and O. + */ +export type NarrowPayloadBlobTypes = { + [key in keyof ClientType]: [ + ClientType[key] + ] extends [ + InvokeFunction + ] ? NarrowedInvokeFunction, OutputTypes, ConfigType> : [ + ClientType[key] + ] extends [ + InvokeMethod + ] ? NarrowedInvokeMethod, FunctionOutputTypes> : ClientType[key]; +}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts new file mode 100644 index 0000000..3a812df --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts @@ -0,0 +1,14 @@ +/** + * @internal + * + * Checks that A and B extend each other. + */ +export type Exact = [ + A +] extends [ + B +] ? ([ + B +] extends [ + A +] ? true : false) : false; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts new file mode 100644 index 0000000..a118b60 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts @@ -0,0 +1,82 @@ +import { InvokeFunction, InvokeMethod } from "../client"; +/** + * @public + * + * This type is intended as a type helper for generated clients. + * When initializing client, cast it to this type by passing + * the client constructor type as the type parameter. + * + * It will then recursively remove "undefined" as a union type from all + * input and output shapes' members. Note, this does not affect + * any member that is optional (?) such as outputs with no required members. + * + * @example + * ```ts + * const client = new Client({}) as AssertiveClient; + * ``` + */ +export type AssertiveClient = NarrowClientIOTypes; +/** + * @public + * + * This is similar to AssertiveClient but additionally changes all + * output types to (recursive) Required so as to bypass all output nullability guards. + */ +export type UncheckedClient = UncheckedClientOutputTypes; +/** + * @internal + * + * Excludes undefined recursively. + */ +export type NoUndefined = T extends Function ? T : [ + T +] extends [ + object +] ? { + [key in keyof T]: NoUndefined; +} : Exclude; +/** + * @internal + * + * Excludes undefined and optional recursively. + */ +export type RecursiveRequired = T extends Function ? T : [ + T +] extends [ + object +] ? { + [key in keyof T]-?: RecursiveRequired; +} : Exclude; +/** + * @internal + * + * Removes undefined from unions. + */ +type NarrowClientIOTypes = { + [key in keyof ClientType]: [ + ClientType[key] + ] extends [ + InvokeFunction + ] ? InvokeFunction, NoUndefined, ConfigType> : [ + ClientType[key] + ] extends [ + InvokeMethod + ] ? InvokeMethod, NoUndefined> : ClientType[key]; +}; +/** + * @internal + * + * Removes undefined from unions and adds yolo output types. + */ +type UncheckedClientOutputTypes = { + [key in keyof ClientType]: [ + ClientType[key] + ] extends [ + InvokeFunction + ] ? InvokeFunction, RecursiveRequired, ConfigType> : [ + ClientType[key] + ] extends [ + InvokeMethod + ] ? InvokeMethod, RecursiveRequired> : ClientType[key]; +}; +export {}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts new file mode 100644 index 0000000..547303f --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts @@ -0,0 +1,41 @@ +/** + * @public + * + * Transforms any members of the object T having type FromType + * to ToType. This applies only to exact type matches. + * + * This is for the case where FromType is a union and only those fields + * matching the same union should be transformed. + */ +export type Transform = RecursiveTransformExact; +/** + * @internal + * + * Returns ToType if T matches exactly with FromType. + */ +type TransformExact = [ + T +] extends [ + FromType +] ? ([ + FromType +] extends [ + T +] ? ToType : T) : T; +/** + * @internal + * + * Applies TransformExact to members of an object recursively. + */ +type RecursiveTransformExact = T extends Function ? T : T extends object ? { + [key in keyof T]: [ + T[key] + ] extends [ + FromType + ] ? [ + FromType + ] extends [ + T[key] + ] ? ToType : RecursiveTransformExact : RecursiveTransformExact; +} : TransformExact; +export {}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts new file mode 100644 index 0000000..4e7adb4 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts @@ -0,0 +1,17 @@ +import { QueryParameterBag } from "./http"; +/** + * @internal + * + * Represents the components parts of a Uniform Resource Identifier used to + * construct the target location of a Request. + */ +export type URI = { + protocol: string; + hostname: string; + port?: number; + path: string; + query?: QueryParameterBag; + username?: string; + password?: string; + fragment?: string; +}; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts new file mode 100644 index 0000000..7c700af --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts @@ -0,0 +1,192 @@ +import { Endpoint } from "./http"; +import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware"; +import { MetadataBearer } from "./response"; +/** + * @public + * + * A generic which checks if Type1 is exactly same as Type2. + */ +export type Exact = [ + Type1 +] extends [ + Type2 +] ? ([ + Type2 +] extends [ + Type1 +] ? true : false) : false; +/** + * @public + * + * A function that, given a Uint8Array of bytes, can produce a string + * representation thereof. The function may optionally attempt to + * convert other input types to Uint8Array before encoding. + * + * @example An encoder function that converts bytes to hexadecimal + * representation would return `'hello'` when given + * `new Uint8Array([104, 101, 108, 108, 111])`. + */ +export interface Encoder { + /** + * Caution: the `any` type on the input is for backwards compatibility. + * Runtime support is limited to Uint8Array and string by default. + * + * You may choose to support more encoder input types if overriding the default + * implementations. + */ + (input: Uint8Array | string | any): string; +} +/** + * @public + * + * A function that, given a string, can derive the bytes represented by that + * string. + * + * @example A decoder function that converts bytes to hexadecimal + * representation would return `new Uint8Array([104, 101, 108, 108, 111])` when + * given the string `'hello'`. + */ +export interface Decoder { + (input: string): Uint8Array; +} +/** + * @public + * + * A function that, when invoked, returns a promise that will be fulfilled with + * a value of type T. + * + * @example A function that reads credentials from shared SDK configuration + * files, assuming roles and collecting MFA tokens as necessary. + */ +export interface Provider { + (): Promise; +} +/** + * @public + * + * A tuple that represents an API name and optional version + * of a library built using the AWS SDK. + */ +export type UserAgentPair = [ + /*name*/ string, + /*version*/ string +]; +/** + * @public + * + * User agent data that to be put into the request's user + * agent. + */ +export type UserAgent = UserAgentPair[]; +/** + * @public + * + * Parses a URL in string form into an Endpoint object. + */ +export interface UrlParser { + (url: string | URL): Endpoint; +} +/** + * @public + * + * A function that, when invoked, returns a promise that will be fulfilled with + * a value of type T. It memoizes the result from the previous invocation + * instead of calling the underlying resources every time. + * + * You can force the provider to refresh the memoized value by invoke the + * function with optional parameter hash with `forceRefresh` boolean key and + * value `true`. + * + * @example A function that reads credentials from IMDS service that could + * return expired credentials. The SDK will keep using the expired credentials + * until an unretryable service error requiring a force refresh of the + * credentials. + */ +export interface MemoizedProvider { + (options?: { + forceRefresh?: boolean; + }): Promise; +} +/** + * @public + * + * A function that, given a request body, determines the + * length of the body. This is used to determine the Content-Length + * that should be sent with a request. + * + * @example A function that reads a file stream and calculates + * the size of the file. + */ +export interface BodyLengthCalculator { + (body: any): number | undefined; +} +/** + * @public + * + * Object containing regionalization information of + * AWS services. + */ +export interface RegionInfo { + hostname: string; + partition: string; + path?: string; + signingService?: string; + signingRegion?: string; +} +/** + * @public + * + * Options to pass when calling {@link RegionInfoProvider} + */ +export interface RegionInfoProviderOptions { + /** + * Enables IPv6/IPv4 dualstack endpoint. + * @defaultValue false + */ + useDualstackEndpoint: boolean; + /** + * Enables FIPS compatible endpoints. + * @defaultValue false + */ + useFipsEndpoint: boolean; +} +/** + * @public + * + * Function returns designated service's regionalization + * information from given region. Each service client + * comes with its regionalization provider. it serves + * to provide the default values of related configurations + */ +export interface RegionInfoProvider { + (region: string, options?: RegionInfoProviderOptions): Promise; +} +/** + * @public + * + * Interface that specifies the retry behavior + */ +export interface RetryStrategy { + /** + * The retry mode describing how the retry strategy control the traffic flow. + */ + mode?: string; + /** + * the retry behavior the will invoke the next handler and handle the retry accordingly. + * This function should also update the $metadata from the response accordingly. + * @see {@link ResponseMetadata} + */ + retry: (next: FinalizeHandler, args: FinalizeHandlerArguments) => Promise>; +} +/** + * @public + * + * Indicates the parameter may be omitted if the parameter object T + * is equivalent to a Partial, i.e. all properties optional. + */ +export type OptionalParameter = Exact, T> extends true ? [ +] | [ + T +] : [ + T +]; diff --git a/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts b/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts new file mode 100644 index 0000000..69c12c8 --- /dev/null +++ b/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts @@ -0,0 +1,35 @@ +import { AbortController } from "./abort"; +/** + * @public + */ +export interface WaiterConfiguration { + /** + * Required service client + */ + client: Client; + /** + * The amount of time in seconds a user is willing to wait for a waiter to complete. + */ + maxWaitTime: number; + /** + * @deprecated Use abortSignal + * Abort controller. Used for ending the waiter early. + */ + abortController?: AbortController; + /** + * Abort Signal. Used for ending the waiter early. + */ + abortSignal?: AbortController["signal"]; + /** + * The minimum amount of time to delay between retries in seconds. This is the + * floor of the exponential backoff. This value defaults to service default + * if not specified. This value MUST be less than or equal to maxDelay and greater than 0. + */ + minDelay?: number; + /** + * The maximum amount of time to delay between retries in seconds. This is the + * ceiling of the exponential backoff. This value defaults to service default + * if not specified. If specified, this value MUST be greater than or equal to 1. + */ + maxDelay?: number; +} diff --git a/node_modules/@smithy/types/dist-types/uri.d.ts b/node_modules/@smithy/types/dist-types/uri.d.ts new file mode 100644 index 0000000..d7b874c --- /dev/null +++ b/node_modules/@smithy/types/dist-types/uri.d.ts @@ -0,0 +1,17 @@ +import { QueryParameterBag } from "./http"; +/** + * @internal + * + * Represents the components parts of a Uniform Resource Identifier used to + * construct the target location of a Request. + */ +export type URI = { + protocol: string; + hostname: string; + port?: number; + path: string; + query?: QueryParameterBag; + username?: string; + password?: string; + fragment?: string; +}; diff --git a/node_modules/@smithy/types/dist-types/util.d.ts b/node_modules/@smithy/types/dist-types/util.d.ts new file mode 100644 index 0000000..b15045c --- /dev/null +++ b/node_modules/@smithy/types/dist-types/util.d.ts @@ -0,0 +1,176 @@ +import { Endpoint } from "./http"; +import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware"; +import { MetadataBearer } from "./response"; +/** + * @public + * + * A generic which checks if Type1 is exactly same as Type2. + */ +export type Exact = [Type1] extends [Type2] ? ([Type2] extends [Type1] ? true : false) : false; +/** + * @public + * + * A function that, given a Uint8Array of bytes, can produce a string + * representation thereof. The function may optionally attempt to + * convert other input types to Uint8Array before encoding. + * + * @example An encoder function that converts bytes to hexadecimal + * representation would return `'hello'` when given + * `new Uint8Array([104, 101, 108, 108, 111])`. + */ +export interface Encoder { + /** + * Caution: the `any` type on the input is for backwards compatibility. + * Runtime support is limited to Uint8Array and string by default. + * + * You may choose to support more encoder input types if overriding the default + * implementations. + */ + (input: Uint8Array | string | any): string; +} +/** + * @public + * + * A function that, given a string, can derive the bytes represented by that + * string. + * + * @example A decoder function that converts bytes to hexadecimal + * representation would return `new Uint8Array([104, 101, 108, 108, 111])` when + * given the string `'hello'`. + */ +export interface Decoder { + (input: string): Uint8Array; +} +/** + * @public + * + * A function that, when invoked, returns a promise that will be fulfilled with + * a value of type T. + * + * @example A function that reads credentials from shared SDK configuration + * files, assuming roles and collecting MFA tokens as necessary. + */ +export interface Provider { + (): Promise; +} +/** + * @public + * + * A tuple that represents an API name and optional version + * of a library built using the AWS SDK. + */ +export type UserAgentPair = [name: string, version?: string]; +/** + * @public + * + * User agent data that to be put into the request's user + * agent. + */ +export type UserAgent = UserAgentPair[]; +/** + * @public + * + * Parses a URL in string form into an Endpoint object. + */ +export interface UrlParser { + (url: string | URL): Endpoint; +} +/** + * @public + * + * A function that, when invoked, returns a promise that will be fulfilled with + * a value of type T. It memoizes the result from the previous invocation + * instead of calling the underlying resources every time. + * + * You can force the provider to refresh the memoized value by invoke the + * function with optional parameter hash with `forceRefresh` boolean key and + * value `true`. + * + * @example A function that reads credentials from IMDS service that could + * return expired credentials. The SDK will keep using the expired credentials + * until an unretryable service error requiring a force refresh of the + * credentials. + */ +export interface MemoizedProvider { + (options?: { + forceRefresh?: boolean; + }): Promise; +} +/** + * @public + * + * A function that, given a request body, determines the + * length of the body. This is used to determine the Content-Length + * that should be sent with a request. + * + * @example A function that reads a file stream and calculates + * the size of the file. + */ +export interface BodyLengthCalculator { + (body: any): number | undefined; +} +/** + * @public + * + * Object containing regionalization information of + * AWS services. + */ +export interface RegionInfo { + hostname: string; + partition: string; + path?: string; + signingService?: string; + signingRegion?: string; +} +/** + * @public + * + * Options to pass when calling {@link RegionInfoProvider} + */ +export interface RegionInfoProviderOptions { + /** + * Enables IPv6/IPv4 dualstack endpoint. + * @defaultValue false + */ + useDualstackEndpoint: boolean; + /** + * Enables FIPS compatible endpoints. + * @defaultValue false + */ + useFipsEndpoint: boolean; +} +/** + * @public + * + * Function returns designated service's regionalization + * information from given region. Each service client + * comes with its regionalization provider. it serves + * to provide the default values of related configurations + */ +export interface RegionInfoProvider { + (region: string, options?: RegionInfoProviderOptions): Promise; +} +/** + * @public + * + * Interface that specifies the retry behavior + */ +export interface RetryStrategy { + /** + * The retry mode describing how the retry strategy control the traffic flow. + */ + mode?: string; + /** + * the retry behavior the will invoke the next handler and handle the retry accordingly. + * This function should also update the $metadata from the response accordingly. + * @see {@link ResponseMetadata} + */ + retry: (next: FinalizeHandler, args: FinalizeHandlerArguments) => Promise>; +} +/** + * @public + * + * Indicates the parameter may be omitted if the parameter object T + * is equivalent to a Partial, i.e. all properties optional. + */ +export type OptionalParameter = Exact, T> extends true ? [] | [T] : [T]; diff --git a/node_modules/@smithy/types/dist-types/waiter.d.ts b/node_modules/@smithy/types/dist-types/waiter.d.ts new file mode 100644 index 0000000..64ff7ff --- /dev/null +++ b/node_modules/@smithy/types/dist-types/waiter.d.ts @@ -0,0 +1,35 @@ +import { AbortController } from "./abort"; +/** + * @public + */ +export interface WaiterConfiguration { + /** + * Required service client + */ + client: Client; + /** + * The amount of time in seconds a user is willing to wait for a waiter to complete. + */ + maxWaitTime: number; + /** + * @deprecated Use abortSignal + * Abort controller. Used for ending the waiter early. + */ + abortController?: AbortController; + /** + * Abort Signal. Used for ending the waiter early. + */ + abortSignal?: AbortController["signal"]; + /** + * The minimum amount of time to delay between retries in seconds. This is the + * floor of the exponential backoff. This value defaults to service default + * if not specified. This value MUST be less than or equal to maxDelay and greater than 0. + */ + minDelay?: number; + /** + * The maximum amount of time to delay between retries in seconds. This is the + * ceiling of the exponential backoff. This value defaults to service default + * if not specified. If specified, this value MUST be greater than or equal to 1. + */ + maxDelay?: number; +} diff --git a/node_modules/@smithy/types/package.json b/node_modules/@smithy/types/package.json new file mode 100644 index 0000000..8ec9d14 --- /dev/null +++ b/node_modules/@smithy/types/package.json @@ -0,0 +1,61 @@ +{ + "name": "@smithy/types", + "version": "2.12.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline types", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4 && node scripts/downlevel", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:tsc -p tsconfig.test.json", + "extract:docs": "api-extractor run --local" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS Smithy Team", + "email": "", + "url": "https://smithy.io" + }, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<=4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/types", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/types" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/url-parser/LICENSE b/node_modules/@smithy/url-parser/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@smithy/url-parser/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/url-parser/README.md b/node_modules/@smithy/url-parser/README.md new file mode 100644 index 0000000..0d8d61e --- /dev/null +++ b/node_modules/@smithy/url-parser/README.md @@ -0,0 +1,10 @@ +# @smithy/url-parser + +[![NPM version](https://img.shields.io/npm/v/@smithy/url-parser/latest.svg)](https://www.npmjs.com/package/@smithy/url-parser) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/url-parser.svg)](https://www.npmjs.com/package/@smithy/url-parser) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/url-parser/dist-cjs/index.js b/node_modules/@smithy/url-parser/dist-cjs/index.js new file mode 100644 index 0000000..ab81787 --- /dev/null +++ b/node_modules/@smithy/url-parser/dist-cjs/index.js @@ -0,0 +1,49 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + parseUrl: () => parseUrl +}); +module.exports = __toCommonJS(src_exports); +var import_querystring_parser = require("@smithy/querystring-parser"); +var parseUrl = /* @__PURE__ */ __name((url) => { + if (typeof url === "string") { + return parseUrl(new URL(url)); + } + const { hostname, pathname, port, protocol, search } = url; + let query; + if (search) { + query = (0, import_querystring_parser.parseQueryString)(search); + } + return { + hostname, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; +}, "parseUrl"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + parseUrl +}); + diff --git a/node_modules/@smithy/url-parser/dist-es/index.js b/node_modules/@smithy/url-parser/dist-es/index.js new file mode 100644 index 0000000..811f8bf --- /dev/null +++ b/node_modules/@smithy/url-parser/dist-es/index.js @@ -0,0 +1,18 @@ +import { parseQueryString } from "@smithy/querystring-parser"; +export const parseUrl = (url) => { + if (typeof url === "string") { + return parseUrl(new URL(url)); + } + const { hostname, pathname, port, protocol, search } = url; + let query; + if (search) { + query = parseQueryString(search); + } + return { + hostname, + port: port ? parseInt(port) : undefined, + protocol, + path: pathname, + query, + }; +}; diff --git a/node_modules/@smithy/url-parser/dist-types/index.d.ts b/node_modules/@smithy/url-parser/dist-types/index.d.ts new file mode 100644 index 0000000..b0d91c9 --- /dev/null +++ b/node_modules/@smithy/url-parser/dist-types/index.d.ts @@ -0,0 +1,5 @@ +import { UrlParser } from "@smithy/types"; +/** + * @internal + */ +export declare const parseUrl: UrlParser; diff --git a/node_modules/@smithy/url-parser/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/url-parser/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..d6f0ec5 --- /dev/null +++ b/node_modules/@smithy/url-parser/dist-types/ts3.4/index.d.ts @@ -0,0 +1,5 @@ +import { UrlParser } from "@smithy/types"; +/** + * @internal + */ +export declare const parseUrl: UrlParser; diff --git a/node_modules/@smithy/url-parser/package.json b/node_modules/@smithy/url-parser/package.json new file mode 100644 index 0000000..9bc3be7 --- /dev/null +++ b/node_modules/@smithy/url-parser/package.json @@ -0,0 +1,58 @@ +{ + "name": "@smithy/url-parser", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline url-parser", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/querystring-parser": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/url-parser", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/url-parser" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-base64/LICENSE b/node_modules/@smithy/util-base64/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/util-base64/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-base64/README.md b/node_modules/@smithy/util-base64/README.md new file mode 100644 index 0000000..c9b6c87 --- /dev/null +++ b/node_modules/@smithy/util-base64/README.md @@ -0,0 +1,4 @@ +# @smithy/util-base64 + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-base64/latest.svg)](https://www.npmjs.com/package/@smithy/util-base64) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-base64.svg)](https://www.npmjs.com/package/@smithy/util-base64) diff --git a/node_modules/@smithy/util-base64/dist-cjs/constants.browser.js b/node_modules/@smithy/util-base64/dist-cjs/constants.browser.js new file mode 100644 index 0000000..d35d09f --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-cjs/constants.browser.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.maxLetterValue = exports.bitsPerByte = exports.bitsPerLetter = exports.alphabetByValue = exports.alphabetByEncoding = void 0; +const alphabetByEncoding = {}; +exports.alphabetByEncoding = alphabetByEncoding; +const alphabetByValue = new Array(64); +exports.alphabetByValue = alphabetByValue; +for (let i = 0, start = "A".charCodeAt(0), limit = "Z".charCodeAt(0); i + start <= limit; i++) { + const char = String.fromCharCode(i + start); + alphabetByEncoding[char] = i; + alphabetByValue[i] = char; +} +for (let i = 0, start = "a".charCodeAt(0), limit = "z".charCodeAt(0); i + start <= limit; i++) { + const char = String.fromCharCode(i + start); + const index = i + 26; + alphabetByEncoding[char] = index; + alphabetByValue[index] = char; +} +for (let i = 0; i < 10; i++) { + alphabetByEncoding[i.toString(10)] = i + 52; + const char = i.toString(10); + const index = i + 52; + alphabetByEncoding[char] = index; + alphabetByValue[index] = char; +} +alphabetByEncoding["+"] = 62; +alphabetByValue[62] = "+"; +alphabetByEncoding["/"] = 63; +alphabetByValue[63] = "/"; +const bitsPerLetter = 6; +exports.bitsPerLetter = bitsPerLetter; +const bitsPerByte = 8; +exports.bitsPerByte = bitsPerByte; +const maxLetterValue = 0b111111; +exports.maxLetterValue = maxLetterValue; diff --git a/node_modules/@smithy/util-base64/dist-cjs/fromBase64.browser.js b/node_modules/@smithy/util-base64/dist-cjs/fromBase64.browser.js new file mode 100644 index 0000000..a5baffd --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-cjs/fromBase64.browser.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromBase64 = void 0; +const constants_browser_1 = require("./constants.browser"); +const fromBase64 = (input) => { + let totalByteLength = (input.length / 4) * 3; + if (input.slice(-2) === "==") { + totalByteLength -= 2; + } + else if (input.slice(-1) === "=") { + totalByteLength--; + } + const out = new ArrayBuffer(totalByteLength); + const dataView = new DataView(out); + for (let i = 0; i < input.length; i += 4) { + let bits = 0; + let bitLength = 0; + for (let j = i, limit = i + 3; j <= limit; j++) { + if (input[j] !== "=") { + if (!(input[j] in constants_browser_1.alphabetByEncoding)) { + throw new TypeError(`Invalid character ${input[j]} in base64 string.`); + } + bits |= constants_browser_1.alphabetByEncoding[input[j]] << ((limit - j) * constants_browser_1.bitsPerLetter); + bitLength += constants_browser_1.bitsPerLetter; + } + else { + bits >>= constants_browser_1.bitsPerLetter; + } + } + const chunkOffset = (i / 4) * 3; + bits >>= bitLength % constants_browser_1.bitsPerByte; + const byteLength = Math.floor(bitLength / constants_browser_1.bitsPerByte); + for (let k = 0; k < byteLength; k++) { + const offset = (byteLength - k - 1) * constants_browser_1.bitsPerByte; + dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset); + } + } + return new Uint8Array(out); +}; +exports.fromBase64 = fromBase64; diff --git a/node_modules/@smithy/util-base64/dist-cjs/fromBase64.js b/node_modules/@smithy/util-base64/dist-cjs/fromBase64.js new file mode 100644 index 0000000..b06a7b8 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-cjs/fromBase64.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromBase64 = void 0; +const util_buffer_from_1 = require("@smithy/util-buffer-from"); +const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; +const fromBase64 = (input) => { + if ((input.length * 3) % 4 !== 0) { + throw new TypeError(`Incorrect padding on base64 string.`); + } + if (!BASE64_REGEX.exec(input)) { + throw new TypeError(`Invalid base64 string.`); + } + const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); +}; +exports.fromBase64 = fromBase64; diff --git a/node_modules/@smithy/util-base64/dist-cjs/index.js b/node_modules/@smithy/util-base64/dist-cjs/index.js new file mode 100644 index 0000000..02848d0 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-cjs/index.js @@ -0,0 +1,27 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +module.exports = __toCommonJS(src_exports); +__reExport(src_exports, require("././fromBase64"), module.exports); +__reExport(src_exports, require("././toBase64"), module.exports); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + fromBase64, + toBase64 +}); + diff --git a/node_modules/@smithy/util-base64/dist-cjs/toBase64.browser.js b/node_modules/@smithy/util-base64/dist-cjs/toBase64.browser.js new file mode 100644 index 0000000..e294f3f --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-cjs/toBase64.browser.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toBase64 = void 0; +const util_utf8_1 = require("@smithy/util-utf8"); +const constants_browser_1 = require("./constants.browser"); +function toBase64(_input) { + let input; + if (typeof _input === "string") { + input = (0, util_utf8_1.fromUtf8)(_input); + } + else { + input = _input; + } + const isArrayLike = typeof input === "object" && typeof input.length === "number"; + const isUint8Array = typeof input === "object" && + typeof input.byteOffset === "number" && + typeof input.byteLength === "number"; + if (!isArrayLike && !isUint8Array) { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + let str = ""; + for (let i = 0; i < input.length; i += 3) { + let bits = 0; + let bitLength = 0; + for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) { + bits |= input[j] << ((limit - j - 1) * constants_browser_1.bitsPerByte); + bitLength += constants_browser_1.bitsPerByte; + } + const bitClusterCount = Math.ceil(bitLength / constants_browser_1.bitsPerLetter); + bits <<= bitClusterCount * constants_browser_1.bitsPerLetter - bitLength; + for (let k = 1; k <= bitClusterCount; k++) { + const offset = (bitClusterCount - k) * constants_browser_1.bitsPerLetter; + str += constants_browser_1.alphabetByValue[(bits & (constants_browser_1.maxLetterValue << offset)) >> offset]; + } + str += "==".slice(0, 4 - bitClusterCount); + } + return str; +} +exports.toBase64 = toBase64; diff --git a/node_modules/@smithy/util-base64/dist-cjs/toBase64.js b/node_modules/@smithy/util-base64/dist-cjs/toBase64.js new file mode 100644 index 0000000..0590ce3 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-cjs/toBase64.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toBase64 = void 0; +const util_buffer_from_1 = require("@smithy/util-buffer-from"); +const util_utf8_1 = require("@smithy/util-utf8"); +const toBase64 = (_input) => { + let input; + if (typeof _input === "string") { + input = (0, util_utf8_1.fromUtf8)(_input); + } + else { + input = _input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); +}; +exports.toBase64 = toBase64; diff --git a/node_modules/@smithy/util-base64/dist-es/constants.browser.js b/node_modules/@smithy/util-base64/dist-es/constants.browser.js new file mode 100644 index 0000000..fd4df4d --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-es/constants.browser.js @@ -0,0 +1,28 @@ +const alphabetByEncoding = {}; +const alphabetByValue = new Array(64); +for (let i = 0, start = "A".charCodeAt(0), limit = "Z".charCodeAt(0); i + start <= limit; i++) { + const char = String.fromCharCode(i + start); + alphabetByEncoding[char] = i; + alphabetByValue[i] = char; +} +for (let i = 0, start = "a".charCodeAt(0), limit = "z".charCodeAt(0); i + start <= limit; i++) { + const char = String.fromCharCode(i + start); + const index = i + 26; + alphabetByEncoding[char] = index; + alphabetByValue[index] = char; +} +for (let i = 0; i < 10; i++) { + alphabetByEncoding[i.toString(10)] = i + 52; + const char = i.toString(10); + const index = i + 52; + alphabetByEncoding[char] = index; + alphabetByValue[index] = char; +} +alphabetByEncoding["+"] = 62; +alphabetByValue[62] = "+"; +alphabetByEncoding["/"] = 63; +alphabetByValue[63] = "/"; +const bitsPerLetter = 6; +const bitsPerByte = 8; +const maxLetterValue = 0b111111; +export { alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue }; diff --git a/node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js b/node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js new file mode 100644 index 0000000..c2c6a66 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js @@ -0,0 +1,36 @@ +import { alphabetByEncoding, bitsPerByte, bitsPerLetter } from "./constants.browser"; +export const fromBase64 = (input) => { + let totalByteLength = (input.length / 4) * 3; + if (input.slice(-2) === "==") { + totalByteLength -= 2; + } + else if (input.slice(-1) === "=") { + totalByteLength--; + } + const out = new ArrayBuffer(totalByteLength); + const dataView = new DataView(out); + for (let i = 0; i < input.length; i += 4) { + let bits = 0; + let bitLength = 0; + for (let j = i, limit = i + 3; j <= limit; j++) { + if (input[j] !== "=") { + if (!(input[j] in alphabetByEncoding)) { + throw new TypeError(`Invalid character ${input[j]} in base64 string.`); + } + bits |= alphabetByEncoding[input[j]] << ((limit - j) * bitsPerLetter); + bitLength += bitsPerLetter; + } + else { + bits >>= bitsPerLetter; + } + } + const chunkOffset = (i / 4) * 3; + bits >>= bitLength % bitsPerByte; + const byteLength = Math.floor(bitLength / bitsPerByte); + for (let k = 0; k < byteLength; k++) { + const offset = (byteLength - k - 1) * bitsPerByte; + dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset); + } + } + return new Uint8Array(out); +}; diff --git a/node_modules/@smithy/util-base64/dist-es/fromBase64.js b/node_modules/@smithy/util-base64/dist-es/fromBase64.js new file mode 100644 index 0000000..5197e93 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-es/fromBase64.js @@ -0,0 +1,12 @@ +import { fromString } from "@smithy/util-buffer-from"; +const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; +export const fromBase64 = (input) => { + if ((input.length * 3) % 4 !== 0) { + throw new TypeError(`Incorrect padding on base64 string.`); + } + if (!BASE64_REGEX.exec(input)) { + throw new TypeError(`Invalid base64 string.`); + } + const buffer = fromString(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); +}; diff --git a/node_modules/@smithy/util-base64/dist-es/index.js b/node_modules/@smithy/util-base64/dist-es/index.js new file mode 100644 index 0000000..594bd43 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-es/index.js @@ -0,0 +1,2 @@ +export * from "./fromBase64"; +export * from "./toBase64"; diff --git a/node_modules/@smithy/util-base64/dist-es/toBase64.browser.js b/node_modules/@smithy/util-base64/dist-es/toBase64.browser.js new file mode 100644 index 0000000..2a03a9d --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-es/toBase64.browser.js @@ -0,0 +1,35 @@ +import { fromUtf8 } from "@smithy/util-utf8"; +import { alphabetByValue, bitsPerByte, bitsPerLetter, maxLetterValue } from "./constants.browser"; +export function toBase64(_input) { + let input; + if (typeof _input === "string") { + input = fromUtf8(_input); + } + else { + input = _input; + } + const isArrayLike = typeof input === "object" && typeof input.length === "number"; + const isUint8Array = typeof input === "object" && + typeof input.byteOffset === "number" && + typeof input.byteLength === "number"; + if (!isArrayLike && !isUint8Array) { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + let str = ""; + for (let i = 0; i < input.length; i += 3) { + let bits = 0; + let bitLength = 0; + for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) { + bits |= input[j] << ((limit - j - 1) * bitsPerByte); + bitLength += bitsPerByte; + } + const bitClusterCount = Math.ceil(bitLength / bitsPerLetter); + bits <<= bitClusterCount * bitsPerLetter - bitLength; + for (let k = 1; k <= bitClusterCount; k++) { + const offset = (bitClusterCount - k) * bitsPerLetter; + str += alphabetByValue[(bits & (maxLetterValue << offset)) >> offset]; + } + str += "==".slice(0, 4 - bitClusterCount); + } + return str; +} diff --git a/node_modules/@smithy/util-base64/dist-es/toBase64.js b/node_modules/@smithy/util-base64/dist-es/toBase64.js new file mode 100644 index 0000000..61f03ce --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-es/toBase64.js @@ -0,0 +1,15 @@ +import { fromArrayBuffer } from "@smithy/util-buffer-from"; +import { fromUtf8 } from "@smithy/util-utf8"; +export const toBase64 = (_input) => { + let input; + if (typeof _input === "string") { + input = fromUtf8(_input); + } + else { + input = _input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64"); +}; diff --git a/node_modules/@smithy/util-base64/dist-types/constants.browser.d.ts b/node_modules/@smithy/util-base64/dist-types/constants.browser.d.ts new file mode 100644 index 0000000..eb750ea --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/constants.browser.d.ts @@ -0,0 +1,6 @@ +declare const alphabetByEncoding: Record; +declare const alphabetByValue: Array; +declare const bitsPerLetter = 6; +declare const bitsPerByte = 8; +declare const maxLetterValue = 63; +export { alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue }; diff --git a/node_modules/@smithy/util-base64/dist-types/fromBase64.browser.d.ts b/node_modules/@smithy/util-base64/dist-types/fromBase64.browser.d.ts new file mode 100644 index 0000000..6a640f1 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/fromBase64.browser.d.ts @@ -0,0 +1,8 @@ +/** + * Converts a base-64 encoded string to a Uint8Array of bytes. + * + * @param input The base-64 encoded string + * + * @see https://tools.ietf.org/html/rfc4648#section-4 + */ +export declare const fromBase64: (input: string) => Uint8Array; diff --git a/node_modules/@smithy/util-base64/dist-types/fromBase64.d.ts b/node_modules/@smithy/util-base64/dist-types/fromBase64.d.ts new file mode 100644 index 0000000..1878a89 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/fromBase64.d.ts @@ -0,0 +1,7 @@ +/** + * Converts a base-64 encoded string to a Uint8Array of bytes using Node.JS's + * `buffer` module. + * + * @param input The base-64 encoded string + */ +export declare const fromBase64: (input: string) => Uint8Array; diff --git a/node_modules/@smithy/util-base64/dist-types/index.d.ts b/node_modules/@smithy/util-base64/dist-types/index.d.ts new file mode 100644 index 0000000..594bd43 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/index.d.ts @@ -0,0 +1,2 @@ +export * from "./fromBase64"; +export * from "./toBase64"; diff --git a/node_modules/@smithy/util-base64/dist-types/toBase64.browser.d.ts b/node_modules/@smithy/util-base64/dist-types/toBase64.browser.d.ts new file mode 100644 index 0000000..5f5615e --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/toBase64.browser.d.ts @@ -0,0 +1,9 @@ +/** + * Converts a Uint8Array of binary data or a utf-8 string to a base-64 encoded string. + * + * @param _input - the binary data or string to encode. + * @returns base64 string. + * + * @see https://tools.ietf.org/html/rfc4648#section-4 + */ +export declare function toBase64(_input: Uint8Array | string): string; diff --git a/node_modules/@smithy/util-base64/dist-types/toBase64.d.ts b/node_modules/@smithy/util-base64/dist-types/toBase64.d.ts new file mode 100644 index 0000000..96bd0ed --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/toBase64.d.ts @@ -0,0 +1,8 @@ +/** + * Converts a Uint8Array of binary data or a utf-8 string to a base-64 encoded string using + * Node.JS's `buffer` module. + * + * @param _input - the binary data or string to encode. + * @returns base64 string. + */ +export declare const toBase64: (_input: Uint8Array | string) => string; diff --git a/node_modules/@smithy/util-base64/dist-types/ts3.4/constants.browser.d.ts b/node_modules/@smithy/util-base64/dist-types/ts3.4/constants.browser.d.ts new file mode 100644 index 0000000..61c36c8 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/ts3.4/constants.browser.d.ts @@ -0,0 +1,6 @@ +declare const alphabetByEncoding: Record; +declare const alphabetByValue: Array; +declare const bitsPerLetter = 6; +declare const bitsPerByte = 8; +declare const maxLetterValue = 63; +export { alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue }; diff --git a/node_modules/@smithy/util-base64/dist-types/ts3.4/fromBase64.browser.d.ts b/node_modules/@smithy/util-base64/dist-types/ts3.4/fromBase64.browser.d.ts new file mode 100644 index 0000000..3a50006 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/ts3.4/fromBase64.browser.d.ts @@ -0,0 +1,8 @@ +/** + * Converts a base-64 encoded string to a Uint8Array of bytes. + * + * @param input The base-64 encoded string + * + * @see https://tools.ietf.org/html/rfc4648#section-4 + */ +export declare const fromBase64: (input: string) => Uint8Array; diff --git a/node_modules/@smithy/util-base64/dist-types/ts3.4/fromBase64.d.ts b/node_modules/@smithy/util-base64/dist-types/ts3.4/fromBase64.d.ts new file mode 100644 index 0000000..f84c7c6 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/ts3.4/fromBase64.d.ts @@ -0,0 +1,7 @@ +/** + * Converts a base-64 encoded string to a Uint8Array of bytes using Node.JS's + * `buffer` module. + * + * @param input The base-64 encoded string + */ +export declare const fromBase64: (input: string) => Uint8Array; diff --git a/node_modules/@smithy/util-base64/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-base64/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..c4e1d03 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/ts3.4/index.d.ts @@ -0,0 +1,2 @@ +export * from "./fromBase64"; +export * from "./toBase64"; diff --git a/node_modules/@smithy/util-base64/dist-types/ts3.4/toBase64.browser.d.ts b/node_modules/@smithy/util-base64/dist-types/ts3.4/toBase64.browser.d.ts new file mode 100644 index 0000000..260f696 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/ts3.4/toBase64.browser.d.ts @@ -0,0 +1,9 @@ +/** + * Converts a Uint8Array of binary data or a utf-8 string to a base-64 encoded string. + * + * @param _input - the binary data or string to encode. + * @returns base64 string. + * + * @see https://tools.ietf.org/html/rfc4648#section-4 + */ +export declare function toBase64(_input: Uint8Array | string): string; diff --git a/node_modules/@smithy/util-base64/dist-types/ts3.4/toBase64.d.ts b/node_modules/@smithy/util-base64/dist-types/ts3.4/toBase64.d.ts new file mode 100644 index 0000000..7e8bb70 --- /dev/null +++ b/node_modules/@smithy/util-base64/dist-types/ts3.4/toBase64.d.ts @@ -0,0 +1,8 @@ +/** + * Converts a Uint8Array of binary data or a utf-8 string to a base-64 encoded string using + * Node.JS's `buffer` module. + * + * @param _input - the binary data or string to encode. + * @returns base64 string. + */ +export declare const toBase64: (_input: Uint8Array | string) => string; diff --git a/node_modules/@smithy/util-base64/package.json b/node_modules/@smithy/util-base64/package.json new file mode 100644 index 0000000..d0d3a76 --- /dev/null +++ b/node_modules/@smithy/util-base64/package.json @@ -0,0 +1,73 @@ +{ + "name": "@smithy/util-base64", + "version": "2.3.0", + "description": "A Base64 <-> UInt8Array converter", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-base64", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "browser": { + "./dist-es/fromBase64": "./dist-es/fromBase64.browser", + "./dist-es/toBase64": "./dist-es/toBase64.browser" + }, + "react-native": { + "./dist-es/fromBase64": "./dist-es/fromBase64.browser", + "./dist-es/toBase64": "./dist-es/toBase64.browser", + "./dist-cjs/fromBase64": "./dist-cjs/fromBase64.browser", + "./dist-cjs/toBase64": "./dist-cjs/toBase64.browser" + }, + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-base64", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-base64" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-body-length-browser/LICENSE b/node_modules/@smithy/util-body-length-browser/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-body-length-browser/README.md b/node_modules/@smithy/util-body-length-browser/README.md new file mode 100644 index 0000000..460d092 --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/README.md @@ -0,0 +1,12 @@ +# @smithy/util-body-length-browser + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-body-length-browser/latest.svg)](https://www.npmjs.com/package/@smithy/util-body-length-browser) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-body-length-browser.svg)](https://www.npmjs.com/package/@smithy/util-body-length-browser) + +Determines the length of a request body in browsers + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/util-body-length-browser/dist-cjs/calculateBodyLength.js b/node_modules/@smithy/util-body-length-browser/dist-cjs/calculateBodyLength.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/dist-cjs/calculateBodyLength.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js b/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js new file mode 100644 index 0000000..9e872bc --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js @@ -0,0 +1,57 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + calculateBodyLength: () => calculateBodyLength +}); +module.exports = __toCommonJS(src_exports); + +// src/calculateBodyLength.ts +var TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; +var calculateBodyLength = /* @__PURE__ */ __name((body) => { + if (typeof body === "string") { + if (TEXT_ENCODER) { + return TEXT_ENCODER.encode(body).byteLength; + } + let len = body.length; + for (let i = len - 1; i >= 0; i--) { + const code = body.charCodeAt(i); + if (code > 127 && code <= 2047) + len++; + else if (code > 2047 && code <= 65535) + len += 2; + if (code >= 56320 && code <= 57343) + i--; + } + return len; + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } + throw new Error(`Body Length computation failed for ${body}`); +}, "calculateBodyLength"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + calculateBodyLength +}); + diff --git a/node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js b/node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js new file mode 100644 index 0000000..6b994ca --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js @@ -0,0 +1,26 @@ +const TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; +export const calculateBodyLength = (body) => { + if (typeof body === "string") { + if (TEXT_ENCODER) { + return TEXT_ENCODER.encode(body).byteLength; + } + let len = body.length; + for (let i = len - 1; i >= 0; i--) { + const code = body.charCodeAt(i); + if (code > 0x7f && code <= 0x7ff) + len++; + else if (code > 0x7ff && code <= 0xffff) + len += 2; + if (code >= 0xdc00 && code <= 0xdfff) + i--; + } + return len; + } + else if (typeof body.byteLength === "number") { + return body.byteLength; + } + else if (typeof body.size === "number") { + return body.size; + } + throw new Error(`Body Length computation failed for ${body}`); +}; diff --git a/node_modules/@smithy/util-body-length-browser/dist-es/index.js b/node_modules/@smithy/util-body-length-browser/dist-es/index.js new file mode 100644 index 0000000..16ba478 --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/dist-es/index.js @@ -0,0 +1 @@ +export * from "./calculateBodyLength"; diff --git a/node_modules/@smithy/util-body-length-browser/dist-types/calculateBodyLength.d.ts b/node_modules/@smithy/util-body-length-browser/dist-types/calculateBodyLength.d.ts new file mode 100644 index 0000000..8e1bdb0 --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/dist-types/calculateBodyLength.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const calculateBodyLength: (body: any) => number | undefined; diff --git a/node_modules/@smithy/util-body-length-browser/dist-types/index.d.ts b/node_modules/@smithy/util-body-length-browser/dist-types/index.d.ts new file mode 100644 index 0000000..7b4a0d7 --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/dist-types/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./calculateBodyLength"; diff --git a/node_modules/@smithy/util-body-length-browser/dist-types/ts3.4/calculateBodyLength.d.ts b/node_modules/@smithy/util-body-length-browser/dist-types/ts3.4/calculateBodyLength.d.ts new file mode 100644 index 0000000..3260536 --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/dist-types/ts3.4/calculateBodyLength.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const calculateBodyLength: (body: any) => number | undefined; diff --git a/node_modules/@smithy/util-body-length-browser/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-body-length-browser/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..ab6cb83 --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/dist-types/ts3.4/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./calculateBodyLength"; diff --git a/node_modules/@smithy/util-body-length-browser/package.json b/node_modules/@smithy/util-body-length-browser/package.json new file mode 100644 index 0000000..6bdddf1 --- /dev/null +++ b/node_modules/@smithy/util-body-length-browser/package.json @@ -0,0 +1,57 @@ +{ + "name": "@smithy/util-body-length-browser", + "description": "Determines the length of a request body in browsers", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-body-length-browser", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-body-length-browser", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-body-length-browser" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-body-length-node/LICENSE b/node_modules/@smithy/util-body-length-node/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-body-length-node/README.md b/node_modules/@smithy/util-body-length-node/README.md new file mode 100644 index 0000000..9a80efe --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/README.md @@ -0,0 +1,12 @@ +# @smithy/util-body-length-node + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-body-length-node/latest.svg)](https://www.npmjs.com/package/@smithy/util-body-length-node) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-body-length-node.svg)](https://www.npmjs.com/package/@smithy/util-body-length-node) + +Determines the length of a request body in node.js + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/util-body-length-node/dist-cjs/calculateBodyLength.js b/node_modules/@smithy/util-body-length-node/dist-cjs/calculateBodyLength.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/dist-cjs/calculateBodyLength.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-body-length-node/dist-cjs/index.js b/node_modules/@smithy/util-body-length-node/dist-cjs/index.js new file mode 100644 index 0000000..1ecdc79 --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/dist-cjs/index.js @@ -0,0 +1,53 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + calculateBodyLength: () => calculateBodyLength +}); +module.exports = __toCommonJS(src_exports); + +// src/calculateBodyLength.ts +var import_fs = require("fs"); +var calculateBodyLength = /* @__PURE__ */ __name((body) => { + if (!body) { + return 0; + } + if (typeof body === "string") { + return Buffer.byteLength(body); + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; + } else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) { + return (0, import_fs.lstatSync)(body.path).size; + } else if (typeof body.fd === "number") { + return (0, import_fs.fstatSync)(body.fd).size; + } + throw new Error(`Body Length computation failed for ${body}`); +}, "calculateBodyLength"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + calculateBodyLength +}); + diff --git a/node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js b/node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js new file mode 100644 index 0000000..857cff5 --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js @@ -0,0 +1,25 @@ +import { fstatSync, lstatSync } from "fs"; +export const calculateBodyLength = (body) => { + if (!body) { + return 0; + } + if (typeof body === "string") { + return Buffer.byteLength(body); + } + else if (typeof body.byteLength === "number") { + return body.byteLength; + } + else if (typeof body.size === "number") { + return body.size; + } + else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; + } + else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) { + return lstatSync(body.path).size; + } + else if (typeof body.fd === "number") { + return fstatSync(body.fd).size; + } + throw new Error(`Body Length computation failed for ${body}`); +}; diff --git a/node_modules/@smithy/util-body-length-node/dist-es/index.js b/node_modules/@smithy/util-body-length-node/dist-es/index.js new file mode 100644 index 0000000..16ba478 --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/dist-es/index.js @@ -0,0 +1 @@ +export * from "./calculateBodyLength"; diff --git a/node_modules/@smithy/util-body-length-node/dist-types/calculateBodyLength.d.ts b/node_modules/@smithy/util-body-length-node/dist-types/calculateBodyLength.d.ts new file mode 100644 index 0000000..8e1bdb0 --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/dist-types/calculateBodyLength.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const calculateBodyLength: (body: any) => number | undefined; diff --git a/node_modules/@smithy/util-body-length-node/dist-types/index.d.ts b/node_modules/@smithy/util-body-length-node/dist-types/index.d.ts new file mode 100644 index 0000000..7b4a0d7 --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/dist-types/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./calculateBodyLength"; diff --git a/node_modules/@smithy/util-body-length-node/dist-types/ts3.4/calculateBodyLength.d.ts b/node_modules/@smithy/util-body-length-node/dist-types/ts3.4/calculateBodyLength.d.ts new file mode 100644 index 0000000..3260536 --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/dist-types/ts3.4/calculateBodyLength.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const calculateBodyLength: (body: any) => number | undefined; diff --git a/node_modules/@smithy/util-body-length-node/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-body-length-node/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..ab6cb83 --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/dist-types/ts3.4/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./calculateBodyLength"; diff --git a/node_modules/@smithy/util-body-length-node/package.json b/node_modules/@smithy/util-body-length-node/package.json new file mode 100644 index 0000000..a629e57 --- /dev/null +++ b/node_modules/@smithy/util-body-length-node/package.json @@ -0,0 +1,61 @@ +{ + "name": "@smithy/util-body-length-node", + "description": "Determines the length of a request body in node.js", + "version": "2.3.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-body-length-node", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-body-length-node", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-body-length-node" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-buffer-from/LICENSE b/node_modules/@smithy/util-buffer-from/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/util-buffer-from/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-buffer-from/README.md b/node_modules/@smithy/util-buffer-from/README.md new file mode 100644 index 0000000..c896b04 --- /dev/null +++ b/node_modules/@smithy/util-buffer-from/README.md @@ -0,0 +1,10 @@ +# @smithy/util-buffer-from + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-buffer-from/latest.svg)](https://www.npmjs.com/package/@smithy/util-buffer-from) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-buffer-from.svg)](https://www.npmjs.com/package/@smithy/util-buffer-from) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/util-buffer-from/dist-cjs/index.js b/node_modules/@smithy/util-buffer-from/dist-cjs/index.js new file mode 100644 index 0000000..c6738d9 --- /dev/null +++ b/node_modules/@smithy/util-buffer-from/dist-cjs/index.js @@ -0,0 +1,47 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + fromArrayBuffer: () => fromArrayBuffer, + fromString: () => fromString +}); +module.exports = __toCommonJS(src_exports); +var import_is_array_buffer = require("@smithy/is-array-buffer"); +var import_buffer = require("buffer"); +var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { + if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return import_buffer.Buffer.from(input, offset, length); +}, "fromArrayBuffer"); +var fromString = /* @__PURE__ */ __name((input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); +}, "fromString"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + fromArrayBuffer, + fromString +}); + diff --git a/node_modules/@smithy/util-buffer-from/dist-es/index.js b/node_modules/@smithy/util-buffer-from/dist-es/index.js new file mode 100644 index 0000000..718f831 --- /dev/null +++ b/node_modules/@smithy/util-buffer-from/dist-es/index.js @@ -0,0 +1,14 @@ +import { isArrayBuffer } from "@smithy/is-array-buffer"; +import { Buffer } from "buffer"; +export const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { + if (!isArrayBuffer(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return Buffer.from(input, offset, length); +}; +export const fromString = (input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? Buffer.from(input, encoding) : Buffer.from(input); +}; diff --git a/node_modules/@smithy/util-buffer-from/dist-types/index.d.ts b/node_modules/@smithy/util-buffer-from/dist-types/index.d.ts new file mode 100644 index 0000000..a523134 --- /dev/null +++ b/node_modules/@smithy/util-buffer-from/dist-types/index.d.ts @@ -0,0 +1,13 @@ +import { Buffer } from "buffer"; +/** + * @internal + */ +export declare const fromArrayBuffer: (input: ArrayBuffer, offset?: number, length?: number) => Buffer; +/** + * @internal + */ +export type StringEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex"; +/** + * @internal + */ +export declare const fromString: (input: string, encoding?: StringEncoding) => Buffer; diff --git a/node_modules/@smithy/util-buffer-from/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-buffer-from/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..f9173f7 --- /dev/null +++ b/node_modules/@smithy/util-buffer-from/dist-types/ts3.4/index.d.ts @@ -0,0 +1,13 @@ +import { Buffer } from "buffer"; +/** + * @internal + */ +export declare const fromArrayBuffer: (input: ArrayBuffer, offset?: number, length?: number) => Buffer; +/** + * @internal + */ +export type StringEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex"; +/** + * @internal + */ +export declare const fromString: (input: string, encoding?: StringEncoding) => Buffer; diff --git a/node_modules/@smithy/util-buffer-from/package.json b/node_modules/@smithy/util-buffer-from/package.json new file mode 100644 index 0000000..a12e51c --- /dev/null +++ b/node_modules/@smithy/util-buffer-from/package.json @@ -0,0 +1,61 @@ +{ + "name": "@smithy/util-buffer-from", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-buffer-from", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-buffer-from", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-buffer-from" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-config-provider/LICENSE b/node_modules/@smithy/util-config-provider/LICENSE new file mode 100644 index 0000000..74d4e5c --- /dev/null +++ b/node_modules/@smithy/util-config-provider/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-config-provider/README.md b/node_modules/@smithy/util-config-provider/README.md new file mode 100644 index 0000000..5b0341d --- /dev/null +++ b/node_modules/@smithy/util-config-provider/README.md @@ -0,0 +1,4 @@ +# @smithy/util-config-provider + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-config-provider/latest.svg)](https://www.npmjs.com/package/@smithy/util-config-provider) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-config-provider.svg)](https://www.npmjs.com/package/@smithy/util-config-provider) diff --git a/node_modules/@smithy/util-config-provider/dist-cjs/booleanSelector.js b/node_modules/@smithy/util-config-provider/dist-cjs/booleanSelector.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-cjs/booleanSelector.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-config-provider/dist-cjs/index.js b/node_modules/@smithy/util-config-provider/dist-cjs/index.js new file mode 100644 index 0000000..210d40d --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-cjs/index.js @@ -0,0 +1,64 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + SelectorType: () => SelectorType, + booleanSelector: () => booleanSelector, + numberSelector: () => numberSelector +}); +module.exports = __toCommonJS(src_exports); + +// src/booleanSelector.ts +var booleanSelector = /* @__PURE__ */ __name((obj, key, type) => { + if (!(key in obj)) + return void 0; + if (obj[key] === "true") + return true; + if (obj[key] === "false") + return false; + throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); +}, "booleanSelector"); + +// src/numberSelector.ts +var numberSelector = /* @__PURE__ */ __name((obj, key, type) => { + if (!(key in obj)) + return void 0; + const numberValue = parseInt(obj[key], 10); + if (Number.isNaN(numberValue)) { + throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); + } + return numberValue; +}, "numberSelector"); + +// src/types.ts +var SelectorType = /* @__PURE__ */ ((SelectorType2) => { + SelectorType2["ENV"] = "env"; + SelectorType2["CONFIG"] = "shared config entry"; + return SelectorType2; +})(SelectorType || {}); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + booleanSelector, + numberSelector, + SelectorType +}); + diff --git a/node_modules/@smithy/util-config-provider/dist-cjs/numberSelector.js b/node_modules/@smithy/util-config-provider/dist-cjs/numberSelector.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-cjs/numberSelector.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-config-provider/dist-cjs/types.js b/node_modules/@smithy/util-config-provider/dist-cjs/types.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-cjs/types.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-config-provider/dist-es/booleanSelector.js b/node_modules/@smithy/util-config-provider/dist-es/booleanSelector.js new file mode 100644 index 0000000..6ba2261 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-es/booleanSelector.js @@ -0,0 +1,9 @@ +export const booleanSelector = (obj, key, type) => { + if (!(key in obj)) + return undefined; + if (obj[key] === "true") + return true; + if (obj[key] === "false") + return false; + throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); +}; diff --git a/node_modules/@smithy/util-config-provider/dist-es/index.js b/node_modules/@smithy/util-config-provider/dist-es/index.js new file mode 100644 index 0000000..a926de8 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-es/index.js @@ -0,0 +1,3 @@ +export * from "./booleanSelector"; +export * from "./numberSelector"; +export * from "./types"; diff --git a/node_modules/@smithy/util-config-provider/dist-es/numberSelector.js b/node_modules/@smithy/util-config-provider/dist-es/numberSelector.js new file mode 100644 index 0000000..81cfe40 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-es/numberSelector.js @@ -0,0 +1,9 @@ +export const numberSelector = (obj, key, type) => { + if (!(key in obj)) + return undefined; + const numberValue = parseInt(obj[key], 10); + if (Number.isNaN(numberValue)) { + throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); + } + return numberValue; +}; diff --git a/node_modules/@smithy/util-config-provider/dist-es/types.js b/node_modules/@smithy/util-config-provider/dist-es/types.js new file mode 100644 index 0000000..5b10fb5 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-es/types.js @@ -0,0 +1,5 @@ +export var SelectorType; +(function (SelectorType) { + SelectorType["ENV"] = "env"; + SelectorType["CONFIG"] = "shared config entry"; +})(SelectorType || (SelectorType = {})); diff --git a/node_modules/@smithy/util-config-provider/dist-types/booleanSelector.d.ts b/node_modules/@smithy/util-config-provider/dist-types/booleanSelector.d.ts new file mode 100644 index 0000000..d4977cb --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-types/booleanSelector.d.ts @@ -0,0 +1,10 @@ +import { SelectorType } from "./types"; +/** + * Returns boolean value true/false for string value "true"/"false", + * if the string is defined in obj[key] + * Returns undefined, if obj[key] is not defined. + * Throws error for all other cases. + * + * @internal + */ +export declare const booleanSelector: (obj: Record, key: string, type: SelectorType) => boolean | undefined; diff --git a/node_modules/@smithy/util-config-provider/dist-types/index.d.ts b/node_modules/@smithy/util-config-provider/dist-types/index.d.ts new file mode 100644 index 0000000..a926de8 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-types/index.d.ts @@ -0,0 +1,3 @@ +export * from "./booleanSelector"; +export * from "./numberSelector"; +export * from "./types"; diff --git a/node_modules/@smithy/util-config-provider/dist-types/numberSelector.d.ts b/node_modules/@smithy/util-config-provider/dist-types/numberSelector.d.ts new file mode 100644 index 0000000..9e0cbf9 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-types/numberSelector.d.ts @@ -0,0 +1,9 @@ +import { SelectorType } from "./types"; +/** + * Returns number value for string value, if the string is defined in obj[key]. + * Returns undefined, if obj[key] is not defined. + * Throws error for all other cases. + * + * @internal + */ +export declare const numberSelector: (obj: Record, key: string, type: SelectorType) => number | undefined; diff --git a/node_modules/@smithy/util-config-provider/dist-types/ts3.4/booleanSelector.d.ts b/node_modules/@smithy/util-config-provider/dist-types/ts3.4/booleanSelector.d.ts new file mode 100644 index 0000000..0b85452 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-types/ts3.4/booleanSelector.d.ts @@ -0,0 +1,10 @@ +import { SelectorType } from "./types"; +/** + * Returns boolean value true/false for string value "true"/"false", + * if the string is defined in obj[key] + * Returns undefined, if obj[key] is not defined. + * Throws error for all other cases. + * + * @internal + */ +export declare const booleanSelector: (obj: Record, key: string, type: SelectorType) => boolean | undefined; diff --git a/node_modules/@smithy/util-config-provider/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-config-provider/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..02fd81d --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-types/ts3.4/index.d.ts @@ -0,0 +1,3 @@ +export * from "./booleanSelector"; +export * from "./numberSelector"; +export * from "./types"; diff --git a/node_modules/@smithy/util-config-provider/dist-types/ts3.4/numberSelector.d.ts b/node_modules/@smithy/util-config-provider/dist-types/ts3.4/numberSelector.d.ts new file mode 100644 index 0000000..3a34671 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-types/ts3.4/numberSelector.d.ts @@ -0,0 +1,9 @@ +import { SelectorType } from "./types"; +/** + * Returns number value for string value, if the string is defined in obj[key]. + * Returns undefined, if obj[key] is not defined. + * Throws error for all other cases. + * + * @internal + */ +export declare const numberSelector: (obj: Record, key: string, type: SelectorType) => number | undefined; diff --git a/node_modules/@smithy/util-config-provider/dist-types/ts3.4/types.d.ts b/node_modules/@smithy/util-config-provider/dist-types/ts3.4/types.d.ts new file mode 100644 index 0000000..e01c128 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-types/ts3.4/types.d.ts @@ -0,0 +1,4 @@ +export declare enum SelectorType { + ENV = "env", + CONFIG = "shared config entry" +} diff --git a/node_modules/@smithy/util-config-provider/dist-types/types.d.ts b/node_modules/@smithy/util-config-provider/dist-types/types.d.ts new file mode 100644 index 0000000..caa65d7 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/dist-types/types.d.ts @@ -0,0 +1,4 @@ +export declare enum SelectorType { + ENV = "env", + CONFIG = "shared config entry" +} diff --git a/node_modules/@smithy/util-config-provider/package.json b/node_modules/@smithy/util-config-provider/package.json new file mode 100644 index 0000000..f55ece9 --- /dev/null +++ b/node_modules/@smithy/util-config-provider/package.json @@ -0,0 +1,62 @@ +{ + "name": "@smithy/util-config-provider", + "version": "2.3.0", + "description": "Utilities package for configuration providers", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-config-provider", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest --passWithNoTests" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "email": "", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "dependencies": { + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-config-provider", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-config-provider" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-defaults-mode-browser/LICENSE b/node_modules/@smithy/util-defaults-mode-browser/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/util-defaults-mode-browser/README.md b/node_modules/@smithy/util-defaults-mode-browser/README.md new file mode 100644 index 0000000..f2f1cc0 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/README.md @@ -0,0 +1,10 @@ +# @smithy/util-defaults-mode-browser + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-defaults-mode-browser/latest.svg)](https://www.npmjs.com/package/@smithy/util-defaults-mode-browser) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-defaults-mode-browser.svg)](https://www.npmjs.com/package/@smithy/util-defaults-mode-browser) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/constants.js b/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/constants.js new file mode 100644 index 0000000..3733506 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/constants.js @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DEFAULTS_MODE_OPTIONS = void 0; +exports.DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/index.js b/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/index.js new file mode 100644 index 0000000..4624ef1 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/index.js @@ -0,0 +1,25 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +module.exports = __toCommonJS(src_exports); +__reExport(src_exports, require("././resolveDefaultsModeConfig"), module.exports); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + resolveDefaultsModeConfig +}); + diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js b/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js new file mode 100644 index 0000000..f23368c --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveDefaultsModeConfig = void 0; +const tslib_1 = require("tslib"); +const property_provider_1 = require("@smithy/property-provider"); +const bowser_1 = tslib_1.__importDefault(require("bowser")); +const constants_1 = require("./constants"); +const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => (0, property_provider_1.memoize)(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode === null || mode === void 0 ? void 0 : mode.toLowerCase()) { + case "auto": + return Promise.resolve(isMobileBrowser() ? "mobile" : "standard"); + case "mobile": + case "in-region": + case "cross-region": + case "standard": + case "legacy": + return Promise.resolve(mode === null || mode === void 0 ? void 0 : mode.toLocaleLowerCase()); + case undefined: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${constants_1.DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); + } +}); +exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig; +const isMobileBrowser = () => { + var _a, _b; + const parsedUA = typeof window !== "undefined" && ((_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) + ? bowser_1.default.parse(window.navigator.userAgent) + : undefined; + const platform = (_b = parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.platform) === null || _b === void 0 ? void 0 : _b.type; + return platform === "tablet" || platform === "mobile"; +}; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.native.js b/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.native.js new file mode 100644 index 0000000..fc6be33 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.native.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveDefaultsModeConfig = void 0; +const property_provider_1 = require("@smithy/property-provider"); +const constants_1 = require("./constants"); +const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => (0, property_provider_1.memoize)(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode === null || mode === void 0 ? void 0 : mode.toLowerCase()) { + case "auto": + return Promise.resolve("mobile"); + case "mobile": + case "in-region": + case "cross-region": + case "standard": + case "legacy": + return Promise.resolve(mode === null || mode === void 0 ? void 0 : mode.toLocaleLowerCase()); + case undefined: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${constants_1.DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); + } +}); +exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js b/node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js new file mode 100644 index 0000000..d58e11f --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js @@ -0,0 +1 @@ +export const DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js b/node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js new file mode 100644 index 0000000..05aa818 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js @@ -0,0 +1 @@ +export * from "./resolveDefaultsModeConfig"; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js b/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js new file mode 100644 index 0000000..940ab63 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js @@ -0,0 +1,27 @@ +import { memoize } from "@smithy/property-provider"; +import bowser from "bowser"; +import { DEFAULTS_MODE_OPTIONS } from "./constants"; +export const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => memoize(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return Promise.resolve(isMobileBrowser() ? "mobile" : "standard"); + case "mobile": + case "in-region": + case "cross-region": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case undefined: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); + } +}); +const isMobileBrowser = () => { + const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent + ? bowser.parse(window.navigator.userAgent) + : undefined; + const platform = parsedUA?.platform?.type; + return platform === "tablet" || platform === "mobile"; +}; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.native.js b/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.native.js new file mode 100644 index 0000000..3164191 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.native.js @@ -0,0 +1,19 @@ +import { memoize } from "@smithy/property-provider"; +import { DEFAULTS_MODE_OPTIONS } from "./constants"; +export const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => memoize(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return Promise.resolve("mobile"); + case "mobile": + case "in-region": + case "cross-region": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case undefined: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); + } +}); diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-types/constants.d.ts b/node_modules/@smithy/util-defaults-mode-browser/dist-types/constants.d.ts new file mode 100644 index 0000000..18dbe6c --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-types/constants.d.ts @@ -0,0 +1,12 @@ +import type { DefaultsMode } from "@smithy/smithy-client"; +import type { Provider } from "@smithy/types"; +/** + * @internal + */ +export declare const DEFAULTS_MODE_OPTIONS: string[]; +/** + * @internal + */ +export interface ResolveDefaultsModeConfigOptions { + defaultsMode?: DefaultsMode | Provider; +} diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-types/index.d.ts b/node_modules/@smithy/util-defaults-mode-browser/dist-types/index.d.ts new file mode 100644 index 0000000..003de26 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-types/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./resolveDefaultsModeConfig"; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-types/resolveDefaultsModeConfig.d.ts b/node_modules/@smithy/util-defaults-mode-browser/dist-types/resolveDefaultsModeConfig.d.ts new file mode 100644 index 0000000..e4cc1b7 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-types/resolveDefaultsModeConfig.d.ts @@ -0,0 +1,17 @@ +import type { DefaultsMode, ResolvedDefaultsMode } from "@smithy/smithy-client"; +import type { Provider } from "@smithy/types"; +/** + * @internal + */ +export interface ResolveDefaultsModeConfigOptions { + defaultsMode?: DefaultsMode | Provider; +} +/** + * Validate the defaultsMode configuration. If the value is set to "auto", it + * resolves the value to "mobile" if the app is running in a mobile browser, + * otherwise it resolves to "standard". + * + * @default "legacy" + * @internal + */ +export declare const resolveDefaultsModeConfig: ({ defaultsMode, }?: ResolveDefaultsModeConfigOptions) => Provider; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-types/resolveDefaultsModeConfig.native.d.ts b/node_modules/@smithy/util-defaults-mode-browser/dist-types/resolveDefaultsModeConfig.native.d.ts new file mode 100644 index 0000000..6c48ad8 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-types/resolveDefaultsModeConfig.native.d.ts @@ -0,0 +1,16 @@ +import type { DefaultsMode, ResolvedDefaultsMode } from "@smithy/smithy-client"; +import type { Provider } from "@smithy/types"; +/** + * @internal + */ +export interface ResolveDefaultsModeConfigOptions { + defaultsMode?: DefaultsMode | Provider; +} +/** + * Validate the defaultsMode configuration. If the value is set to "auto", it + * resolves the value to "mobile". + * + * @default "legacy" + * @internal + */ +export declare const resolveDefaultsModeConfig: ({ defaultsMode, }?: ResolveDefaultsModeConfigOptions) => Provider; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/constants.d.ts b/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/constants.d.ts new file mode 100644 index 0000000..fc88602 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/constants.d.ts @@ -0,0 +1,12 @@ +import { DefaultsMode } from "@smithy/smithy-client"; +import { Provider } from "@smithy/types"; +/** + * @internal + */ +export declare const DEFAULTS_MODE_OPTIONS: string[]; +/** + * @internal + */ +export interface ResolveDefaultsModeConfigOptions { + defaultsMode?: DefaultsMode | Provider; +} diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..4ab48b4 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./resolveDefaultsModeConfig"; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/resolveDefaultsModeConfig.d.ts b/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/resolveDefaultsModeConfig.d.ts new file mode 100644 index 0000000..d468478 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/resolveDefaultsModeConfig.d.ts @@ -0,0 +1,17 @@ +import { DefaultsMode, ResolvedDefaultsMode } from "@smithy/smithy-client"; +import { Provider } from "@smithy/types"; +/** + * @internal + */ +export interface ResolveDefaultsModeConfigOptions { + defaultsMode?: DefaultsMode | Provider; +} +/** + * Validate the defaultsMode configuration. If the value is set to "auto", it + * resolves the value to "mobile" if the app is running in a mobile browser, + * otherwise it resolves to "standard". + * + * @default "legacy" + * @internal + */ +export declare const resolveDefaultsModeConfig: ({ defaultsMode, }?: ResolveDefaultsModeConfigOptions) => Provider; diff --git a/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/resolveDefaultsModeConfig.native.d.ts b/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/resolveDefaultsModeConfig.native.d.ts new file mode 100644 index 0000000..86fe4b7 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/dist-types/ts3.4/resolveDefaultsModeConfig.native.d.ts @@ -0,0 +1,16 @@ +import { DefaultsMode, ResolvedDefaultsMode } from "@smithy/smithy-client"; +import { Provider } from "@smithy/types"; +/** + * @internal + */ +export interface ResolveDefaultsModeConfigOptions { + defaultsMode?: DefaultsMode | Provider; +} +/** + * Validate the defaultsMode configuration. If the value is set to "auto", it + * resolves the value to "mobile". + * + * @default "legacy" + * @internal + */ +export declare const resolveDefaultsModeConfig: ({ defaultsMode, }?: ResolveDefaultsModeConfigOptions) => Provider; diff --git a/node_modules/@smithy/util-defaults-mode-browser/package.json b/node_modules/@smithy/util-defaults-mode-browser/package.json new file mode 100644 index 0000000..b9e6152 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-browser/package.json @@ -0,0 +1,66 @@ +{ + "name": "@smithy/util-defaults-mode-browser", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-defaults-mode-browser", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^2.2.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">= 10.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "react-native": {}, + "browser": {}, + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-defaults-mode-node", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-defaults-mode-node" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-defaults-mode-node/LICENSE b/node_modules/@smithy/util-defaults-mode-node/LICENSE new file mode 100644 index 0000000..dd65ae0 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@smithy/util-defaults-mode-node/README.md b/node_modules/@smithy/util-defaults-mode-node/README.md new file mode 100644 index 0000000..bfae0bd --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/README.md @@ -0,0 +1,10 @@ +# @smithy/util-defaults-mode-node + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-defaults-mode-node/latest.svg)](https://www.npmjs.com/package/@smithy/util-defaults-mode-node) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-defaults-mode-node.svg)](https://www.npmjs.com/package/@smithy/util-defaults-mode-node) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-cjs/constants.js b/node_modules/@smithy/util-defaults-mode-node/dist-cjs/constants.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-cjs/constants.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-cjs/defaultsModeConfig.js b/node_modules/@smithy/util-defaults-mode-node/dist-cjs/defaultsModeConfig.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-cjs/defaultsModeConfig.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js b/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js new file mode 100644 index 0000000..fbc00a1 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js @@ -0,0 +1,119 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + resolveDefaultsModeConfig: () => resolveDefaultsModeConfig +}); +module.exports = __toCommonJS(src_exports); + +// src/resolveDefaultsModeConfig.ts +var import_config_resolver = require("@smithy/config-resolver"); +var import_node_config_provider = require("@smithy/node-config-provider"); +var import_property_provider = require("@smithy/property-provider"); + +// src/constants.ts +var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; +var AWS_REGION_ENV = "AWS_REGION"; +var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; +var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; +var IMDS_REGION_PATH = "/latest/meta-data/placement/region"; + +// src/defaultsModeConfig.ts +var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; +var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; +var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + return env[AWS_DEFAULTS_MODE_ENV]; + }, + configFileSelector: (profile) => { + return profile[AWS_DEFAULTS_MODE_CONFIG]; + }, + default: "legacy" +}; + +// src/resolveDefaultsModeConfig.ts +var resolveDefaultsModeConfig = /* @__PURE__ */ __name(({ + region = (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS), + defaultsMode = (0, import_node_config_provider.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) +} = {}) => (0, import_property_provider.memoize)(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode == null ? void 0 : mode.toLowerCase()) { + case "auto": + return resolveNodeDefaultsModeAuto(region); + case "in-region": + case "cross-region": + case "mobile": + case "standard": + case "legacy": + return Promise.resolve(mode == null ? void 0 : mode.toLocaleLowerCase()); + case void 0: + return Promise.resolve("legacy"); + default: + throw new Error( + `Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}` + ); + } +}), "resolveDefaultsModeConfig"); +var resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => { + if (clientRegion) { + const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; + const inferredRegion = await inferPhysicalRegion(); + if (!inferredRegion) { + return "standard"; + } + if (resolvedRegion === inferredRegion) { + return "in-region"; + } else { + return "cross-region"; + } + } + return "standard"; +}, "resolveNodeDefaultsModeAuto"); +var inferPhysicalRegion = /* @__PURE__ */ __name(async () => { + if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { + return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; + } + if (!process.env[ENV_IMDS_DISABLED]) { + try { + const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require("@smithy/credential-provider-imds"))); + const endpoint = await getInstanceMetadataEndpoint(); + return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); + } catch (e) { + } + } +}, "inferPhysicalRegion"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + resolveDefaultsModeConfig +}); + diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-cjs/resolveDefaultsModeConfig.js b/node_modules/@smithy/util-defaults-mode-node/dist-cjs/resolveDefaultsModeConfig.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-cjs/resolveDefaultsModeConfig.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-es/constants.js b/node_modules/@smithy/util-defaults-mode-node/dist-es/constants.js new file mode 100644 index 0000000..69361a3 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-es/constants.js @@ -0,0 +1,6 @@ +export const AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; +export const AWS_REGION_ENV = "AWS_REGION"; +export const AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; +export const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +export const DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; +export const IMDS_REGION_PATH = "/latest/meta-data/placement/region"; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-es/defaultsModeConfig.js b/node_modules/@smithy/util-defaults-mode-node/dist-es/defaultsModeConfig.js new file mode 100644 index 0000000..f43b570 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-es/defaultsModeConfig.js @@ -0,0 +1,11 @@ +const AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; +const AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; +export const NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + return env[AWS_DEFAULTS_MODE_ENV]; + }, + configFileSelector: (profile) => { + return profile[AWS_DEFAULTS_MODE_CONFIG]; + }, + default: "legacy", +}; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-es/index.js b/node_modules/@smithy/util-defaults-mode-node/dist-es/index.js new file mode 100644 index 0000000..05aa818 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-es/index.js @@ -0,0 +1 @@ +export * from "./resolveDefaultsModeConfig"; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-es/resolveDefaultsModeConfig.js b/node_modules/@smithy/util-defaults-mode-node/dist-es/resolveDefaultsModeConfig.js new file mode 100644 index 0000000..8c9d050 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-es/resolveDefaultsModeConfig.js @@ -0,0 +1,52 @@ +import { NODE_REGION_CONFIG_OPTIONS } from "@smithy/config-resolver"; +import { loadConfig } from "@smithy/node-config-provider"; +import { memoize } from "@smithy/property-provider"; +import { AWS_DEFAULT_REGION_ENV, AWS_EXECUTION_ENV, AWS_REGION_ENV, DEFAULTS_MODE_OPTIONS, ENV_IMDS_DISABLED, IMDS_REGION_PATH, } from "./constants"; +import { NODE_DEFAULTS_MODE_CONFIG_OPTIONS } from "./defaultsModeConfig"; +export const resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS), } = {}) => memoize(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return resolveNodeDefaultsModeAuto(region); + case "in-region": + case "cross-region": + case "mobile": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case undefined: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); + } +}); +const resolveNodeDefaultsModeAuto = async (clientRegion) => { + if (clientRegion) { + const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; + const inferredRegion = await inferPhysicalRegion(); + if (!inferredRegion) { + return "standard"; + } + if (resolvedRegion === inferredRegion) { + return "in-region"; + } + else { + return "cross-region"; + } + } + return "standard"; +}; +const inferPhysicalRegion = async () => { + if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { + return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; + } + if (!process.env[ENV_IMDS_DISABLED]) { + try { + const { getInstanceMetadataEndpoint, httpRequest } = await import("@smithy/credential-provider-imds"); + const endpoint = await getInstanceMetadataEndpoint(); + return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); + } + catch (e) { + } + } +}; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-types/constants.d.ts b/node_modules/@smithy/util-defaults-mode-node/dist-types/constants.d.ts new file mode 100644 index 0000000..a2db283 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-types/constants.d.ts @@ -0,0 +1,24 @@ +/** + * @internal + */ +export declare const AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; +/** + * @internal + */ +export declare const AWS_REGION_ENV = "AWS_REGION"; +/** + * @internal + */ +export declare const AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; +/** + * @internal + */ +export declare const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +/** + * @internal + */ +export declare const DEFAULTS_MODE_OPTIONS: string[]; +/** + * @internal + */ +export declare const IMDS_REGION_PATH = "/latest/meta-data/placement/region"; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-types/defaultsModeConfig.d.ts b/node_modules/@smithy/util-defaults-mode-node/dist-types/defaultsModeConfig.d.ts new file mode 100644 index 0000000..12f4dae --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-types/defaultsModeConfig.d.ts @@ -0,0 +1,6 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import type { DefaultsMode } from "@smithy/smithy-client"; +/** + * @internal + */ +export declare const NODE_DEFAULTS_MODE_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-types/index.d.ts b/node_modules/@smithy/util-defaults-mode-node/dist-types/index.d.ts new file mode 100644 index 0000000..003de26 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-types/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./resolveDefaultsModeConfig"; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-types/resolveDefaultsModeConfig.d.ts b/node_modules/@smithy/util-defaults-mode-node/dist-types/resolveDefaultsModeConfig.d.ts new file mode 100644 index 0000000..8f34371 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-types/resolveDefaultsModeConfig.d.ts @@ -0,0 +1,17 @@ +import type { DefaultsMode, ResolvedDefaultsMode } from "@smithy/smithy-client"; +import type { Provider } from "@smithy/types"; +/** + * @internal + */ +export interface ResolveDefaultsModeConfigOptions { + defaultsMode?: DefaultsMode | Provider; + region?: string | Provider; +} +/** + * Validate the defaultsMode configuration. If the value is set to "auto", it + * resolves the value to "in-region", "cross-region", or "standard". + * + * @default "legacy" + * @internal + */ +export declare const resolveDefaultsModeConfig: ({ region, defaultsMode, }?: ResolveDefaultsModeConfigOptions) => Provider; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/constants.d.ts b/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/constants.d.ts new file mode 100644 index 0000000..b847dc2 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/constants.d.ts @@ -0,0 +1,24 @@ +/** + * @internal + */ +export declare const AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; +/** + * @internal + */ +export declare const AWS_REGION_ENV = "AWS_REGION"; +/** + * @internal + */ +export declare const AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; +/** + * @internal + */ +export declare const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +/** + * @internal + */ +export declare const DEFAULTS_MODE_OPTIONS: string[]; +/** + * @internal + */ +export declare const IMDS_REGION_PATH = "/latest/meta-data/placement/region"; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/defaultsModeConfig.d.ts b/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/defaultsModeConfig.d.ts new file mode 100644 index 0000000..76c3d0d --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/defaultsModeConfig.d.ts @@ -0,0 +1,6 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +import { DefaultsMode } from "@smithy/smithy-client"; +/** + * @internal + */ +export declare const NODE_DEFAULTS_MODE_CONFIG_OPTIONS: LoadedConfigSelectors; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..4ab48b4 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/index.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export * from "./resolveDefaultsModeConfig"; diff --git a/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/resolveDefaultsModeConfig.d.ts b/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/resolveDefaultsModeConfig.d.ts new file mode 100644 index 0000000..4daa927 --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/dist-types/ts3.4/resolveDefaultsModeConfig.d.ts @@ -0,0 +1,17 @@ +import { DefaultsMode, ResolvedDefaultsMode } from "@smithy/smithy-client"; +import { Provider } from "@smithy/types"; +/** + * @internal + */ +export interface ResolveDefaultsModeConfigOptions { + defaultsMode?: DefaultsMode | Provider; + region?: string | Provider; +} +/** + * Validate the defaultsMode configuration. If the value is set to "auto", it + * resolves the value to "in-region", "cross-region", or "standard". + * + * @default "legacy" + * @internal + */ +export declare const resolveDefaultsModeConfig: ({ region, defaultsMode, }?: ResolveDefaultsModeConfigOptions) => Provider; diff --git a/node_modules/@smithy/util-defaults-mode-node/package.json b/node_modules/@smithy/util-defaults-mode-node/package.json new file mode 100644 index 0000000..4e4f80d --- /dev/null +++ b/node_modules/@smithy/util-defaults-mode-node/package.json @@ -0,0 +1,66 @@ +{ + "name": "@smithy/util-defaults-mode-node", + "version": "2.3.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-defaults-mode-node", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/config-resolver": "^2.2.0", + "@smithy/credential-provider-imds": "^2.3.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "engines": { + "node": ">= 10.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-defaults-mode-node", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-defaults-mode-node" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/LICENSE b/node_modules/@smithy/util-endpoints/LICENSE new file mode 100644 index 0000000..a1895fa --- /dev/null +++ b/node_modules/@smithy/util-endpoints/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/README.md b/node_modules/@smithy/util-endpoints/README.md new file mode 100644 index 0000000..85d60b3 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/README.md @@ -0,0 +1,10 @@ +# @smithy/util-endpoints + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-endpoints/latest.svg)](https://www.npmjs.com/package/@smithy/util-endpoints) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-endpoints.svg)](https://www.npmjs.com/package/@smithy/util-endpoints) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/debug/debugId.js b/node_modules/@smithy/util-endpoints/dist-cjs/debug/debugId.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/debug/debugId.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/debug/index.js b/node_modules/@smithy/util-endpoints/dist-cjs/debug/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/debug/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/debug/toDebugString.js b/node_modules/@smithy/util-endpoints/dist-cjs/debug/toDebugString.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/debug/toDebugString.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/getEndpointUrlConfig.js b/node_modules/@smithy/util-endpoints/dist-cjs/getEndpointUrlConfig.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/getEndpointUrlConfig.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/index.js b/node_modules/@smithy/util-endpoints/dist-cjs/index.js new file mode 100644 index 0000000..82fe188 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/index.js @@ -0,0 +1,484 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + EndpointError: () => EndpointError, + customEndpointFunctions: () => customEndpointFunctions, + isIpAddress: () => isIpAddress, + isValidHostLabel: () => isValidHostLabel, + resolveEndpoint: () => resolveEndpoint +}); +module.exports = __toCommonJS(src_exports); + +// src/lib/isIpAddress.ts +var IP_V4_REGEX = new RegExp( + `^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$` +); +var isIpAddress = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress"); + +// src/lib/isValidHostLabel.ts +var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); +var isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } + } + return true; +}, "isValidHostLabel"); + +// src/utils/customEndpointFunctions.ts +var customEndpointFunctions = {}; + +// src/debug/debugId.ts +var debugId = "endpoints"; + +// src/debug/toDebugString.ts +function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; + } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; + } + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); +} +__name(toDebugString, "toDebugString"); + +// src/types/EndpointError.ts +var _EndpointError = class _EndpointError extends Error { + constructor(message) { + super(message); + this.name = "EndpointError"; + } +}; +__name(_EndpointError, "EndpointError"); +var EndpointError = _EndpointError; + +// src/lib/booleanEquals.ts +var booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "booleanEquals"); + +// src/lib/getAttrPathList.ts +var getAttrPathList = /* @__PURE__ */ __name((path) => { + const parts = path.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError(`Path: '${path}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } else { + pathList.push(part); + } + } + return pathList; +}, "getAttrPathList"); + +// src/lib/getAttr.ts +var getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); + } else if (Array.isArray(acc)) { + return acc[parseInt(index)]; + } + return acc[index]; +}, value), "getAttr"); + +// src/lib/isSet.ts +var isSet = /* @__PURE__ */ __name((value) => value != null, "isSet"); + +// src/lib/not.ts +var not = /* @__PURE__ */ __name((value) => !value, "not"); + +// src/lib/parseURL.ts +var import_types3 = require("@smithy/types"); +var DEFAULT_PORTS = { + [import_types3.EndpointURLScheme.HTTP]: 80, + [import_types3.EndpointURLScheme.HTTPS]: 443 +}; +var parseURL = /* @__PURE__ */ __name((value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname: hostname2, port, protocol: protocol2 = "", path = "", query = {} } = value; + const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path}`); + url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&"); + return url; + } + return new URL(value); + } catch (error) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(import_types3.EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress(hostname); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp + }; +}, "parseURL"); + +// src/lib/stringEquals.ts +var stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "stringEquals"); + +// src/lib/substring.ts +var substring = /* @__PURE__ */ __name((input, start, stop, reverse) => { + if (start >= stop || input.length < stop) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); +}, "substring"); + +// src/lib/uriEncode.ts +var uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode"); + +// src/utils/endpointFunctions.ts +var endpointFunctions = { + booleanEquals, + getAttr, + isSet, + isValidHostLabel, + not, + parseURL, + stringEquals, + substring, + uriEncode +}; + +// src/utils/evaluateTemplate.ts +var evaluateTemplate = /* @__PURE__ */ __name((template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord + }; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; + } + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); + } else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); +}, "evaluateTemplate"); + +// src/utils/getReferenceValue.ts +var getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord + }; + return referenceRecord[ref]; +}, "getReferenceValue"); + +// src/utils/evaluateExpression.ts +var evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } else if (obj["fn"]) { + return callFunction(obj, options); + } else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); +}, "evaluateExpression"); + +// src/utils/callFunction.ts +var callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => { + const evaluatedArgs = argv.map( + (arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options) + ); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { + return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); + } + return endpointFunctions[fn](...evaluatedArgs); +}, "callFunction"); + +// src/utils/evaluateCondition.ts +var evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => { + var _a, _b; + if (assign && assign in options.referenceRecord) { + throw new EndpointError(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(fnArgs, options); + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, debugId, `evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); + return { + result: value === "" ? true : !!value, + ...assign != null && { toAssign: { name: assign, value } } + }; +}, "evaluateCondition"); + +// src/utils/evaluateConditions.ts +var evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => { + var _a, _b; + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord + } + }); + if (!result) { + return { result }; + } + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, debugId, `assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + return { result: true, referenceRecord: conditionsReferenceRecord }; +}, "evaluateConditions"); + +// src/utils/getEndpointHeaders.ts +var getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce( + (acc, [headerKey, headerVal]) => ({ + ...acc, + [headerKey]: headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }) + }), + {} +), "getEndpointHeaders"); + +// src/utils/getEndpointProperty.ts +var getEndpointProperty = /* @__PURE__ */ __name((property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError(`Unexpected endpoint property: ${property}`); + } + return getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); + } +}, "getEndpointProperty"); + +// src/utils/getEndpointProperties.ts +var getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce( + (acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: getEndpointProperty(propertyVal, options) + }), + {} +), "getEndpointProperties"); + +// src/utils/getEndpointUrl.ts +var getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } catch (error) { + console.error(`Failed to construct URL with ${expression}`, error); + throw error; + } + } + throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); +}, "getEndpointUrl"); + +// src/utils/evaluateEndpointRule.ts +var evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => { + var _a, _b; + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }; + const { url, properties, headers } = endpoint; + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, debugId, `Resolving endpoint from template: ${toDebugString(endpoint)}`); + return { + ...headers != void 0 && { + headers: getEndpointHeaders(headers, endpointRuleOptions) + }, + ...properties != void 0 && { + properties: getEndpointProperties(properties, endpointRuleOptions) + }, + url: getEndpointUrl(url, endpointRuleOptions) + }; +}, "evaluateEndpointRule"); + +// src/utils/evaluateErrorRule.ts +var evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => { + const { conditions, error } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + throw new EndpointError( + evaluateExpression(error, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }) + ); +}, "evaluateErrorRule"); + +// src/utils/evaluateTreeRule.ts +var evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }); +}, "evaluateTreeRule"); + +// src/utils/evaluateRules.ts +var evaluateRules = /* @__PURE__ */ __name((rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else if (rule.type === "error") { + evaluateErrorRule(rule, options); + } else if (rule.type === "tree") { + const endpointOrUndefined = evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else { + throw new EndpointError(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError(`Rules evaluation failed`); +}, "evaluateRules"); + +// src/resolveEndpoint.ts +var resolveEndpoint = /* @__PURE__ */ __name((ruleSetObject, options) => { + var _a, _b, _c, _d, _e; + const { endpointParams, logger } = options; + const { parameters, rules } = ruleSetObject; + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; + } + } + const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new EndpointError(`Missing required parameter: '${requiredParam}'`); + } + } + const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} }); + if ((_c = options.endpointParams) == null ? void 0 : _c.Endpoint) { + try { + const givenEndpoint = new URL(options.endpointParams.Endpoint); + const { protocol, port } = givenEndpoint; + endpoint.url.protocol = protocol; + endpoint.url.port = port; + } catch (e) { + } + } + (_e = (_d = options.logger) == null ? void 0 : _d.debug) == null ? void 0 : _e.call(_d, `${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; +}, "resolveEndpoint"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + isIpAddress, + isValidHostLabel, + customEndpointFunctions, + resolveEndpoint, + EndpointError +}); + diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/booleanEquals.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/booleanEquals.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/booleanEquals.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttr.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttr.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttr.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttrPathList.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttrPathList.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttrPathList.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/index.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/isIpAddress.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/isIpAddress.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/isIpAddress.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/isSet.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/isSet.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/isSet.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/isValidHostLabel.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/isValidHostLabel.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/isValidHostLabel.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/not.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/not.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/not.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/parseURL.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/parseURL.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/parseURL.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/stringEquals.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/stringEquals.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/stringEquals.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/substring.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/substring.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/substring.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/lib/uriEncode.js b/node_modules/@smithy/util-endpoints/dist-cjs/lib/uriEncode.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/lib/uriEncode.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/resolveEndpoint.js b/node_modules/@smithy/util-endpoints/dist-cjs/resolveEndpoint.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/resolveEndpoint.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointError.js b/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointError.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointError.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointFunctions.js b/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointFunctions.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointFunctions.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointRuleObject.js b/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointRuleObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointRuleObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/types/ErrorRuleObject.js b/node_modules/@smithy/util-endpoints/dist-cjs/types/ErrorRuleObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/types/ErrorRuleObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/types/RuleSetObject.js b/node_modules/@smithy/util-endpoints/dist-cjs/types/RuleSetObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/types/RuleSetObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/types/TreeRuleObject.js b/node_modules/@smithy/util-endpoints/dist-cjs/types/TreeRuleObject.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/types/TreeRuleObject.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/types/index.js b/node_modules/@smithy/util-endpoints/dist-cjs/types/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/types/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/types/shared.js b/node_modules/@smithy/util-endpoints/dist-cjs/types/shared.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/types/shared.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/callFunction.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/callFunction.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/callFunction.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/customEndpointFunctions.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/customEndpointFunctions.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/customEndpointFunctions.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/endpointFunctions.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/endpointFunctions.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/endpointFunctions.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateCondition.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateCondition.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateCondition.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateConditions.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateConditions.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateConditions.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateEndpointRule.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateEndpointRule.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateEndpointRule.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateErrorRule.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateErrorRule.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateErrorRule.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateExpression.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateExpression.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateExpression.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateRules.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateRules.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateRules.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTemplate.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTemplate.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTemplate.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTreeRule.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTreeRule.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTreeRule.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointHeaders.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointHeaders.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointHeaders.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperties.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperties.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperties.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperty.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperty.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperty.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointUrl.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointUrl.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointUrl.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/getReferenceValue.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/getReferenceValue.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/getReferenceValue.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-cjs/utils/index.js b/node_modules/@smithy/util-endpoints/dist-cjs/utils/index.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-cjs/utils/index.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js b/node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js new file mode 100644 index 0000000..0d4e27e --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js @@ -0,0 +1 @@ +export const debugId = "endpoints"; diff --git a/node_modules/@smithy/util-endpoints/dist-es/debug/index.js b/node_modules/@smithy/util-endpoints/dist-es/debug/index.js new file mode 100644 index 0000000..70d3b15 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/debug/index.js @@ -0,0 +1,2 @@ +export * from "./debugId"; +export * from "./toDebugString"; diff --git a/node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js b/node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js new file mode 100644 index 0000000..33c8fcb --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js @@ -0,0 +1,12 @@ +export function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; + } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; + } + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); +} diff --git a/node_modules/@smithy/util-endpoints/dist-es/getEndpointUrlConfig.js b/node_modules/@smithy/util-endpoints/dist-es/getEndpointUrlConfig.js new file mode 100644 index 0000000..5069030 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/getEndpointUrlConfig.js @@ -0,0 +1,21 @@ +const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; +const CONFIG_ENDPOINT_URL = "endpoint_url"; +export const getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env) => { + const serviceEndpointUrlSections = [ENV_ENDPOINT_URL, ...serviceId.split(" ").map((w) => w.toUpperCase())]; + const serviceEndpointUrl = env[serviceEndpointUrlSections.join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + configFileSelector: (profile) => { + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + default: undefined, +}); diff --git a/node_modules/@smithy/util-endpoints/dist-es/index.js b/node_modules/@smithy/util-endpoints/dist-es/index.js new file mode 100644 index 0000000..07c6fd3 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/index.js @@ -0,0 +1,5 @@ +export * from "./lib/isIpAddress"; +export * from "./lib/isValidHostLabel"; +export * from "./utils/customEndpointFunctions"; +export * from "./resolveEndpoint"; +export * from "./types"; diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js b/node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js new file mode 100644 index 0000000..730cbd3 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js @@ -0,0 +1 @@ +export const booleanEquals = (value1, value2) => value1 === value2; diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js b/node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js new file mode 100644 index 0000000..d77f165 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js @@ -0,0 +1,11 @@ +import { EndpointError } from "../types"; +import { getAttrPathList } from "./getAttrPathList"; +export const getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); + } + else if (Array.isArray(acc)) { + return acc[parseInt(index)]; + } + return acc[index]; +}, value); diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js b/node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js new file mode 100644 index 0000000..5817a2d --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js @@ -0,0 +1,25 @@ +import { EndpointError } from "../types"; +export const getAttrPathList = (path) => { + const parts = path.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError(`Path: '${path}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } + else { + pathList.push(part); + } + } + return pathList; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/index.js b/node_modules/@smithy/util-endpoints/dist-es/lib/index.js new file mode 100644 index 0000000..99a0844 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/index.js @@ -0,0 +1,9 @@ +export * from "./booleanEquals"; +export * from "./getAttr"; +export * from "./isSet"; +export * from "./isValidHostLabel"; +export * from "./not"; +export * from "./parseURL"; +export * from "./stringEquals"; +export * from "./substring"; +export * from "./uriEncode"; diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js b/node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js new file mode 100644 index 0000000..20be5a3 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js @@ -0,0 +1,2 @@ +const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); +export const isIpAddress = (value) => IP_V4_REGEX.test(value) || (value.startsWith("[") && value.endsWith("]")); diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js b/node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js new file mode 100644 index 0000000..83ccc7a --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js @@ -0,0 +1 @@ +export const isSet = (value) => value != null; diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js b/node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js new file mode 100644 index 0000000..7858598 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js @@ -0,0 +1,13 @@ +const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); +export const isValidHostLabel = (value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } + } + return true; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/not.js b/node_modules/@smithy/util-endpoints/dist-es/lib/not.js new file mode 100644 index 0000000..180e5dd --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/not.js @@ -0,0 +1 @@ +export const not = (value) => !value; diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js b/node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js new file mode 100644 index 0000000..79f9b24 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js @@ -0,0 +1,51 @@ +import { EndpointURLScheme } from "@smithy/types"; +import { isIpAddress } from "./isIpAddress"; +const DEFAULT_PORTS = { + [EndpointURLScheme.HTTP]: 80, + [EndpointURLScheme.HTTPS]: 443, +}; +export const parseURL = (value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname, port, protocol = "", path = "", query = {} } = value; + const url = new URL(`${protocol}//${hostname}${port ? `:${port}` : ""}${path}`); + url.search = Object.entries(query) + .map(([k, v]) => `${k}=${v}`) + .join("&"); + return url; + } + return new URL(value); + } + catch (error) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress(hostname); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || + (typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`)); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp, + }; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js b/node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js new file mode 100644 index 0000000..ee41426 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js @@ -0,0 +1 @@ +export const stringEquals = (value1, value2) => value1 === value2; diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/substring.js b/node_modules/@smithy/util-endpoints/dist-es/lib/substring.js new file mode 100644 index 0000000..942dde4 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/substring.js @@ -0,0 +1,9 @@ +export const substring = (input, start, stop, reverse) => { + if (start >= stop || input.length < stop) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js b/node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js new file mode 100644 index 0000000..ae226dc --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js @@ -0,0 +1 @@ +export const uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`); diff --git a/node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js b/node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js new file mode 100644 index 0000000..67e4784 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js @@ -0,0 +1,37 @@ +import { debugId, toDebugString } from "./debug"; +import { EndpointError } from "./types"; +import { evaluateRules } from "./utils"; +export const resolveEndpoint = (ruleSetObject, options) => { + const { endpointParams, logger } = options; + const { parameters, rules } = ruleSetObject; + options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters) + .filter(([, v]) => v.default != null) + .map(([k, v]) => [k, v.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; + } + } + const requiredParams = Object.entries(parameters) + .filter(([, v]) => v.required) + .map(([k]) => k); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new EndpointError(`Missing required parameter: '${requiredParam}'`); + } + } + const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} }); + if (options.endpointParams?.Endpoint) { + try { + const givenEndpoint = new URL(options.endpointParams.Endpoint); + const { protocol, port } = givenEndpoint; + endpoint.url.protocol = protocol; + endpoint.url.port = port; + } + catch (e) { + } + } + options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js b/node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js new file mode 100644 index 0000000..1ce597d --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js @@ -0,0 +1,6 @@ +export class EndpointError extends Error { + constructor(message) { + super(message); + this.name = "EndpointError"; + } +} diff --git a/node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js b/node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js b/node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js b/node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js b/node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js b/node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/types/index.js b/node_modules/@smithy/util-endpoints/dist-es/types/index.js new file mode 100644 index 0000000..a49f984 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/types/index.js @@ -0,0 +1,7 @@ +export * from "./EndpointError"; +export * from "./EndpointFunctions"; +export * from "./EndpointRuleObject"; +export * from "./ErrorRuleObject"; +export * from "./RuleSetObject"; +export * from "./TreeRuleObject"; +export * from "./shared"; diff --git a/node_modules/@smithy/util-endpoints/dist-es/types/shared.js b/node_modules/@smithy/util-endpoints/dist-es/types/shared.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/types/shared.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js b/node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js new file mode 100644 index 0000000..bf0747a --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js @@ -0,0 +1,11 @@ +import { customEndpointFunctions } from "./customEndpointFunctions"; +import { endpointFunctions } from "./endpointFunctions"; +import { evaluateExpression } from "./evaluateExpression"; +export const callFunction = ({ fn, argv }, options) => { + const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options)); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { + return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); + } + return endpointFunctions[fn](...evaluatedArgs); +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js b/node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js new file mode 100644 index 0000000..0c26493 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js @@ -0,0 +1 @@ +export const customEndpointFunctions = {}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js b/node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js new file mode 100644 index 0000000..e2215ff --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js @@ -0,0 +1,12 @@ +import { booleanEquals, getAttr, isSet, isValidHostLabel, not, parseURL, stringEquals, substring, uriEncode, } from "../lib"; +export const endpointFunctions = { + booleanEquals, + getAttr, + isSet, + isValidHostLabel, + not, + parseURL, + stringEquals, + substring, + uriEncode, +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js new file mode 100644 index 0000000..279d0ad --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js @@ -0,0 +1,14 @@ +import { debugId, toDebugString } from "../debug"; +import { EndpointError } from "../types"; +import { callFunction } from "./callFunction"; +export const evaluateCondition = ({ assign, ...fnArgs }, options) => { + if (assign && assign in options.referenceRecord) { + throw new EndpointError(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(fnArgs, options); + options.logger?.debug?.(debugId, `evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); + return { + result: value === "" ? true : !!value, + ...(assign != null && { toAssign: { name: assign, value } }), + }; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js new file mode 100644 index 0000000..2890d4a --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js @@ -0,0 +1,22 @@ +import { debugId, toDebugString } from "../debug"; +import { evaluateCondition } from "./evaluateCondition"; +export const evaluateConditions = (conditions = [], options) => { + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord, + }, + }); + if (!result) { + return { result }; + } + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + options.logger?.debug?.(debugId, `assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + return { result: true, referenceRecord: conditionsReferenceRecord }; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js new file mode 100644 index 0000000..5674429 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js @@ -0,0 +1,27 @@ +import { debugId, toDebugString } from "../debug"; +import { evaluateConditions } from "./evaluateConditions"; +import { getEndpointHeaders } from "./getEndpointHeaders"; +import { getEndpointProperties } from "./getEndpointProperties"; +import { getEndpointUrl } from "./getEndpointUrl"; +export const evaluateEndpointRule = (endpointRule, options) => { + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + }; + const { url, properties, headers } = endpoint; + options.logger?.debug?.(debugId, `Resolving endpoint from template: ${toDebugString(endpoint)}`); + return { + ...(headers != undefined && { + headers: getEndpointHeaders(headers, endpointRuleOptions), + }), + ...(properties != undefined && { + properties: getEndpointProperties(properties, endpointRuleOptions), + }), + url: getEndpointUrl(url, endpointRuleOptions), + }; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js new file mode 100644 index 0000000..1a57860 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js @@ -0,0 +1,14 @@ +import { EndpointError } from "../types"; +import { evaluateConditions } from "./evaluateConditions"; +import { evaluateExpression } from "./evaluateExpression"; +export const evaluateErrorRule = (errorRule, options) => { + const { conditions, error } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + throw new EndpointError(evaluateExpression(error, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + })); +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js new file mode 100644 index 0000000..7f69658 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js @@ -0,0 +1,16 @@ +import { EndpointError } from "../types"; +import { callFunction } from "./callFunction"; +import { evaluateTemplate } from "./evaluateTemplate"; +import { getReferenceValue } from "./getReferenceValue"; +export const evaluateExpression = (obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } + else if (obj["fn"]) { + return callFunction(obj, options); + } + else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js new file mode 100644 index 0000000..58a40a0 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js @@ -0,0 +1,27 @@ +import { EndpointError } from "../types"; +import { evaluateEndpointRule } from "./evaluateEndpointRule"; +import { evaluateErrorRule } from "./evaluateErrorRule"; +import { evaluateTreeRule } from "./evaluateTreeRule"; +export const evaluateRules = (rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } + else if (rule.type === "error") { + evaluateErrorRule(rule, options); + } + else if (rule.type === "tree") { + const endpointOrUndefined = evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } + else { + throw new EndpointError(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError(`Rules evaluation failed`); +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js new file mode 100644 index 0000000..7005809 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js @@ -0,0 +1,36 @@ +import { getAttr } from "../lib"; +export const evaluateTemplate = (template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord, + }; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; + } + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); + } + else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTreeRule.js b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTreeRule.js new file mode 100644 index 0000000..427c1fa --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTreeRule.js @@ -0,0 +1,13 @@ +import { evaluateConditions } from "./evaluateConditions"; +import { evaluateRules } from "./evaluateRules"; +export const evaluateTreeRule = (treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + }); +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js b/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js new file mode 100644 index 0000000..f94cf55 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js @@ -0,0 +1,12 @@ +import { EndpointError } from "../types"; +import { evaluateExpression } from "./evaluateExpression"; +export const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({ + ...acc, + [headerKey]: headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }), +}), {}); diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js b/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js new file mode 100644 index 0000000..e7afe88 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js @@ -0,0 +1,5 @@ +import { getEndpointProperty } from "./getEndpointProperty"; +export const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: getEndpointProperty(propertyVal, options), +}), {}); diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperty.js b/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperty.js new file mode 100644 index 0000000..0600969 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperty.js @@ -0,0 +1,21 @@ +import { EndpointError } from "../types"; +import { evaluateTemplate } from "./evaluateTemplate"; +import { getEndpointProperties } from "./getEndpointProperties"; +export const getEndpointProperty = (property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError(`Unexpected endpoint property: ${property}`); + } + return getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); + } +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js b/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js new file mode 100644 index 0000000..8f1301e --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js @@ -0,0 +1,15 @@ +import { EndpointError } from "../types"; +import { evaluateExpression } from "./evaluateExpression"; +export const getEndpointUrl = (endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } + catch (error) { + console.error(`Failed to construct URL with ${expression}`, error); + throw error; + } + } + throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js b/node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js new file mode 100644 index 0000000..759f4d4 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js @@ -0,0 +1,7 @@ +export const getReferenceValue = ({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord, + }; + return referenceRecord[ref]; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-es/utils/index.js b/node_modules/@smithy/util-endpoints/dist-es/utils/index.js new file mode 100644 index 0000000..b571d02 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-es/utils/index.js @@ -0,0 +1,2 @@ +export * from "./customEndpointFunctions"; +export * from "./evaluateRules"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/debug/debugId.d.ts b/node_modules/@smithy/util-endpoints/dist-types/debug/debugId.d.ts new file mode 100644 index 0000000..d39f408 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/debug/debugId.d.ts @@ -0,0 +1 @@ +export declare const debugId = "endpoints"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/debug/index.d.ts b/node_modules/@smithy/util-endpoints/dist-types/debug/index.d.ts new file mode 100644 index 0000000..70d3b15 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/debug/index.d.ts @@ -0,0 +1,2 @@ +export * from "./debugId"; +export * from "./toDebugString"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/debug/toDebugString.d.ts b/node_modules/@smithy/util-endpoints/dist-types/debug/toDebugString.d.ts new file mode 100644 index 0000000..6bf1d3a --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/debug/toDebugString.d.ts @@ -0,0 +1,9 @@ +import { EndpointParameters, EndpointV2 } from "@smithy/types"; +import { GetAttrValue } from "../lib"; +import { EndpointObject, FunctionObject, FunctionReturn } from "../types"; +export declare function toDebugString(input: EndpointParameters): string; +export declare function toDebugString(input: EndpointV2): string; +export declare function toDebugString(input: GetAttrValue): string; +export declare function toDebugString(input: FunctionObject): string; +export declare function toDebugString(input: FunctionReturn): string; +export declare function toDebugString(input: EndpointObject): string; diff --git a/node_modules/@smithy/util-endpoints/dist-types/getEndpointUrlConfig.d.ts b/node_modules/@smithy/util-endpoints/dist-types/getEndpointUrlConfig.d.ts new file mode 100644 index 0000000..0971010 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/getEndpointUrlConfig.d.ts @@ -0,0 +1,2 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +export declare const getEndpointUrlConfig: (serviceId: string) => LoadedConfigSelectors; diff --git a/node_modules/@smithy/util-endpoints/dist-types/index.d.ts b/node_modules/@smithy/util-endpoints/dist-types/index.d.ts new file mode 100644 index 0000000..07c6fd3 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/index.d.ts @@ -0,0 +1,5 @@ +export * from "./lib/isIpAddress"; +export * from "./lib/isValidHostLabel"; +export * from "./utils/customEndpointFunctions"; +export * from "./resolveEndpoint"; +export * from "./types"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/booleanEquals.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/booleanEquals.d.ts new file mode 100644 index 0000000..7eac561 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/booleanEquals.d.ts @@ -0,0 +1,5 @@ +/** + * Evaluates two boolean values value1 and value2 for equality and returns + * true if both values match. + */ +export declare const booleanEquals: (value1: boolean, value2: boolean) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/getAttr.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/getAttr.d.ts new file mode 100644 index 0000000..a8088c5 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/getAttr.d.ts @@ -0,0 +1,7 @@ +export type GetAttrValue = string | boolean | { + [key: string]: GetAttrValue; +} | Array; +/** + * Returns value corresponding to pathing string for an array or object. + */ +export declare const getAttr: (value: GetAttrValue, path: string) => GetAttrValue; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/getAttrPathList.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/getAttrPathList.d.ts new file mode 100644 index 0000000..e6c4979 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/getAttrPathList.d.ts @@ -0,0 +1,4 @@ +/** + * Parses path as a getAttr expression, returning a list of strings. + */ +export declare const getAttrPathList: (path: string) => Array; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/index.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/index.d.ts new file mode 100644 index 0000000..99a0844 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/index.d.ts @@ -0,0 +1,9 @@ +export * from "./booleanEquals"; +export * from "./getAttr"; +export * from "./isSet"; +export * from "./isValidHostLabel"; +export * from "./not"; +export * from "./parseURL"; +export * from "./stringEquals"; +export * from "./substring"; +export * from "./uriEncode"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/isIpAddress.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/isIpAddress.d.ts new file mode 100644 index 0000000..28aba97 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/isIpAddress.d.ts @@ -0,0 +1,4 @@ +/** + * Validates if the provided value is an IP address. + */ +export declare const isIpAddress: (value: string) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/isSet.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/isSet.d.ts new file mode 100644 index 0000000..7c74ec5 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/isSet.d.ts @@ -0,0 +1,5 @@ +/** + * Evaluates whether a value is set (aka not null or undefined). + * Returns true if the value is set, otherwise returns false. + */ +export declare const isSet: (value: unknown) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/isValidHostLabel.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/isValidHostLabel.d.ts new file mode 100644 index 0000000..c05f9e9 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/isValidHostLabel.d.ts @@ -0,0 +1,7 @@ +/** + * Evaluates whether one or more string values are valid host labels per RFC 1123. + * + * If allowSubDomains is true, then the provided value may be zero or more dotted + * subdomains which are each validated per RFC 1123. + */ +export declare const isValidHostLabel: (value: string, allowSubDomains?: boolean) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/not.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/not.d.ts new file mode 100644 index 0000000..1e8e728 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/not.d.ts @@ -0,0 +1,5 @@ +/** + * Performs logical negation on the provided boolean value, + * returning the negated value. + */ +export declare const not: (value: boolean) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/parseURL.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/parseURL.d.ts new file mode 100644 index 0000000..3e0dce3 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/parseURL.d.ts @@ -0,0 +1,5 @@ +import { Endpoint, EndpointURL } from "@smithy/types"; +/** + * Parses a string, URL, or Endpoint into it’s Endpoint URL components. + */ +export declare const parseURL: (value: string | URL | Endpoint) => EndpointURL | null; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/stringEquals.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/stringEquals.d.ts new file mode 100644 index 0000000..bdfc98d --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/stringEquals.d.ts @@ -0,0 +1,5 @@ +/** + * Evaluates two string values value1 and value2 for equality and returns + * true if both values match. + */ +export declare const stringEquals: (value1: string, value2: string) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/substring.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/substring.d.ts new file mode 100644 index 0000000..5d70035 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/substring.d.ts @@ -0,0 +1,7 @@ +/** + * Computes the substring of a given string, conditionally indexing from the end of the string. + * When the string is long enough to fully include the substring, return the substring. + * Otherwise, return None. The start index is inclusive and the stop index is exclusive. + * The length of the returned string will always be stop-start. + */ +export declare const substring: (input: string, start: number, stop: number, reverse: boolean) => string | null; diff --git a/node_modules/@smithy/util-endpoints/dist-types/lib/uriEncode.d.ts b/node_modules/@smithy/util-endpoints/dist-types/lib/uriEncode.d.ts new file mode 100644 index 0000000..c2a720c --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/lib/uriEncode.d.ts @@ -0,0 +1,4 @@ +/** + * Performs percent-encoding per RFC3986 section 2.1 + */ +export declare const uriEncode: (value: string) => string; diff --git a/node_modules/@smithy/util-endpoints/dist-types/resolveEndpoint.d.ts b/node_modules/@smithy/util-endpoints/dist-types/resolveEndpoint.d.ts new file mode 100644 index 0000000..b02188b --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/resolveEndpoint.d.ts @@ -0,0 +1,6 @@ +import { EndpointV2 } from "@smithy/types"; +import { EndpointResolverOptions, RuleSetObject } from "./types"; +/** + * Resolves an endpoint URL by processing the endpoints ruleset and options. + */ +export declare const resolveEndpoint: (ruleSetObject: RuleSetObject, options: EndpointResolverOptions) => EndpointV2; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/debug/debugId.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/debug/debugId.d.ts new file mode 100644 index 0000000..f674b8a --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/debug/debugId.d.ts @@ -0,0 +1 @@ +export declare const debugId = "endpoints"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/debug/index.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/debug/index.d.ts new file mode 100644 index 0000000..1eb0bf4 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/debug/index.d.ts @@ -0,0 +1,2 @@ +export * from "./debugId"; +export * from "./toDebugString"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/debug/toDebugString.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/debug/toDebugString.d.ts new file mode 100644 index 0000000..e295ca0 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/debug/toDebugString.d.ts @@ -0,0 +1,9 @@ +import { EndpointParameters, EndpointV2 } from "@smithy/types"; +import { GetAttrValue } from "../lib"; +import { EndpointObject, FunctionObject, FunctionReturn } from "../types"; +export declare function toDebugString(input: EndpointParameters): string; +export declare function toDebugString(input: EndpointV2): string; +export declare function toDebugString(input: GetAttrValue): string; +export declare function toDebugString(input: FunctionObject): string; +export declare function toDebugString(input: FunctionReturn): string; +export declare function toDebugString(input: EndpointObject): string; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/getEndpointUrlConfig.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/getEndpointUrlConfig.d.ts new file mode 100644 index 0000000..7b9d068 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/getEndpointUrlConfig.d.ts @@ -0,0 +1,2 @@ +import { LoadedConfigSelectors } from "@smithy/node-config-provider"; +export declare const getEndpointUrlConfig: (serviceId: string) => LoadedConfigSelectors; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..db9abb0 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/index.d.ts @@ -0,0 +1,5 @@ +export * from "./lib/isIpAddress"; +export * from "./lib/isValidHostLabel"; +export * from "./utils/customEndpointFunctions"; +export * from "./resolveEndpoint"; +export * from "./types"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/booleanEquals.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/booleanEquals.d.ts new file mode 100644 index 0000000..7aec001 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/booleanEquals.d.ts @@ -0,0 +1,5 @@ +/** + * Evaluates two boolean values value1 and value2 for equality and returns + * true if both values match. + */ +export declare const booleanEquals: (value1: boolean, value2: boolean) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/getAttr.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/getAttr.d.ts new file mode 100644 index 0000000..e2f5b43 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/getAttr.d.ts @@ -0,0 +1,7 @@ +export type GetAttrValue = string | boolean | { + [key: string]: GetAttrValue; +} | Array; +/** + * Returns value corresponding to pathing string for an array or object. + */ +export declare const getAttr: (value: GetAttrValue, path: string) => GetAttrValue; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/getAttrPathList.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/getAttrPathList.d.ts new file mode 100644 index 0000000..93bbf31 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/getAttrPathList.d.ts @@ -0,0 +1,4 @@ +/** + * Parses path as a getAttr expression, returning a list of strings. + */ +export declare const getAttrPathList: (path: string) => Array; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/index.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/index.d.ts new file mode 100644 index 0000000..a28ecaa --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/index.d.ts @@ -0,0 +1,9 @@ +export * from "./booleanEquals"; +export * from "./getAttr"; +export * from "./isSet"; +export * from "./isValidHostLabel"; +export * from "./not"; +export * from "./parseURL"; +export * from "./stringEquals"; +export * from "./substring"; +export * from "./uriEncode"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/isIpAddress.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/isIpAddress.d.ts new file mode 100644 index 0000000..9f37893 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/isIpAddress.d.ts @@ -0,0 +1,4 @@ +/** + * Validates if the provided value is an IP address. + */ +export declare const isIpAddress: (value: string) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/isSet.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/isSet.d.ts new file mode 100644 index 0000000..6b102dd --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/isSet.d.ts @@ -0,0 +1,5 @@ +/** + * Evaluates whether a value is set (aka not null or undefined). + * Returns true if the value is set, otherwise returns false. + */ +export declare const isSet: (value: unknown) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/isValidHostLabel.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/isValidHostLabel.d.ts new file mode 100644 index 0000000..01f7eb9 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/isValidHostLabel.d.ts @@ -0,0 +1,7 @@ +/** + * Evaluates whether one or more string values are valid host labels per RFC 1123. + * + * If allowSubDomains is true, then the provided value may be zero or more dotted + * subdomains which are each validated per RFC 1123. + */ +export declare const isValidHostLabel: (value: string, allowSubDomains?: boolean) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/not.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/not.d.ts new file mode 100644 index 0000000..b4e84ac --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/not.d.ts @@ -0,0 +1,5 @@ +/** + * Performs logical negation on the provided boolean value, + * returning the negated value. + */ +export declare const not: (value: boolean) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/parseURL.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/parseURL.d.ts new file mode 100644 index 0000000..0f54066 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/parseURL.d.ts @@ -0,0 +1,5 @@ +import { Endpoint, EndpointURL } from "@smithy/types"; +/** + * Parses a string, URL, or Endpoint into it’s Endpoint URL components. + */ +export declare const parseURL: (value: string | URL | Endpoint) => EndpointURL | null; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/stringEquals.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/stringEquals.d.ts new file mode 100644 index 0000000..9acb10c --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/stringEquals.d.ts @@ -0,0 +1,5 @@ +/** + * Evaluates two string values value1 and value2 for equality and returns + * true if both values match. + */ +export declare const stringEquals: (value1: string, value2: string) => boolean; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/substring.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/substring.d.ts new file mode 100644 index 0000000..a99025c --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/substring.d.ts @@ -0,0 +1,7 @@ +/** + * Computes the substring of a given string, conditionally indexing from the end of the string. + * When the string is long enough to fully include the substring, return the substring. + * Otherwise, return None. The start index is inclusive and the stop index is exclusive. + * The length of the returned string will always be stop-start. + */ +export declare const substring: (input: string, start: number, stop: number, reverse: boolean) => string | null; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/uriEncode.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/uriEncode.d.ts new file mode 100644 index 0000000..acb75bb --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/lib/uriEncode.d.ts @@ -0,0 +1,4 @@ +/** + * Performs percent-encoding per RFC3986 section 2.1 + */ +export declare const uriEncode: (value: string) => string; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/resolveEndpoint.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/resolveEndpoint.d.ts new file mode 100644 index 0000000..5469fa2 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/resolveEndpoint.d.ts @@ -0,0 +1,6 @@ +import { EndpointV2 } from "@smithy/types"; +import { EndpointResolverOptions, RuleSetObject } from "./types"; +/** + * Resolves an endpoint URL by processing the endpoints ruleset and options. + */ +export declare const resolveEndpoint: (ruleSetObject: RuleSetObject, options: EndpointResolverOptions) => EndpointV2; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/EndpointError.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/EndpointError.d.ts new file mode 100644 index 0000000..4f3c538 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/EndpointError.d.ts @@ -0,0 +1,3 @@ +export declare class EndpointError extends Error { + constructor(message: string); +} diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/EndpointFunctions.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/EndpointFunctions.d.ts new file mode 100644 index 0000000..7b3cf42 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/EndpointFunctions.d.ts @@ -0,0 +1,2 @@ +import { FunctionReturn } from "./shared"; +export type EndpointFunctions = Record FunctionReturn>; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/EndpointRuleObject.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/EndpointRuleObject.d.ts new file mode 100644 index 0000000..436001e --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/EndpointRuleObject.d.ts @@ -0,0 +1,5 @@ +import { EndpointObject as __EndpointObject, EndpointObjectHeaders as __EndpointObjectHeaders, EndpointObjectProperties as __EndpointObjectProperties, EndpointRuleObject as __EndpointRuleObject } from "@smithy/types"; +export type EndpointObjectProperties = __EndpointObjectProperties; +export type EndpointObjectHeaders = __EndpointObjectHeaders; +export type EndpointObject = __EndpointObject; +export type EndpointRuleObject = __EndpointRuleObject; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/ErrorRuleObject.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/ErrorRuleObject.d.ts new file mode 100644 index 0000000..1540835 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/ErrorRuleObject.d.ts @@ -0,0 +1,2 @@ +import { ErrorRuleObject as __ErrorRuleObject } from "@smithy/types"; +export type ErrorRuleObject = __ErrorRuleObject; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/RuleSetObject.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/RuleSetObject.d.ts new file mode 100644 index 0000000..227b269 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/RuleSetObject.d.ts @@ -0,0 +1,4 @@ +import { DeprecatedObject as __DeprecatedObject, ParameterObject as __ParameterObject, RuleSetObject as __RuleSetObject } from "@smithy/types"; +export type DeprecatedObject = __DeprecatedObject; +export type ParameterObject = __ParameterObject; +export type RuleSetObject = __RuleSetObject; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/TreeRuleObject.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/TreeRuleObject.d.ts new file mode 100644 index 0000000..ecdb6b4 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/TreeRuleObject.d.ts @@ -0,0 +1,3 @@ +import { RuleSetRules as __RuleSetRules, TreeRuleObject as __TreeRuleObject } from "@smithy/types"; +export type RuleSetRules = __RuleSetRules; +export type TreeRuleObject = __TreeRuleObject; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/index.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/index.d.ts new file mode 100644 index 0000000..f89fb63 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/index.d.ts @@ -0,0 +1,7 @@ +export * from "./EndpointError"; +export * from "./EndpointFunctions"; +export * from "./EndpointRuleObject"; +export * from "./ErrorRuleObject"; +export * from "./RuleSetObject"; +export * from "./TreeRuleObject"; +export * from "./shared"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/shared.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/shared.d.ts new file mode 100644 index 0000000..052dcf3 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/types/shared.d.ts @@ -0,0 +1,25 @@ +import { EndpointARN, EndpointPartition, Logger } from "@smithy/types"; +export type ReferenceObject = { + ref: string; +}; +export type FunctionObject = { + fn: string; + argv: FunctionArgv; +}; +export type FunctionArgv = Array; +export type FunctionReturn = string | boolean | number | EndpointARN | EndpointPartition | { + [key: string]: FunctionReturn; +} | null; +export type ConditionObject = FunctionObject & { + assign?: string; +}; +export type Expression = string | ReferenceObject | FunctionObject; +export type EndpointParams = Record; +export type EndpointResolverOptions = { + endpointParams: EndpointParams; + logger?: Logger; +}; +export type ReferenceRecord = Record; +export type EvaluateOptions = EndpointResolverOptions & { + referenceRecord: ReferenceRecord; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/callFunction.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/callFunction.d.ts new file mode 100644 index 0000000..bfdf543 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/callFunction.d.ts @@ -0,0 +1,2 @@ +import { EvaluateOptions, FunctionObject, FunctionReturn } from "../types"; +export declare const callFunction: ({ fn, argv }: FunctionObject, options: EvaluateOptions) => FunctionReturn; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/customEndpointFunctions.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/customEndpointFunctions.d.ts new file mode 100644 index 0000000..1cd2240 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/customEndpointFunctions.d.ts @@ -0,0 +1,4 @@ +import { EndpointFunctions } from "../types/EndpointFunctions"; +export declare const customEndpointFunctions: { + [key: string]: EndpointFunctions; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/endpointFunctions.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/endpointFunctions.d.ts new file mode 100644 index 0000000..cde57d1 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/endpointFunctions.d.ts @@ -0,0 +1,11 @@ +export declare const endpointFunctions: { + booleanEquals: (value1: boolean, value2: boolean) => boolean; + getAttr: (value: import("../lib").GetAttrValue, path: string) => import("../lib").GetAttrValue; + isSet: (value: unknown) => boolean; + isValidHostLabel: (value: string, allowSubDomains?: boolean) => boolean; + not: (value: boolean) => boolean; + parseURL: (value: string | URL | import("@smithy/types").Endpoint) => import("@smithy/types").EndpointURL | null; + stringEquals: (value1: string, value2: string) => boolean; + substring: (input: string, start: number, stop: number, reverse: boolean) => string | null; + uriEncode: (value: string) => string; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateCondition.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateCondition.d.ts new file mode 100644 index 0000000..ba2c0be --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateCondition.d.ts @@ -0,0 +1,8 @@ +import { ConditionObject, EvaluateOptions } from "../types"; +export declare const evaluateCondition: ({ assign, ...fnArgs }: ConditionObject, options: EvaluateOptions) => { + toAssign?: { + name: string; + value: import("../types").FunctionReturn; + } | undefined; + result: boolean; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateConditions.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateConditions.d.ts new file mode 100644 index 0000000..a7fbc5f --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateConditions.d.ts @@ -0,0 +1,8 @@ +import { ConditionObject, EvaluateOptions, FunctionReturn } from "../types"; +export declare const evaluateConditions: (conditions: ConditionObject[] | undefined, options: EvaluateOptions) => { + result: false; + referenceRecord?: undefined; +} | { + result: boolean; + referenceRecord: Record; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateEndpointRule.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateEndpointRule.d.ts new file mode 100644 index 0000000..32f23ff --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateEndpointRule.d.ts @@ -0,0 +1,3 @@ +import { EndpointV2 } from "@smithy/types"; +import { EndpointRuleObject, EvaluateOptions } from "../types"; +export declare const evaluateEndpointRule: (endpointRule: EndpointRuleObject, options: EvaluateOptions) => EndpointV2 | undefined; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateErrorRule.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateErrorRule.d.ts new file mode 100644 index 0000000..eef15e3 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateErrorRule.d.ts @@ -0,0 +1,2 @@ +import { ErrorRuleObject, EvaluateOptions } from "../types"; +export declare const evaluateErrorRule: (errorRule: ErrorRuleObject, options: EvaluateOptions) => void; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateExpression.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateExpression.d.ts new file mode 100644 index 0000000..8bbd358 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateExpression.d.ts @@ -0,0 +1,2 @@ +import { EvaluateOptions, Expression } from "../types"; +export declare const evaluateExpression: (obj: Expression, keyName: string, options: EvaluateOptions) => import("../types").FunctionReturn; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateRules.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateRules.d.ts new file mode 100644 index 0000000..a37fe07 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateRules.d.ts @@ -0,0 +1,3 @@ +import { EndpointV2 } from "@smithy/types"; +import { EvaluateOptions } from "../types"; +export declare const evaluateRules: (rules: import("@smithy/types").RuleSetRules, options: EvaluateOptions) => EndpointV2; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateTemplate.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateTemplate.d.ts new file mode 100644 index 0000000..e6ae9c3 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateTemplate.d.ts @@ -0,0 +1,2 @@ +import { EvaluateOptions } from "../types"; +export declare const evaluateTemplate: (template: string, options: EvaluateOptions) => string; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateTreeRule.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateTreeRule.d.ts new file mode 100644 index 0000000..8518f7b --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateTreeRule.d.ts @@ -0,0 +1,3 @@ +import { EndpointV2 } from "@smithy/types"; +import { EvaluateOptions, TreeRuleObject } from "../types"; +export declare const evaluateTreeRule: (treeRule: TreeRuleObject, options: EvaluateOptions) => EndpointV2 | undefined; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointHeaders.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointHeaders.d.ts new file mode 100644 index 0000000..2775159 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointHeaders.d.ts @@ -0,0 +1,2 @@ +import { EndpointObjectHeaders, EvaluateOptions } from "../types"; +export declare const getEndpointHeaders: (headers: EndpointObjectHeaders, options: EvaluateOptions) => {}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointProperties.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointProperties.d.ts new file mode 100644 index 0000000..944b39d --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointProperties.d.ts @@ -0,0 +1,2 @@ +import { EndpointObjectProperties, EvaluateOptions } from "../types"; +export declare const getEndpointProperties: (properties: EndpointObjectProperties, options: EvaluateOptions) => {}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointProperty.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointProperty.d.ts new file mode 100644 index 0000000..5002377 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointProperty.d.ts @@ -0,0 +1,3 @@ +import { EndpointObjectProperty } from "@smithy/types"; +import { EvaluateOptions } from "../types"; +export declare const getEndpointProperty: (property: EndpointObjectProperty, options: EvaluateOptions) => EndpointObjectProperty; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointUrl.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointUrl.d.ts new file mode 100644 index 0000000..9c93422 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointUrl.d.ts @@ -0,0 +1,2 @@ +import { EvaluateOptions, Expression } from "../types"; +export declare const getEndpointUrl: (endpointUrl: Expression, options: EvaluateOptions) => URL; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getReferenceValue.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getReferenceValue.d.ts new file mode 100644 index 0000000..2ebfda3 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getReferenceValue.d.ts @@ -0,0 +1,2 @@ +import { EvaluateOptions, ReferenceObject } from "../types"; +export declare const getReferenceValue: ({ ref }: ReferenceObject, options: EvaluateOptions) => import("../types").FunctionReturn; diff --git a/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/index.d.ts b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/index.d.ts new file mode 100644 index 0000000..bd481df --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/index.d.ts @@ -0,0 +1,2 @@ +export * from "./customEndpointFunctions"; +export * from "./evaluateRules"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/types/EndpointError.d.ts b/node_modules/@smithy/util-endpoints/dist-types/types/EndpointError.d.ts new file mode 100644 index 0000000..89132f2 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/types/EndpointError.d.ts @@ -0,0 +1,3 @@ +export declare class EndpointError extends Error { + constructor(message: string); +} diff --git a/node_modules/@smithy/util-endpoints/dist-types/types/EndpointFunctions.d.ts b/node_modules/@smithy/util-endpoints/dist-types/types/EndpointFunctions.d.ts new file mode 100644 index 0000000..33b1a0b --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/types/EndpointFunctions.d.ts @@ -0,0 +1,2 @@ +import { FunctionReturn } from "./shared"; +export type EndpointFunctions = Record FunctionReturn>; diff --git a/node_modules/@smithy/util-endpoints/dist-types/types/EndpointRuleObject.d.ts b/node_modules/@smithy/util-endpoints/dist-types/types/EndpointRuleObject.d.ts new file mode 100644 index 0000000..d24545f --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/types/EndpointRuleObject.d.ts @@ -0,0 +1,5 @@ +import { EndpointObject as __EndpointObject, EndpointObjectHeaders as __EndpointObjectHeaders, EndpointObjectProperties as __EndpointObjectProperties, EndpointRuleObject as __EndpointRuleObject } from "@smithy/types"; +export type EndpointObjectProperties = __EndpointObjectProperties; +export type EndpointObjectHeaders = __EndpointObjectHeaders; +export type EndpointObject = __EndpointObject; +export type EndpointRuleObject = __EndpointRuleObject; diff --git a/node_modules/@smithy/util-endpoints/dist-types/types/ErrorRuleObject.d.ts b/node_modules/@smithy/util-endpoints/dist-types/types/ErrorRuleObject.d.ts new file mode 100644 index 0000000..51fe138 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/types/ErrorRuleObject.d.ts @@ -0,0 +1,2 @@ +import { ErrorRuleObject as __ErrorRuleObject } from "@smithy/types"; +export type ErrorRuleObject = __ErrorRuleObject; diff --git a/node_modules/@smithy/util-endpoints/dist-types/types/RuleSetObject.d.ts b/node_modules/@smithy/util-endpoints/dist-types/types/RuleSetObject.d.ts new file mode 100644 index 0000000..3335b80 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/types/RuleSetObject.d.ts @@ -0,0 +1,4 @@ +import { DeprecatedObject as __DeprecatedObject, ParameterObject as __ParameterObject, RuleSetObject as __RuleSetObject } from "@smithy/types"; +export type DeprecatedObject = __DeprecatedObject; +export type ParameterObject = __ParameterObject; +export type RuleSetObject = __RuleSetObject; diff --git a/node_modules/@smithy/util-endpoints/dist-types/types/TreeRuleObject.d.ts b/node_modules/@smithy/util-endpoints/dist-types/types/TreeRuleObject.d.ts new file mode 100644 index 0000000..3d902d0 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/types/TreeRuleObject.d.ts @@ -0,0 +1,3 @@ +import { RuleSetRules as __RuleSetRules, TreeRuleObject as __TreeRuleObject } from "@smithy/types"; +export type RuleSetRules = __RuleSetRules; +export type TreeRuleObject = __TreeRuleObject; diff --git a/node_modules/@smithy/util-endpoints/dist-types/types/index.d.ts b/node_modules/@smithy/util-endpoints/dist-types/types/index.d.ts new file mode 100644 index 0000000..a49f984 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/types/index.d.ts @@ -0,0 +1,7 @@ +export * from "./EndpointError"; +export * from "./EndpointFunctions"; +export * from "./EndpointRuleObject"; +export * from "./ErrorRuleObject"; +export * from "./RuleSetObject"; +export * from "./TreeRuleObject"; +export * from "./shared"; diff --git a/node_modules/@smithy/util-endpoints/dist-types/types/shared.d.ts b/node_modules/@smithy/util-endpoints/dist-types/types/shared.d.ts new file mode 100644 index 0000000..8351a92 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/types/shared.d.ts @@ -0,0 +1,25 @@ +import { EndpointARN, EndpointPartition, Logger } from "@smithy/types"; +export type ReferenceObject = { + ref: string; +}; +export type FunctionObject = { + fn: string; + argv: FunctionArgv; +}; +export type FunctionArgv = Array; +export type FunctionReturn = string | boolean | number | EndpointARN | EndpointPartition | { + [key: string]: FunctionReturn; +} | null; +export type ConditionObject = FunctionObject & { + assign?: string; +}; +export type Expression = string | ReferenceObject | FunctionObject; +export type EndpointParams = Record; +export type EndpointResolverOptions = { + endpointParams: EndpointParams; + logger?: Logger; +}; +export type ReferenceRecord = Record; +export type EvaluateOptions = EndpointResolverOptions & { + referenceRecord: ReferenceRecord; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/callFunction.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/callFunction.d.ts new file mode 100644 index 0000000..729a206 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/callFunction.d.ts @@ -0,0 +1,2 @@ +import { EvaluateOptions, FunctionObject, FunctionReturn } from "../types"; +export declare const callFunction: ({ fn, argv }: FunctionObject, options: EvaluateOptions) => FunctionReturn; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/customEndpointFunctions.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/customEndpointFunctions.d.ts new file mode 100644 index 0000000..d8971d0 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/customEndpointFunctions.d.ts @@ -0,0 +1,4 @@ +import { EndpointFunctions } from "../types/EndpointFunctions"; +export declare const customEndpointFunctions: { + [key: string]: EndpointFunctions; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/endpointFunctions.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/endpointFunctions.d.ts new file mode 100644 index 0000000..12d75b9 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/endpointFunctions.d.ts @@ -0,0 +1,11 @@ +export declare const endpointFunctions: { + booleanEquals: (value1: boolean, value2: boolean) => boolean; + getAttr: (value: import("../lib").GetAttrValue, path: string) => import("../lib").GetAttrValue; + isSet: (value: unknown) => boolean; + isValidHostLabel: (value: string, allowSubDomains?: boolean) => boolean; + not: (value: boolean) => boolean; + parseURL: (value: string | URL | import("@smithy/types").Endpoint) => import("@smithy/types").EndpointURL | null; + stringEquals: (value1: string, value2: string) => boolean; + substring: (input: string, start: number, stop: number, reverse: boolean) => string | null; + uriEncode: (value: string) => string; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateCondition.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateCondition.d.ts new file mode 100644 index 0000000..5fbe59f --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateCondition.d.ts @@ -0,0 +1,8 @@ +import { ConditionObject, EvaluateOptions } from "../types"; +export declare const evaluateCondition: ({ assign, ...fnArgs }: ConditionObject, options: EvaluateOptions) => { + toAssign?: { + name: string; + value: import("../types").FunctionReturn; + } | undefined; + result: boolean; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateConditions.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateConditions.d.ts new file mode 100644 index 0000000..4131beb --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateConditions.d.ts @@ -0,0 +1,8 @@ +import { ConditionObject, EvaluateOptions, FunctionReturn } from "../types"; +export declare const evaluateConditions: (conditions: ConditionObject[] | undefined, options: EvaluateOptions) => { + result: false; + referenceRecord?: undefined; +} | { + result: boolean; + referenceRecord: Record; +}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateEndpointRule.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateEndpointRule.d.ts new file mode 100644 index 0000000..da9496e --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateEndpointRule.d.ts @@ -0,0 +1,3 @@ +import { EndpointV2 } from "@smithy/types"; +import { EndpointRuleObject, EvaluateOptions } from "../types"; +export declare const evaluateEndpointRule: (endpointRule: EndpointRuleObject, options: EvaluateOptions) => EndpointV2 | undefined; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateErrorRule.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateErrorRule.d.ts new file mode 100644 index 0000000..df4973d --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateErrorRule.d.ts @@ -0,0 +1,2 @@ +import { ErrorRuleObject, EvaluateOptions } from "../types"; +export declare const evaluateErrorRule: (errorRule: ErrorRuleObject, options: EvaluateOptions) => void; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateExpression.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateExpression.d.ts new file mode 100644 index 0000000..2541960 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateExpression.d.ts @@ -0,0 +1,2 @@ +import { EvaluateOptions, Expression } from "../types"; +export declare const evaluateExpression: (obj: Expression, keyName: string, options: EvaluateOptions) => import("../types").FunctionReturn; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateRules.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateRules.d.ts new file mode 100644 index 0000000..d38c8be --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateRules.d.ts @@ -0,0 +1,3 @@ +import { EndpointV2 } from "@smithy/types"; +import { EvaluateOptions } from "../types"; +export declare const evaluateRules: (rules: import("@smithy/types").RuleSetRules, options: EvaluateOptions) => EndpointV2; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateTemplate.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateTemplate.d.ts new file mode 100644 index 0000000..9b0b9ad --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateTemplate.d.ts @@ -0,0 +1,2 @@ +import { EvaluateOptions } from "../types"; +export declare const evaluateTemplate: (template: string, options: EvaluateOptions) => string; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateTreeRule.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateTreeRule.d.ts new file mode 100644 index 0000000..2564388 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateTreeRule.d.ts @@ -0,0 +1,3 @@ +import { EndpointV2 } from "@smithy/types"; +import { EvaluateOptions, TreeRuleObject } from "../types"; +export declare const evaluateTreeRule: (treeRule: TreeRuleObject, options: EvaluateOptions) => EndpointV2 | undefined; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointHeaders.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointHeaders.d.ts new file mode 100644 index 0000000..a802565 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointHeaders.d.ts @@ -0,0 +1,2 @@ +import { EndpointObjectHeaders, EvaluateOptions } from "../types"; +export declare const getEndpointHeaders: (headers: EndpointObjectHeaders, options: EvaluateOptions) => {}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperties.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperties.d.ts new file mode 100644 index 0000000..9c83bb0 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperties.d.ts @@ -0,0 +1,2 @@ +import { EndpointObjectProperties, EvaluateOptions } from "../types"; +export declare const getEndpointProperties: (properties: EndpointObjectProperties, options: EvaluateOptions) => {}; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperty.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperty.d.ts new file mode 100644 index 0000000..7bc5b82 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperty.d.ts @@ -0,0 +1,3 @@ +import { EndpointObjectProperty } from "@smithy/types"; +import { EvaluateOptions } from "../types"; +export declare const getEndpointProperty: (property: EndpointObjectProperty, options: EvaluateOptions) => EndpointObjectProperty; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointUrl.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointUrl.d.ts new file mode 100644 index 0000000..4ab2289 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointUrl.d.ts @@ -0,0 +1,2 @@ +import { EvaluateOptions, Expression } from "../types"; +export declare const getEndpointUrl: (endpointUrl: Expression, options: EvaluateOptions) => URL; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/getReferenceValue.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/getReferenceValue.d.ts new file mode 100644 index 0000000..3699ec1 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/getReferenceValue.d.ts @@ -0,0 +1,2 @@ +import { EvaluateOptions, ReferenceObject } from "../types"; +export declare const getReferenceValue: ({ ref }: ReferenceObject, options: EvaluateOptions) => import("../types").FunctionReturn; diff --git a/node_modules/@smithy/util-endpoints/dist-types/utils/index.d.ts b/node_modules/@smithy/util-endpoints/dist-types/utils/index.d.ts new file mode 100644 index 0000000..b571d02 --- /dev/null +++ b/node_modules/@smithy/util-endpoints/dist-types/utils/index.d.ts @@ -0,0 +1,2 @@ +export * from "./customEndpointFunctions"; +export * from "./evaluateRules"; diff --git a/node_modules/@smithy/util-endpoints/package.json b/node_modules/@smithy/util-endpoints/package.json new file mode 100644 index 0000000..923562d --- /dev/null +++ b/node_modules/@smithy/util-endpoints/package.json @@ -0,0 +1,67 @@ +{ + "name": "@smithy/util-endpoints", + "version": "1.2.0", + "description": "Utilities to help with endpoint resolution.", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-endpoints", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest", + "test:integration": "yarn g:jest --config jest.config.integ.js" + }, + "keywords": [ + "endpoint" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^2.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">= 14.0.0" + }, + "typesVersions": { + "<4.0": { + "types/*": [ + "types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/master/packages/util-endpoints", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-endpoints" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-hex-encoding/LICENSE b/node_modules/@smithy/util-hex-encoding/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/util-hex-encoding/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-hex-encoding/README.md b/node_modules/@smithy/util-hex-encoding/README.md new file mode 100644 index 0000000..67e4499 --- /dev/null +++ b/node_modules/@smithy/util-hex-encoding/README.md @@ -0,0 +1,4 @@ +# @smithy/util-hex-encoding + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-hex-encoding/latest.svg)](https://www.npmjs.com/package/@smithy/util-hex-encoding) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-hex-encoding.svg)](https://www.npmjs.com/package/@smithy/util-hex-encoding) diff --git a/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js b/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js new file mode 100644 index 0000000..78a59ea --- /dev/null +++ b/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js @@ -0,0 +1,67 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + fromHex: () => fromHex, + toHex: () => toHex +}); +module.exports = __toCommonJS(src_exports); +var SHORT_TO_HEX = {}; +var HEX_TO_SHORT = {}; +for (let i = 0; i < 256; i++) { + let encodedByte = i.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i] = encodedByte; + HEX_TO_SHORT[encodedByte] = i; +} +function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i = 0; i < encoded.length; i += 2) { + const encodedByte = encoded.slice(i, i + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i / 2] = HEX_TO_SHORT[encodedByte]; + } else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; +} +__name(fromHex, "fromHex"); +function toHex(bytes) { + let out = ""; + for (let i = 0; i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; + } + return out; +} +__name(toHex, "toHex"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + fromHex, + toHex +}); + diff --git a/node_modules/@smithy/util-hex-encoding/dist-es/index.js b/node_modules/@smithy/util-hex-encoding/dist-es/index.js new file mode 100644 index 0000000..e47b3aa --- /dev/null +++ b/node_modules/@smithy/util-hex-encoding/dist-es/index.js @@ -0,0 +1,33 @@ +const SHORT_TO_HEX = {}; +const HEX_TO_SHORT = {}; +for (let i = 0; i < 256; i++) { + let encodedByte = i.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i] = encodedByte; + HEX_TO_SHORT[encodedByte] = i; +} +export function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i = 0; i < encoded.length; i += 2) { + const encodedByte = encoded.slice(i, i + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i / 2] = HEX_TO_SHORT[encodedByte]; + } + else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; +} +export function toHex(bytes) { + let out = ""; + for (let i = 0; i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; + } + return out; +} diff --git a/node_modules/@smithy/util-hex-encoding/dist-types/index.d.ts b/node_modules/@smithy/util-hex-encoding/dist-types/index.d.ts new file mode 100644 index 0000000..9d4307a --- /dev/null +++ b/node_modules/@smithy/util-hex-encoding/dist-types/index.d.ts @@ -0,0 +1,12 @@ +/** + * Converts a hexadecimal encoded string to a Uint8Array of bytes. + * + * @param encoded The hexadecimal encoded string + */ +export declare function fromHex(encoded: string): Uint8Array; +/** + * Converts a Uint8Array of binary data to a hexadecimal encoded string. + * + * @param bytes The binary data to encode + */ +export declare function toHex(bytes: Uint8Array): string; diff --git a/node_modules/@smithy/util-hex-encoding/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-hex-encoding/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..02a8848 --- /dev/null +++ b/node_modules/@smithy/util-hex-encoding/dist-types/ts3.4/index.d.ts @@ -0,0 +1,12 @@ +/** + * Converts a hexadecimal encoded string to a Uint8Array of bytes. + * + * @param encoded The hexadecimal encoded string + */ +export declare function fromHex(encoded: string): Uint8Array; +/** + * Converts a Uint8Array of binary data to a hexadecimal encoded string. + * + * @param bytes The binary data to encode + */ +export declare function toHex(bytes: Uint8Array): string; diff --git a/node_modules/@smithy/util-hex-encoding/package.json b/node_modules/@smithy/util-hex-encoding/package.json new file mode 100644 index 0000000..d754cf8 --- /dev/null +++ b/node_modules/@smithy/util-hex-encoding/package.json @@ -0,0 +1,60 @@ +{ + "name": "@smithy/util-hex-encoding", + "version": "2.2.0", + "description": "Converts binary buffers to and from lowercase hexadecimal encoding", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-hex-encoding", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "dependencies": { + "tslib": "^2.6.2" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-hex-encoding", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-hex-encoding" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-middleware/LICENSE b/node_modules/@smithy/util-middleware/LICENSE new file mode 100644 index 0000000..a1895fa --- /dev/null +++ b/node_modules/@smithy/util-middleware/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-middleware/README.md b/node_modules/@smithy/util-middleware/README.md new file mode 100644 index 0000000..f043cfa --- /dev/null +++ b/node_modules/@smithy/util-middleware/README.md @@ -0,0 +1,12 @@ +# @smithy/util-middleware + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-middleware/latest.svg)](https://www.npmjs.com/package/@smithy/util-middleware) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-middleware.svg)](https://www.npmjs.com/package/@smithy/util-middleware) + +> An internal package + +This package provides shared utilities for middleware. + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/util-middleware/dist-cjs/getSmithyContext.js b/node_modules/@smithy/util-middleware/dist-cjs/getSmithyContext.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-cjs/getSmithyContext.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-middleware/dist-cjs/index.js b/node_modules/@smithy/util-middleware/dist-cjs/index.js new file mode 100644 index 0000000..dfccf17 --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-cjs/index.js @@ -0,0 +1,45 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + getSmithyContext: () => getSmithyContext, + normalizeProvider: () => normalizeProvider +}); +module.exports = __toCommonJS(src_exports); + +// src/getSmithyContext.ts +var import_types = require("@smithy/types"); +var getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + +// src/normalizeProvider.ts +var normalizeProvider = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; +}, "normalizeProvider"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + getSmithyContext, + normalizeProvider +}); + diff --git a/node_modules/@smithy/util-middleware/dist-cjs/normalizeProvider.js b/node_modules/@smithy/util-middleware/dist-cjs/normalizeProvider.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-cjs/normalizeProvider.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js b/node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js new file mode 100644 index 0000000..3848a0c --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js @@ -0,0 +1,2 @@ +import { SMITHY_CONTEXT_KEY } from "@smithy/types"; +export const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {}); diff --git a/node_modules/@smithy/util-middleware/dist-es/index.js b/node_modules/@smithy/util-middleware/dist-es/index.js new file mode 100644 index 0000000..484290d --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-es/index.js @@ -0,0 +1,2 @@ +export * from "./getSmithyContext"; +export * from "./normalizeProvider"; diff --git a/node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js b/node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js new file mode 100644 index 0000000..a83ea99 --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js @@ -0,0 +1,6 @@ +export const normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; +}; diff --git a/node_modules/@smithy/util-middleware/dist-types/getSmithyContext.d.ts b/node_modules/@smithy/util-middleware/dist-types/getSmithyContext.d.ts new file mode 100644 index 0000000..523ee47 --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-types/getSmithyContext.d.ts @@ -0,0 +1,5 @@ +import { HandlerExecutionContext } from "@smithy/types"; +/** + * @internal + */ +export declare const getSmithyContext: (context: HandlerExecutionContext) => Record; diff --git a/node_modules/@smithy/util-middleware/dist-types/index.d.ts b/node_modules/@smithy/util-middleware/dist-types/index.d.ts new file mode 100644 index 0000000..3869284 --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-types/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./getSmithyContext"; +/** + * @internal + */ +export * from "./normalizeProvider"; diff --git a/node_modules/@smithy/util-middleware/dist-types/normalizeProvider.d.ts b/node_modules/@smithy/util-middleware/dist-types/normalizeProvider.d.ts new file mode 100644 index 0000000..4fe2d9a --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-types/normalizeProvider.d.ts @@ -0,0 +1,7 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + * + * @returns a provider function for the input value if it isn't already one. + */ +export declare const normalizeProvider: (input: T | Provider) => Provider; diff --git a/node_modules/@smithy/util-middleware/dist-types/ts3.4/getSmithyContext.d.ts b/node_modules/@smithy/util-middleware/dist-types/ts3.4/getSmithyContext.d.ts new file mode 100644 index 0000000..14cd7c4 --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-types/ts3.4/getSmithyContext.d.ts @@ -0,0 +1,5 @@ +import { HandlerExecutionContext } from "@smithy/types"; +/** + * @internal + */ +export declare const getSmithyContext: (context: HandlerExecutionContext) => Record; diff --git a/node_modules/@smithy/util-middleware/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-middleware/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..ab07159 --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-types/ts3.4/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./getSmithyContext"; +/** + * @internal + */ +export * from "./normalizeProvider"; diff --git a/node_modules/@smithy/util-middleware/dist-types/ts3.4/normalizeProvider.d.ts b/node_modules/@smithy/util-middleware/dist-types/ts3.4/normalizeProvider.d.ts new file mode 100644 index 0000000..594e8fa --- /dev/null +++ b/node_modules/@smithy/util-middleware/dist-types/ts3.4/normalizeProvider.d.ts @@ -0,0 +1,7 @@ +import { Provider } from "@smithy/types"; +/** + * @internal + * + * @returns a provider function for the input value if it isn't already one. + */ +export declare const normalizeProvider: (input: T | Provider) => Provider; diff --git a/node_modules/@smithy/util-middleware/package.json b/node_modules/@smithy/util-middleware/package.json new file mode 100644 index 0000000..89399b6 --- /dev/null +++ b/node_modules/@smithy/util-middleware/package.json @@ -0,0 +1,66 @@ +{ + "name": "@smithy/util-middleware", + "version": "2.2.0", + "description": "Shared utilities for to be used in middleware packages.", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-middleware", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "keywords": [ + "aws", + "middleware" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "types/*": [ + "types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/master/packages/util-middleware", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-middleware" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/LICENSE b/node_modules/@smithy/util-retry/LICENSE new file mode 100644 index 0000000..a1895fa --- /dev/null +++ b/node_modules/@smithy/util-retry/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/README.md b/node_modules/@smithy/util-retry/README.md new file mode 100644 index 0000000..16408e4 --- /dev/null +++ b/node_modules/@smithy/util-retry/README.md @@ -0,0 +1,78 @@ +# @smithy/util-retry + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-retry/latest.svg)](https://www.npmjs.com/package/@smithy/util-retry) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-retry.svg)](https://www.npmjs.com/package/@smithy/util-retry) + +This package provides shared utilities for retries. + +## Usage + +### Default + +By default, each client already has a default retry strategy. The default retry count is 3, and +only retryable errors will be retried. + +[AWS Documentation: Retry behavior](https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html). + +```js +import { S3Client } from "@aws-sdk/client-s3"; + +const client = new S3Client({}); // default retry strategy included. +``` + +### MaxAttempts + +If you want to change the number of attempts, you can provide `maxAttempts` configuration during client creation. + +```js +import { S3Client } from "@aws-sdk/client-s3"; + +const client = new S3Client({ maxAttempts: 4 }); +``` + +This is recommended because the `StandardRetryStrategy` includes backoff calculation, +deciding whether an error should be retried, and a retry token counter. + +### MaxAttempts and BackoffComputation + +If you want to change the number of attempts and use a custom delay +computation, you can use the `ConfiguredRetryStrategy` from `@smithy/util-retry`. + +```js +import { S3Client } from "@aws-sdk/client-s3"; +import { ConfiguredRetryStrategy } from "@smithy/util-retry"; + +const client = new S3Client({ + retryStrategy: new ConfiguredRetryStrategy( + 4, // max attempts. + (attempt: number) => 100 + attempt * 1000 // backoff function. + ), +}); +``` + +This example sets the backoff at 100ms plus 1s per attempt. + +### MaxAttempts and RetryStrategy + +If you provide both `maxAttempts` and `retryStrategy`, the `retryStrategy` will +get precedence as it's more specific. + +```js +import { S3Client } from "@aws-sdk/client-s3"; +import { ConfiguredRetryStrategy } from "@smithy/util-retry"; + +const client = new S3Client({ + maxAttempts: 2, // ignored. + retryStrategy: new ConfiguredRetryStrategy( + 4, // used. + (attempt: number) => 100 + attempt * 1000 // backoff function. + ), +}); +``` + +### Further customization + +You can implement the `RetryStrategyV2` interface. + +Source: https://github.com/awslabs/smithy-typescript/blob/main/packages/types/src/retry.ts +API Docs: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-types/Interface/RetryStrategyV2/ diff --git a/node_modules/@smithy/util-retry/dist-cjs/AdaptiveRetryStrategy.js b/node_modules/@smithy/util-retry/dist-cjs/AdaptiveRetryStrategy.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-cjs/AdaptiveRetryStrategy.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/dist-cjs/ConfiguredRetryStrategy.js b/node_modules/@smithy/util-retry/dist-cjs/ConfiguredRetryStrategy.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-cjs/ConfiguredRetryStrategy.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/dist-cjs/DefaultRateLimiter.js b/node_modules/@smithy/util-retry/dist-cjs/DefaultRateLimiter.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-cjs/DefaultRateLimiter.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/dist-cjs/StandardRetryStrategy.js b/node_modules/@smithy/util-retry/dist-cjs/StandardRetryStrategy.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-cjs/StandardRetryStrategy.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/dist-cjs/config.js b/node_modules/@smithy/util-retry/dist-cjs/config.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-cjs/config.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/dist-cjs/constants.js b/node_modules/@smithy/util-retry/dist-cjs/constants.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-cjs/constants.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/dist-cjs/defaultRetryBackoffStrategy.js b/node_modules/@smithy/util-retry/dist-cjs/defaultRetryBackoffStrategy.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-cjs/defaultRetryBackoffStrategy.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/dist-cjs/defaultRetryToken.js b/node_modules/@smithy/util-retry/dist-cjs/defaultRetryToken.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-cjs/defaultRetryToken.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/dist-cjs/index.js b/node_modules/@smithy/util-retry/dist-cjs/index.js new file mode 100644 index 0000000..63ab7c8 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-cjs/index.js @@ -0,0 +1,347 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, + DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, + DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE, + DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE, + DefaultRateLimiter: () => DefaultRateLimiter, + INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS, + INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER, + MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY, + NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT, + REQUEST_HEADER: () => REQUEST_HEADER, + RETRY_COST: () => RETRY_COST, + RETRY_MODES: () => RETRY_MODES, + StandardRetryStrategy: () => StandardRetryStrategy, + THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, + TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST +}); +module.exports = __toCommonJS(src_exports); + +// src/config.ts +var RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => { + RETRY_MODES2["STANDARD"] = "standard"; + RETRY_MODES2["ADAPTIVE"] = "adaptive"; + return RETRY_MODES2; +})(RETRY_MODES || {}); +var DEFAULT_MAX_ATTEMPTS = 3; +var DEFAULT_RETRY_MODE = "standard" /* STANDARD */; + +// src/DefaultRateLimiter.ts +var import_service_error_classification = require("@smithy/service-error-classification"); +var _DefaultRateLimiter = class _DefaultRateLimiter { + constructor(options) { + // Pre-set state variables + this.currentCapacity = 0; + this.enabled = false; + this.lastMaxRate = 0; + this.measuredTxRate = 0; + this.requestCount = 0; + this.lastTimestamp = 0; + this.timeWindow = 0; + this.beta = (options == null ? void 0 : options.beta) ?? 0.7; + this.minCapacity = (options == null ? void 0 : options.minCapacity) ?? 1; + this.minFillRate = (options == null ? void 0 : options.minFillRate) ?? 0.5; + this.scaleConstant = (options == null ? void 0 : options.scaleConstant) ?? 0.4; + this.smooth = (options == null ? void 0 : options.smooth) ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + getCurrentTimeInSeconds() { + return Date.now() / 1e3; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = (amount - this.currentCapacity) / this.fillRate * 1e3; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if ((0, import_service_error_classification.isThrottlingError)(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise( + this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate + ); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } +}; +__name(_DefaultRateLimiter, "DefaultRateLimiter"); +var DefaultRateLimiter = _DefaultRateLimiter; + +// src/constants.ts +var DEFAULT_RETRY_DELAY_BASE = 100; +var MAXIMUM_RETRY_DELAY = 20 * 1e3; +var THROTTLING_RETRY_DELAY_BASE = 500; +var INITIAL_RETRY_TOKENS = 500; +var RETRY_COST = 5; +var TIMEOUT_RETRY_COST = 10; +var NO_RETRY_INCREMENT = 1; +var INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; +var REQUEST_HEADER = "amz-sdk-request"; + +// src/defaultRetryBackoffStrategy.ts +var getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }, "computeNextBackoffDelay"); + const setDelayBase = /* @__PURE__ */ __name((delay) => { + delayBase = delay; + }, "setDelayBase"); + return { + computeNextBackoffDelay, + setDelayBase + }; +}, "getDefaultRetryBackoffStrategy"); + +// src/defaultRetryToken.ts +var createDefaultRetryToken = /* @__PURE__ */ __name(({ + retryDelay, + retryCount, + retryCost +}) => { + const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); + const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); + const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); + return { + getRetryCount, + getRetryDelay, + getRetryCost + }; +}, "createDefaultRetryToken"); + +// src/StandardRetryStrategy.ts +var _StandardRetryStrategy = class _StandardRetryStrategy { + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.mode = "standard" /* STANDARD */; + this.capacity = INITIAL_RETRY_TOKENS; + this.retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0 + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase( + errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE + ); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost + }); + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + /** + * @returns the current available retry capacity. + * + * This number decreases when retries are executed and refills when requests or retries succeed. + */ + getCapacity() { + return this.capacity; + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (error) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } + } + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); + } + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } +}; +__name(_StandardRetryStrategy, "StandardRetryStrategy"); +var StandardRetryStrategy = _StandardRetryStrategy; + +// src/AdaptiveRetryStrategy.ts +var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = "adaptive" /* ADAPTIVE */; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); + } + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } +}; +__name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); +var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; + +// src/ConfiguredRetryStrategy.ts +var _ConfiguredRetryStrategy = class _ConfiguredRetryStrategy extends StandardRetryStrategy { + /** + * @param maxAttempts - the maximum number of retry attempts allowed. + * e.g., if set to 3, then 4 total requests are possible. + * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt + * and returns the delay. + * + * @example exponential backoff. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2) + * }); + * ``` + * @example constant delay. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, 2000) + * }); + * ``` + */ + constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { + super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); + if (typeof computeNextBackoffDelay === "number") { + this.computeNextBackoffDelay = () => computeNextBackoffDelay; + } else { + this.computeNextBackoffDelay = computeNextBackoffDelay; + } + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); + return token; + } +}; +__name(_ConfiguredRetryStrategy, "ConfiguredRetryStrategy"); +var ConfiguredRetryStrategy = _ConfiguredRetryStrategy; +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + AdaptiveRetryStrategy, + ConfiguredRetryStrategy, + DefaultRateLimiter, + StandardRetryStrategy, + RETRY_MODES, + DEFAULT_MAX_ATTEMPTS, + DEFAULT_RETRY_MODE, + DEFAULT_RETRY_DELAY_BASE, + MAXIMUM_RETRY_DELAY, + THROTTLING_RETRY_DELAY_BASE, + INITIAL_RETRY_TOKENS, + RETRY_COST, + TIMEOUT_RETRY_COST, + NO_RETRY_INCREMENT, + INVOCATION_ID_HEADER, + REQUEST_HEADER +}); + diff --git a/node_modules/@smithy/util-retry/dist-cjs/types.js b/node_modules/@smithy/util-retry/dist-cjs/types.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-cjs/types.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js b/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js new file mode 100644 index 0000000..e20cf0f --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js @@ -0,0 +1,24 @@ +import { RETRY_MODES } from "./config"; +import { DefaultRateLimiter } from "./DefaultRateLimiter"; +import { StandardRetryStrategy } from "./StandardRetryStrategy"; +export class AdaptiveRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = RETRY_MODES.ADAPTIVE; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); + } + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } +} diff --git a/node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js b/node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js new file mode 100644 index 0000000..541bdb2 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js @@ -0,0 +1,18 @@ +import { DEFAULT_RETRY_DELAY_BASE } from "./constants"; +import { StandardRetryStrategy } from "./StandardRetryStrategy"; +export class ConfiguredRetryStrategy extends StandardRetryStrategy { + constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { + super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); + if (typeof computeNextBackoffDelay === "number") { + this.computeNextBackoffDelay = () => computeNextBackoffDelay; + } + else { + this.computeNextBackoffDelay = computeNextBackoffDelay; + } + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); + return token; + } +} diff --git a/node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js b/node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js new file mode 100644 index 0000000..fd44f1b --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js @@ -0,0 +1,99 @@ +import { isThrottlingError } from "@smithy/service-error-classification"; +export class DefaultRateLimiter { + constructor(options) { + this.currentCapacity = 0; + this.enabled = false; + this.lastMaxRate = 0; + this.measuredTxRate = 0; + this.requestCount = 0; + this.lastTimestamp = 0; + this.timeWindow = 0; + this.beta = options?.beta ?? 0.7; + this.minCapacity = options?.minCapacity ?? 1; + this.minFillRate = options?.minFillRate ?? 0.5; + this.scaleConstant = options?.scaleConstant ?? 0.4; + this.smooth = options?.smooth ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + getCurrentTimeInSeconds() { + return Date.now() / 1000; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if (isThrottlingError(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } + else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } +} diff --git a/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js b/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js new file mode 100644 index 0000000..07adde0 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js @@ -0,0 +1,65 @@ +import { DEFAULT_MAX_ATTEMPTS, RETRY_MODES } from "./config"; +import { DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, NO_RETRY_INCREMENT, RETRY_COST, THROTTLING_RETRY_DELAY_BASE, TIMEOUT_RETRY_COST, } from "./constants"; +import { getDefaultRetryBackoffStrategy } from "./defaultRetryBackoffStrategy"; +import { createDefaultRetryToken } from "./defaultRetryToken"; +export class StandardRetryStrategy { + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.mode = RETRY_MODES.STANDARD; + this.capacity = INITIAL_RETRY_TOKENS; + this.retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0, + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint + ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) + : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost, + }); + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + getCapacity() { + return this.capacity; + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } + catch (error) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } + } + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return (attempts < maxAttempts && + this.capacity >= this.getCapacityCost(errorInfo.errorType) && + this.isRetryableError(errorInfo.errorType)); + } + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } +} diff --git a/node_modules/@smithy/util-retry/dist-es/config.js b/node_modules/@smithy/util-retry/dist-es/config.js new file mode 100644 index 0000000..438d42d --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-es/config.js @@ -0,0 +1,7 @@ +export var RETRY_MODES; +(function (RETRY_MODES) { + RETRY_MODES["STANDARD"] = "standard"; + RETRY_MODES["ADAPTIVE"] = "adaptive"; +})(RETRY_MODES || (RETRY_MODES = {})); +export const DEFAULT_MAX_ATTEMPTS = 3; +export const DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD; diff --git a/node_modules/@smithy/util-retry/dist-es/constants.js b/node_modules/@smithy/util-retry/dist-es/constants.js new file mode 100644 index 0000000..0876f8e --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-es/constants.js @@ -0,0 +1,9 @@ +export const DEFAULT_RETRY_DELAY_BASE = 100; +export const MAXIMUM_RETRY_DELAY = 20 * 1000; +export const THROTTLING_RETRY_DELAY_BASE = 500; +export const INITIAL_RETRY_TOKENS = 500; +export const RETRY_COST = 5; +export const TIMEOUT_RETRY_COST = 10; +export const NO_RETRY_INCREMENT = 1; +export const INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; +export const REQUEST_HEADER = "amz-sdk-request"; diff --git a/node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js b/node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js new file mode 100644 index 0000000..ce04bc5 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js @@ -0,0 +1,14 @@ +import { DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY } from "./constants"; +export const getDefaultRetryBackoffStrategy = () => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = (attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }; + const setDelayBase = (delay) => { + delayBase = delay; + }; + return { + computeNextBackoffDelay, + setDelayBase, + }; +}; diff --git a/node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js b/node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js new file mode 100644 index 0000000..203bb66 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js @@ -0,0 +1,11 @@ +import { MAXIMUM_RETRY_DELAY } from "./constants"; +export const createDefaultRetryToken = ({ retryDelay, retryCount, retryCost, }) => { + const getRetryCount = () => retryCount; + const getRetryDelay = () => Math.min(MAXIMUM_RETRY_DELAY, retryDelay); + const getRetryCost = () => retryCost; + return { + getRetryCount, + getRetryDelay, + getRetryCost, + }; +}; diff --git a/node_modules/@smithy/util-retry/dist-es/index.js b/node_modules/@smithy/util-retry/dist-es/index.js new file mode 100644 index 0000000..8637ced --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-es/index.js @@ -0,0 +1,7 @@ +export * from "./AdaptiveRetryStrategy"; +export * from "./ConfiguredRetryStrategy"; +export * from "./DefaultRateLimiter"; +export * from "./StandardRetryStrategy"; +export * from "./config"; +export * from "./constants"; +export * from "./types"; diff --git a/node_modules/@smithy/util-retry/dist-es/types.js b/node_modules/@smithy/util-retry/dist-es/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-es/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@smithy/util-retry/dist-types/AdaptiveRetryStrategy.d.ts b/node_modules/@smithy/util-retry/dist-types/AdaptiveRetryStrategy.d.ts new file mode 100644 index 0000000..8092519 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/AdaptiveRetryStrategy.d.ts @@ -0,0 +1,33 @@ +import { Provider, RetryErrorInfo, RetryStrategyV2, RetryToken, StandardRetryToken } from "@smithy/types"; +import { RateLimiter } from "./types"; +/** + * @public + * + * Strategy options to be passed to AdaptiveRetryStrategy + */ +export interface AdaptiveRetryStrategyOptions { + rateLimiter?: RateLimiter; +} +/** + * @public + * + * The AdaptiveRetryStrategy is a retry strategy for executing against a very + * resource constrained set of resources. Care should be taken when using this + * retry strategy. By default, it uses a dynamic backoff delay based on load + * currently perceived against the downstream resource and performs circuit + * breaking to disable retries in the event of high downstream failures using + * the DefaultRateLimiter. + * + * @see {@link StandardRetryStrategy} + * @see {@link DefaultRateLimiter } + */ +export declare class AdaptiveRetryStrategy implements RetryStrategyV2 { + private readonly maxAttemptsProvider; + private rateLimiter; + private standardRetryStrategy; + readonly mode: string; + constructor(maxAttemptsProvider: Provider, options?: AdaptiveRetryStrategyOptions); + acquireInitialRetryToken(retryTokenScope: string): Promise; + refreshRetryTokenForRetry(tokenToRenew: StandardRetryToken, errorInfo: RetryErrorInfo): Promise; + recordSuccess(token: StandardRetryToken): void; +} diff --git a/node_modules/@smithy/util-retry/dist-types/ConfiguredRetryStrategy.d.ts b/node_modules/@smithy/util-retry/dist-types/ConfiguredRetryStrategy.d.ts new file mode 100644 index 0000000..3250c6d --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ConfiguredRetryStrategy.d.ts @@ -0,0 +1,32 @@ +import type { Provider, RetryBackoffStrategy, RetryErrorInfo, RetryStrategyV2, StandardRetryToken } from "@smithy/types"; +import { StandardRetryStrategy } from "./StandardRetryStrategy"; +/** + * @public + * + * This extension of the StandardRetryStrategy allows customizing the + * backoff computation. + */ +export declare class ConfiguredRetryStrategy extends StandardRetryStrategy implements RetryStrategyV2 { + private readonly computeNextBackoffDelay; + /** + * @param maxAttempts - the maximum number of retry attempts allowed. + * e.g., if set to 3, then 4 total requests are possible. + * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt + * and returns the delay. + * + * @example exponential backoff. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2) + * }); + * ``` + * @example constant delay. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, 2000) + * }); + * ``` + */ + constructor(maxAttempts: number | Provider, computeNextBackoffDelay?: number | RetryBackoffStrategy["computeNextBackoffDelay"]); + refreshRetryTokenForRetry(tokenToRenew: StandardRetryToken, errorInfo: RetryErrorInfo): Promise; +} diff --git a/node_modules/@smithy/util-retry/dist-types/DefaultRateLimiter.d.ts b/node_modules/@smithy/util-retry/dist-types/DefaultRateLimiter.d.ts new file mode 100644 index 0000000..97e3b83 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/DefaultRateLimiter.d.ts @@ -0,0 +1,45 @@ +import { RateLimiter } from "./types"; +/** + * @public + */ +export interface DefaultRateLimiterOptions { + beta?: number; + minCapacity?: number; + minFillRate?: number; + scaleConstant?: number; + smooth?: number; +} +/** + * @public + */ +export declare class DefaultRateLimiter implements RateLimiter { + private beta; + private minCapacity; + private minFillRate; + private scaleConstant; + private smooth; + private currentCapacity; + private enabled; + private lastMaxRate; + private measuredTxRate; + private requestCount; + private fillRate; + private lastThrottleTime; + private lastTimestamp; + private lastTxRateBucket; + private maxCapacity; + private timeWindow; + constructor(options?: DefaultRateLimiterOptions); + private getCurrentTimeInSeconds; + getSendToken(): Promise; + private acquireTokenBucket; + private refillTokenBucket; + updateClientSendingRate(response: any): void; + private calculateTimeWindow; + private cubicThrottle; + private cubicSuccess; + private enableTokenBucket; + private updateTokenBucketRate; + private updateMeasuredRate; + private getPrecise; +} diff --git a/node_modules/@smithy/util-retry/dist-types/StandardRetryStrategy.d.ts b/node_modules/@smithy/util-retry/dist-types/StandardRetryStrategy.d.ts new file mode 100644 index 0000000..c100ebc --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/StandardRetryStrategy.d.ts @@ -0,0 +1,26 @@ +import { Provider, RetryErrorInfo, RetryStrategyV2, StandardRetryToken } from "@smithy/types"; +/** + * @public + */ +export declare class StandardRetryStrategy implements RetryStrategyV2 { + private readonly maxAttempts; + readonly mode: string; + private capacity; + private readonly retryBackoffStrategy; + private readonly maxAttemptsProvider; + constructor(maxAttempts: number); + constructor(maxAttemptsProvider: Provider); + acquireInitialRetryToken(retryTokenScope: string): Promise; + refreshRetryTokenForRetry(token: StandardRetryToken, errorInfo: RetryErrorInfo): Promise; + recordSuccess(token: StandardRetryToken): void; + /** + * @returns the current available retry capacity. + * + * This number decreases when retries are executed and refills when requests or retries succeed. + */ + getCapacity(): number; + private getMaxAttempts; + private shouldRetry; + private getCapacityCost; + private isRetryableError; +} diff --git a/node_modules/@smithy/util-retry/dist-types/config.d.ts b/node_modules/@smithy/util-retry/dist-types/config.d.ts new file mode 100644 index 0000000..e4e74b3 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/config.d.ts @@ -0,0 +1,20 @@ +/** + * @public + */ +export declare enum RETRY_MODES { + STANDARD = "standard", + ADAPTIVE = "adaptive" +} +/** + * @public + * + * The default value for how many HTTP requests an SDK should make for a + * single SDK operation invocation before giving up + */ +export declare const DEFAULT_MAX_ATTEMPTS = 3; +/** + * @public + * + * The default retry algorithm to use. + */ +export declare const DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD; diff --git a/node_modules/@smithy/util-retry/dist-types/constants.d.ts b/node_modules/@smithy/util-retry/dist-types/constants.d.ts new file mode 100644 index 0000000..bc7fec8 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/constants.d.ts @@ -0,0 +1,59 @@ +/** + * @public + * + * The base number of milliseconds to use in calculating a suitable cool-down + * time when a retryable error is encountered. + */ +export declare const DEFAULT_RETRY_DELAY_BASE = 100; +/** + * @public + * + * The maximum amount of time (in milliseconds) that will be used as a delay + * between retry attempts. + */ +export declare const MAXIMUM_RETRY_DELAY: number; +/** + * @public + * + * The retry delay base (in milliseconds) to use when a throttling error is + * encountered. + */ +export declare const THROTTLING_RETRY_DELAY_BASE = 500; +/** + * @public + * + * Initial number of retry tokens in Retry Quota + */ +export declare const INITIAL_RETRY_TOKENS = 500; +/** + * @public + * + * The total amount of retry tokens to be decremented from retry token balance. + */ +export declare const RETRY_COST = 5; +/** + * @public + * + * The total amount of retry tokens to be decremented from retry token balance + * when a throttling error is encountered. + */ +export declare const TIMEOUT_RETRY_COST = 10; +/** + * @public + * + * The total amount of retry token to be incremented from retry token balance + * if an SDK operation invocation succeeds without requiring a retry request. + */ +export declare const NO_RETRY_INCREMENT = 1; +/** + * @public + * + * Header name for SDK invocation ID + */ +export declare const INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; +/** + * @public + * + * Header name for request retry information. + */ +export declare const REQUEST_HEADER = "amz-sdk-request"; diff --git a/node_modules/@smithy/util-retry/dist-types/defaultRetryBackoffStrategy.d.ts b/node_modules/@smithy/util-retry/dist-types/defaultRetryBackoffStrategy.d.ts new file mode 100644 index 0000000..b70eb2d --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/defaultRetryBackoffStrategy.d.ts @@ -0,0 +1,5 @@ +import { StandardRetryBackoffStrategy } from "@smithy/types"; +/** + * @internal + */ +export declare const getDefaultRetryBackoffStrategy: () => StandardRetryBackoffStrategy; diff --git a/node_modules/@smithy/util-retry/dist-types/defaultRetryToken.d.ts b/node_modules/@smithy/util-retry/dist-types/defaultRetryToken.d.ts new file mode 100644 index 0000000..947b68f --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/defaultRetryToken.d.ts @@ -0,0 +1,9 @@ +import { StandardRetryToken } from "@smithy/types"; +/** + * @internal + */ +export declare const createDefaultRetryToken: ({ retryDelay, retryCount, retryCost, }: { + retryDelay: number; + retryCount: number; + retryCost?: number | undefined; +}) => StandardRetryToken; diff --git a/node_modules/@smithy/util-retry/dist-types/index.d.ts b/node_modules/@smithy/util-retry/dist-types/index.d.ts new file mode 100644 index 0000000..8637ced --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/index.d.ts @@ -0,0 +1,7 @@ +export * from "./AdaptiveRetryStrategy"; +export * from "./ConfiguredRetryStrategy"; +export * from "./DefaultRateLimiter"; +export * from "./StandardRetryStrategy"; +export * from "./config"; +export * from "./constants"; +export * from "./types"; diff --git a/node_modules/@smithy/util-retry/dist-types/ts3.4/AdaptiveRetryStrategy.d.ts b/node_modules/@smithy/util-retry/dist-types/ts3.4/AdaptiveRetryStrategy.d.ts new file mode 100644 index 0000000..f6b0ef4 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ts3.4/AdaptiveRetryStrategy.d.ts @@ -0,0 +1,33 @@ +import { Provider, RetryErrorInfo, RetryStrategyV2, RetryToken, StandardRetryToken } from "@smithy/types"; +import { RateLimiter } from "./types"; +/** + * @public + * + * Strategy options to be passed to AdaptiveRetryStrategy + */ +export interface AdaptiveRetryStrategyOptions { + rateLimiter?: RateLimiter; +} +/** + * @public + * + * The AdaptiveRetryStrategy is a retry strategy for executing against a very + * resource constrained set of resources. Care should be taken when using this + * retry strategy. By default, it uses a dynamic backoff delay based on load + * currently perceived against the downstream resource and performs circuit + * breaking to disable retries in the event of high downstream failures using + * the DefaultRateLimiter. + * + * @see {@link StandardRetryStrategy} + * @see {@link DefaultRateLimiter } + */ +export declare class AdaptiveRetryStrategy implements RetryStrategyV2 { + private readonly maxAttemptsProvider; + private rateLimiter; + private standardRetryStrategy; + readonly mode: string; + constructor(maxAttemptsProvider: Provider, options?: AdaptiveRetryStrategyOptions); + acquireInitialRetryToken(retryTokenScope: string): Promise; + refreshRetryTokenForRetry(tokenToRenew: StandardRetryToken, errorInfo: RetryErrorInfo): Promise; + recordSuccess(token: StandardRetryToken): void; +} diff --git a/node_modules/@smithy/util-retry/dist-types/ts3.4/ConfiguredRetryStrategy.d.ts b/node_modules/@smithy/util-retry/dist-types/ts3.4/ConfiguredRetryStrategy.d.ts new file mode 100644 index 0000000..7df2983 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ts3.4/ConfiguredRetryStrategy.d.ts @@ -0,0 +1,32 @@ +import { Provider, RetryBackoffStrategy, RetryErrorInfo, RetryStrategyV2, StandardRetryToken } from "@smithy/types"; +import { StandardRetryStrategy } from "./StandardRetryStrategy"; +/** + * @public + * + * This extension of the StandardRetryStrategy allows customizing the + * backoff computation. + */ +export declare class ConfiguredRetryStrategy extends StandardRetryStrategy implements RetryStrategyV2 { + private readonly computeNextBackoffDelay; + /** + * @param maxAttempts - the maximum number of retry attempts allowed. + * e.g., if set to 3, then 4 total requests are possible. + * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt + * and returns the delay. + * + * @example exponential backoff. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2) + * }); + * ``` + * @example constant delay. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, 2000) + * }); + * ``` + */ + constructor(maxAttempts: number | Provider, computeNextBackoffDelay?: number | RetryBackoffStrategy["computeNextBackoffDelay"]); + refreshRetryTokenForRetry(tokenToRenew: StandardRetryToken, errorInfo: RetryErrorInfo): Promise; +} diff --git a/node_modules/@smithy/util-retry/dist-types/ts3.4/DefaultRateLimiter.d.ts b/node_modules/@smithy/util-retry/dist-types/ts3.4/DefaultRateLimiter.d.ts new file mode 100644 index 0000000..4867909 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ts3.4/DefaultRateLimiter.d.ts @@ -0,0 +1,45 @@ +import { RateLimiter } from "./types"; +/** + * @public + */ +export interface DefaultRateLimiterOptions { + beta?: number; + minCapacity?: number; + minFillRate?: number; + scaleConstant?: number; + smooth?: number; +} +/** + * @public + */ +export declare class DefaultRateLimiter implements RateLimiter { + private beta; + private minCapacity; + private minFillRate; + private scaleConstant; + private smooth; + private currentCapacity; + private enabled; + private lastMaxRate; + private measuredTxRate; + private requestCount; + private fillRate; + private lastThrottleTime; + private lastTimestamp; + private lastTxRateBucket; + private maxCapacity; + private timeWindow; + constructor(options?: DefaultRateLimiterOptions); + private getCurrentTimeInSeconds; + getSendToken(): Promise; + private acquireTokenBucket; + private refillTokenBucket; + updateClientSendingRate(response: any): void; + private calculateTimeWindow; + private cubicThrottle; + private cubicSuccess; + private enableTokenBucket; + private updateTokenBucketRate; + private updateMeasuredRate; + private getPrecise; +} diff --git a/node_modules/@smithy/util-retry/dist-types/ts3.4/StandardRetryStrategy.d.ts b/node_modules/@smithy/util-retry/dist-types/ts3.4/StandardRetryStrategy.d.ts new file mode 100644 index 0000000..c22f8b8 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ts3.4/StandardRetryStrategy.d.ts @@ -0,0 +1,26 @@ +import { Provider, RetryErrorInfo, RetryStrategyV2, StandardRetryToken } from "@smithy/types"; +/** + * @public + */ +export declare class StandardRetryStrategy implements RetryStrategyV2 { + private readonly maxAttempts; + readonly mode: string; + private capacity; + private readonly retryBackoffStrategy; + private readonly maxAttemptsProvider; + constructor(maxAttempts: number); + constructor(maxAttemptsProvider: Provider); + acquireInitialRetryToken(retryTokenScope: string): Promise; + refreshRetryTokenForRetry(token: StandardRetryToken, errorInfo: RetryErrorInfo): Promise; + recordSuccess(token: StandardRetryToken): void; + /** + * @returns the current available retry capacity. + * + * This number decreases when retries are executed and refills when requests or retries succeed. + */ + getCapacity(): number; + private getMaxAttempts; + private shouldRetry; + private getCapacityCost; + private isRetryableError; +} diff --git a/node_modules/@smithy/util-retry/dist-types/ts3.4/config.d.ts b/node_modules/@smithy/util-retry/dist-types/ts3.4/config.d.ts new file mode 100644 index 0000000..6727a38 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ts3.4/config.d.ts @@ -0,0 +1,20 @@ +/** + * @public + */ +export declare enum RETRY_MODES { + STANDARD = "standard", + ADAPTIVE = "adaptive" +} +/** + * @public + * + * The default value for how many HTTP requests an SDK should make for a + * single SDK operation invocation before giving up + */ +export declare const DEFAULT_MAX_ATTEMPTS = 3; +/** + * @public + * + * The default retry algorithm to use. + */ +export declare const DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD; diff --git a/node_modules/@smithy/util-retry/dist-types/ts3.4/constants.d.ts b/node_modules/@smithy/util-retry/dist-types/ts3.4/constants.d.ts new file mode 100644 index 0000000..5c1a5ce --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ts3.4/constants.d.ts @@ -0,0 +1,59 @@ +/** + * @public + * + * The base number of milliseconds to use in calculating a suitable cool-down + * time when a retryable error is encountered. + */ +export declare const DEFAULT_RETRY_DELAY_BASE = 100; +/** + * @public + * + * The maximum amount of time (in milliseconds) that will be used as a delay + * between retry attempts. + */ +export declare const MAXIMUM_RETRY_DELAY: number; +/** + * @public + * + * The retry delay base (in milliseconds) to use when a throttling error is + * encountered. + */ +export declare const THROTTLING_RETRY_DELAY_BASE = 500; +/** + * @public + * + * Initial number of retry tokens in Retry Quota + */ +export declare const INITIAL_RETRY_TOKENS = 500; +/** + * @public + * + * The total amount of retry tokens to be decremented from retry token balance. + */ +export declare const RETRY_COST = 5; +/** + * @public + * + * The total amount of retry tokens to be decremented from retry token balance + * when a throttling error is encountered. + */ +export declare const TIMEOUT_RETRY_COST = 10; +/** + * @public + * + * The total amount of retry token to be incremented from retry token balance + * if an SDK operation invocation succeeds without requiring a retry request. + */ +export declare const NO_RETRY_INCREMENT = 1; +/** + * @public + * + * Header name for SDK invocation ID + */ +export declare const INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; +/** + * @public + * + * Header name for request retry information. + */ +export declare const REQUEST_HEADER = "amz-sdk-request"; diff --git a/node_modules/@smithy/util-retry/dist-types/ts3.4/defaultRetryBackoffStrategy.d.ts b/node_modules/@smithy/util-retry/dist-types/ts3.4/defaultRetryBackoffStrategy.d.ts new file mode 100644 index 0000000..1d632ca --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ts3.4/defaultRetryBackoffStrategy.d.ts @@ -0,0 +1,5 @@ +import { StandardRetryBackoffStrategy } from "@smithy/types"; +/** + * @internal + */ +export declare const getDefaultRetryBackoffStrategy: () => StandardRetryBackoffStrategy; diff --git a/node_modules/@smithy/util-retry/dist-types/ts3.4/defaultRetryToken.d.ts b/node_modules/@smithy/util-retry/dist-types/ts3.4/defaultRetryToken.d.ts new file mode 100644 index 0000000..fd4b75e --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ts3.4/defaultRetryToken.d.ts @@ -0,0 +1,9 @@ +import { StandardRetryToken } from "@smithy/types"; +/** + * @internal + */ +export declare const createDefaultRetryToken: ({ retryDelay, retryCount, retryCost, }: { + retryDelay: number; + retryCount: number; + retryCost?: number | undefined; +}) => StandardRetryToken; diff --git a/node_modules/@smithy/util-retry/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-retry/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..de9af3d --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ts3.4/index.d.ts @@ -0,0 +1,7 @@ +export * from "./AdaptiveRetryStrategy"; +export * from "./ConfiguredRetryStrategy"; +export * from "./DefaultRateLimiter"; +export * from "./StandardRetryStrategy"; +export * from "./config"; +export * from "./constants"; +export * from "./types"; diff --git a/node_modules/@smithy/util-retry/dist-types/ts3.4/types.d.ts b/node_modules/@smithy/util-retry/dist-types/ts3.4/types.d.ts new file mode 100644 index 0000000..5a20c01 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/ts3.4/types.d.ts @@ -0,0 +1,19 @@ +/** + * @internal + */ +export interface RateLimiter { + /** + * If there is sufficient capacity (tokens) available, it immediately returns. + * If there is not sufficient capacity, it will either sleep a certain amount + * of time until the rate limiter can retrieve a token from its token bucket + * or raise an exception indicating there is insufficient capacity. + */ + getSendToken: () => Promise; + /** + * Updates the client sending rate based on response. + * If the response was successful, the capacity and fill rate are increased. + * If the response was a throttling response, the capacity and fill rate are + * decreased. Transient errors do not affect the rate limiter. + */ + updateClientSendingRate: (response: any) => void; +} diff --git a/node_modules/@smithy/util-retry/dist-types/types.d.ts b/node_modules/@smithy/util-retry/dist-types/types.d.ts new file mode 100644 index 0000000..b3f2bd1 --- /dev/null +++ b/node_modules/@smithy/util-retry/dist-types/types.d.ts @@ -0,0 +1,19 @@ +/** + * @internal + */ +export interface RateLimiter { + /** + * If there is sufficient capacity (tokens) available, it immediately returns. + * If there is not sufficient capacity, it will either sleep a certain amount + * of time until the rate limiter can retrieve a token from its token bucket + * or raise an exception indicating there is insufficient capacity. + */ + getSendToken: () => Promise; + /** + * Updates the client sending rate based on response. + * If the response was successful, the capacity and fill rate are increased. + * If the response was a throttling response, the capacity and fill rate are + * decreased. Transient errors do not affect the rate limiter. + */ + updateClientSendingRate: (response: any) => void; +} diff --git a/node_modules/@smithy/util-retry/package.json b/node_modules/@smithy/util-retry/package.json new file mode 100644 index 0000000..15d84ca --- /dev/null +++ b/node_modules/@smithy/util-retry/package.json @@ -0,0 +1,68 @@ +{ + "name": "@smithy/util-retry", + "version": "2.2.0", + "description": "Shared retry utilities to be used in middleware packages.", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-retry", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "extract:docs": "api-extractor run --local", + "test": "yarn g:jest" + }, + "keywords": [ + "aws", + "retry" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/service-error-classification": "^2.1.5", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "@types/node": "^14.14.31", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">= 14.0.0" + }, + "typesVersions": { + "<4.0": { + "types/*": [ + "types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/master/packages/util-retry", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-retry" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-stream/LICENSE b/node_modules/@smithy/util-stream/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/util-stream/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-stream/README.md b/node_modules/@smithy/util-stream/README.md new file mode 100644 index 0000000..6fcd9f6 --- /dev/null +++ b/node_modules/@smithy/util-stream/README.md @@ -0,0 +1,6 @@ +# @smithy/util-stream + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-stream/latest.svg)](https://www.npmjs.com/package/@smithy/util-stream) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-stream.svg)](https://www.npmjs.com/package/@smithy/util-stream) + +Package with utilities to operate on streams. diff --git a/node_modules/@smithy/util-stream/dist-cjs/blob/Uint8ArrayBlobAdapter.js b/node_modules/@smithy/util-stream/dist-cjs/blob/Uint8ArrayBlobAdapter.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-cjs/blob/Uint8ArrayBlobAdapter.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-stream/dist-cjs/blob/transforms.js b/node_modules/@smithy/util-stream/dist-cjs/blob/transforms.js new file mode 100644 index 0000000..0440577 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-cjs/blob/transforms.js @@ -0,0 +1 @@ +module.exports = require("../index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js b/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js new file mode 100644 index 0000000..d8e540c --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAwsChunkedEncodingStream = void 0; +const getAwsChunkedEncodingStream = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== undefined && + bodyLengthChecker !== undefined && + checksumAlgorithmFn !== undefined && + checksumLocationName !== undefined && + streamHasher !== undefined; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; + const reader = readableStream.getReader(); + return new ReadableStream({ + async pull(controller) { + const { value, done } = await reader.read(); + if (done) { + controller.enqueue(`0\r\n`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + controller.enqueue(`${checksumLocationName}:${checksum}\r\n`); + controller.enqueue(`\r\n`); + } + controller.close(); + } + else { + controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r\n${value}\r\n`); + } + }, + }); +}; +exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; diff --git a/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js b/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js new file mode 100644 index 0000000..4f3f9e7 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAwsChunkedEncodingStream = void 0; +const stream_1 = require("stream"); +const getAwsChunkedEncodingStream = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== undefined && + checksumAlgorithmFn !== undefined && + checksumLocationName !== undefined && + streamHasher !== undefined; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; + const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); + readableStream.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push("\r\n"); + }); + readableStream.on("end", async () => { + awsChunkedEncodingStream.push(`0\r\n`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); + awsChunkedEncodingStream.push(`\r\n`); + } + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; +}; +exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; diff --git a/node_modules/@smithy/util-stream/dist-cjs/index.js b/node_modules/@smithy/util-stream/dist-cjs/index.js new file mode 100644 index 0000000..4031941 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-cjs/index.js @@ -0,0 +1,89 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter +}); +module.exports = __toCommonJS(src_exports); + +// src/blob/transforms.ts +var import_util_base64 = require("@smithy/util-base64"); +var import_util_utf8 = require("@smithy/util-utf8"); +function transformToString(payload, encoding = "utf-8") { + if (encoding === "base64") { + return (0, import_util_base64.toBase64)(payload); + } + return (0, import_util_utf8.toUtf8)(payload); +} +__name(transformToString, "transformToString"); +function transformFromString(str, encoding) { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str)); + } + return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str)); +} +__name(transformFromString, "transformFromString"); + +// src/blob/Uint8ArrayBlobAdapter.ts +var _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array { + /** + * @param source - such as a string or Stream. + * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. + */ + static fromString(source, encoding = "utf-8") { + switch (typeof source) { + case "string": + return transformFromString(source, encoding); + default: + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } + } + /** + * @param source - Uint8Array to be mutated. + * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. + */ + static mutate(source) { + Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype); + return source; + } + /** + * @param encoding - default 'utf-8'. + * @returns the blob as string. + */ + transformToString(encoding = "utf-8") { + return transformToString(this, encoding); + } +}; +__name(_Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter"); +var Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter; + +// src/index.ts +__reExport(src_exports, require("././getAwsChunkedEncodingStream"), module.exports); +__reExport(src_exports, require("././sdk-stream-mixin"), module.exports); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + Uint8ArrayBlobAdapter, + getAwsChunkedEncodingStream, + sdkStreamMixin +}); + diff --git a/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js b/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js new file mode 100644 index 0000000..3f34f0d --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sdkStreamMixin = void 0; +const fetch_http_handler_1 = require("@smithy/fetch-http-handler"); +const util_base64_1 = require("@smithy/util-base64"); +const util_hex_encoding_1 = require("@smithy/util-hex-encoding"); +const util_utf8_1 = require("@smithy/util-utf8"); +const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; +const sdkStreamMixin = (stream) => { + var _a, _b; + if (!isBlobInstance(stream) && !isReadableStreamInstance(stream)) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, fetch_http_handler_1.streamCollector)(stream); + }; + const blobToWebStream = (blob) => { + if (typeof blob.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\n" + + "If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob.stream(); + }; + return Object.assign(stream, { + transformToByteArray: transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return (0, util_base64_1.toBase64)(buf); + } + else if (encoding === "hex") { + return (0, util_hex_encoding_1.toHex)(buf); + } + else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { + return (0, util_utf8_1.toUtf8)(buf); + } + else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } + else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } + else if (isReadableStreamInstance(stream)) { + return stream; + } + else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + }, + }); +}; +exports.sdkStreamMixin = sdkStreamMixin; +const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; +const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; diff --git a/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js b/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js new file mode 100644 index 0000000..c2af344 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sdkStreamMixin = void 0; +const node_http_handler_1 = require("@smithy/node-http-handler"); +const util_buffer_from_1 = require("@smithy/util-buffer-from"); +const stream_1 = require("stream"); +const util_1 = require("util"); +const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; +const sdkStreamMixin = (stream) => { + var _a, _b; + if (!(stream instanceof stream_1.Readable)) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, node_http_handler_1.streamCollector)(stream); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === undefined || Buffer.isEncoding(encoding)) { + return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); + } + else { + const decoder = new util_1.TextDecoder(encoding); + return decoder.decode(buf); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + if (stream.readableFlowing !== null) { + throw new Error("The stream has been consumed by other callbacks."); + } + if (typeof stream_1.Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available."); + } + transformed = true; + return stream_1.Readable.toWeb(stream); + }, + }); +}; +exports.sdkStreamMixin = sdkStreamMixin; diff --git a/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js b/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js new file mode 100644 index 0000000..41746b1 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js @@ -0,0 +1,18 @@ +import { transformFromString, transformToString } from "./transforms"; +export class Uint8ArrayBlobAdapter extends Uint8Array { + static fromString(source, encoding = "utf-8") { + switch (typeof source) { + case "string": + return transformFromString(source, encoding); + default: + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } + } + static mutate(source) { + Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype); + return source; + } + transformToString(encoding = "utf-8") { + return transformToString(this, encoding); + } +} diff --git a/node_modules/@smithy/util-stream/dist-es/blob/transforms.js b/node_modules/@smithy/util-stream/dist-es/blob/transforms.js new file mode 100644 index 0000000..0d1f74a --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-es/blob/transforms.js @@ -0,0 +1,15 @@ +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; +import { Uint8ArrayBlobAdapter } from "./Uint8ArrayBlobAdapter"; +export function transformToString(payload, encoding = "utf-8") { + if (encoding === "base64") { + return toBase64(payload); + } + return toUtf8(payload); +} +export function transformFromString(str, encoding) { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate(fromBase64(str)); + } + return Uint8ArrayBlobAdapter.mutate(fromUtf8(str)); +} diff --git a/node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js b/node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js new file mode 100644 index 0000000..b5d5fa4 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js @@ -0,0 +1,27 @@ +export const getAwsChunkedEncodingStream = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== undefined && + bodyLengthChecker !== undefined && + checksumAlgorithmFn !== undefined && + checksumLocationName !== undefined && + streamHasher !== undefined; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; + const reader = readableStream.getReader(); + return new ReadableStream({ + async pull(controller) { + const { value, done } = await reader.read(); + if (done) { + controller.enqueue(`0\r\n`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + controller.enqueue(`${checksumLocationName}:${checksum}\r\n`); + controller.enqueue(`\r\n`); + } + controller.close(); + } + else { + controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r\n${value}\r\n`); + } + }, + }); +}; diff --git a/node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.js b/node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.js new file mode 100644 index 0000000..7c55116 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.js @@ -0,0 +1,26 @@ +import { Readable } from "stream"; +export const getAwsChunkedEncodingStream = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== undefined && + checksumAlgorithmFn !== undefined && + checksumLocationName !== undefined && + streamHasher !== undefined; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; + const awsChunkedEncodingStream = new Readable({ read: () => { } }); + readableStream.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push("\r\n"); + }); + readableStream.on("end", async () => { + awsChunkedEncodingStream.push(`0\r\n`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); + awsChunkedEncodingStream.push(`\r\n`); + } + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; +}; diff --git a/node_modules/@smithy/util-stream/dist-es/index.js b/node_modules/@smithy/util-stream/dist-es/index.js new file mode 100644 index 0000000..47bcb14 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-es/index.js @@ -0,0 +1,3 @@ +export * from "./blob/Uint8ArrayBlobAdapter"; +export * from "./getAwsChunkedEncodingStream"; +export * from "./sdk-stream-mixin"; diff --git a/node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js b/node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js new file mode 100644 index 0000000..bb673de --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js @@ -0,0 +1,64 @@ +import { streamCollector } from "@smithy/fetch-http-handler"; +import { toBase64 } from "@smithy/util-base64"; +import { toHex } from "@smithy/util-hex-encoding"; +import { toUtf8 } from "@smithy/util-utf8"; +const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; +export const sdkStreamMixin = (stream) => { + if (!isBlobInstance(stream) && !isReadableStreamInstance(stream)) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await streamCollector(stream); + }; + const blobToWebStream = (blob) => { + if (typeof blob.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\n" + + "If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob.stream(); + }; + return Object.assign(stream, { + transformToByteArray: transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return toBase64(buf); + } + else if (encoding === "hex") { + return toHex(buf); + } + else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { + return toUtf8(buf); + } + else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } + else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } + else if (isReadableStreamInstance(stream)) { + return stream; + } + else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + }, + }); +}; +const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; +const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; diff --git a/node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.js b/node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.js new file mode 100644 index 0000000..b5835e1 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.js @@ -0,0 +1,45 @@ +import { streamCollector } from "@smithy/node-http-handler"; +import { fromArrayBuffer } from "@smithy/util-buffer-from"; +import { Readable } from "stream"; +import { TextDecoder } from "util"; +const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; +export const sdkStreamMixin = (stream) => { + if (!(stream instanceof Readable)) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await streamCollector(stream); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === undefined || Buffer.isEncoding(encoding)) { + return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); + } + else { + const decoder = new TextDecoder(encoding); + return decoder.decode(buf); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + if (stream.readableFlowing !== null) { + throw new Error("The stream has been consumed by other callbacks."); + } + if (typeof Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available."); + } + transformed = true; + return Readable.toWeb(stream); + }, + }); +}; diff --git a/node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts b/node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts new file mode 100644 index 0000000..c3d994d --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts @@ -0,0 +1,21 @@ +/** + * Adapter for conversions of the native Uint8Array type. + * @public + */ +export declare class Uint8ArrayBlobAdapter extends Uint8Array { + /** + * @param source - such as a string or Stream. + * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. + */ + static fromString(source: string, encoding?: string): Uint8ArrayBlobAdapter; + /** + * @param source - Uint8Array to be mutated. + * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. + */ + static mutate(source: Uint8Array): Uint8ArrayBlobAdapter; + /** + * @param encoding - default 'utf-8'. + * @returns the blob as string. + */ + transformToString(encoding?: string): string; +} diff --git a/node_modules/@smithy/util-stream/dist-types/blob/transforms.d.ts b/node_modules/@smithy/util-stream/dist-types/blob/transforms.d.ts new file mode 100644 index 0000000..c54a18b --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/blob/transforms.d.ts @@ -0,0 +1,9 @@ +import { Uint8ArrayBlobAdapter } from "./Uint8ArrayBlobAdapter"; +/** + * @internal + */ +export declare function transformToString(payload: Uint8Array, encoding?: string): string; +/** + * @internal + */ +export declare function transformFromString(str: string, encoding?: string): Uint8ArrayBlobAdapter; diff --git a/node_modules/@smithy/util-stream/dist-types/getAwsChunkedEncodingStream.browser.d.ts b/node_modules/@smithy/util-stream/dist-types/getAwsChunkedEncodingStream.browser.d.ts new file mode 100644 index 0000000..f767f77 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/getAwsChunkedEncodingStream.browser.d.ts @@ -0,0 +1,5 @@ +import { GetAwsChunkedEncodingStream } from "@smithy/types"; +/** + * @internal + */ +export declare const getAwsChunkedEncodingStream: GetAwsChunkedEncodingStream; diff --git a/node_modules/@smithy/util-stream/dist-types/getAwsChunkedEncodingStream.d.ts b/node_modules/@smithy/util-stream/dist-types/getAwsChunkedEncodingStream.d.ts new file mode 100644 index 0000000..d3997d0 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/getAwsChunkedEncodingStream.d.ts @@ -0,0 +1,7 @@ +/// +import { GetAwsChunkedEncodingStream } from "@smithy/types"; +import { Readable } from "stream"; +/** + * @internal + */ +export declare const getAwsChunkedEncodingStream: GetAwsChunkedEncodingStream; diff --git a/node_modules/@smithy/util-stream/dist-types/index.d.ts b/node_modules/@smithy/util-stream/dist-types/index.d.ts new file mode 100644 index 0000000..47bcb14 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/index.d.ts @@ -0,0 +1,3 @@ +export * from "./blob/Uint8ArrayBlobAdapter"; +export * from "./getAwsChunkedEncodingStream"; +export * from "./sdk-stream-mixin"; diff --git a/node_modules/@smithy/util-stream/dist-types/sdk-stream-mixin.browser.d.ts b/node_modules/@smithy/util-stream/dist-types/sdk-stream-mixin.browser.d.ts new file mode 100644 index 0000000..400c0b2 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/sdk-stream-mixin.browser.d.ts @@ -0,0 +1,7 @@ +import { SdkStream } from "@smithy/types"; +/** + * The stream handling utility functions for browsers and React Native + * + * @internal + */ +export declare const sdkStreamMixin: (stream: unknown) => SdkStream; diff --git a/node_modules/@smithy/util-stream/dist-types/sdk-stream-mixin.d.ts b/node_modules/@smithy/util-stream/dist-types/sdk-stream-mixin.d.ts new file mode 100644 index 0000000..7576db6 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/sdk-stream-mixin.d.ts @@ -0,0 +1,8 @@ +import { SdkStream } from "@smithy/types"; +import { Readable } from "stream"; +/** + * The function that mixes in the utility functions to help consuming runtime-specific payload stream. + * + * @internal + */ +export declare const sdkStreamMixin: (stream: unknown) => SdkStream; diff --git a/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/Uint8ArrayBlobAdapter.d.ts b/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/Uint8ArrayBlobAdapter.d.ts new file mode 100644 index 0000000..e0338a2 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/Uint8ArrayBlobAdapter.d.ts @@ -0,0 +1,21 @@ +/** + * Adapter for conversions of the native Uint8Array type. + * @public + */ +export declare class Uint8ArrayBlobAdapter extends Uint8Array { + /** + * @param source - such as a string or Stream. + * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. + */ + static fromString(source: string, encoding?: string): Uint8ArrayBlobAdapter; + /** + * @param source - Uint8Array to be mutated. + * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. + */ + static mutate(source: Uint8Array): Uint8ArrayBlobAdapter; + /** + * @param encoding - default 'utf-8'. + * @returns the blob as string. + */ + transformToString(encoding?: string): string; +} diff --git a/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/transforms.d.ts b/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/transforms.d.ts new file mode 100644 index 0000000..6e3ee0a --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/transforms.d.ts @@ -0,0 +1,9 @@ +import { Uint8ArrayBlobAdapter } from "./Uint8ArrayBlobAdapter"; +/** + * @internal + */ +export declare function transformToString(payload: Uint8Array, encoding?: string): string; +/** + * @internal + */ +export declare function transformFromString(str: string, encoding?: string): Uint8ArrayBlobAdapter; diff --git a/node_modules/@smithy/util-stream/dist-types/ts3.4/getAwsChunkedEncodingStream.browser.d.ts b/node_modules/@smithy/util-stream/dist-types/ts3.4/getAwsChunkedEncodingStream.browser.d.ts new file mode 100644 index 0000000..5979078 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/ts3.4/getAwsChunkedEncodingStream.browser.d.ts @@ -0,0 +1,5 @@ +import { GetAwsChunkedEncodingStream } from "@smithy/types"; +/** + * @internal + */ +export declare const getAwsChunkedEncodingStream: GetAwsChunkedEncodingStream; diff --git a/node_modules/@smithy/util-stream/dist-types/ts3.4/getAwsChunkedEncodingStream.d.ts b/node_modules/@smithy/util-stream/dist-types/ts3.4/getAwsChunkedEncodingStream.d.ts new file mode 100644 index 0000000..a100381 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/ts3.4/getAwsChunkedEncodingStream.d.ts @@ -0,0 +1,7 @@ +/// +import { GetAwsChunkedEncodingStream } from "@smithy/types"; +import { Readable } from "stream"; +/** + * @internal + */ +export declare const getAwsChunkedEncodingStream: GetAwsChunkedEncodingStream; diff --git a/node_modules/@smithy/util-stream/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-stream/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..952bb4f --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/ts3.4/index.d.ts @@ -0,0 +1,3 @@ +export * from "./blob/Uint8ArrayBlobAdapter"; +export * from "./getAwsChunkedEncodingStream"; +export * from "./sdk-stream-mixin"; diff --git a/node_modules/@smithy/util-stream/dist-types/ts3.4/sdk-stream-mixin.browser.d.ts b/node_modules/@smithy/util-stream/dist-types/ts3.4/sdk-stream-mixin.browser.d.ts new file mode 100644 index 0000000..99dea40 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/ts3.4/sdk-stream-mixin.browser.d.ts @@ -0,0 +1,7 @@ +import { SdkStream } from "@smithy/types"; +/** + * The stream handling utility functions for browsers and React Native + * + * @internal + */ +export declare const sdkStreamMixin: (stream: unknown) => SdkStream; diff --git a/node_modules/@smithy/util-stream/dist-types/ts3.4/sdk-stream-mixin.d.ts b/node_modules/@smithy/util-stream/dist-types/ts3.4/sdk-stream-mixin.d.ts new file mode 100644 index 0000000..1dbf498 --- /dev/null +++ b/node_modules/@smithy/util-stream/dist-types/ts3.4/sdk-stream-mixin.d.ts @@ -0,0 +1,8 @@ +import { SdkStream } from "@smithy/types"; +import { Readable } from "stream"; +/** + * The function that mixes in the utility functions to help consuming runtime-specific payload stream. + * + * @internal + */ +export declare const sdkStreamMixin: (stream: unknown) => SdkStream; diff --git a/node_modules/@smithy/util-stream/package.json b/node_modules/@smithy/util-stream/package.json new file mode 100644 index 0000000..85f36d7 --- /dev/null +++ b/node_modules/@smithy/util-stream/package.json @@ -0,0 +1,95 @@ +{ + "name": "@smithy/util-stream", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-stream", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "extract:docs": "api-extractor run --local", + "test": "yarn g:jest && karma start karma.conf.js", + "test:integration": "yarn g:jest --config jest.config.integ.js" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-buffer-from": "^2.2.0", + "@smithy/util-hex-encoding": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@smithy/util-test": "^0.2.0", + "@types/chai-as-promised": "^7.1.2", + "@types/node": "^14.14.31", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "karma": "6.4.0", + "karma-chai": "0.1.0", + "karma-chrome-launcher": "3.1.1", + "karma-coverage": "2.2.1", + "karma-env-preprocessor": "0.1.1", + "karma-firefox-launcher": "2.1.3", + "karma-jasmine": "5.1.0", + "karma-mocha": "2.0.1", + "karma-sourcemap-loader": "0.3.8", + "karma-typescript": "5.5.3", + "karma-webpack": "5.0.0", + "rimraf": "3.0.2", + "typedoc": "0.23.23", + "webpack": "5.76.0", + "webpack-cli": "4.10.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "browser": { + "./dist-es/getAwsChunkedEncodingStream": "./dist-es/getAwsChunkedEncodingStream.browser", + "./dist-es/sdk-stream-mixin": "./dist-es/sdk-stream-mixin.browser" + }, + "react-native": { + "./dist-es/getAwsChunkedEncodingStream": "./dist-es/getAwsChunkedEncodingStream.browser", + "./dist-es/sdk-stream-mixin": "./dist-es/sdk-stream-mixin.browser", + "./dist-cjs/getAwsChunkedEncodingStream": "./dist-cjs/getAwsChunkedEncodingStream.browser", + "./dist-cjs/sdk-stream-mixin": "./dist-cjs/sdk-stream-mixin.browser" + }, + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-stream", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-stream" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-uri-escape/LICENSE b/node_modules/@smithy/util-uri-escape/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-uri-escape/README.md b/node_modules/@smithy/util-uri-escape/README.md new file mode 100644 index 0000000..22e939a --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/README.md @@ -0,0 +1,10 @@ +# @smithy/util-uri-escape + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-uri-escape/latest.svg)](https://www.npmjs.com/package/@smithy/util-uri-escape) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-uri-escape.svg)](https://www.npmjs.com/package/@smithy/util-uri-escape) + +> An internal package + +## Usage + +You probably shouldn't, at least directly. diff --git a/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri-path.js b/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri-path.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri-path.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri.js b/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-uri-escape/dist-cjs/index.js b/node_modules/@smithy/util-uri-escape/dist-cjs/index.js new file mode 100644 index 0000000..51001ef --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-cjs/index.js @@ -0,0 +1,43 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + escapeUri: () => escapeUri, + escapeUriPath: () => escapeUriPath +}); +module.exports = __toCommonJS(src_exports); + +// src/escape-uri.ts +var escapeUri = /* @__PURE__ */ __name((uri) => ( + // AWS percent-encodes some extra non-standard characters in a URI + encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode) +), "escapeUri"); +var hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); + +// src/escape-uri-path.ts +var escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + escapeUri, + escapeUriPath +}); + diff --git a/node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js b/node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js new file mode 100644 index 0000000..81b3fe3 --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js @@ -0,0 +1,2 @@ +import { escapeUri } from "./escape-uri"; +export const escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); diff --git a/node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js b/node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js new file mode 100644 index 0000000..8990be1 --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js @@ -0,0 +1,2 @@ +export const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); +const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; diff --git a/node_modules/@smithy/util-uri-escape/dist-es/index.js b/node_modules/@smithy/util-uri-escape/dist-es/index.js new file mode 100644 index 0000000..ed402e1 --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-es/index.js @@ -0,0 +1,2 @@ +export * from "./escape-uri"; +export * from "./escape-uri-path"; diff --git a/node_modules/@smithy/util-uri-escape/dist-types/escape-uri-path.d.ts b/node_modules/@smithy/util-uri-escape/dist-types/escape-uri-path.d.ts new file mode 100644 index 0000000..b547ff9 --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-types/escape-uri-path.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const escapeUriPath: (uri: string) => string; diff --git a/node_modules/@smithy/util-uri-escape/dist-types/escape-uri.d.ts b/node_modules/@smithy/util-uri-escape/dist-types/escape-uri.d.ts new file mode 100644 index 0000000..3f14d2c --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-types/escape-uri.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const escapeUri: (uri: string) => string; diff --git a/node_modules/@smithy/util-uri-escape/dist-types/index.d.ts b/node_modules/@smithy/util-uri-escape/dist-types/index.d.ts new file mode 100644 index 0000000..1913825 --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-types/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./escape-uri"; +/** + * @internal + */ +export * from "./escape-uri-path"; diff --git a/node_modules/@smithy/util-uri-escape/dist-types/ts3.4/escape-uri-path.d.ts b/node_modules/@smithy/util-uri-escape/dist-types/ts3.4/escape-uri-path.d.ts new file mode 100644 index 0000000..a7e19ca --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-types/ts3.4/escape-uri-path.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const escapeUriPath: (uri: string) => string; diff --git a/node_modules/@smithy/util-uri-escape/dist-types/ts3.4/escape-uri.d.ts b/node_modules/@smithy/util-uri-escape/dist-types/ts3.4/escape-uri.d.ts new file mode 100644 index 0000000..13cc372 --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-types/ts3.4/escape-uri.d.ts @@ -0,0 +1,4 @@ +/** + * @internal + */ +export declare const escapeUri: (uri: string) => string; diff --git a/node_modules/@smithy/util-uri-escape/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-uri-escape/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..ad719fe --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/dist-types/ts3.4/index.d.ts @@ -0,0 +1,8 @@ +/** + * @internal + */ +export * from "./escape-uri"; +/** + * @internal + */ +export * from "./escape-uri-path"; diff --git a/node_modules/@smithy/util-uri-escape/package.json b/node_modules/@smithy/util-uri-escape/package.json new file mode 100644 index 0000000..5c9b9ee --- /dev/null +++ b/node_modules/@smithy/util-uri-escape/package.json @@ -0,0 +1,59 @@ +{ + "name": "@smithy/util-uri-escape", + "version": "2.2.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-uri-escape", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "types": "./dist-types/index.d.ts", + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-uri-escape", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-uri-escape" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/@smithy/util-utf8/LICENSE b/node_modules/@smithy/util-utf8/LICENSE new file mode 100644 index 0000000..7b6491b --- /dev/null +++ b/node_modules/@smithy/util-utf8/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/node_modules/@smithy/util-utf8/README.md b/node_modules/@smithy/util-utf8/README.md new file mode 100644 index 0000000..fc5db6d --- /dev/null +++ b/node_modules/@smithy/util-utf8/README.md @@ -0,0 +1,4 @@ +# @smithy/util-utf8 + +[![NPM version](https://img.shields.io/npm/v/@smithy/util-utf8/latest.svg)](https://www.npmjs.com/package/@smithy/util-utf8) +[![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-utf8.svg)](https://www.npmjs.com/package/@smithy/util-utf8) diff --git a/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js b/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js b/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-utf8/dist-cjs/index.js b/node_modules/@smithy/util-utf8/dist-cjs/index.js new file mode 100644 index 0000000..0b22680 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-cjs/index.js @@ -0,0 +1,65 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + fromUtf8: () => fromUtf8, + toUint8Array: () => toUint8Array, + toUtf8: () => toUtf8 +}); +module.exports = __toCommonJS(src_exports); + +// src/fromUtf8.ts +var import_util_buffer_from = require("@smithy/util-buffer-from"); +var fromUtf8 = /* @__PURE__ */ __name((input) => { + const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); +}, "fromUtf8"); + +// src/toUint8Array.ts +var toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +}, "toUint8Array"); + +// src/toUtf8.ts + +var toUtf8 = /* @__PURE__ */ __name((input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); +}, "toUtf8"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (module.exports = { + fromUtf8, + toUint8Array, + toUtf8 +}); + diff --git a/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js b/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js b/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js b/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js new file mode 100644 index 0000000..532e610 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js @@ -0,0 +1 @@ +module.exports = require("./index.js"); \ No newline at end of file diff --git a/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js b/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js new file mode 100644 index 0000000..7344190 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js @@ -0,0 +1 @@ +export const fromUtf8 = (input) => new TextEncoder().encode(input); diff --git a/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js b/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js new file mode 100644 index 0000000..6dc438b --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js @@ -0,0 +1,5 @@ +import { fromString } from "@smithy/util-buffer-from"; +export const fromUtf8 = (input) => { + const buf = fromString(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); +}; diff --git a/node_modules/@smithy/util-utf8/dist-es/index.js b/node_modules/@smithy/util-utf8/dist-es/index.js new file mode 100644 index 0000000..00ba465 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-es/index.js @@ -0,0 +1,3 @@ +export * from "./fromUtf8"; +export * from "./toUint8Array"; +export * from "./toUtf8"; diff --git a/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js b/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js new file mode 100644 index 0000000..2cd36f7 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js @@ -0,0 +1,10 @@ +import { fromUtf8 } from "./fromUtf8"; +export const toUint8Array = (data) => { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +}; diff --git a/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js b/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js new file mode 100644 index 0000000..c292127 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js @@ -0,0 +1,9 @@ +export const toUtf8 = (input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return new TextDecoder("utf-8").decode(input); +}; diff --git a/node_modules/@smithy/util-utf8/dist-es/toUtf8.js b/node_modules/@smithy/util-utf8/dist-es/toUtf8.js new file mode 100644 index 0000000..7be8745 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-es/toUtf8.js @@ -0,0 +1,10 @@ +import { fromArrayBuffer } from "@smithy/util-buffer-from"; +export const toUtf8 = (input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); +}; diff --git a/node_modules/@smithy/util-utf8/dist-types/fromUtf8.browser.d.ts b/node_modules/@smithy/util-utf8/dist-types/fromUtf8.browser.d.ts new file mode 100644 index 0000000..dd91981 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/fromUtf8.browser.d.ts @@ -0,0 +1 @@ +export declare const fromUtf8: (input: string) => Uint8Array; diff --git a/node_modules/@smithy/util-utf8/dist-types/fromUtf8.d.ts b/node_modules/@smithy/util-utf8/dist-types/fromUtf8.d.ts new file mode 100644 index 0000000..dd91981 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/fromUtf8.d.ts @@ -0,0 +1 @@ +export declare const fromUtf8: (input: string) => Uint8Array; diff --git a/node_modules/@smithy/util-utf8/dist-types/index.d.ts b/node_modules/@smithy/util-utf8/dist-types/index.d.ts new file mode 100644 index 0000000..00ba465 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/index.d.ts @@ -0,0 +1,3 @@ +export * from "./fromUtf8"; +export * from "./toUint8Array"; +export * from "./toUtf8"; diff --git a/node_modules/@smithy/util-utf8/dist-types/toUint8Array.d.ts b/node_modules/@smithy/util-utf8/dist-types/toUint8Array.d.ts new file mode 100644 index 0000000..11b6342 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/toUint8Array.d.ts @@ -0,0 +1 @@ +export declare const toUint8Array: (data: string | ArrayBuffer | ArrayBufferView) => Uint8Array; diff --git a/node_modules/@smithy/util-utf8/dist-types/toUtf8.browser.d.ts b/node_modules/@smithy/util-utf8/dist-types/toUtf8.browser.d.ts new file mode 100644 index 0000000..8494acd --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/toUtf8.browser.d.ts @@ -0,0 +1,7 @@ +/** + * + * This does not convert non-utf8 strings to utf8, it only passes through strings if + * a string is received instead of a Uint8Array. + * + */ +export declare const toUtf8: (input: Uint8Array | string) => string; diff --git a/node_modules/@smithy/util-utf8/dist-types/toUtf8.d.ts b/node_modules/@smithy/util-utf8/dist-types/toUtf8.d.ts new file mode 100644 index 0000000..8494acd --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/toUtf8.d.ts @@ -0,0 +1,7 @@ +/** + * + * This does not convert non-utf8 strings to utf8, it only passes through strings if + * a string is received instead of a Uint8Array. + * + */ +export declare const toUtf8: (input: Uint8Array | string) => string; diff --git a/node_modules/@smithy/util-utf8/dist-types/ts3.4/fromUtf8.browser.d.ts b/node_modules/@smithy/util-utf8/dist-types/ts3.4/fromUtf8.browser.d.ts new file mode 100644 index 0000000..39f3d6d --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/ts3.4/fromUtf8.browser.d.ts @@ -0,0 +1 @@ +export declare const fromUtf8: (input: string) => Uint8Array; diff --git a/node_modules/@smithy/util-utf8/dist-types/ts3.4/fromUtf8.d.ts b/node_modules/@smithy/util-utf8/dist-types/ts3.4/fromUtf8.d.ts new file mode 100644 index 0000000..39f3d6d --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/ts3.4/fromUtf8.d.ts @@ -0,0 +1 @@ +export declare const fromUtf8: (input: string) => Uint8Array; diff --git a/node_modules/@smithy/util-utf8/dist-types/ts3.4/index.d.ts b/node_modules/@smithy/util-utf8/dist-types/ts3.4/index.d.ts new file mode 100644 index 0000000..ef9761d --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/ts3.4/index.d.ts @@ -0,0 +1,3 @@ +export * from "./fromUtf8"; +export * from "./toUint8Array"; +export * from "./toUtf8"; diff --git a/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUint8Array.d.ts b/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUint8Array.d.ts new file mode 100644 index 0000000..562fe10 --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUint8Array.d.ts @@ -0,0 +1 @@ +export declare const toUint8Array: (data: string | ArrayBuffer | ArrayBufferView) => Uint8Array; diff --git a/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.browser.d.ts b/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.browser.d.ts new file mode 100644 index 0000000..33511ad --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.browser.d.ts @@ -0,0 +1,7 @@ +/** + * + * This does not convert non-utf8 strings to utf8, it only passes through strings if + * a string is received instead of a Uint8Array. + * + */ +export declare const toUtf8: (input: Uint8Array | string) => string; diff --git a/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.d.ts b/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.d.ts new file mode 100644 index 0000000..33511ad --- /dev/null +++ b/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.d.ts @@ -0,0 +1,7 @@ +/** + * + * This does not convert non-utf8 strings to utf8, it only passes through strings if + * a string is received instead of a Uint8Array. + * + */ +export declare const toUtf8: (input: Uint8Array | string) => string; diff --git a/node_modules/@smithy/util-utf8/package.json b/node_modules/@smithy/util-utf8/package.json new file mode 100644 index 0000000..78bfb4d --- /dev/null +++ b/node_modules/@smithy/util-utf8/package.json @@ -0,0 +1,66 @@ +{ + "name": "@smithy/util-utf8", + "version": "2.3.0", + "description": "A UTF-8 string <-> UInt8Array converter", + "main": "./dist-cjs/index.js", + "module": "./dist-es/index.js", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", + "build:cjs": "node ../../scripts/inline util-utf8", + "build:es": "yarn g:tsc -p tsconfig.es.json", + "build:types": "yarn g:tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", + "format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"", + "test": "yarn g:jest" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/recommended": "1.0.1", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23" + }, + "types": "./dist-types/index.d.ts", + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "browser": { + "./dist-es/fromUtf8": "./dist-es/fromUtf8.browser", + "./dist-es/toUtf8": "./dist-es/toUtf8.browser" + }, + "react-native": {}, + "homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/util-utf8", + "repository": { + "type": "git", + "url": "https://github.com/awslabs/smithy-typescript.git", + "directory": "packages/util-utf8" + }, + "typedoc": { + "entryPoint": "src/index.ts" + }, + "publishConfig": { + "directory": ".release/package" + } +} \ No newline at end of file diff --git a/node_modules/bowser/CHANGELOG.md b/node_modules/bowser/CHANGELOG.md new file mode 100644 index 0000000..260a03d --- /dev/null +++ b/node_modules/bowser/CHANGELOG.md @@ -0,0 +1,218 @@ +# Bowser Changelog + +### 2.11.0 (Sep 12, 2020) +- [ADD] Added support for aliases in `Parser#is` method (#437) +- [ADD] Added more typings (#438, #427) +- [ADD] Added support for MIUI Browserr (#436) + +### 2.10.0 (Jul 9, 2020) +- [FIX] Fix for Firefox detection on iOS 13 [#415] +- [FIX] Fixes for typings.d.ts [#409] +- [FIX] Updated development dependencies + +### 2.9.0 (Jan 28, 2020) +- [ADD] Export more methods and constants via .d.ts [#388], [#390] + +### 2.8.1 (Dec 26, 2019) +- [FIX] Reverted [#382] as it broke build + +### 2.8.0 (Dec 26, 2019) +- [ADD] Add polyfills for Array.find & Object.assign [#383] +- [ADD] Export constants with types.d.ts [#382] +- [FIX] Add support for WeChat on Windows [#381] +- [FIX] Fix detection of Firefox on iPad [#379] +- [FIX] Add detection of Electron [#375] +- [FIX] Updated dev-dependencies + +### 2.7.0 (Oct 2, 2019) +- [FIX] Add support for QQ Browser [#362] +- [FIX] Add support for GSA [#364] +- [FIX] Updated dependencies + +### 2.6.0 (Sep 6, 2019) +- [ADD] Define "module" export in package.json [#354] +- [FIX] Fix Tablet PC detection [#334] + +### 2.5.4 (Sep 2, 2019) +- [FIX] Exclude docs from the npm package [#349] + +### 2.5.3 (Aug 4, 2019) +- [FIX] Add MacOS names support [#338] +- [FIX] Point typings.d.ts from package.json [#341] +- [FIX] Upgrade dependencies + +### 2.5.2 (July 17, 2019) +- [FIX] Fixes the bug undefined method because of failed build (#335) + +### 2.5.1 (July 17, 2019) +- [FIX] Fixes the bug with a custom Error class (#335) +- [FIX] Fixes the settings for Babel to reduce the bundle size (#259) + +### 2.5.0 (July 16, 2019) +- [ADD] Add constant output so that users can quickly get all types (#325) +- [FIX] Add support for Roku OS (#332) +- [FIX] Update devDependencies +- [FIX] Fix docs, README and added funding information + +### 2.4.0 (May 3, 2019) +- [FIX] Update regexp for generic browsers (#310) +- [FIX] Fix issues with module.exports (#318) +- [FIX] Update devDependencies (#316, #321, #322) +- [FIX] Fix docs (#320) + +### 2.3.0 (April 14, 2019) +- [ADD] Add support for Blink-based MS Edge (#311) +- [ADD] Add more types for TS (#289) +- [FIX] Update dev-dependencies +- [FIX] Update docs + +### 2.2.1 (April 12, 2019) +- [ADD] Add an alias for Samsung Internet +- [FIX] Fix browser name detection for browsers without an alias (#313) + +### 2.2.0 (April 7, 2019) +- [ADD] Add short aliases for browser names (#295) +- [FIX] Fix Yandex Browser version detection (#308) + +### 2.1.2 (March 6, 2019) +- [FIX] Fix buggy `getFirstMatch` reference + +### 2.1.1 (March 6, 2019) +- [ADD] Add detection of PlayStation 4 (#291) +- [ADD] Deploy docs on GH Pages (#293) +- [FIX] Fix files extensions for importing (#294) +- [FIX] Fix docs (#295) + +### 2.1.0 (January 24, 2019) +- [ADD] Add new `Parser.getEngineName()` method (#288) +- [ADD] Add detection of ChromeOS (#287) +- [FIX] Fix README + +### 2.0.0 (January 19, 2019) +- [ADD] Support a non strict equality in `Parser.satisfies()` (#275) +- [ADD] Add Android versions names (#276) +- [ADD] Add a typings file (#277) +- [ADD] Added support for Googlebot recognition (#278) +- [FIX] Update building tools, avoid security issues + +### 2.0.0-beta.3 (September 15, 2018) +- [FIX] Fix Chrome Mobile detection (#253) +- [FIX] Use built bowser for CI (#252) +- [FIX] Update babel-plugin-add-module-exports (#251) + +### 2.0.0-beta.2 (September 9, 2018) +- [FIX] Fix failing comparing version through `Parser.satisfies` (#243) +- [FIX] Fix travis testing, include eslint into CI testing +- [FIX] Add support for Maxthon desktop browser (#246) +- [FIX] Add support for Swing browser (#248) +- [DOCS] Regenerate docs + +### 2.0.0-beta.1 (August 18, 2018) +- [ADD] Add loose version comparison to `Parser.compareVersion()` and `Parser.satisfies()` +- [CHORE] Add CONTRIBUTING.md +- [DOCS] Regenerate docs + +### 2.0.0-alpha.4 (August 2, 2018) +- [DOCS] Fix usage docs (#238) +- [CHANGE] Make `./es5.js` the main file of the package (#239) + +### 2.0.0-alpha.3 (July 22, 2018) +- [CHANGE] Rename split and rename `compiled.js` to `es5.js` and `bundled.js` (#231, #236, #237) +- [ADD] Add `Parser.some` (#235) + +### 2.0.0-alpha.2 (July 17, 2018) +- [CHANGE] Make `src/bowser` main file instead of the bundled one +- [CHANGE] Move the bundled file to the root of the package to make it possible to `require('bowser/compiled')` (#231) +- [REMOVE] Remove `typings.d.ts` before stable release (#232) +- [FIX] Improve Nexus devices detection (#233) + +### 2.0.0-alpha.1 (July 9, 2018) +- [ADD] `Bowser.getParser()` +- [ADD] `Bowser.parse` +- [ADD] `Parser` class which describes parsing process +- [CHANGE] Change bowser's returning object +- [REMOVE] Remove bower support + +### 1.9.4 (June 28, 2018) +- [FIX] Fix NAVER Whale browser detection (#220) +- [FIX] Fix MZ Browser browser detection (#219) +- [FIX] Fix Firefox Focus browser detection (#191) +- [FIX] Fix webOS browser detection (#186) + +### 1.9.3 (March 12, 2018) +- [FIX] Fix `typings.d.ts` — add `ipad`, `iphone`, `ipod` flags to the interface + +### 1.9.2 (February 5, 2018) +- [FIX] Fix `typings.d.ts` — add `osname` flag to the interface + +### 1.9.1 (December 22, 2017) +- [FIX] Fix `typings.d.ts` — add `chromium` flag to the interface + +### 1.9.0 (December 20, 2017) +- [ADD] Add a public method `.detect()` (#205) +- [DOCS] Fix description of `chromium` flag in docs (#206) + +### 1.8.1 (October 7, 2017) +- [FIX] Fix detection of MS Edge on Android and iOS (#201) + +### 1.8.0 (October 7, 2017) +- [ADD] Add `osname` into result object (#200) + +### 1.7.3 (August 30, 2017) +- [FIX] Fix detection of Chrome on Android 8 OPR6 (#193) + +### 1.7.2 (August 17, 2017) +- [FIX] Fix typings.d.ts according to #185 + +### 1.7.1 (July 13, 2017) +- [ADD] Fix detecting of Tablet PC as tablet (#183) + +### 1.7.0 (May 18, 2017) +- [ADD] Add OS version support for Windows and macOS (#178) + +### 1.6.0 (December 5, 2016) +- [ADD] Add some tests for Windows devices (#89) +- [ADD] Add `root` to initialization process (#170) +- [FIX] Upgrade .travis.yml config + +### 1.5.0 (October 31, 2016) +- [ADD] Throw an error when `minVersion` map has not a string as a version and fix readme (#165) +- [FIX] Fix truly detection of Windows Phones (#167) + +### 1.4.6 (September 19, 2016) +- [FIX] Fix mobile Opera's version detection on Android +- [FIX] Fix typescript typings — add `mobile` and `tablet` flags +- [DOC] Fix description of `bowser.check` + +### 1.4.5 (August 30, 2016) + +- [FIX] Add support of Samsung Internet for Android +- [FIX] Fix case when `navigator.userAgent` is `undefined` +- [DOC] Add information about `strictMode` in `check` function +- [DOC] Consistent use of `bowser` variable in the README + +### 1.4.4 (August 10, 2016) + +- [FIX] Fix AMD `define` call — pass name to the function + +### 1.4.3 (July 27, 2016) + +- [FIX] Fix error `Object doesn't support this property or method` on IE8 + +### 1.4.2 (July 26, 2016) + +- [FIX] Fix missing `isUnsupportedBrowser` in typings description +- [DOC] Fix `check`'s declaration in README + +### 1.4.1 (July 7, 2016) + +- [FIX] Fix `strictMode` logic for `isUnsupportedBrowser` + +### 1.4.0 (June 28, 2016) + +- [FEATURE] Add `bowser.compareVersions` method +- [FEATURE] Add `bowser.isUnsupportedBrowser` method +- [FEATURE] Add `bowser.check` method +- [DOC] Changelog started +- [DOC] Add API section to README +- [FIX] Fix detection of browser type (A/C/X) for Chromium diff --git a/node_modules/bowser/LICENSE b/node_modules/bowser/LICENSE new file mode 100644 index 0000000..94085f0 --- /dev/null +++ b/node_modules/bowser/LICENSE @@ -0,0 +1,39 @@ +Copyright 2015, Dustin Diaz (the "Original Author") +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +Distributions of all or part of the Software intended to be used +by the recipients as they would use the unmodified Software, +containing modifications that substantially alter, remove, or +disable functionality of the Software, outside of the documented +configuration mechanisms provided by the Software, shall be +modified such that the Original Author's bug reporting email +addresses and urls are either replaced with the contact information +of the parties responsible for the changes, or removed entirely. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +Except where noted, this license applies to any and all software +programs and associated documentation files created by the +Original Author, when distributed with the Software. diff --git a/node_modules/bowser/README.md b/node_modules/bowser/README.md new file mode 100644 index 0000000..8f5f915 --- /dev/null +++ b/node_modules/bowser/README.md @@ -0,0 +1,179 @@ +## Bowser +A small, fast and rich-API browser/platform/engine detector for both browser and node. +- **Small.** Use plain ES5-version which is ~4.8kB gzipped. +- **Optimized.** Use only those parsers you need — it doesn't do useless work. +- **Multi-platform.** It's browser- and node-ready, so you can use it in any environment. + +Don't hesitate to support the project on Github or [OpenCollective](https://opencollective.com/bowser) if you like it ❤️ Also, contributors are always welcome! + +[![Financial Contributors on Open Collective](https://opencollective.com/bowser/all/badge.svg?label=financial+contributors)](https://opencollective.com/bowser) [![Build Status](https://travis-ci.org/lancedikson/bowser.svg?branch=master)](https://travis-ci.org/lancedikson/bowser/) [![Greenkeeper badge](https://badges.greenkeeper.io/lancedikson/bowser.svg)](https://greenkeeper.io/) [![Coverage Status](https://coveralls.io/repos/github/lancedikson/bowser/badge.svg?branch=master)](https://coveralls.io/github/lancedikson/bowser?branch=master) ![Downloads](https://img.shields.io/npm/dm/bowser) + +# Contents +- [Overview](#overview) +- [Use cases](#use-cases) +- [Advanced usage](#advanced-usage) +- [How can I help?](#contributing) + +# Overview + +The library is made to help to detect what browser your user has and gives you a convenient API to filter the users somehow depending on their browsers. Check it out on this page: https://bowser-js.github.io/bowser-online/. + +### ⚠️ Version 2.0 breaking changes ⚠️ + +Version 2.0 has drastically changed the API. All available methods are on the [docs page](https://lancedikson.github.io/bowser/docs). + +_For legacy code, check out the [1.x](https://github.com/lancedikson/bowser/tree/v1.x) branch and install it through `npm install bowser@1.9.4`._ + +# Use cases + +First of all, require the library. This is a UMD Module, so it will work for AMD, TypeScript, ES6, and CommonJS module systems. + +```javascript +const Bowser = require("bowser"); // CommonJS + +import * as Bowser from "bowser"; // TypeScript + +import Bowser from "bowser"; // ES6 (and TypeScript with --esModuleInterop enabled) +``` + +By default, the exported version is the *ES5 transpiled version*, which **do not** include any polyfills. + +In case you don't use your own `babel-polyfill` you may need to have pre-built bundle with all needed polyfills. +So, for you it's suitable to require bowser like this: `require('bowser/bundled')`. +As the result, you get a ES5 version of bowser with `babel-polyfill` bundled together. + +You may need to use the source files, so they will be available in the package as well. + +## Browser props detection + +Often we need to pick users' browser properties such as the name, the version, the rendering engine and so on. Here is an example how to do it with Bowser: + +```javascript +const browser = Bowser.getParser(window.navigator.userAgent); + +console.log(`The current browser name is "${browser.getBrowserName()}"`); +// The current browser name is "Internet Explorer" +``` + +or + +```javascript +const browser = Bowser.getParser(window.navigator.userAgent); +console.log(browser.getBrowser()); + +// outputs +{ + name: "Internet Explorer" + version: "11.0" +} +``` + +or + +```javascript +console.log(Bowser.parse(window.navigator.userAgent)); + +// outputs +{ + browser: { + name: "Internet Explorer" + version: "11.0" + }, + os: { + name: "Windows" + version: "NT 6.3" + versionName: "8.1" + }, + platform: { + type: "desktop" + }, + engine: { + name: "Trident" + version: "7.0" + } +} +``` + + +## Filtering browsers + +You could want to filter some particular browsers to provide any special support for them or make any workarounds. +It could look like this: + +```javascript +const browser = Bowser.getParser(window.navigator.userAgent); +const isValidBrowser = browser.satisfies({ + // declare browsers per OS + windows: { + "internet explorer": ">10", + }, + macos: { + safari: ">10.1" + }, + + // per platform (mobile, desktop or tablet) + mobile: { + safari: '>=9', + 'android browser': '>3.10' + }, + + // or in general + chrome: "~20.1.1432", + firefox: ">31", + opera: ">=22", + + // also supports equality operator + chrome: "=20.1.1432", // will match particular build only + + // and loose-equality operator + chrome: "~20", // will match any 20.* sub-version + chrome: "~20.1" // will match any 20.1.* sub-version (20.1.19 as well as 20.1.12.42-alpha.1) +}); +``` + +Settings for any particular OS or platform has more priority and redefines settings of standalone browsers. +Thus, you can define OS or platform specific rules and they will have more priority in the end. + +More of API and possibilities you will find in the `docs` folder. + +### Browser names for `.satisfies()` + +By default you are supposed to use the full browser name for `.satisfies`. +But, there's a short way to define a browser using short aliases. The full +list of aliases can be found in [the file](src/constants.js). + +## Similar Projects +* [Kong](https://github.com/BigBadBleuCheese/Kong) - A C# port of Bowser. + +## Contributors + +### Code Contributors + +This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. + + +### Financial Contributors + +Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/bowser/contribute)] + +#### Individuals + + + +#### Organizations + +Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/bowser/contribute)] + + + + + + + + + + + + +## License +Licensed as MIT. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/bowser/bundled.js b/node_modules/bowser/bundled.js new file mode 100644 index 0000000..066ac40 --- /dev/null +++ b/node_modules/bowser/bundled.js @@ -0,0 +1 @@ +!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.bowser=n():t.bowser=n()}(this,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=129)}([function(t,n,e){var r=e(1),i=e(7),o=e(14),u=e(11),a=e(19),c=function(t,n,e){var s,f,l,h,d=t&c.F,p=t&c.G,v=t&c.S,g=t&c.P,y=t&c.B,m=p?r:v?r[n]||(r[n]={}):(r[n]||{}).prototype,b=p?i:i[n]||(i[n]={}),S=b.prototype||(b.prototype={});for(s in p&&(e=n),e)l=((f=!d&&m&&void 0!==m[s])?m:e)[s],h=y&&f?a(l,r):g&&"function"==typeof l?a(Function.call,l):l,m&&u(m,s,l,t&c.U),b[s]!=l&&o(b,s,h),g&&S[s]!=l&&(S[s]=l)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(50)("wks"),i=e(31),o=e(1).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,n,e){var r=e(21),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)},function(t,n,e){t.exports=!e(2)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(3),i=e(96),o=e(28),u=Object.defineProperty;n.f=e(8)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(26);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(1),i=e(14),o=e(13),u=e(31)("src"),a=e(134),c=(""+a).split("toString");e(7).inspectSource=function(t){return a.call(t)},(t.exports=function(t,n,e,a){var s="function"==typeof e;s&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(s&&(o(e,u)||i(e,u,t[n]?""+t[n]:c.join(String(n)))),t===r?t[n]=e:a?t[n]?t[n]=e:i(t,n,e):(delete t[n],i(t,n,e)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[u]||a.call(this)}))},function(t,n,e){var r=e(0),i=e(2),o=e(26),u=/"/g,a=function(t,n,e,r){var i=String(o(t)),a="<"+n;return""!==e&&(a+=" "+e+'="'+String(r).replace(u,""")+'"'),a+">"+i+""};t.exports=function(t,n){var e={};e[t]=n(a),r(r.P+r.F*i((function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3})),"String",e)}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(9),i=e(30);t.exports=e(8)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(46),i=e(26);t.exports=function(t){return r(i(t))}},function(t,n,e){"use strict";var r=e(2);t.exports=function(t,n){return!!t&&r((function(){n?t.call(null,(function(){}),1):t.call(null)}))}},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r=e(18),i=function(){function t(){}return t.getFirstMatch=function(t,n){var e=n.match(t);return e&&e.length>0&&e[1]||""},t.getSecondMatch=function(t,n){var e=n.match(t);return e&&e.length>1&&e[2]||""},t.matchAndReturnConst=function(t,n,e){if(t.test(n))return e},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var n=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(n.push(0),10===n[0])switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var n=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(n.push(0),!(1===n[0]&&n[1]<5))return 1===n[0]&&n[1]<6?"Cupcake":1===n[0]&&n[1]>=6?"Donut":2===n[0]&&n[1]<2?"Eclair":2===n[0]&&2===n[1]?"Froyo":2===n[0]&&n[1]>2?"Gingerbread":3===n[0]?"Honeycomb":4===n[0]&&n[1]<1?"Ice Cream Sandwich":4===n[0]&&n[1]<4?"Jelly Bean":4===n[0]&&n[1]>=4?"KitKat":5===n[0]?"Lollipop":6===n[0]?"Marshmallow":7===n[0]?"Nougat":8===n[0]?"Oreo":9===n[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(n,e,r){void 0===r&&(r=!1);var i=t.getVersionPrecision(n),o=t.getVersionPrecision(e),u=Math.max(i,o),a=0,c=t.map([n,e],(function(n){var e=u-t.getVersionPrecision(n),r=n+new Array(e+1).join(".0");return t.map(r.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(r&&(a=u-Math.min(i,o)),u-=1;u>=a;){if(c[0][u]>c[1][u])return 1;if(c[0][u]===c[1][u]){if(u===a)return 0;u-=1}else if(c[0][u]1?i-1:0),u=1;u0?r:e)(t)}},function(t,n,e){var r=e(47),i=e(30),o=e(15),u=e(28),a=e(13),c=e(96),s=Object.getOwnPropertyDescriptor;n.f=e(8)?s:function(t,n){if(t=o(t),n=u(n,!0),c)try{return s(t,n)}catch(t){}if(a(t,n))return i(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(0),i=e(7),o=e(2);t.exports=function(t,n){var e=(i.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*o((function(){e(1)})),"Object",u)}},function(t,n,e){var r=e(19),i=e(46),o=e(10),u=e(6),a=e(112);t.exports=function(t,n){var e=1==t,c=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l,d=n||a;return function(n,a,p){for(var v,g,y=o(n),m=i(y),b=r(a,p,3),S=u(m.length),w=0,_=e?d(n,S):c?d(n,0):void 0;S>w;w++)if((h||w in m)&&(g=b(v=m[w],w,y),t))if(e)_[w]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:_.push(v)}else if(f)return!1;return l?-1:s||f?f:_}}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){"use strict";if(e(8)){var r=e(32),i=e(1),o=e(2),u=e(0),a=e(61),c=e(86),s=e(19),f=e(44),l=e(30),h=e(14),d=e(45),p=e(21),v=e(6),g=e(123),y=e(34),m=e(28),b=e(13),S=e(48),w=e(4),_=e(10),M=e(78),x=e(35),P=e(37),O=e(36).f,F=e(80),A=e(31),E=e(5),N=e(24),R=e(51),k=e(49),T=e(82),I=e(42),j=e(54),L=e(43),B=e(81),C=e(114),W=e(9),V=e(22),G=W.f,D=V.f,U=i.RangeError,z=i.TypeError,q=i.Uint8Array,K=Array.prototype,Y=c.ArrayBuffer,Q=c.DataView,H=N(0),J=N(2),X=N(3),Z=N(4),$=N(5),tt=N(6),nt=R(!0),et=R(!1),rt=T.values,it=T.keys,ot=T.entries,ut=K.lastIndexOf,at=K.reduce,ct=K.reduceRight,st=K.join,ft=K.sort,lt=K.slice,ht=K.toString,dt=K.toLocaleString,pt=E("iterator"),vt=E("toStringTag"),gt=A("typed_constructor"),yt=A("def_constructor"),mt=a.CONSTR,bt=a.TYPED,St=a.VIEW,wt=N(1,(function(t,n){return Ot(k(t,t[yt]),n)})),_t=o((function(){return 1===new q(new Uint16Array([1]).buffer)[0]})),Mt=!!q&&!!q.prototype.set&&o((function(){new q(1).set({})})),xt=function(t,n){var e=p(t);if(e<0||e%n)throw U("Wrong offset!");return e},Pt=function(t){if(w(t)&&bt in t)return t;throw z(t+" is not a typed array!")},Ot=function(t,n){if(!(w(t)&> in t))throw z("It is not a typed array constructor!");return new t(n)},Ft=function(t,n){return At(k(t,t[yt]),n)},At=function(t,n){for(var e=0,r=n.length,i=Ot(t,r);r>e;)i[e]=n[e++];return i},Et=function(t,n,e){G(t,n,{get:function(){return this._d[e]}})},Nt=function(t){var n,e,r,i,o,u,a=_(t),c=arguments.length,f=c>1?arguments[1]:void 0,l=void 0!==f,h=F(a);if(null!=h&&!M(h)){for(u=h.call(a),r=[],n=0;!(o=u.next()).done;n++)r.push(o.value);a=r}for(l&&c>2&&(f=s(f,arguments[2],2)),n=0,e=v(a.length),i=Ot(this,e);e>n;n++)i[n]=l?f(a[n],n):a[n];return i},Rt=function(){for(var t=0,n=arguments.length,e=Ot(this,n);n>t;)e[t]=arguments[t++];return e},kt=!!q&&o((function(){dt.call(new q(1))})),Tt=function(){return dt.apply(kt?lt.call(Pt(this)):Pt(this),arguments)},It={copyWithin:function(t,n){return C.call(Pt(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Pt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return B.apply(Pt(this),arguments)},filter:function(t){return Ft(this,J(Pt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return $(Pt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){H(Pt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return et(Pt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return st.apply(Pt(this),arguments)},lastIndexOf:function(t){return ut.apply(Pt(this),arguments)},map:function(t){return wt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return at.apply(Pt(this),arguments)},reduceRight:function(t){return ct.apply(Pt(this),arguments)},reverse:function(){for(var t,n=Pt(this).length,e=Math.floor(n/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return ft.call(Pt(this),t)},subarray:function(t,n){var e=Pt(this),r=e.length,i=y(t,r);return new(k(e,e[yt]))(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,v((void 0===n?r:y(n,r))-i))}},jt=function(t,n){return Ft(this,lt.call(Pt(this),t,n))},Lt=function(t){Pt(this);var n=xt(arguments[1],1),e=this.length,r=_(t),i=v(r.length),o=0;if(i+n>e)throw U("Wrong length!");for(;o255?255:255&r),i.v[d](e*n+i.o,r,_t)}(this,e,t)},enumerable:!0})};b?(p=e((function(t,e,r,i){f(t,p,s,"_d");var o,u,a,c,l=0,d=0;if(w(e)){if(!(e instanceof Y||"ArrayBuffer"==(c=S(e))||"SharedArrayBuffer"==c))return bt in e?At(p,e):Nt.call(p,e);o=e,d=xt(r,n);var y=e.byteLength;if(void 0===i){if(y%n)throw U("Wrong length!");if((u=y-d)<0)throw U("Wrong length!")}else if((u=v(i)*n)+d>y)throw U("Wrong length!");a=u/n}else a=g(e),o=new Y(u=a*n);for(h(t,"_d",{b:o,o:d,l:u,e:a,v:new Q(o)});ldocument.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[o[r]];return c()};t.exports=Object.create||function(t,n){var e;return null!==t?(a.prototype=r(t),e=new a,a.prototype=null,e[u]=t):e=c(),void 0===n?e:i(e,n)}},function(t,n,e){var r=e(98),i=e(65).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,n,e){var r=e(13),i=e(10),o=e(64)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){var r=e(5)("unscopables"),i=Array.prototype;null==i[r]&&e(14)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,n,e){var r=e(4);t.exports=function(t,n){if(!r(t)||t._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return t}},function(t,n,e){var r=e(9).f,i=e(13),o=e(5)("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,o)&&r(t,o,{configurable:!0,value:n})}},function(t,n,e){var r=e(0),i=e(26),o=e(2),u=e(68),a="["+u+"]",c=RegExp("^"+a+a+"*"),s=RegExp(a+a+"*$"),f=function(t,n,e){var i={},a=o((function(){return!!u[t]()||"​…"!="​…"[t]()})),c=i[t]=a?n(l):u[t];e&&(i[e]=c),r(r.P+r.F*a,"String",i)},l=f.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(c,"")),2&n&&(t=t.replace(s,"")),t};t.exports=f},function(t,n){t.exports={}},function(t,n,e){"use strict";var r=e(1),i=e(9),o=e(8),u=e(5)("species");t.exports=function(t){var n=r[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){var r=e(11);t.exports=function(t,n,e){for(var i in n)r(t,i,n[i],e);return t}},function(t,n,e){var r=e(25);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(25),i=e(5)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),i))?e:o?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,e){var r=e(3),i=e(20),o=e(5)("species");t.exports=function(t,n){var e,u=r(t).constructor;return void 0===u||null==(e=r(u)[o])?n:i(e)}},function(t,n,e){var r=e(7),i=e(1),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(32)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,n,e){var r=e(15),i=e(6),o=e(34);t.exports=function(t){return function(n,e,u){var a,c=r(n),s=i(c.length),f=o(u,s);if(t&&e!=e){for(;s>f;)if((a=c[f++])!=a)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===e)return t||f||0;return!t&&-1}}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(25);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(5)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var o=[7],u=o[r]();u.next=function(){return{done:e=!0}},o[r]=function(){return u},t(o)}catch(t){}return e}},function(t,n,e){"use strict";var r=e(3);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,e){"use strict";var r=e(48),i=RegExp.prototype.exec;t.exports=function(t,n){var e=t.exec;if("function"==typeof e){var o=e.call(t,n);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,n)}},function(t,n,e){"use strict";e(116);var r=e(11),i=e(14),o=e(2),u=e(26),a=e(5),c=e(83),s=a("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),l=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e="ab".split(t);return 2===e.length&&"a"===e[0]&&"b"===e[1]}();t.exports=function(t,n,e){var h=a(t),d=!o((function(){var n={};return n[h]=function(){return 7},7!=""[t](n)})),p=d?!o((function(){var n=!1,e=/a/;return e.exec=function(){return n=!0,null},"split"===t&&(e.constructor={},e.constructor[s]=function(){return e}),e[h](""),!n})):void 0;if(!d||!p||"replace"===t&&!f||"split"===t&&!l){var v=/./[h],g=e(u,h,""[t],(function(t,n,e,r,i){return n.exec===c?d&&!i?{done:!0,value:v.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}})),y=g[0],m=g[1];r(String.prototype,t,y),i(RegExp.prototype,h,2==n?function(t,n){return m.call(t,this,n)}:function(t){return m.call(t,this)})}}},function(t,n,e){var r=e(19),i=e(111),o=e(78),u=e(3),a=e(6),c=e(80),s={},f={};(n=t.exports=function(t,n,e,l,h){var d,p,v,g,y=h?function(){return t}:c(t),m=r(e,l,n?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(d=a(t.length);d>b;b++)if((g=n?m(u(p=t[b])[0],p[1]):m(t[b]))===s||g===f)return g}else for(v=y.call(t);!(p=v.next()).done;)if((g=i(v,m,p.value,n))===s||g===f)return g}).BREAK=s,n.RETURN=f},function(t,n,e){var r=e(1).navigator;t.exports=r&&r.userAgent||""},function(t,n,e){"use strict";var r=e(1),i=e(0),o=e(11),u=e(45),a=e(29),c=e(58),s=e(44),f=e(4),l=e(2),h=e(54),d=e(40),p=e(69);t.exports=function(t,n,e,v,g,y){var m=r[t],b=m,S=g?"set":"add",w=b&&b.prototype,_={},M=function(t){var n=w[t];o(w,t,"delete"==t?function(t){return!(y&&!f(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof b&&(y||w.forEach&&!l((function(){(new b).entries().next()})))){var x=new b,P=x[S](y?{}:-0,1)!=x,O=l((function(){x.has(1)})),F=h((function(t){new b(t)})),A=!y&&l((function(){for(var t=new b,n=5;n--;)t[S](n,n);return!t.has(-0)}));F||((b=n((function(n,e){s(n,b,t);var r=p(new m,n,b);return null!=e&&c(e,g,r[S],r),r}))).prototype=w,w.constructor=b),(O||A)&&(M("delete"),M("has"),g&&M("get")),(A||P)&&M(S),y&&w.clear&&delete w.clear}else b=v.getConstructor(n,t,g,S),u(b.prototype,e),a.NEED=!0;return d(b,t),_[t]=b,i(i.G+i.W+i.F*(b!=m),_),y||v.setStrong(b,t,g),b}},function(t,n,e){for(var r,i=e(1),o=e(14),u=e(31),a=u("typed_array"),c=u("view"),s=!(!i.ArrayBuffer||!i.DataView),f=s,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[h[l++]])?(o(r.prototype,a,!0),o(r.prototype,c,!0)):f=!1;t.exports={ABV:s,CONSTR:f,TYPED:a,VIEW:c}},function(t,n,e){var r=e(4),i=e(1).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){n.f=e(5)},function(t,n,e){var r=e(50)("keys"),i=e(31);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(1).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(4),i=e(3),o=function(t,n){if(i(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=e(19)(Function.call,e(22).f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},function(t,n){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n,e){var r=e(4),i=e(67).set;t.exports=function(t,n,e){var o,u=n.constructor;return u!==e&&"function"==typeof u&&(o=u.prototype)!==e.prototype&&r(o)&&i&&i(t,o),t}},function(t,n,e){"use strict";var r=e(21),i=e(26);t.exports=function(t){var n=String(i(this)),e="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(n+=n))1&o&&(e+=n);return e}},function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},function(t,n,e){var r=e(21),i=e(26);t.exports=function(t){return function(n,e){var o,u,a=String(i(n)),c=r(e),s=a.length;return c<0||c>=s?t?"":void 0:(o=a.charCodeAt(c))<55296||o>56319||c+1===s||(u=a.charCodeAt(c+1))<56320||u>57343?t?a.charAt(c):o:t?a.slice(c,c+2):u-56320+(o-55296<<10)+65536}}},function(t,n,e){"use strict";var r=e(32),i=e(0),o=e(11),u=e(14),a=e(42),c=e(110),s=e(40),f=e(37),l=e(5)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,n,e,p,v,g,y){c(e,n,p);var m,b,S,w=function(t){if(!h&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},_=n+" Iterator",M="values"==v,x=!1,P=t.prototype,O=P[l]||P["@@iterator"]||v&&P[v],F=O||w(v),A=v?M?w("entries"):F:void 0,E="Array"==n&&P.entries||O;if(E&&(S=f(E.call(new t)))!==Object.prototype&&S.next&&(s(S,_,!0),r||"function"==typeof S[l]||u(S,l,d)),M&&O&&"values"!==O.name&&(x=!0,F=function(){return O.call(this)}),r&&!y||!h&&!x&&P[l]||u(P,l,F),a[n]=F,a[_]=d,v)if(m={values:M?F:w("values"),keys:g?F:w("keys"),entries:A},y)for(b in m)b in P||o(P,b,m[b]);else i(i.P+i.F*(h||x),n,m);return m}},function(t,n,e){var r=e(76),i=e(26);t.exports=function(t,n,e){if(r(n))throw TypeError("String#"+e+" doesn't accept regex!");return String(i(t))}},function(t,n,e){var r=e(4),i=e(25),o=e(5)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,e){var r=e(5)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,e){var r=e(42),i=e(5)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,n,e){"use strict";var r=e(9),i=e(30);t.exports=function(t,n,e){n in t?r.f(t,n,i(0,e)):t[n]=e}},function(t,n,e){var r=e(48),i=e(5)("iterator"),o=e(42);t.exports=e(7).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n,e){"use strict";var r=e(10),i=e(34),o=e(6);t.exports=function(t){for(var n=r(this),e=o(n.length),u=arguments.length,a=i(u>1?arguments[1]:void 0,e),c=u>2?arguments[2]:void 0,s=void 0===c?e:i(c,e);s>a;)n[a++]=t;return n}},function(t,n,e){"use strict";var r=e(38),i=e(115),o=e(42),u=e(15);t.exports=e(74)(Array,"Array",(function(t,n){this._t=u(t),this._i=0,this._k=n}),(function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,i(1)):i(0,"keys"==n?e:"values"==n?t[e]:[e,t[e]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,n,e){"use strict";var r,i,o=e(55),u=RegExp.prototype.exec,a=String.prototype.replace,c=u,s=(r=/a/,i=/b*/g,u.call(r,"a"),u.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=void 0!==/()??/.exec("")[1];(s||f)&&(c=function(t){var n,e,r,i,c=this;return f&&(e=new RegExp("^"+c.source+"$(?!\\s)",o.call(c))),s&&(n=c.lastIndex),r=u.call(c,t),s&&r&&(c.lastIndex=c.global?r.index+r[0].length:n),f&&r&&r.length>1&&a.call(r[0],e,(function(){for(i=1;ie;)n.push(arguments[e++]);return y[++g]=function(){a("function"==typeof t?t:Function(t),n)},r(g),g},d=function(t){delete y[t]},"process"==e(25)(l)?r=function(t){l.nextTick(u(m,t,1))}:v&&v.now?r=function(t){v.now(u(m,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=u(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in s("script")?function(t){c.appendChild(s("script")).onreadystatechange=function(){c.removeChild(this),m.call(t)}}:function(t){setTimeout(u(m,t,1),0)}),t.exports={set:h,clear:d}},function(t,n,e){"use strict";var r=e(1),i=e(8),o=e(32),u=e(61),a=e(14),c=e(45),s=e(2),f=e(44),l=e(21),h=e(6),d=e(123),p=e(36).f,v=e(9).f,g=e(81),y=e(40),m="prototype",b="Wrong index!",S=r.ArrayBuffer,w=r.DataView,_=r.Math,M=r.RangeError,x=r.Infinity,P=S,O=_.abs,F=_.pow,A=_.floor,E=_.log,N=_.LN2,R=i?"_b":"buffer",k=i?"_l":"byteLength",T=i?"_o":"byteOffset";function I(t,n,e){var r,i,o,u=new Array(e),a=8*e-n-1,c=(1<>1,f=23===n?F(2,-24)-F(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=O(t))!=t||t===x?(i=t!=t?1:0,r=c):(r=A(E(t)/N),t*(o=F(2,-r))<1&&(r--,o*=2),(t+=r+s>=1?f/o:f*F(2,1-s))*o>=2&&(r++,o/=2),r+s>=c?(i=0,r=c):r+s>=1?(i=(t*o-1)*F(2,n),r+=s):(i=t*F(2,s-1)*F(2,n),r=0));n>=8;u[l++]=255&i,i/=256,n-=8);for(r=r<0;u[l++]=255&r,r/=256,a-=8);return u[--l]|=128*h,u}function j(t,n,e){var r,i=8*e-n-1,o=(1<>1,a=i-7,c=e-1,s=t[c--],f=127&s;for(s>>=7;a>0;f=256*f+t[c],c--,a-=8);for(r=f&(1<<-a)-1,f>>=-a,a+=n;a>0;r=256*r+t[c],c--,a-=8);if(0===f)f=1-u;else{if(f===o)return r?NaN:s?-x:x;r+=F(2,n),f-=u}return(s?-1:1)*r*F(2,f-n)}function L(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function B(t){return[255&t]}function C(t){return[255&t,t>>8&255]}function W(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function V(t){return I(t,52,8)}function G(t){return I(t,23,4)}function D(t,n,e){v(t[m],n,{get:function(){return this[e]}})}function U(t,n,e,r){var i=d(+e);if(i+n>t[k])throw M(b);var o=t[R]._b,u=i+t[T],a=o.slice(u,u+n);return r?a:a.reverse()}function z(t,n,e,r,i,o){var u=d(+e);if(u+n>t[k])throw M(b);for(var a=t[R]._b,c=u+t[T],s=r(+i),f=0;fQ;)(q=Y[Q++])in S||a(S,q,P[q]);o||(K.constructor=S)}var H=new w(new S(2)),J=w[m].setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||c(w[m],{setInt8:function(t,n){J.call(this,t,n<<24>>24)},setUint8:function(t,n){J.call(this,t,n<<24>>24)}},!0)}else S=function(t){f(this,S,"ArrayBuffer");var n=d(t);this._b=g.call(new Array(n),0),this[k]=n},w=function(t,n,e){f(this,w,"DataView"),f(t,S,"DataView");var r=t[k],i=l(n);if(i<0||i>r)throw M("Wrong offset!");if(i+(e=void 0===e?r-i:h(e))>r)throw M("Wrong length!");this[R]=t,this[T]=i,this[k]=e},i&&(D(S,"byteLength","_l"),D(w,"buffer","_b"),D(w,"byteLength","_l"),D(w,"byteOffset","_o")),c(w[m],{getInt8:function(t){return U(this,1,t)[0]<<24>>24},getUint8:function(t){return U(this,1,t)[0]},getInt16:function(t){var n=U(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=U(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return L(U(this,4,t,arguments[1]))},getUint32:function(t){return L(U(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return j(U(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return j(U(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){z(this,1,t,B,n)},setUint8:function(t,n){z(this,1,t,B,n)},setInt16:function(t,n){z(this,2,t,C,n,arguments[2])},setUint16:function(t,n){z(this,2,t,C,n,arguments[2])},setInt32:function(t,n){z(this,4,t,W,n,arguments[2])},setUint32:function(t,n){z(this,4,t,W,n,arguments[2])},setFloat32:function(t,n){z(this,4,t,G,n,arguments[2])},setFloat64:function(t,n){z(this,8,t,V,n,arguments[2])}});y(S,"ArrayBuffer"),y(w,"DataView"),a(w[m],u.VIEW,!0),n.ArrayBuffer=S,n.DataView=w},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){t.exports=!e(128)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(91))&&r.__esModule?r:{default:r},o=e(18);function u(t,n){for(var e=0;e0){var u=Object.keys(e),c=a.default.find(u,(function(t){return n.isOS(t)}));if(c){var s=this.satisfies(e[c]);if(void 0!==s)return s}var f=a.default.find(u,(function(t){return n.isPlatform(t)}));if(f){var l=this.satisfies(e[f]);if(void 0!==l)return l}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(t){return n.isBrowser(t,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},n.isBrowser=function(t,n){void 0===n&&(n=!1);var e=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return n&&i&&(r=i.toLowerCase()),r===e},n.compareVersion=function(t){var n=[0],e=t,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(e=t.substr(1),"="===t[1]?(r=!0,e=t.substr(2)):n=[],">"===t[0]?n.push(1):n.push(-1)):"="===t[0]?e=t.substr(1):"~"===t[0]&&(r=!0,e=t.substr(1)),n.indexOf(a.default.compareVersions(i,e,r))>-1},n.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},n.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},n.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},n.is=function(t,n){return void 0===n&&(n=!1),this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)},n.some=function(t){var n=this;return void 0===t&&(t=[]),t.some((function(t){return n.is(t)}))},t}();n.default=s,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r};var o=/version\/(\d+(\.?_?\d+)+)/i,u=[{test:[/googlebot/i],describe:function(t){var n={name:"Googlebot"},e=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/opera/i],describe:function(t){var n={name:"Opera"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/opr\/|opios/i],describe:function(t){var n={name:"Opera"},e=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/SamsungBrowser/i],describe:function(t){var n={name:"Samsung Internet for Android"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/Whale/i],describe:function(t){var n={name:"NAVER Whale Browser"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/MZBrowser/i],describe:function(t){var n={name:"MZ Browser"},e=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/focus/i],describe:function(t){var n={name:"Focus"},e=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/swing/i],describe:function(t){var n={name:"Swing"},e=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/coast/i],describe:function(t){var n={name:"Opera Coast"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var n={name:"Opera Touch"},e=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/yabrowser/i],describe:function(t){var n={name:"Yandex Browser"},e=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/ucbrowser/i],describe:function(t){var n={name:"UC Browser"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/Maxthon|mxios/i],describe:function(t){var n={name:"Maxthon"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/epiphany/i],describe:function(t){var n={name:"Epiphany"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/puffin/i],describe:function(t){var n={name:"Puffin"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/sleipnir/i],describe:function(t){var n={name:"Sleipnir"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/k-meleon/i],describe:function(t){var n={name:"K-Meleon"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/micromessenger/i],describe:function(t){var n={name:"WeChat"},e=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/qqbrowser/i],describe:function(t){var n={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},e=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/msie|trident/i],describe:function(t){var n={name:"Internet Explorer"},e=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/\sedg\//i],describe:function(t){var n={name:"Microsoft Edge"},e=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/edg([ea]|ios)/i],describe:function(t){var n={name:"Microsoft Edge"},e=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/vivaldi/i],describe:function(t){var n={name:"Vivaldi"},e=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/seamonkey/i],describe:function(t){var n={name:"SeaMonkey"},e=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/sailfish/i],describe:function(t){var n={name:"Sailfish"},e=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return e&&(n.version=e),n}},{test:[/silk/i],describe:function(t){var n={name:"Amazon Silk"},e=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/phantom/i],describe:function(t){var n={name:"PhantomJS"},e=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/slimerjs/i],describe:function(t){var n={name:"SlimerJS"},e=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var n={name:"BlackBerry"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var n={name:"WebOS Browser"},e=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/bada/i],describe:function(t){var n={name:"Bada"},e=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/tizen/i],describe:function(t){var n={name:"Tizen"},e=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/qupzilla/i],describe:function(t){var n={name:"QupZilla"},e=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var n={name:"Firefox"},e=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/electron/i],describe:function(t){var n={name:"Electron"},e=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/MiuiBrowser/i],describe:function(t){var n={name:"Miui"},e=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/chromium/i],describe:function(t){var n={name:"Chromium"},e=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/chrome|crios|crmo/i],describe:function(t){var n={name:"Chrome"},e=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/GSA/i],describe:function(t){var n={name:"Google Search"},e=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:function(t){var n=!t.test(/like android/i),e=t.test(/android/i);return n&&e},describe:function(t){var n={name:"Android Browser"},e=i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/playstation 4/i],describe:function(t){var n={name:"PlayStation 4"},e=i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/safari|applewebkit/i],describe:function(t){var n={name:"Safari"},e=i.default.getFirstMatch(o,t);return e&&(n.version=e),n}},{test:[/.*/i],describe:function(t){var n=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(n,t),version:i.default.getSecondMatch(n,t)}}}];n.default=u,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r},o=e(18);var u=[{test:[/Roku\/DVP/],describe:function(t){var n=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:o.OS_MAP.Roku,version:n}}},{test:[/windows phone/i],describe:function(t){var n=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.WindowsPhone,version:n}}},{test:[/windows /i],describe:function(t){var n=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),e=i.default.getWindowsVersionName(n);return{name:o.OS_MAP.Windows,version:n,versionName:e}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var n={name:o.OS_MAP.iOS},e=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return e&&(n.version=e),n}},{test:[/macintosh/i],describe:function(t){var n=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),e=i.default.getMacOSVersionName(n),r={name:o.OS_MAP.MacOS,version:n};return e&&(r.versionName=e),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var n=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:n}}},{test:function(t){var n=!t.test(/like android/i),e=t.test(/android/i);return n&&e},describe:function(t){var n=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),e=i.default.getAndroidVersionName(n),r={name:o.OS_MAP.Android,version:n};return e&&(r.versionName=e),r}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var n=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),e={name:o.OS_MAP.WebOS};return n&&n.length&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var n=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:o.OS_MAP.BlackBerry,version:n}}},{test:[/bada/i],describe:function(t){var n=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Bada,version:n}}},{test:[/tizen/i],describe:function(t){var n=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Tizen,version:n}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var n=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.PlayStation4,version:n}}}];n.default=u,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r},o=e(18);var u=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var n=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",e={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return n&&(e.model=n),e}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){var n=t.test(/ipod|iphone/i),e=t.test(/like (ipod|iphone)/i);return n&&!e},describe:function(t){var n=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:n}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var n=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&n>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];n.default=u,t.exports=n.default},function(t,n,e){"use strict";n.__esModule=!0,n.default=void 0;var r,i=(r=e(17))&&r.__esModule?r:{default:r},o=e(18);var u=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:o.ENGINE_MAP.Blink};var n=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:o.ENGINE_MAP.EdgeHTML,version:n}}},{test:[/trident/i],describe:function(t){var n={name:o.ENGINE_MAP.Trident},e=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:function(t){return t.test(/presto/i)},describe:function(t){var n={name:o.ENGINE_MAP.Presto},e=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:function(t){var n=t.test(/gecko/i),e=t.test(/like gecko/i);return n&&!e},describe:function(t){var n={name:o.ENGINE_MAP.Gecko},e=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var n={name:o.ENGINE_MAP.WebKit},e=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return e&&(n.version=e),n}}];n.default=u,t.exports=n.default},function(t,n,e){t.exports=!e(8)&&!e(2)((function(){return 7!=Object.defineProperty(e(62)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(1),i=e(7),o=e(32),u=e(63),a=e(9).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||a(n,t,{value:u.f(t)})}},function(t,n,e){var r=e(13),i=e(15),o=e(51)(!1),u=e(64)("IE_PROTO");t.exports=function(t,n){var e,a=i(t),c=0,s=[];for(e in a)e!=u&&r(a,e)&&s.push(e);for(;n.length>c;)r(a,e=n[c++])&&(~o(s,e)||s.push(e));return s}},function(t,n,e){var r=e(9),i=e(3),o=e(33);t.exports=e(8)?Object.defineProperties:function(t,n){i(t);for(var e,u=o(n),a=u.length,c=0;a>c;)r.f(t,e=u[c++],n[e]);return t}},function(t,n,e){var r=e(15),i=e(36).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return u.slice()}}(t):i(r(t))}},function(t,n,e){"use strict";var r=e(8),i=e(33),o=e(52),u=e(47),a=e(10),c=e(46),s=Object.assign;t.exports=!s||e(2)((function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=s({},t)[e]||Object.keys(s({},n)).join("")!=r}))?function(t,n){for(var e=a(t),s=arguments.length,f=1,l=o.f,h=u.f;s>f;)for(var d,p=c(arguments[f++]),v=l?i(p).concat(l(p)):i(p),g=v.length,y=0;g>y;)d=v[y++],r&&!h.call(p,d)||(e[d]=p[d]);return e}:s},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,e){"use strict";var r=e(20),i=e(4),o=e(104),u=[].slice,a={},c=function(t,n,e){if(!(n in a)){for(var r=[],i=0;i>>0||(u.test(e)?16:10))}:r},function(t,n,e){var r=e(1).parseFloat,i=e(41).trim;t.exports=1/r(e(68)+"-0")!=-1/0?function(t){var n=i(String(t),3),e=r(n);return 0===e&&"-"==n.charAt(0)?-0:e}:r},function(t,n,e){var r=e(25);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(n);return+t}},function(t,n,e){var r=e(4),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,n){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,e){"use strict";var r=e(35),i=e(30),o=e(40),u={};e(14)(u,e(5)("iterator"),(function(){return this})),t.exports=function(t,n,e){t.prototype=r(u,{next:i(1,e)}),o(t,n+" Iterator")}},function(t,n,e){var r=e(3);t.exports=function(t,n,e,i){try{return i?n(r(e)[0],e[1]):n(e)}catch(n){var o=t.return;throw void 0!==o&&r(o.call(t)),n}}},function(t,n,e){var r=e(224);t.exports=function(t,n){return new(r(t))(n)}},function(t,n,e){var r=e(20),i=e(10),o=e(46),u=e(6);t.exports=function(t,n,e,a,c){r(n);var s=i(t),f=o(s),l=u(s.length),h=c?l-1:0,d=c?-1:1;if(e<2)for(;;){if(h in f){a=f[h],h+=d;break}if(h+=d,c?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;c?h>=0:l>h;h+=d)h in f&&(a=n(a,f[h],h,s));return a}},function(t,n,e){"use strict";var r=e(10),i=e(34),o=e(6);t.exports=[].copyWithin||function(t,n){var e=r(this),u=o(e.length),a=i(t,u),c=i(n,u),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?u:i(s,u))-c,u-a),l=1;for(c0;)c in e?e[a]=e[c]:delete e[a],a+=l,c+=l;return e}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){"use strict";var r=e(83);e(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,n,e){e(8)&&"g"!=/./g.flags&&e(9).f(RegExp.prototype,"flags",{configurable:!0,get:e(55)})},function(t,n,e){"use strict";var r,i,o,u,a=e(32),c=e(1),s=e(19),f=e(48),l=e(0),h=e(4),d=e(20),p=e(44),v=e(58),g=e(49),y=e(85).set,m=e(244)(),b=e(119),S=e(245),w=e(59),_=e(120),M=c.TypeError,x=c.process,P=x&&x.versions,O=P&&P.v8||"",F=c.Promise,A="process"==f(x),E=function(){},N=i=b.f,R=!!function(){try{var t=F.resolve(1),n=(t.constructor={})[e(5)("species")]=function(t){t(E,E)};return(A||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof n&&0!==O.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),k=function(t){var n;return!(!h(t)||"function"!=typeof(n=t.then))&&n},T=function(t,n){if(!t._n){t._n=!0;var e=t._c;m((function(){for(var r=t._v,i=1==t._s,o=0,u=function(n){var e,o,u,a=i?n.ok:n.fail,c=n.resolve,s=n.reject,f=n.domain;try{a?(i||(2==t._h&&L(t),t._h=1),!0===a?e=r:(f&&f.enter(),e=a(r),f&&(f.exit(),u=!0)),e===n.promise?s(M("Promise-chain cycle")):(o=k(e))?o.call(e,c,s):c(e)):s(r)}catch(t){f&&!u&&f.exit(),s(t)}};e.length>o;)u(e[o++]);t._c=[],t._n=!1,n&&!t._h&&I(t)}))}},I=function(t){y.call(c,(function(){var n,e,r,i=t._v,o=j(t);if(o&&(n=S((function(){A?x.emit("unhandledRejection",i,t):(e=c.onunhandledrejection)?e({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=A||j(t)?2:1),t._a=void 0,o&&n.e)throw n.v}))},j=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){y.call(c,(function(){var n;A?x.emit("rejectionHandled",t):(n=c.onrejectionhandled)&&n({promise:t,reason:t._v})}))},B=function(t){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=t,n._s=2,n._a||(n._a=n._c.slice()),T(n,!0))},C=function(t){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===t)throw M("Promise can't be resolved itself");(n=k(t))?m((function(){var r={_w:e,_d:!1};try{n.call(t,s(C,r,1),s(B,r,1))}catch(t){B.call(r,t)}})):(e._v=t,e._s=1,T(e,!1))}catch(t){B.call({_w:e,_d:!1},t)}}};R||(F=function(t){p(this,F,"Promise","_h"),d(t),r.call(this);try{t(s(C,this,1),s(B,this,1))}catch(t){B.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e(45)(F.prototype,{then:function(t,n){var e=N(g(this,F));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=A?x.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&T(this,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=s(C,t,1),this.reject=s(B,t,1)},b.f=N=function(t){return t===F||t===u?new o(t):i(t)}),l(l.G+l.W+l.F*!R,{Promise:F}),e(40)(F,"Promise"),e(43)("Promise"),u=e(7).Promise,l(l.S+l.F*!R,"Promise",{reject:function(t){var n=N(this);return(0,n.reject)(t),n.promise}}),l(l.S+l.F*(a||!R),"Promise",{resolve:function(t){return _(a&&this===u?F:this,t)}}),l(l.S+l.F*!(R&&e(54)((function(t){F.all(t).catch(E)}))),"Promise",{all:function(t){var n=this,e=N(n),r=e.resolve,i=e.reject,o=S((function(){var e=[],o=0,u=1;v(t,!1,(function(t){var a=o++,c=!1;e.push(void 0),u++,n.resolve(t).then((function(t){c||(c=!0,e[a]=t,--u||r(e))}),i)})),--u||r(e)}));return o.e&&i(o.v),e.promise},race:function(t){var n=this,e=N(n),r=e.reject,i=S((function(){v(t,!1,(function(t){n.resolve(t).then(e.resolve,r)}))}));return i.e&&r(i.v),e.promise}})},function(t,n,e){"use strict";var r=e(20);function i(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=r(n),this.reject=r(e)}t.exports.f=function(t){return new i(t)}},function(t,n,e){var r=e(3),i=e(4),o=e(119);t.exports=function(t,n){if(r(t),i(n)&&n.constructor===t)return n;var e=o.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){"use strict";var r=e(9).f,i=e(35),o=e(45),u=e(19),a=e(44),c=e(58),s=e(74),f=e(115),l=e(43),h=e(8),d=e(29).fastKey,p=e(39),v=h?"_s":"size",g=function(t,n){var e,r=d(n);if("F"!==r)return t._i[r];for(e=t._f;e;e=e.n)if(e.k==n)return e};t.exports={getConstructor:function(t,n,e,s){var f=t((function(t,r){a(t,f,n,"_i"),t._t=n,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,null!=r&&c(r,e,t[s],t)}));return o(f.prototype,{clear:function(){for(var t=p(this,n),e=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete e[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var e=p(this,n),r=g(e,t);if(r){var i=r.n,o=r.p;delete e._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),e._f==r&&(e._f=i),e._l==r&&(e._l=o),e[v]--}return!!r},forEach:function(t){p(this,n);for(var e,r=u(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(r(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!g(p(this,n),t)}}),h&&r(f.prototype,"size",{get:function(){return p(this,n)[v]}}),f},def:function(t,n,e){var r,i,o=g(t,n);return o?o.v=e:(t._l=o={i:i=d(n,!0),k:n,v:e,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[v]++,"F"!==i&&(t._i[i]=o)),t},getEntry:g,setStrong:function(t,n,e){s(t,n,(function(t,e){this._t=p(t,n),this._k=e,this._l=void 0}),(function(){for(var t=this._k,n=this._l;n&&n.r;)n=n.p;return this._t&&(this._l=n=n?n.n:this._t._f)?f(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(this._t=void 0,f(1))}),e?"entries":"values",!e,!0),l(n)}}},function(t,n,e){"use strict";var r=e(45),i=e(29).getWeak,o=e(3),u=e(4),a=e(44),c=e(58),s=e(24),f=e(13),l=e(39),h=s(5),d=s(6),p=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,n){return h(t.a,(function(t){return t[0]===n}))};g.prototype={get:function(t){var n=y(this,t);if(n)return n[1]},has:function(t){return!!y(this,t)},set:function(t,n){var e=y(this,t);e?e[1]=n:this.a.push([t,n])},delete:function(t){var n=d(this.a,(function(n){return n[0]===t}));return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,o){var s=t((function(t,r){a(t,s,n,"_i"),t._t=n,t._i=p++,t._l=void 0,null!=r&&c(r,e,t[o],t)}));return r(s.prototype,{delete:function(t){if(!u(t))return!1;var e=i(t);return!0===e?v(l(this,n)).delete(t):e&&f(e,this._i)&&delete e[this._i]},has:function(t){if(!u(t))return!1;var e=i(t);return!0===e?v(l(this,n)).has(t):e&&f(e,this._i)}}),s},def:function(t,n,e){var r=i(o(n),!0);return!0===r?v(t).set(n,e):r[t._i]=e,t},ufstore:v}},function(t,n,e){var r=e(21),i=e(6);t.exports=function(t){if(void 0===t)return 0;var n=r(t),e=i(n);if(n!==e)throw RangeError("Wrong length!");return e}},function(t,n,e){var r=e(36),i=e(52),o=e(3),u=e(1).Reflect;t.exports=u&&u.ownKeys||function(t){var n=r.f(o(t)),e=i.f;return e?n.concat(e(t)):n}},function(t,n,e){var r=e(6),i=e(70),o=e(26);t.exports=function(t,n,e,u){var a=String(o(t)),c=a.length,s=void 0===e?" ":String(e),f=r(n);if(f<=c||""==s)return a;var l=f-c,h=i.call(s,Math.ceil(l/s.length));return h.length>l&&(h=h.slice(0,l)),u?h+a:a+h}},function(t,n,e){var r=e(8),i=e(33),o=e(15),u=e(47).f;t.exports=function(t){return function(n){for(var e,a=o(n),c=i(a),s=c.length,f=0,l=[];s>f;)e=c[f++],r&&!u.call(a,e)||l.push(t?[e,a[e]]:a[e]);return l}}},function(t,n){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){e(130),t.exports=e(90)},function(t,n,e){"use strict";e(131);var r,i=(r=e(303))&&r.__esModule?r:{default:r};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},function(t,n,e){"use strict";e(132),e(275),e(277),e(280),e(282),e(284),e(286),e(288),e(290),e(292),e(294),e(296),e(298),e(302)},function(t,n,e){e(133),e(136),e(137),e(138),e(139),e(140),e(141),e(142),e(143),e(144),e(145),e(146),e(147),e(148),e(149),e(150),e(151),e(152),e(153),e(154),e(155),e(156),e(157),e(158),e(159),e(160),e(161),e(162),e(163),e(164),e(165),e(166),e(167),e(168),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(177),e(179),e(180),e(181),e(182),e(183),e(184),e(185),e(186),e(187),e(188),e(189),e(190),e(191),e(192),e(193),e(194),e(195),e(196),e(197),e(198),e(199),e(200),e(201),e(202),e(203),e(204),e(205),e(206),e(207),e(208),e(209),e(210),e(211),e(212),e(214),e(215),e(217),e(218),e(219),e(220),e(221),e(222),e(223),e(225),e(226),e(227),e(228),e(229),e(230),e(231),e(232),e(233),e(234),e(235),e(236),e(237),e(82),e(238),e(116),e(239),e(117),e(240),e(241),e(242),e(243),e(118),e(246),e(247),e(248),e(249),e(250),e(251),e(252),e(253),e(254),e(255),e(256),e(257),e(258),e(259),e(260),e(261),e(262),e(263),e(264),e(265),e(266),e(267),e(268),e(269),e(270),e(271),e(272),e(273),e(274),t.exports=e(7)},function(t,n,e){"use strict";var r=e(1),i=e(13),o=e(8),u=e(0),a=e(11),c=e(29).KEY,s=e(2),f=e(50),l=e(40),h=e(31),d=e(5),p=e(63),v=e(97),g=e(135),y=e(53),m=e(3),b=e(4),S=e(10),w=e(15),_=e(28),M=e(30),x=e(35),P=e(100),O=e(22),F=e(52),A=e(9),E=e(33),N=O.f,R=A.f,k=P.f,T=r.Symbol,I=r.JSON,j=I&&I.stringify,L=d("_hidden"),B=d("toPrimitive"),C={}.propertyIsEnumerable,W=f("symbol-registry"),V=f("symbols"),G=f("op-symbols"),D=Object.prototype,U="function"==typeof T&&!!F.f,z=r.QObject,q=!z||!z.prototype||!z.prototype.findChild,K=o&&s((function(){return 7!=x(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=N(D,n);r&&delete D[n],R(t,n,e),r&&t!==D&&R(D,n,r)}:R,Y=function(t){var n=V[t]=x(T.prototype);return n._k=t,n},Q=U&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},H=function(t,n,e){return t===D&&H(G,n,e),m(t),n=_(n,!0),m(e),i(V,n)?(e.enumerable?(i(t,L)&&t[L][n]&&(t[L][n]=!1),e=x(e,{enumerable:M(0,!1)})):(i(t,L)||R(t,L,M(1,{})),t[L][n]=!0),K(t,n,e)):R(t,n,e)},J=function(t,n){m(t);for(var e,r=g(n=w(n)),i=0,o=r.length;o>i;)H(t,e=r[i++],n[e]);return t},X=function(t){var n=C.call(this,t=_(t,!0));return!(this===D&&i(V,t)&&!i(G,t))&&(!(n||!i(this,t)||!i(V,t)||i(this,L)&&this[L][t])||n)},Z=function(t,n){if(t=w(t),n=_(n,!0),t!==D||!i(V,n)||i(G,n)){var e=N(t,n);return!e||!i(V,n)||i(t,L)&&t[L][n]||(e.enumerable=!0),e}},$=function(t){for(var n,e=k(w(t)),r=[],o=0;e.length>o;)i(V,n=e[o++])||n==L||n==c||r.push(n);return r},tt=function(t){for(var n,e=t===D,r=k(e?G:w(t)),o=[],u=0;r.length>u;)!i(V,n=r[u++])||e&&!i(D,n)||o.push(V[n]);return o};U||(a((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(e){this===D&&n.call(G,e),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),K(this,t,M(1,e))};return o&&q&&K(D,t,{configurable:!0,set:n}),Y(t)}).prototype,"toString",(function(){return this._k})),O.f=Z,A.f=H,e(36).f=P.f=$,e(47).f=X,F.f=tt,o&&!e(32)&&a(D,"propertyIsEnumerable",X,!0),p.f=function(t){return Y(d(t))}),u(u.G+u.W+u.F*!U,{Symbol:T});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)d(nt[et++]);for(var rt=E(d.store),it=0;rt.length>it;)v(rt[it++]);u(u.S+u.F*!U,"Symbol",{for:function(t){return i(W,t+="")?W[t]:W[t]=T(t)},keyFor:function(t){if(!Q(t))throw TypeError(t+" is not a symbol!");for(var n in W)if(W[n]===t)return n},useSetter:function(){q=!0},useSimple:function(){q=!1}}),u(u.S+u.F*!U,"Object",{create:function(t,n){return void 0===n?x(t):J(x(t),n)},defineProperty:H,defineProperties:J,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:tt});var ot=s((function(){F.f(1)}));u(u.S+u.F*ot,"Object",{getOwnPropertySymbols:function(t){return F.f(S(t))}}),I&&u(u.S+u.F*(!U||s((function(){var t=T();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))}))),"JSON",{stringify:function(t){for(var n,e,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(e=n=r[1],(b(n)||void 0!==t)&&!Q(t))return y(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!Q(n))return n}),r[1]=n,j.apply(I,r)}}),T.prototype[B]||e(14)(T.prototype,B,T.prototype.valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){t.exports=e(50)("native-function-to-string",Function.toString)},function(t,n,e){var r=e(33),i=e(52),o=e(47);t.exports=function(t){var n=r(t),e=i.f;if(e)for(var u,a=e(t),c=o.f,s=0;a.length>s;)c.call(t,u=a[s++])&&n.push(u);return n}},function(t,n,e){var r=e(0);r(r.S,"Object",{create:e(35)})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(8),"Object",{defineProperty:e(9).f})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(8),"Object",{defineProperties:e(99)})},function(t,n,e){var r=e(15),i=e(22).f;e(23)("getOwnPropertyDescriptor",(function(){return function(t,n){return i(r(t),n)}}))},function(t,n,e){var r=e(10),i=e(37);e(23)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},function(t,n,e){var r=e(10),i=e(33);e(23)("keys",(function(){return function(t){return i(r(t))}}))},function(t,n,e){e(23)("getOwnPropertyNames",(function(){return e(100).f}))},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(23)("freeze",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(23)("seal",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(29).onFreeze;e(23)("preventExtensions",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4);e(23)("isFrozen",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(23)("isSealed",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(23)("isExtensible",(function(t){return function(n){return!!r(n)&&(!t||t(n))}}))},function(t,n,e){var r=e(0);r(r.S+r.F,"Object",{assign:e(101)})},function(t,n,e){var r=e(0);r(r.S,"Object",{is:e(102)})},function(t,n,e){var r=e(0);r(r.S,"Object",{setPrototypeOf:e(67).set})},function(t,n,e){"use strict";var r=e(48),i={};i[e(5)("toStringTag")]="z",i+""!="[object z]"&&e(11)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,n,e){var r=e(0);r(r.P,"Function",{bind:e(103)})},function(t,n,e){var r=e(9).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||e(8)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,n,e){"use strict";var r=e(4),i=e(37),o=e(5)("hasInstance"),u=Function.prototype;o in u||e(9).f(u,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,e){var r=e(0),i=e(105);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,n,e){var r=e(0),i=e(106);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,n,e){"use strict";var r=e(1),i=e(13),o=e(25),u=e(69),a=e(28),c=e(2),s=e(36).f,f=e(22).f,l=e(9).f,h=e(41).trim,d=r.Number,p=d,v=d.prototype,g="Number"==o(e(35)(v)),y="trim"in String.prototype,m=function(t){var n=a(t,!1);if("string"==typeof n&&n.length>2){var e,r,i,o=(n=y?n.trim():h(n,3)).charCodeAt(0);if(43===o||45===o){if(88===(e=n.charCodeAt(2))||120===e)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+n}for(var u,c=n.slice(2),s=0,f=c.length;si)return NaN;return parseInt(c,r)}}return+n};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof d&&(g?c((function(){v.valueOf.call(e)})):"Number"!=o(e))?u(new p(m(n)),e,d):m(n)};for(var b,S=e(8)?s(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;S.length>w;w++)i(p,b=S[w])&&!i(d,b)&&l(d,b,f(p,b));d.prototype=v,v.constructor=d,e(11)(r,"Number",d)}},function(t,n,e){"use strict";var r=e(0),i=e(21),o=e(107),u=e(70),a=1..toFixed,c=Math.floor,s=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,n){for(var e=-1,r=n;++e<6;)r+=t*s[e],s[e]=r%1e7,r=c(r/1e7)},h=function(t){for(var n=6,e=0;--n>=0;)e+=s[n],s[n]=c(e/t),e=e%t*1e7},d=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==s[t]){var e=String(s[t]);n=""===n?e:n+u.call("0",7-e.length)+e}return n},p=function(t,n,e){return 0===n?e:n%2==1?p(t,n-1,e*t):p(t*t,n/2,e)};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(2)((function(){a.call({})}))),"Number",{toFixed:function(t){var n,e,r,a,c=o(this,f),s=i(t),v="",g="0";if(s<0||s>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(v="-",c=-c),c>1e-21)if(e=(n=function(t){for(var n=0,e=t;e>=4096;)n+=12,e/=4096;for(;e>=2;)n+=1,e/=2;return n}(c*p(2,69,1))-69)<0?c*p(2,-n,1):c/p(2,n,1),e*=4503599627370496,(n=52-n)>0){for(l(0,e),r=s;r>=7;)l(1e7,0),r-=7;for(l(p(10,r,1),0),r=n-1;r>=23;)h(1<<23),r-=23;h(1<0?v+((a=g.length)<=s?"0."+u.call("0",s-a)+g:g.slice(0,a-s)+"."+g.slice(a-s)):v+g}})},function(t,n,e){"use strict";var r=e(0),i=e(2),o=e(107),u=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==u.call(1,void 0)}))||!i((function(){u.call({})}))),"Number",{toPrecision:function(t){var n=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,e){var r=e(0),i=e(1).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{isInteger:e(108)})},function(t,n,e){var r=e(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,e){var r=e(0),i=e(108),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,n,e){var r=e(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,e){var r=e(0),i=e(106);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,n,e){var r=e(0),i=e(105);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,n,e){var r=e(0),i=e(109),o=Math.sqrt,u=Math.acosh;r(r.S+r.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,n,e){var r=e(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(n){return isFinite(n=+n)&&0!=n?n<0?-t(-n):Math.log(n+Math.sqrt(n*n+1)):n}})},function(t,n,e){var r=e(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,e){var r=e(0),i=e(71);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,e){var r=e(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,n,e){var r=e(0),i=e(72);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,e){var r=e(0);r(r.S,"Math",{fround:e(178)})},function(t,n,e){var r=e(71),i=Math.pow,o=i(2,-52),u=i(2,-23),a=i(2,127)*(2-u),c=i(2,-126);t.exports=Math.fround||function(t){var n,e,i=Math.abs(t),s=r(t);return ia||e!=e?s*(1/0):s*e}},function(t,n,e){var r=e(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,n){for(var e,r,o=0,u=0,a=arguments.length,c=0;u0?(r=e/c)*r:e;return c===1/0?1/0:c*Math.sqrt(o)}})},function(t,n,e){var r=e(0),i=Math.imul;r(r.S+r.F*e(2)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r;return 0|i*o+((65535&e>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log1p:e(109)})},function(t,n,e){var r=e(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,e){var r=e(0);r(r.S,"Math",{sign:e(71)})},function(t,n,e){var r=e(0),i=e(72),o=Math.exp;r(r.S+r.F*e(2)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,e){var r=e(0),i=e(72),o=Math.exp;r(r.S,"Math",{tanh:function(t){var n=i(t=+t),e=i(-t);return n==1/0?1:e==1/0?-1:(n-e)/(o(t)+o(-t))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,e){var r=e(0),i=e(34),o=String.fromCharCode,u=String.fromCodePoint;r(r.S+r.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,e=[],r=arguments.length,u=0;r>u;){if(n=+arguments[u++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");e.push(n<65536?o(n):o(55296+((n-=65536)>>10),n%1024+56320))}return e.join("")}})},function(t,n,e){var r=e(0),i=e(15),o=e(6);r(r.S,"String",{raw:function(t){for(var n=i(t.raw),e=o(n.length),r=arguments.length,u=[],a=0;e>a;)u.push(String(n[a++])),a=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})}))},function(t,n,e){"use strict";var r=e(0),i=e(73)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(75),u="".endsWith;r(r.P+r.F*e(77)("endsWith"),"String",{endsWith:function(t){var n=o(this,t,"endsWith"),e=arguments.length>1?arguments[1]:void 0,r=i(n.length),a=void 0===e?r:Math.min(i(e),r),c=String(t);return u?u.call(n,c,a):n.slice(a-c.length,a)===c}})},function(t,n,e){"use strict";var r=e(0),i=e(75);r(r.P+r.F*e(77)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,e){var r=e(0);r(r.P,"String",{repeat:e(70)})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(75),u="".startsWith;r(r.P+r.F*e(77)("startsWith"),"String",{startsWith:function(t){var n=o(this,t,"startsWith"),e=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(t);return u?u.call(n,r,e):n.slice(e,e+r.length)===r}})},function(t,n,e){"use strict";e(12)("anchor",(function(t){return function(n){return t(this,"a","name",n)}}))},function(t,n,e){"use strict";e(12)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,n,e){"use strict";e(12)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,n,e){"use strict";e(12)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,n,e){"use strict";e(12)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,n,e){"use strict";e(12)("fontcolor",(function(t){return function(n){return t(this,"font","color",n)}}))},function(t,n,e){"use strict";e(12)("fontsize",(function(t){return function(n){return t(this,"font","size",n)}}))},function(t,n,e){"use strict";e(12)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,n,e){"use strict";e(12)("link",(function(t){return function(n){return t(this,"a","href",n)}}))},function(t,n,e){"use strict";e(12)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,n,e){"use strict";e(12)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,n,e){"use strict";e(12)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,n,e){"use strict";e(12)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,n,e){var r=e(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,e){"use strict";var r=e(0),i=e(10),o=e(28);r(r.P+r.F*e(2)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var n=i(this),e=o(n);return"number"!=typeof e||isFinite(e)?n.toISOString():null}})},function(t,n,e){var r=e(0),i=e(213);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,n,e){"use strict";var r=e(2),i=Date.prototype.getTime,o=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),e=t.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(e>99?e:"0"+u(e))+"Z"}:o},function(t,n,e){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&e(11)(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,n,e){var r=e(5)("toPrimitive"),i=Date.prototype;r in i||e(14)(i,r,e(216))},function(t,n,e){"use strict";var r=e(3),i=e(28);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,n,e){var r=e(0);r(r.S,"Array",{isArray:e(53)})},function(t,n,e){"use strict";var r=e(19),i=e(0),o=e(10),u=e(111),a=e(78),c=e(6),s=e(79),f=e(80);i(i.S+i.F*!e(54)((function(t){Array.from(t)})),"Array",{from:function(t){var n,e,i,l,h=o(t),d="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v,y=0,m=f(h);if(g&&(v=r(v,p>2?arguments[2]:void 0,2)),null==m||d==Array&&a(m))for(e=new d(n=c(h.length));n>y;y++)s(e,y,g?v(h[y],y):h[y]);else for(l=m.call(h),e=new d;!(i=l.next()).done;y++)s(e,y,g?u(l,v,[i.value,y],!0):i.value);return e.length=y,e}})},function(t,n,e){"use strict";var r=e(0),i=e(79);r(r.S+r.F*e(2)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,n=arguments.length,e=new("function"==typeof this?this:Array)(n);n>t;)i(e,t,arguments[t++]);return e.length=n,e}})},function(t,n,e){"use strict";var r=e(0),i=e(15),o=[].join;r(r.P+r.F*(e(46)!=Object||!e(16)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,n,e){"use strict";var r=e(0),i=e(66),o=e(25),u=e(34),a=e(6),c=[].slice;r(r.P+r.F*e(2)((function(){i&&c.call(i)})),"Array",{slice:function(t,n){var e=a(this.length),r=o(this);if(n=void 0===n?e:n,"Array"==r)return c.call(this,t,n);for(var i=u(t,e),s=u(n,e),f=a(s-i),l=new Array(f),h=0;h1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in n&&n[r]===t)return r||0;return-1}})},function(t,n,e){var r=e(0);r(r.P,"Array",{copyWithin:e(114)}),e(38)("copyWithin")},function(t,n,e){var r=e(0);r(r.P,"Array",{fill:e(81)}),e(38)("fill")},function(t,n,e){"use strict";var r=e(0),i=e(24)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(38)("find")},function(t,n,e){"use strict";var r=e(0),i=e(24)(6),o="findIndex",u=!0;o in[]&&Array(1)[o]((function(){u=!1})),r(r.P+r.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(38)(o)},function(t,n,e){e(43)("Array")},function(t,n,e){var r=e(1),i=e(69),o=e(9).f,u=e(36).f,a=e(76),c=e(55),s=r.RegExp,f=s,l=s.prototype,h=/a/g,d=/a/g,p=new s(h)!==h;if(e(8)&&(!p||e(2)((function(){return d[e(5)("match")]=!1,s(h)!=h||s(d)==d||"/a/i"!=s(h,"i")})))){s=function(t,n){var e=this instanceof s,r=a(t),o=void 0===n;return!e&&r&&t.constructor===s&&o?t:i(p?new f(r&&!o?t.source:t,n):f((r=t instanceof s)?t.source:t,r&&o?c.call(t):n),e?this:l,s)};for(var v=function(t){t in s||o(s,t,{configurable:!0,get:function(){return f[t]},set:function(n){f[t]=n}})},g=u(f),y=0;g.length>y;)v(g[y++]);l.constructor=s,s.prototype=l,e(11)(r,"RegExp",s)}e(43)("RegExp")},function(t,n,e){"use strict";e(117);var r=e(3),i=e(55),o=e(8),u=/./.toString,a=function(t){e(11)(RegExp.prototype,"toString",t,!0)};e(2)((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))?a((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=u.name&&a((function(){return u.call(this)}))},function(t,n,e){"use strict";var r=e(3),i=e(6),o=e(84),u=e(56);e(57)("match",1,(function(t,n,e,a){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=a(e,t,this);if(n.done)return n.value;var c=r(t),s=String(this);if(!c.global)return u(c,s);var f=c.unicode;c.lastIndex=0;for(var l,h=[],d=0;null!==(l=u(c,s));){var p=String(l[0]);h[d]=p,""===p&&(c.lastIndex=o(s,i(c.lastIndex),f)),d++}return 0===d?null:h}]}))},function(t,n,e){"use strict";var r=e(3),i=e(10),o=e(6),u=e(21),a=e(84),c=e(56),s=Math.max,f=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;e(57)("replace",2,(function(t,n,e,p){return[function(r,i){var o=t(this),u=null==r?void 0:r[n];return void 0!==u?u.call(r,o,i):e.call(String(o),r,i)},function(t,n){var i=p(e,t,this,n);if(i.done)return i.value;var l=r(t),h=String(this),d="function"==typeof n;d||(n=String(n));var g=l.global;if(g){var y=l.unicode;l.lastIndex=0}for(var m=[];;){var b=c(l,h);if(null===b)break;if(m.push(b),!g)break;""===String(b[0])&&(l.lastIndex=a(h,o(l.lastIndex),y))}for(var S,w="",_=0,M=0;M=_&&(w+=h.slice(_,P)+N,_=P+x.length)}return w+h.slice(_)}];function v(t,n,r,o,u,a){var c=r+t.length,s=o.length,f=d;return void 0!==u&&(u=i(u),f=h),e.call(a,f,(function(e,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":a=u[i.slice(1,-1)];break;default:var f=+i;if(0===f)return e;if(f>s){var h=l(f/10);return 0===h?e:h<=s?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):e}a=o[f-1]}return void 0===a?"":a}))}}))},function(t,n,e){"use strict";var r=e(3),i=e(102),o=e(56);e(57)("search",1,(function(t,n,e,u){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=u(e,t,this);if(n.done)return n.value;var a=r(t),c=String(this),s=a.lastIndex;i(s,0)||(a.lastIndex=0);var f=o(a,c);return i(a.lastIndex,s)||(a.lastIndex=s),null===f?-1:f.index}]}))},function(t,n,e){"use strict";var r=e(76),i=e(3),o=e(49),u=e(84),a=e(6),c=e(56),s=e(83),f=e(2),l=Math.min,h=[].push,d=!f((function(){RegExp(4294967295,"y")}));e(57)("split",2,(function(t,n,e,f){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!r(t))return e.call(i,t,n);for(var o,u,a,c=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,d=void 0===n?4294967295:n>>>0,p=new RegExp(t.source,f+"g");(o=s.call(p,i))&&!((u=p.lastIndex)>l&&(c.push(i.slice(l,o.index)),o.length>1&&o.index=d));)p.lastIndex===o.index&&p.lastIndex++;return l===i.length?!a&&p.test("")||c.push(""):c.push(i.slice(l)),c.length>d?c.slice(0,d):c}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,r){var i=t(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,i,r):p.call(String(i),e,r)},function(t,n){var r=f(p,t,this,n,p!==e);if(r.done)return r.value;var s=i(t),h=String(this),v=o(s,RegExp),g=s.unicode,y=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(d?"y":"g"),m=new v(d?s:"^(?:"+s.source+")",y),b=void 0===n?4294967295:n>>>0;if(0===b)return[];if(0===h.length)return null===c(m,h)?[h]:[];for(var S=0,w=0,_=[];w0?arguments[0]:void 0)}}),{get:function(t){var n=r.getEntry(i(this,"Map"),t);return n&&n.v},set:function(t,n){return r.def(i(this,"Map"),0===t?0:t,n)}},r,!0)},function(t,n,e){"use strict";var r=e(121),i=e(39);t.exports=e(60)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,n,e){"use strict";var r,i=e(1),o=e(24)(0),u=e(11),a=e(29),c=e(101),s=e(122),f=e(4),l=e(39),h=e(39),d=!i.ActiveXObject&&"ActiveXObject"in i,p=a.getWeak,v=Object.isExtensible,g=s.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(f(t)){var n=p(t);return!0===n?g(l(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(t,n){return s.def(l(this,"WeakMap"),t,n)}},b=t.exports=e(60)("WeakMap",y,m,s,!0,!0);h&&d&&(c((r=s.getConstructor(y,"WeakMap")).prototype,m),a.NEED=!0,o(["delete","has","get","set"],(function(t){var n=b.prototype,e=n[t];u(n,t,(function(n,i){if(f(n)&&!v(n)){this._f||(this._f=new r);var o=this._f[t](n,i);return"set"==t?this:o}return e.call(this,n,i)}))})))},function(t,n,e){"use strict";var r=e(122),i=e(39);e(60)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,n,e){"use strict";var r=e(0),i=e(61),o=e(86),u=e(3),a=e(34),c=e(6),s=e(4),f=e(1).ArrayBuffer,l=e(49),h=o.ArrayBuffer,d=o.DataView,p=i.ABV&&f.isView,v=h.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(f!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return p&&p(t)||s(t)&&g in t}}),r(r.P+r.U+r.F*e(2)((function(){return!new h(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,n){if(void 0!==v&&void 0===n)return v.call(u(this),t);for(var e=u(this).byteLength,r=a(t,e),i=a(void 0===n?e:n,e),o=new(l(this,h))(c(i-r)),s=new d(this),f=new d(o),p=0;r=n.length)return{value:void 0,done:!0}}while(!((t=n[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,n,e){var r=e(22),i=e(37),o=e(13),u=e(0),a=e(4),c=e(3);u(u.S,"Reflect",{get:function t(n,e){var u,s,f=arguments.length<3?n:arguments[2];return c(n)===f?n[e]:(u=r.f(n,e))?o(u,"value")?u.value:void 0!==u.get?u.get.call(f):void 0:a(s=i(n))?t(s,e,f):void 0}})},function(t,n,e){var r=e(22),i=e(0),o=e(3);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return r.f(o(t),n)}})},function(t,n,e){var r=e(0),i=e(37),o=e(3);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,e){var r=e(0),i=e(3),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{ownKeys:e(124)})},function(t,n,e){var r=e(0),i=e(3),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,n,e){var r=e(9),i=e(22),o=e(37),u=e(13),a=e(0),c=e(30),s=e(3),f=e(4);a(a.S,"Reflect",{set:function t(n,e,a){var l,h,d=arguments.length<4?n:arguments[3],p=i.f(s(n),e);if(!p){if(f(h=o(n)))return t(h,e,a,d);p=c(0)}if(u(p,"value")){if(!1===p.writable||!f(d))return!1;if(l=i.f(d,e)){if(l.get||l.set||!1===l.writable)return!1;l.value=a,r.f(d,e,l)}else r.f(d,e,c(0,a));return!0}return void 0!==p.set&&(p.set.call(d,a),!0)}})},function(t,n,e){var r=e(0),i=e(67);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,n){i.check(t,n);try{return i.set(t,n),!0}catch(t){return!1}}})},function(t,n,e){e(276),t.exports=e(7).Array.includes},function(t,n,e){"use strict";var r=e(0),i=e(51)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(38)("includes")},function(t,n,e){e(278),t.exports=e(7).Array.flatMap},function(t,n,e){"use strict";var r=e(0),i=e(279),o=e(10),u=e(6),a=e(20),c=e(112);r(r.P,"Array",{flatMap:function(t){var n,e,r=o(this);return a(t),n=u(r.length),e=c(r,0),i(e,r,r,n,0,1,t,arguments[1]),e}}),e(38)("flatMap")},function(t,n,e){"use strict";var r=e(53),i=e(4),o=e(6),u=e(19),a=e(5)("isConcatSpreadable");t.exports=function t(n,e,c,s,f,l,h,d){for(var p,v,g=f,y=0,m=!!h&&u(h,d,3);y0)g=t(n,e,p,o(p.length),g,l-1)-1;else{if(g>=9007199254740991)throw TypeError();n[g]=p}g++}y++}return g}},function(t,n,e){e(281),t.exports=e(7).String.padStart},function(t,n,e){"use strict";var r=e(0),i=e(125),o=e(59),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,n,e){e(283),t.exports=e(7).String.padEnd},function(t,n,e){"use strict";var r=e(0),i=e(125),o=e(59),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,n,e){e(285),t.exports=e(7).String.trimLeft},function(t,n,e){"use strict";e(41)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,n,e){e(287),t.exports=e(7).String.trimRight},function(t,n,e){"use strict";e(41)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,n,e){e(289),t.exports=e(63).f("asyncIterator")},function(t,n,e){e(97)("asyncIterator")},function(t,n,e){e(291),t.exports=e(7).Object.getOwnPropertyDescriptors},function(t,n,e){var r=e(0),i=e(124),o=e(15),u=e(22),a=e(79);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var n,e,r=o(t),c=u.f,s=i(r),f={},l=0;s.length>l;)void 0!==(e=c(r,n=s[l++]))&&a(f,n,e);return f}})},function(t,n,e){e(293),t.exports=e(7).Object.values},function(t,n,e){var r=e(0),i=e(126)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,n,e){e(295),t.exports=e(7).Object.entries},function(t,n,e){var r=e(0),i=e(126)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,n,e){"use strict";e(118),e(297),t.exports=e(7).Promise.finally},function(t,n,e){"use strict";var r=e(0),i=e(7),o=e(1),u=e(49),a=e(120);r(r.P+r.R,"Promise",{finally:function(t){var n=u(this,i.Promise||o.Promise),e="function"==typeof t;return this.then(e?function(e){return a(n,t()).then((function(){return e}))}:t,e?function(e){return a(n,t()).then((function(){throw e}))}:t)}})},function(t,n,e){e(299),e(300),e(301),t.exports=e(7)},function(t,n,e){var r=e(1),i=e(0),o=e(59),u=[].slice,a=/MSIE .\./.test(o),c=function(t){return function(n,e){var r=arguments.length>2,i=!!r&&u.call(arguments,2);return t(r?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,e)}};i(i.G+i.B+i.F*a,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,n,e){var r=e(0),i=e(85);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,n,e){for(var r=e(82),i=e(33),o=e(11),u=e(1),a=e(14),c=e(42),s=e(5),f=s("iterator"),l=s("toStringTag"),h=c.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(d),v=0;v=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),s=r.call(u,"finallyLoc");if(c&&s){if(this.prev=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),p}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;O(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),p}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,n,e){e(304),t.exports=e(127).global},function(t,n,e){var r=e(305);r(r.G,{global:e(87)})},function(t,n,e){var r=e(87),i=e(127),o=e(306),u=e(308),a=e(315),c=function(t,n,e){var s,f,l,h=t&c.F,d=t&c.G,p=t&c.S,v=t&c.P,g=t&c.B,y=t&c.W,m=d?i:i[n]||(i[n]={}),b=m.prototype,S=d?r:p?r[n]:(r[n]||{}).prototype;for(s in d&&(e=n),e)(f=!h&&S&&void 0!==S[s])&&a(m,s)||(l=f?S[s]:e[s],m[s]=d&&"function"!=typeof S[s]?e[s]:g&&f?o(l,r):y&&S[s]==l?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((m.virtual||(m.virtual={}))[s]=l,t&c.R&&b&&!b[s]&&u(b,s,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n,e){var r=e(307);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(309),i=e(314);t.exports=e(89)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(310),i=e(311),o=e(313),u=Object.defineProperty;n.f=e(89)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(88);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){t.exports=!e(89)&&!e(128)((function(){return 7!=Object.defineProperty(e(312)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(88),i=e(87).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){var r=e(88);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}}])})); \ No newline at end of file diff --git a/node_modules/bowser/es5.js b/node_modules/bowser/es5.js new file mode 100644 index 0000000..bb8ec3d --- /dev/null +++ b/node_modules/bowser/es5.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bowser=t():e.bowser=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(r),a=Math.max(i,s),o=0,u=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(o=a-Math.min(i,s)),a-=1;a>=o;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===o)return 0;a-=1}else if(u[0][a]1?i-1:0),a=1;a0){var a=Object.keys(r),u=o.default.find(a,(function(e){return t.isOS(e)}));if(u){var d=this.satisfies(r[u]);if(void 0!==d)return d}var c=o.default.find(a,(function(e){return t.isPlatform(e)}));if(c){var f=this.satisfies(r[c]);if(void 0!==f)return f}}if(s>0){var l=Object.keys(i),h=o.default.find(l,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=o.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(o.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=d,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n};var s=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:s.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:s.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:s.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})})); \ No newline at end of file diff --git a/node_modules/bowser/index.d.ts b/node_modules/bowser/index.d.ts new file mode 100644 index 0000000..d95656a --- /dev/null +++ b/node_modules/bowser/index.d.ts @@ -0,0 +1,250 @@ +// Type definitions for Bowser v2 +// Project: https://github.com/lancedikson/bowser +// Definitions by: Alexander P. Cerutti , + +export = Bowser; +export as namespace Bowser; + +declare namespace Bowser { + /** + * Creates a Parser instance + * @param {string} UA - User agent string + * @param {boolean} skipParsing + */ + + function getParser(UA: string, skipParsing?: boolean): Parser.Parser; + + /** + * Creates a Parser instance and runs Parser.getResult immediately + * @param UA - User agent string + * @returns {Parser.ParsedResult} + */ + + function parse(UA: string): Parser.ParsedResult; + + /** + * Constants exposed via bowser getters + */ + const BROWSER_MAP: Record; + const ENGINE_MAP: Record; + const OS_MAP: Record; + const PLATFORMS_MAP: Record; + + namespace Parser { + interface Parser { + constructor(UA: string, skipParsing?: boolean): Parser.Parser; + + /** + * Get parsed browser object + * @return {BrowserDetails} Browser's details + */ + + getBrowser(): BrowserDetails; + + /** + * Get browser's name + * @param {Boolean} [toLowerCase] return lower-cased value + * @return {String} Browser's name or an empty string + */ + + getBrowserName(toLowerCase?: boolean): string; + + /** + * Get browser's version + * @return {String} version of browser + */ + + getBrowserVersion(): string; + + /** + * Get OS + * @return {OSDetails} - OS Details + * + * @example + * this.getOS(); // { + * // name: 'macOS', + * // version: '10.11.12', + * // } + */ + + getOS(): OSDetails; + + /** + * Get OS name + * @param {Boolean} [toLowerCase] return lower-cased value + * @return {String} name of the OS — macOS, Windows, Linux, etc. + */ + + getOSName(toLowerCase?: boolean): string; + + /** + * Get OS version + * @return {String} full version with dots ('10.11.12', '5.6', etc) + */ + + getOSVersion(): string; + + /** + * Get parsed platform + * @returns {PlatformDetails} + */ + + getPlatform(): PlatformDetails; + + /** + * Get platform name + * @param {boolean} toLowerCase + */ + + getPlatformType(toLowerCase?: boolean): string; + + /** + * Get parsed engine + * @returns {EngineDetails} + */ + + getEngine(): EngineDetails; + + /** + * Get parsed engine's name + * @returns {String} Engine's name or an empty string + */ + + getEngineName(): string; + + /** + * Get parsed result + * @return {ParsedResult} + */ + + getResult(): ParsedResult; + + /** + * Get UserAgent string of current Parser instance + * @return {String} User-Agent String of the current object + */ + + getUA(): string; + + /** + * Is anything? Check if the browser is called "anything", + * the OS called "anything" or the platform called "anything" + * @param {String} anything + * @returns {Boolean} + */ + + is(anything: any): boolean; + + /** + * Parse full information about the browser + * @returns {Parser.Parser} + */ + + parse(): Parser.Parser; + + /** + * Get parsed browser object + * @returns {BrowserDetails} + */ + + parseBrowser(): BrowserDetails; + + /** + * Get parsed engine + * @returns {EngineDetails} + */ + + parseEngine(): EngineDetails; + + /** + * Parse OS and save it to this.parsedResult.os + * @returns {OSDetails} + */ + + parseOS(): OSDetails; + + /** + * Get parsed platform + * @returns {PlatformDetails} + */ + + parsePlatform(): PlatformDetails; + + /** + * Check if parsed browser matches certain conditions + * + * @param {checkTree} checkTree It's one or two layered object, + * which can include a platform or an OS on the first layer + * and should have browsers specs on the bottom-laying layer + * + * @returns {Boolean|undefined} Whether the browser satisfies the set conditions or not. + * Returns `undefined` when the browser is no described in the checkTree object. + * + * @example + * const browser = new Bowser(UA); + * if (browser.check({chrome: '>118.01.1322' })) + * // or with os + * if (browser.check({windows: { chrome: '>118.01.1322' } })) + * // or with platforms + * if (browser.check({desktop: { chrome: '>118.01.1322' } })) + */ + + satisfies(checkTree: checkTree): boolean | undefined; + + /** + * Check if the browser name equals the passed string + * @param browserName The string to compare with the browser name + * @param [includingAlias=false] The flag showing whether alias will be included into comparison + * @returns {boolean} + */ + + + isBrowser(browserName: string, includingAlias?: boolean): boolean; + + /** + * Check if any of the given values satifies `.is(anything)` + * @param {string[]} anythings + * @returns {boolean} true if at least one condition is satisfied, false otherwise. + */ + + some(anythings: string[]): boolean | undefined; + + /** + * Test a UA string for a regexp + * @param regex + * @returns {boolean} true if the regex matches the UA, false otherwise. + */ + + test(regex: RegExp): boolean; + } + + interface ParsedResult { + browser: BrowserDetails; + os: OSDetails; + platform: PlatformDetails; + engine: EngineDetails; + } + + interface Details { + name?: string; + version?: string; + } + + interface OSDetails extends Details { + versionName?: string; + } + + interface PlatformDetails { + type?: string; + vendor?: string; + model?: string; + } + + type BrowserDetails = Details; + type EngineDetails = Details; + + interface checkTree { + [key: string]: any; + } + } +} diff --git a/node_modules/bowser/package.json b/node_modules/bowser/package.json new file mode 100644 index 0000000..3fb7c83 --- /dev/null +++ b/node_modules/bowser/package.json @@ -0,0 +1,83 @@ +{ + "name": "bowser", + "version": "2.11.0", + "description": "Lightweight browser detector", + "keywords": [ + "browser", + "useragent", + "user-agent", + "parser", + "ua", + "detection", + "ender", + "sniff" + ], + "homepage": "https://github.com/lancedikson/bowser", + "author": "Dustin Diaz (http://dustindiaz.com)", + "contributors": [ + { + "name": "Denis Demchenko", + "url": "http://twitter.com/lancedikson" + } + ], + "main": "es5.js", + "browser": "es5.js", + "module": "src/bowser.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git+https://github.com/lancedikson/bowser.git" + }, + "devDependencies": { + "@babel/cli": "^7.11.6", + "@babel/core": "^7.8.0", + "@babel/polyfill": "^7.8.3", + "@babel/preset-env": "^7.8.2", + "@babel/register": "^7.8.3", + "ava": "^3.0.0", + "babel-eslint": "^10.0.3", + "babel-loader": "^8.0.6", + "babel-plugin-add-module-exports": "^1.0.2", + "babel-plugin-istanbul": "^6.0.0", + "compression-webpack-plugin": "^4.0.0", + "coveralls": "^3.0.6", + "docdash": "^1.1.1", + "eslint": "^6.5.1", + "eslint-config-airbnb-base": "^13.2.0", + "eslint-plugin-ava": "^10.0.0", + "eslint-plugin-import": "^2.18.2", + "gh-pages": "^3.0.0", + "jsdoc": "^3.6.3", + "nyc": "^15.0.0", + "sinon": "^9.0.0", + "testem": "^3.0.0", + "webpack": "^4.41.0", + "webpack-bundle-analyzer": "^3.5.2", + "webpack-cli": "^3.3.9", + "yamljs": "^0.3.0" + }, + "ava": { + "require": [ + "@babel/register" + ] + }, + "bugs": { + "url": "https://github.com/lancedikson/bowser/issues" + }, + "directories": { + "test": "test" + }, + "scripts": { + "build": "webpack --config webpack.config.js", + "generate-and-deploy-docs": "npm run generate-docs && gh-pages --dist docs --dest docs", + "watch": "webpack --watch --config webpack.config.js", + "prepublishOnly": "npm run build", + "lint": "eslint ./src", + "testem": "testem", + "test": "nyc --reporter=html --reporter=text ava", + "test:watch": "ava --watch", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "generate-docs": "jsdoc -c jsdoc.json" + }, + "license": "MIT" +} diff --git a/node_modules/bowser/src/bowser.js b/node_modules/bowser/src/bowser.js new file mode 100644 index 0000000..f79e6e0 --- /dev/null +++ b/node_modules/bowser/src/bowser.js @@ -0,0 +1,77 @@ +/*! + * Bowser - a browser detector + * https://github.com/lancedikson/bowser + * MIT License | (c) Dustin Diaz 2012-2015 + * MIT License | (c) Denis Demchenko 2015-2019 + */ +import Parser from './parser.js'; +import { + BROWSER_MAP, + ENGINE_MAP, + OS_MAP, + PLATFORMS_MAP, +} from './constants.js'; + +/** + * Bowser class. + * Keep it simple as much as it can be. + * It's supposed to work with collections of {@link Parser} instances + * rather then solve one-instance problems. + * All the one-instance stuff is located in Parser class. + * + * @class + * @classdesc Bowser is a static object, that provides an API to the Parsers + * @hideconstructor + */ +class Bowser { + /** + * Creates a {@link Parser} instance + * + * @param {String} UA UserAgent string + * @param {Boolean} [skipParsing=false] Will make the Parser postpone parsing until you ask it + * explicitly. Same as `skipParsing` for {@link Parser}. + * @returns {Parser} + * @throws {Error} when UA is not a String + * + * @example + * const parser = Bowser.getParser(window.navigator.userAgent); + * const result = parser.getResult(); + */ + static getParser(UA, skipParsing = false) { + if (typeof UA !== 'string') { + throw new Error('UserAgent should be a string'); + } + return new Parser(UA, skipParsing); + } + + /** + * Creates a {@link Parser} instance and runs {@link Parser.getResult} immediately + * + * @param UA + * @return {ParsedResult} + * + * @example + * const result = Bowser.parse(window.navigator.userAgent); + */ + static parse(UA) { + return (new Parser(UA)).getResult(); + } + + static get BROWSER_MAP() { + return BROWSER_MAP; + } + + static get ENGINE_MAP() { + return ENGINE_MAP; + } + + static get OS_MAP() { + return OS_MAP; + } + + static get PLATFORMS_MAP() { + return PLATFORMS_MAP; + } +} + +export default Bowser; diff --git a/node_modules/bowser/src/constants.js b/node_modules/bowser/src/constants.js new file mode 100644 index 0000000..f335032 --- /dev/null +++ b/node_modules/bowser/src/constants.js @@ -0,0 +1,116 @@ +// NOTE: this list must be up-to-date with browsers listed in +// test/acceptance/useragentstrings.yml +export const BROWSER_ALIASES_MAP = { + 'Amazon Silk': 'amazon_silk', + 'Android Browser': 'android', + Bada: 'bada', + BlackBerry: 'blackberry', + Chrome: 'chrome', + Chromium: 'chromium', + Electron: 'electron', + Epiphany: 'epiphany', + Firefox: 'firefox', + Focus: 'focus', + Generic: 'generic', + 'Google Search': 'google_search', + Googlebot: 'googlebot', + 'Internet Explorer': 'ie', + 'K-Meleon': 'k_meleon', + Maxthon: 'maxthon', + 'Microsoft Edge': 'edge', + 'MZ Browser': 'mz', + 'NAVER Whale Browser': 'naver', + Opera: 'opera', + 'Opera Coast': 'opera_coast', + PhantomJS: 'phantomjs', + Puffin: 'puffin', + QupZilla: 'qupzilla', + QQ: 'qq', + QQLite: 'qqlite', + Safari: 'safari', + Sailfish: 'sailfish', + 'Samsung Internet for Android': 'samsung_internet', + SeaMonkey: 'seamonkey', + Sleipnir: 'sleipnir', + Swing: 'swing', + Tizen: 'tizen', + 'UC Browser': 'uc', + Vivaldi: 'vivaldi', + 'WebOS Browser': 'webos', + WeChat: 'wechat', + 'Yandex Browser': 'yandex', + Roku: 'roku', +}; + +export const BROWSER_MAP = { + amazon_silk: 'Amazon Silk', + android: 'Android Browser', + bada: 'Bada', + blackberry: 'BlackBerry', + chrome: 'Chrome', + chromium: 'Chromium', + electron: 'Electron', + epiphany: 'Epiphany', + firefox: 'Firefox', + focus: 'Focus', + generic: 'Generic', + googlebot: 'Googlebot', + google_search: 'Google Search', + ie: 'Internet Explorer', + k_meleon: 'K-Meleon', + maxthon: 'Maxthon', + edge: 'Microsoft Edge', + mz: 'MZ Browser', + naver: 'NAVER Whale Browser', + opera: 'Opera', + opera_coast: 'Opera Coast', + phantomjs: 'PhantomJS', + puffin: 'Puffin', + qupzilla: 'QupZilla', + qq: 'QQ Browser', + qqlite: 'QQ Browser Lite', + safari: 'Safari', + sailfish: 'Sailfish', + samsung_internet: 'Samsung Internet for Android', + seamonkey: 'SeaMonkey', + sleipnir: 'Sleipnir', + swing: 'Swing', + tizen: 'Tizen', + uc: 'UC Browser', + vivaldi: 'Vivaldi', + webos: 'WebOS Browser', + wechat: 'WeChat', + yandex: 'Yandex Browser', +}; + +export const PLATFORMS_MAP = { + tablet: 'tablet', + mobile: 'mobile', + desktop: 'desktop', + tv: 'tv', +}; + +export const OS_MAP = { + WindowsPhone: 'Windows Phone', + Windows: 'Windows', + MacOS: 'macOS', + iOS: 'iOS', + Android: 'Android', + WebOS: 'WebOS', + BlackBerry: 'BlackBerry', + Bada: 'Bada', + Tizen: 'Tizen', + Linux: 'Linux', + ChromeOS: 'Chrome OS', + PlayStation4: 'PlayStation 4', + Roku: 'Roku', +}; + +export const ENGINE_MAP = { + EdgeHTML: 'EdgeHTML', + Blink: 'Blink', + Trident: 'Trident', + Presto: 'Presto', + Gecko: 'Gecko', + WebKit: 'WebKit', +}; diff --git a/node_modules/bowser/src/parser-browsers.js b/node_modules/bowser/src/parser-browsers.js new file mode 100644 index 0000000..ee7840c --- /dev/null +++ b/node_modules/bowser/src/parser-browsers.js @@ -0,0 +1,700 @@ +/** + * Browsers' descriptors + * + * The idea of descriptors is simple. You should know about them two simple things: + * 1. Every descriptor has a method or property called `test` and a `describe` method. + * 2. Order of descriptors is important. + * + * More details: + * 1. Method or property `test` serves as a way to detect whether the UA string + * matches some certain browser or not. The `describe` method helps to make a result + * object with params that show some browser-specific things: name, version, etc. + * 2. Order of descriptors is important because a Parser goes through them one by one + * in course. For example, if you insert Chrome's descriptor as the first one, + * more then a half of browsers will be described as Chrome, because they will pass + * the Chrome descriptor's test. + * + * Descriptor's `test` could be a property with an array of RegExps, where every RegExp + * will be applied to a UA string to test it whether it matches or not. + * If a descriptor has two or more regexps in the `test` array it tests them one by one + * with a logical sum operation. Parser stops if it has found any RegExp that matches the UA. + * + * Or `test` could be a method. In that case it gets a Parser instance and should + * return true/false to get the Parser know if this browser descriptor matches the UA or not. + */ + +import Utils from './utils.js'; + +const commonVersionIdentifier = /version\/(\d+(\.?_?\d+)+)/i; + +const browsersList = [ + /* Googlebot */ + { + test: [/googlebot/i], + describe(ua) { + const browser = { + name: 'Googlebot', + }; + const version = Utils.getFirstMatch(/googlebot\/(\d+(\.\d+))/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + + /* Opera < 13.0 */ + { + test: [/opera/i], + describe(ua) { + const browser = { + name: 'Opera', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + + /* Opera > 13.0 */ + { + test: [/opr\/|opios/i], + describe(ua) { + const browser = { + name: 'Opera', + }; + const version = Utils.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/SamsungBrowser/i], + describe(ua) { + const browser = { + name: 'Samsung Internet for Android', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/Whale/i], + describe(ua) { + const browser = { + name: 'NAVER Whale Browser', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/MZBrowser/i], + describe(ua) { + const browser = { + name: 'MZ Browser', + }; + const version = Utils.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/focus/i], + describe(ua) { + const browser = { + name: 'Focus', + }; + const version = Utils.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/swing/i], + describe(ua) { + const browser = { + name: 'Swing', + }; + const version = Utils.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/coast/i], + describe(ua) { + const browser = { + name: 'Opera Coast', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/opt\/\d+(?:.?_?\d+)+/i], + describe(ua) { + const browser = { + name: 'Opera Touch', + }; + const version = Utils.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/yabrowser/i], + describe(ua) { + const browser = { + name: 'Yandex Browser', + }; + const version = Utils.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/ucbrowser/i], + describe(ua) { + const browser = { + name: 'UC Browser', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/Maxthon|mxios/i], + describe(ua) { + const browser = { + name: 'Maxthon', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/epiphany/i], + describe(ua) { + const browser = { + name: 'Epiphany', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/puffin/i], + describe(ua) { + const browser = { + name: 'Puffin', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/sleipnir/i], + describe(ua) { + const browser = { + name: 'Sleipnir', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/k-meleon/i], + describe(ua) { + const browser = { + name: 'K-Meleon', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/micromessenger/i], + describe(ua) { + const browser = { + name: 'WeChat', + }; + const version = Utils.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/qqbrowser/i], + describe(ua) { + const browser = { + name: (/qqbrowserlite/i).test(ua) ? 'QQ Browser Lite' : 'QQ Browser', + }; + const version = Utils.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/msie|trident/i], + describe(ua) { + const browser = { + name: 'Internet Explorer', + }; + const version = Utils.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/\sedg\//i], + describe(ua) { + const browser = { + name: 'Microsoft Edge', + }; + + const version = Utils.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/edg([ea]|ios)/i], + describe(ua) { + const browser = { + name: 'Microsoft Edge', + }; + + const version = Utils.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/vivaldi/i], + describe(ua) { + const browser = { + name: 'Vivaldi', + }; + const version = Utils.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/seamonkey/i], + describe(ua) { + const browser = { + name: 'SeaMonkey', + }; + const version = Utils.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/sailfish/i], + describe(ua) { + const browser = { + name: 'Sailfish', + }; + + const version = Utils.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/silk/i], + describe(ua) { + const browser = { + name: 'Amazon Silk', + }; + const version = Utils.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/phantom/i], + describe(ua) { + const browser = { + name: 'PhantomJS', + }; + const version = Utils.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/slimerjs/i], + describe(ua) { + const browser = { + name: 'SlimerJS', + }; + const version = Utils.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/blackberry|\bbb\d+/i, /rim\stablet/i], + describe(ua) { + const browser = { + name: 'BlackBerry', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/(web|hpw)[o0]s/i], + describe(ua) { + const browser = { + name: 'WebOS Browser', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/bada/i], + describe(ua) { + const browser = { + name: 'Bada', + }; + const version = Utils.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/tizen/i], + describe(ua) { + const browser = { + name: 'Tizen', + }; + const version = Utils.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/qupzilla/i], + describe(ua) { + const browser = { + name: 'QupZilla', + }; + const version = Utils.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/firefox|iceweasel|fxios/i], + describe(ua) { + const browser = { + name: 'Firefox', + }; + const version = Utils.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/electron/i], + describe(ua) { + const browser = { + name: 'Electron', + }; + const version = Utils.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/MiuiBrowser/i], + describe(ua) { + const browser = { + name: 'Miui', + }; + const version = Utils.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/chromium/i], + describe(ua) { + const browser = { + name: 'Chromium', + }; + const version = Utils.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/chrome|crios|crmo/i], + describe(ua) { + const browser = { + name: 'Chrome', + }; + const version = Utils.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + { + test: [/GSA/i], + describe(ua) { + const browser = { + name: 'Google Search', + }; + const version = Utils.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + + /* Android Browser */ + { + test(parser) { + const notLikeAndroid = !parser.test(/like android/i); + const butAndroid = parser.test(/android/i); + return notLikeAndroid && butAndroid; + }, + describe(ua) { + const browser = { + name: 'Android Browser', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + + /* PlayStation 4 */ + { + test: [/playstation 4/i], + describe(ua) { + const browser = { + name: 'PlayStation 4', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + + /* Safari */ + { + test: [/safari|applewebkit/i], + describe(ua) { + const browser = { + name: 'Safari', + }; + const version = Utils.getFirstMatch(commonVersionIdentifier, ua); + + if (version) { + browser.version = version; + } + + return browser; + }, + }, + + /* Something else */ + { + test: [/.*/i], + describe(ua) { + /* Here we try to make sure that there are explicit details about the device + * in order to decide what regexp exactly we want to apply + * (as there is a specific decision based on that conclusion) + */ + const regexpWithoutDeviceSpec = /^(.*)\/(.*) /; + const regexpWithDeviceSpec = /^(.*)\/(.*)[ \t]\((.*)/; + const hasDeviceSpec = ua.search('\\(') !== -1; + const regexp = hasDeviceSpec ? regexpWithDeviceSpec : regexpWithoutDeviceSpec; + return { + name: Utils.getFirstMatch(regexp, ua), + version: Utils.getSecondMatch(regexp, ua), + }; + }, + }, +]; + +export default browsersList; diff --git a/node_modules/bowser/src/parser-engines.js b/node_modules/bowser/src/parser-engines.js new file mode 100644 index 0000000..d46d0e5 --- /dev/null +++ b/node_modules/bowser/src/parser-engines.js @@ -0,0 +1,120 @@ +import Utils from './utils.js'; +import { ENGINE_MAP } from './constants.js'; + +/* + * More specific goes first + */ +export default [ + /* EdgeHTML */ + { + test(parser) { + return parser.getBrowserName(true) === 'microsoft edge'; + }, + describe(ua) { + const isBlinkBased = /\sedg\//i.test(ua); + + // return blink if it's blink-based one + if (isBlinkBased) { + return { + name: ENGINE_MAP.Blink, + }; + } + + // otherwise match the version and return EdgeHTML + const version = Utils.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, ua); + + return { + name: ENGINE_MAP.EdgeHTML, + version, + }; + }, + }, + + /* Trident */ + { + test: [/trident/i], + describe(ua) { + const engine = { + name: ENGINE_MAP.Trident, + }; + + const version = Utils.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + engine.version = version; + } + + return engine; + }, + }, + + /* Presto */ + { + test(parser) { + return parser.test(/presto/i); + }, + describe(ua) { + const engine = { + name: ENGINE_MAP.Presto, + }; + + const version = Utils.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + engine.version = version; + } + + return engine; + }, + }, + + /* Gecko */ + { + test(parser) { + const isGecko = parser.test(/gecko/i); + const likeGecko = parser.test(/like gecko/i); + return isGecko && !likeGecko; + }, + describe(ua) { + const engine = { + name: ENGINE_MAP.Gecko, + }; + + const version = Utils.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + engine.version = version; + } + + return engine; + }, + }, + + /* Blink */ + { + test: [/(apple)?webkit\/537\.36/i], + describe() { + return { + name: ENGINE_MAP.Blink, + }; + }, + }, + + /* WebKit */ + { + test: [/(apple)?webkit/i], + describe(ua) { + const engine = { + name: ENGINE_MAP.WebKit, + }; + + const version = Utils.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, ua); + + if (version) { + engine.version = version; + } + + return engine; + }, + }, +]; diff --git a/node_modules/bowser/src/parser-os.js b/node_modules/bowser/src/parser-os.js new file mode 100644 index 0000000..4c516dd --- /dev/null +++ b/node_modules/bowser/src/parser-os.js @@ -0,0 +1,199 @@ +import Utils from './utils.js'; +import { OS_MAP } from './constants.js'; + +export default [ + /* Roku */ + { + test: [/Roku\/DVP/], + describe(ua) { + const version = Utils.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, ua); + return { + name: OS_MAP.Roku, + version, + }; + }, + }, + + /* Windows Phone */ + { + test: [/windows phone/i], + describe(ua) { + const version = Utils.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, ua); + return { + name: OS_MAP.WindowsPhone, + version, + }; + }, + }, + + /* Windows */ + { + test: [/windows /i], + describe(ua) { + const version = Utils.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, ua); + const versionName = Utils.getWindowsVersionName(version); + + return { + name: OS_MAP.Windows, + version, + versionName, + }; + }, + }, + + /* Firefox on iPad */ + { + test: [/Macintosh(.*?) FxiOS(.*?)\//], + describe(ua) { + const result = { + name: OS_MAP.iOS, + }; + const version = Utils.getSecondMatch(/(Version\/)(\d[\d.]+)/, ua); + if (version) { + result.version = version; + } + return result; + }, + }, + + /* macOS */ + { + test: [/macintosh/i], + describe(ua) { + const version = Utils.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, ua).replace(/[_\s]/g, '.'); + const versionName = Utils.getMacOSVersionName(version); + + const os = { + name: OS_MAP.MacOS, + version, + }; + if (versionName) { + os.versionName = versionName; + } + return os; + }, + }, + + /* iOS */ + { + test: [/(ipod|iphone|ipad)/i], + describe(ua) { + const version = Utils.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i, ua).replace(/[_\s]/g, '.'); + + return { + name: OS_MAP.iOS, + version, + }; + }, + }, + + /* Android */ + { + test(parser) { + const notLikeAndroid = !parser.test(/like android/i); + const butAndroid = parser.test(/android/i); + return notLikeAndroid && butAndroid; + }, + describe(ua) { + const version = Utils.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, ua); + const versionName = Utils.getAndroidVersionName(version); + const os = { + name: OS_MAP.Android, + version, + }; + if (versionName) { + os.versionName = versionName; + } + return os; + }, + }, + + /* WebOS */ + { + test: [/(web|hpw)[o0]s/i], + describe(ua) { + const version = Utils.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, ua); + const os = { + name: OS_MAP.WebOS, + }; + + if (version && version.length) { + os.version = version; + } + return os; + }, + }, + + /* BlackBerry */ + { + test: [/blackberry|\bbb\d+/i, /rim\stablet/i], + describe(ua) { + const version = Utils.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, ua) + || Utils.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, ua) + || Utils.getFirstMatch(/\bbb(\d+)/i, ua); + + return { + name: OS_MAP.BlackBerry, + version, + }; + }, + }, + + /* Bada */ + { + test: [/bada/i], + describe(ua) { + const version = Utils.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, ua); + + return { + name: OS_MAP.Bada, + version, + }; + }, + }, + + /* Tizen */ + { + test: [/tizen/i], + describe(ua) { + const version = Utils.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, ua); + + return { + name: OS_MAP.Tizen, + version, + }; + }, + }, + + /* Linux */ + { + test: [/linux/i], + describe() { + return { + name: OS_MAP.Linux, + }; + }, + }, + + /* Chrome OS */ + { + test: [/CrOS/], + describe() { + return { + name: OS_MAP.ChromeOS, + }; + }, + }, + + /* Playstation 4 */ + { + test: [/PlayStation 4/], + describe(ua) { + const version = Utils.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, ua); + return { + name: OS_MAP.PlayStation4, + version, + }; + }, + }, +]; diff --git a/node_modules/bowser/src/parser-platforms.js b/node_modules/bowser/src/parser-platforms.js new file mode 100644 index 0000000..48b1eb1 --- /dev/null +++ b/node_modules/bowser/src/parser-platforms.js @@ -0,0 +1,266 @@ +import Utils from './utils.js'; +import { PLATFORMS_MAP } from './constants.js'; + +/* + * Tablets go first since usually they have more specific + * signs to detect. + */ + +export default [ + /* Googlebot */ + { + test: [/googlebot/i], + describe() { + return { + type: 'bot', + vendor: 'Google', + }; + }, + }, + + /* Huawei */ + { + test: [/huawei/i], + describe(ua) { + const model = Utils.getFirstMatch(/(can-l01)/i, ua) && 'Nova'; + const platform = { + type: PLATFORMS_MAP.mobile, + vendor: 'Huawei', + }; + if (model) { + platform.model = model; + } + return platform; + }, + }, + + /* Nexus Tablet */ + { + test: [/nexus\s*(?:7|8|9|10).*/i], + describe() { + return { + type: PLATFORMS_MAP.tablet, + vendor: 'Nexus', + }; + }, + }, + + /* iPad */ + { + test: [/ipad/i], + describe() { + return { + type: PLATFORMS_MAP.tablet, + vendor: 'Apple', + model: 'iPad', + }; + }, + }, + + /* Firefox on iPad */ + { + test: [/Macintosh(.*?) FxiOS(.*?)\//], + describe() { + return { + type: PLATFORMS_MAP.tablet, + vendor: 'Apple', + model: 'iPad', + }; + }, + }, + + /* Amazon Kindle Fire */ + { + test: [/kftt build/i], + describe() { + return { + type: PLATFORMS_MAP.tablet, + vendor: 'Amazon', + model: 'Kindle Fire HD 7', + }; + }, + }, + + /* Another Amazon Tablet with Silk */ + { + test: [/silk/i], + describe() { + return { + type: PLATFORMS_MAP.tablet, + vendor: 'Amazon', + }; + }, + }, + + /* Tablet */ + { + test: [/tablet(?! pc)/i], + describe() { + return { + type: PLATFORMS_MAP.tablet, + }; + }, + }, + + /* iPod/iPhone */ + { + test(parser) { + const iDevice = parser.test(/ipod|iphone/i); + const likeIDevice = parser.test(/like (ipod|iphone)/i); + return iDevice && !likeIDevice; + }, + describe(ua) { + const model = Utils.getFirstMatch(/(ipod|iphone)/i, ua); + return { + type: PLATFORMS_MAP.mobile, + vendor: 'Apple', + model, + }; + }, + }, + + /* Nexus Mobile */ + { + test: [/nexus\s*[0-6].*/i, /galaxy nexus/i], + describe() { + return { + type: PLATFORMS_MAP.mobile, + vendor: 'Nexus', + }; + }, + }, + + /* Mobile */ + { + test: [/[^-]mobi/i], + describe() { + return { + type: PLATFORMS_MAP.mobile, + }; + }, + }, + + /* BlackBerry */ + { + test(parser) { + return parser.getBrowserName(true) === 'blackberry'; + }, + describe() { + return { + type: PLATFORMS_MAP.mobile, + vendor: 'BlackBerry', + }; + }, + }, + + /* Bada */ + { + test(parser) { + return parser.getBrowserName(true) === 'bada'; + }, + describe() { + return { + type: PLATFORMS_MAP.mobile, + }; + }, + }, + + /* Windows Phone */ + { + test(parser) { + return parser.getBrowserName() === 'windows phone'; + }, + describe() { + return { + type: PLATFORMS_MAP.mobile, + vendor: 'Microsoft', + }; + }, + }, + + /* Android Tablet */ + { + test(parser) { + const osMajorVersion = Number(String(parser.getOSVersion()).split('.')[0]); + return parser.getOSName(true) === 'android' && (osMajorVersion >= 3); + }, + describe() { + return { + type: PLATFORMS_MAP.tablet, + }; + }, + }, + + /* Android Mobile */ + { + test(parser) { + return parser.getOSName(true) === 'android'; + }, + describe() { + return { + type: PLATFORMS_MAP.mobile, + }; + }, + }, + + /* desktop */ + { + test(parser) { + return parser.getOSName(true) === 'macos'; + }, + describe() { + return { + type: PLATFORMS_MAP.desktop, + vendor: 'Apple', + }; + }, + }, + + /* Windows */ + { + test(parser) { + return parser.getOSName(true) === 'windows'; + }, + describe() { + return { + type: PLATFORMS_MAP.desktop, + }; + }, + }, + + /* Linux */ + { + test(parser) { + return parser.getOSName(true) === 'linux'; + }, + describe() { + return { + type: PLATFORMS_MAP.desktop, + }; + }, + }, + + /* PlayStation 4 */ + { + test(parser) { + return parser.getOSName(true) === 'playstation 4'; + }, + describe() { + return { + type: PLATFORMS_MAP.tv, + }; + }, + }, + + /* Roku */ + { + test(parser) { + return parser.getOSName(true) === 'roku'; + }, + describe() { + return { + type: PLATFORMS_MAP.tv, + }; + }, + }, +]; diff --git a/node_modules/bowser/src/parser.js b/node_modules/bowser/src/parser.js new file mode 100644 index 0000000..2f9f39f --- /dev/null +++ b/node_modules/bowser/src/parser.js @@ -0,0 +1,496 @@ +import browserParsersList from './parser-browsers.js'; +import osParsersList from './parser-os.js'; +import platformParsersList from './parser-platforms.js'; +import enginesParsersList from './parser-engines.js'; +import Utils from './utils.js'; + +/** + * The main class that arranges the whole parsing process. + */ +class Parser { + /** + * Create instance of Parser + * + * @param {String} UA User-Agent string + * @param {Boolean} [skipParsing=false] parser can skip parsing in purpose of performance + * improvements if you need to make a more particular parsing + * like {@link Parser#parseBrowser} or {@link Parser#parsePlatform} + * + * @throw {Error} in case of empty UA String + * + * @constructor + */ + constructor(UA, skipParsing = false) { + if (UA === void (0) || UA === null || UA === '') { + throw new Error("UserAgent parameter can't be empty"); + } + + this._ua = UA; + + /** + * @typedef ParsedResult + * @property {Object} browser + * @property {String|undefined} [browser.name] + * Browser name, like `"Chrome"` or `"Internet Explorer"` + * @property {String|undefined} [browser.version] Browser version as a String `"12.01.45334.10"` + * @property {Object} os + * @property {String|undefined} [os.name] OS name, like `"Windows"` or `"macOS"` + * @property {String|undefined} [os.version] OS version, like `"NT 5.1"` or `"10.11.1"` + * @property {String|undefined} [os.versionName] OS name, like `"XP"` or `"High Sierra"` + * @property {Object} platform + * @property {String|undefined} [platform.type] + * platform type, can be either `"desktop"`, `"tablet"` or `"mobile"` + * @property {String|undefined} [platform.vendor] Vendor of the device, + * like `"Apple"` or `"Samsung"` + * @property {String|undefined} [platform.model] Device model, + * like `"iPhone"` or `"Kindle Fire HD 7"` + * @property {Object} engine + * @property {String|undefined} [engine.name] + * Can be any of this: `WebKit`, `Blink`, `Gecko`, `Trident`, `Presto`, `EdgeHTML` + * @property {String|undefined} [engine.version] String version of the engine + */ + this.parsedResult = {}; + + if (skipParsing !== true) { + this.parse(); + } + } + + /** + * Get UserAgent string of current Parser instance + * @return {String} User-Agent String of the current object + * + * @public + */ + getUA() { + return this._ua; + } + + /** + * Test a UA string for a regexp + * @param {RegExp} regex + * @return {Boolean} + */ + test(regex) { + return regex.test(this._ua); + } + + /** + * Get parsed browser object + * @return {Object} + */ + parseBrowser() { + this.parsedResult.browser = {}; + + const browserDescriptor = Utils.find(browserParsersList, (_browser) => { + if (typeof _browser.test === 'function') { + return _browser.test(this); + } + + if (_browser.test instanceof Array) { + return _browser.test.some(condition => this.test(condition)); + } + + throw new Error("Browser's test function is not valid"); + }); + + if (browserDescriptor) { + this.parsedResult.browser = browserDescriptor.describe(this.getUA()); + } + + return this.parsedResult.browser; + } + + /** + * Get parsed browser object + * @return {Object} + * + * @public + */ + getBrowser() { + if (this.parsedResult.browser) { + return this.parsedResult.browser; + } + + return this.parseBrowser(); + } + + /** + * Get browser's name + * @return {String} Browser's name or an empty string + * + * @public + */ + getBrowserName(toLowerCase) { + if (toLowerCase) { + return String(this.getBrowser().name).toLowerCase() || ''; + } + return this.getBrowser().name || ''; + } + + + /** + * Get browser's version + * @return {String} version of browser + * + * @public + */ + getBrowserVersion() { + return this.getBrowser().version; + } + + /** + * Get OS + * @return {Object} + * + * @example + * this.getOS(); + * { + * name: 'macOS', + * version: '10.11.12' + * } + */ + getOS() { + if (this.parsedResult.os) { + return this.parsedResult.os; + } + + return this.parseOS(); + } + + /** + * Parse OS and save it to this.parsedResult.os + * @return {*|{}} + */ + parseOS() { + this.parsedResult.os = {}; + + const os = Utils.find(osParsersList, (_os) => { + if (typeof _os.test === 'function') { + return _os.test(this); + } + + if (_os.test instanceof Array) { + return _os.test.some(condition => this.test(condition)); + } + + throw new Error("Browser's test function is not valid"); + }); + + if (os) { + this.parsedResult.os = os.describe(this.getUA()); + } + + return this.parsedResult.os; + } + + /** + * Get OS name + * @param {Boolean} [toLowerCase] return lower-cased value + * @return {String} name of the OS — macOS, Windows, Linux, etc. + */ + getOSName(toLowerCase) { + const { name } = this.getOS(); + + if (toLowerCase) { + return String(name).toLowerCase() || ''; + } + + return name || ''; + } + + /** + * Get OS version + * @return {String} full version with dots ('10.11.12', '5.6', etc) + */ + getOSVersion() { + return this.getOS().version; + } + + /** + * Get parsed platform + * @return {{}} + */ + getPlatform() { + if (this.parsedResult.platform) { + return this.parsedResult.platform; + } + + return this.parsePlatform(); + } + + /** + * Get platform name + * @param {Boolean} [toLowerCase=false] + * @return {*} + */ + getPlatformType(toLowerCase = false) { + const { type } = this.getPlatform(); + + if (toLowerCase) { + return String(type).toLowerCase() || ''; + } + + return type || ''; + } + + /** + * Get parsed platform + * @return {{}} + */ + parsePlatform() { + this.parsedResult.platform = {}; + + const platform = Utils.find(platformParsersList, (_platform) => { + if (typeof _platform.test === 'function') { + return _platform.test(this); + } + + if (_platform.test instanceof Array) { + return _platform.test.some(condition => this.test(condition)); + } + + throw new Error("Browser's test function is not valid"); + }); + + if (platform) { + this.parsedResult.platform = platform.describe(this.getUA()); + } + + return this.parsedResult.platform; + } + + /** + * Get parsed engine + * @return {{}} + */ + getEngine() { + if (this.parsedResult.engine) { + return this.parsedResult.engine; + } + + return this.parseEngine(); + } + + /** + * Get engines's name + * @return {String} Engines's name or an empty string + * + * @public + */ + getEngineName(toLowerCase) { + if (toLowerCase) { + return String(this.getEngine().name).toLowerCase() || ''; + } + return this.getEngine().name || ''; + } + + /** + * Get parsed platform + * @return {{}} + */ + parseEngine() { + this.parsedResult.engine = {}; + + const engine = Utils.find(enginesParsersList, (_engine) => { + if (typeof _engine.test === 'function') { + return _engine.test(this); + } + + if (_engine.test instanceof Array) { + return _engine.test.some(condition => this.test(condition)); + } + + throw new Error("Browser's test function is not valid"); + }); + + if (engine) { + this.parsedResult.engine = engine.describe(this.getUA()); + } + + return this.parsedResult.engine; + } + + /** + * Parse full information about the browser + * @returns {Parser} + */ + parse() { + this.parseBrowser(); + this.parseOS(); + this.parsePlatform(); + this.parseEngine(); + + return this; + } + + /** + * Get parsed result + * @return {ParsedResult} + */ + getResult() { + return Utils.assign({}, this.parsedResult); + } + + /** + * Check if parsed browser matches certain conditions + * + * @param {Object} checkTree It's one or two layered object, + * which can include a platform or an OS on the first layer + * and should have browsers specs on the bottom-laying layer + * + * @returns {Boolean|undefined} Whether the browser satisfies the set conditions or not. + * Returns `undefined` when the browser is no described in the checkTree object. + * + * @example + * const browser = Bowser.getParser(window.navigator.userAgent); + * if (browser.satisfies({chrome: '>118.01.1322' })) + * // or with os + * if (browser.satisfies({windows: { chrome: '>118.01.1322' } })) + * // or with platforms + * if (browser.satisfies({desktop: { chrome: '>118.01.1322' } })) + */ + satisfies(checkTree) { + const platformsAndOSes = {}; + let platformsAndOSCounter = 0; + const browsers = {}; + let browsersCounter = 0; + + const allDefinitions = Object.keys(checkTree); + + allDefinitions.forEach((key) => { + const currentDefinition = checkTree[key]; + if (typeof currentDefinition === 'string') { + browsers[key] = currentDefinition; + browsersCounter += 1; + } else if (typeof currentDefinition === 'object') { + platformsAndOSes[key] = currentDefinition; + platformsAndOSCounter += 1; + } + }); + + if (platformsAndOSCounter > 0) { + const platformsAndOSNames = Object.keys(platformsAndOSes); + const OSMatchingDefinition = Utils.find(platformsAndOSNames, name => (this.isOS(name))); + + if (OSMatchingDefinition) { + const osResult = this.satisfies(platformsAndOSes[OSMatchingDefinition]); + + if (osResult !== void 0) { + return osResult; + } + } + + const platformMatchingDefinition = Utils.find( + platformsAndOSNames, + name => (this.isPlatform(name)), + ); + if (platformMatchingDefinition) { + const platformResult = this.satisfies(platformsAndOSes[platformMatchingDefinition]); + + if (platformResult !== void 0) { + return platformResult; + } + } + } + + if (browsersCounter > 0) { + const browserNames = Object.keys(browsers); + const matchingDefinition = Utils.find(browserNames, name => (this.isBrowser(name, true))); + + if (matchingDefinition !== void 0) { + return this.compareVersion(browsers[matchingDefinition]); + } + } + + return undefined; + } + + /** + * Check if the browser name equals the passed string + * @param browserName The string to compare with the browser name + * @param [includingAlias=false] The flag showing whether alias will be included into comparison + * @returns {boolean} + */ + isBrowser(browserName, includingAlias = false) { + const defaultBrowserName = this.getBrowserName().toLowerCase(); + let browserNameLower = browserName.toLowerCase(); + const alias = Utils.getBrowserTypeByAlias(browserNameLower); + + if (includingAlias && alias) { + browserNameLower = alias.toLowerCase(); + } + return browserNameLower === defaultBrowserName; + } + + compareVersion(version) { + let expectedResults = [0]; + let comparableVersion = version; + let isLoose = false; + + const currentBrowserVersion = this.getBrowserVersion(); + + if (typeof currentBrowserVersion !== 'string') { + return void 0; + } + + if (version[0] === '>' || version[0] === '<') { + comparableVersion = version.substr(1); + if (version[1] === '=') { + isLoose = true; + comparableVersion = version.substr(2); + } else { + expectedResults = []; + } + if (version[0] === '>') { + expectedResults.push(1); + } else { + expectedResults.push(-1); + } + } else if (version[0] === '=') { + comparableVersion = version.substr(1); + } else if (version[0] === '~') { + isLoose = true; + comparableVersion = version.substr(1); + } + + return expectedResults.indexOf( + Utils.compareVersions(currentBrowserVersion, comparableVersion, isLoose), + ) > -1; + } + + isOS(osName) { + return this.getOSName(true) === String(osName).toLowerCase(); + } + + isPlatform(platformType) { + return this.getPlatformType(true) === String(platformType).toLowerCase(); + } + + isEngine(engineName) { + return this.getEngineName(true) === String(engineName).toLowerCase(); + } + + /** + * Is anything? Check if the browser is called "anything", + * the OS called "anything" or the platform called "anything" + * @param {String} anything + * @param [includingAlias=false] The flag showing whether alias will be included into comparison + * @returns {Boolean} + */ + is(anything, includingAlias = false) { + return this.isBrowser(anything, includingAlias) || this.isOS(anything) + || this.isPlatform(anything); + } + + /** + * Check if any of the given values satisfies this.is(anything) + * @param {String[]} anythings + * @returns {Boolean} + */ + some(anythings = []) { + return anythings.some(anything => this.is(anything)); + } +} + +export default Parser; diff --git a/node_modules/bowser/src/utils.js b/node_modules/bowser/src/utils.js new file mode 100644 index 0000000..d1174bf --- /dev/null +++ b/node_modules/bowser/src/utils.js @@ -0,0 +1,309 @@ +import { BROWSER_MAP, BROWSER_ALIASES_MAP } from './constants.js'; + +export default class Utils { + /** + * Get first matched item for a string + * @param {RegExp} regexp + * @param {String} ua + * @return {Array|{index: number, input: string}|*|boolean|string} + */ + static getFirstMatch(regexp, ua) { + const match = ua.match(regexp); + return (match && match.length > 0 && match[1]) || ''; + } + + /** + * Get second matched item for a string + * @param regexp + * @param {String} ua + * @return {Array|{index: number, input: string}|*|boolean|string} + */ + static getSecondMatch(regexp, ua) { + const match = ua.match(regexp); + return (match && match.length > 1 && match[2]) || ''; + } + + /** + * Match a regexp and return a constant or undefined + * @param {RegExp} regexp + * @param {String} ua + * @param {*} _const Any const that will be returned if regexp matches the string + * @return {*} + */ + static matchAndReturnConst(regexp, ua, _const) { + if (regexp.test(ua)) { + return _const; + } + return void (0); + } + + static getWindowsVersionName(version) { + switch (version) { + case 'NT': return 'NT'; + case 'XP': return 'XP'; + case 'NT 5.0': return '2000'; + case 'NT 5.1': return 'XP'; + case 'NT 5.2': return '2003'; + case 'NT 6.0': return 'Vista'; + case 'NT 6.1': return '7'; + case 'NT 6.2': return '8'; + case 'NT 6.3': return '8.1'; + case 'NT 10.0': return '10'; + default: return undefined; + } + } + + /** + * Get macOS version name + * 10.5 - Leopard + * 10.6 - Snow Leopard + * 10.7 - Lion + * 10.8 - Mountain Lion + * 10.9 - Mavericks + * 10.10 - Yosemite + * 10.11 - El Capitan + * 10.12 - Sierra + * 10.13 - High Sierra + * 10.14 - Mojave + * 10.15 - Catalina + * + * @example + * getMacOSVersionName("10.14") // 'Mojave' + * + * @param {string} version + * @return {string} versionName + */ + static getMacOSVersionName(version) { + const v = version.split('.').splice(0, 2).map(s => parseInt(s, 10) || 0); + v.push(0); + if (v[0] !== 10) return undefined; + switch (v[1]) { + case 5: return 'Leopard'; + case 6: return 'Snow Leopard'; + case 7: return 'Lion'; + case 8: return 'Mountain Lion'; + case 9: return 'Mavericks'; + case 10: return 'Yosemite'; + case 11: return 'El Capitan'; + case 12: return 'Sierra'; + case 13: return 'High Sierra'; + case 14: return 'Mojave'; + case 15: return 'Catalina'; + default: return undefined; + } + } + + /** + * Get Android version name + * 1.5 - Cupcake + * 1.6 - Donut + * 2.0 - Eclair + * 2.1 - Eclair + * 2.2 - Froyo + * 2.x - Gingerbread + * 3.x - Honeycomb + * 4.0 - Ice Cream Sandwich + * 4.1 - Jelly Bean + * 4.4 - KitKat + * 5.x - Lollipop + * 6.x - Marshmallow + * 7.x - Nougat + * 8.x - Oreo + * 9.x - Pie + * + * @example + * getAndroidVersionName("7.0") // 'Nougat' + * + * @param {string} version + * @return {string} versionName + */ + static getAndroidVersionName(version) { + const v = version.split('.').splice(0, 2).map(s => parseInt(s, 10) || 0); + v.push(0); + if (v[0] === 1 && v[1] < 5) return undefined; + if (v[0] === 1 && v[1] < 6) return 'Cupcake'; + if (v[0] === 1 && v[1] >= 6) return 'Donut'; + if (v[0] === 2 && v[1] < 2) return 'Eclair'; + if (v[0] === 2 && v[1] === 2) return 'Froyo'; + if (v[0] === 2 && v[1] > 2) return 'Gingerbread'; + if (v[0] === 3) return 'Honeycomb'; + if (v[0] === 4 && v[1] < 1) return 'Ice Cream Sandwich'; + if (v[0] === 4 && v[1] < 4) return 'Jelly Bean'; + if (v[0] === 4 && v[1] >= 4) return 'KitKat'; + if (v[0] === 5) return 'Lollipop'; + if (v[0] === 6) return 'Marshmallow'; + if (v[0] === 7) return 'Nougat'; + if (v[0] === 8) return 'Oreo'; + if (v[0] === 9) return 'Pie'; + return undefined; + } + + /** + * Get version precisions count + * + * @example + * getVersionPrecision("1.10.3") // 3 + * + * @param {string} version + * @return {number} + */ + static getVersionPrecision(version) { + return version.split('.').length; + } + + /** + * Calculate browser version weight + * + * @example + * compareVersions('1.10.2.1', '1.8.2.1.90') // 1 + * compareVersions('1.010.2.1', '1.09.2.1.90'); // 1 + * compareVersions('1.10.2.1', '1.10.2.1'); // 0 + * compareVersions('1.10.2.1', '1.0800.2'); // -1 + * compareVersions('1.10.2.1', '1.10', true); // 0 + * + * @param {String} versionA versions versions to compare + * @param {String} versionB versions versions to compare + * @param {boolean} [isLoose] enable loose comparison + * @return {Number} comparison result: -1 when versionA is lower, + * 1 when versionA is bigger, 0 when both equal + */ + /* eslint consistent-return: 1 */ + static compareVersions(versionA, versionB, isLoose = false) { + // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2 + const versionAPrecision = Utils.getVersionPrecision(versionA); + const versionBPrecision = Utils.getVersionPrecision(versionB); + + let precision = Math.max(versionAPrecision, versionBPrecision); + let lastPrecision = 0; + + const chunks = Utils.map([versionA, versionB], (version) => { + const delta = precision - Utils.getVersionPrecision(version); + + // 2) "9" -> "9.0" (for precision = 2) + const _version = version + new Array(delta + 1).join('.0'); + + // 3) "9.0" -> ["000000000"", "000000009"] + return Utils.map(_version.split('.'), chunk => new Array(20 - chunk.length).join('0') + chunk).reverse(); + }); + + // adjust precision for loose comparison + if (isLoose) { + lastPrecision = precision - Math.min(versionAPrecision, versionBPrecision); + } + + // iterate in reverse order by reversed chunks array + precision -= 1; + while (precision >= lastPrecision) { + // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true) + if (chunks[0][precision] > chunks[1][precision]) { + return 1; + } + + if (chunks[0][precision] === chunks[1][precision]) { + if (precision === lastPrecision) { + // all version chunks are same + return 0; + } + + precision -= 1; + } else if (chunks[0][precision] < chunks[1][precision]) { + return -1; + } + } + + return undefined; + } + + /** + * Array::map polyfill + * + * @param {Array} arr + * @param {Function} iterator + * @return {Array} + */ + static map(arr, iterator) { + const result = []; + let i; + if (Array.prototype.map) { + return Array.prototype.map.call(arr, iterator); + } + for (i = 0; i < arr.length; i += 1) { + result.push(iterator(arr[i])); + } + return result; + } + + /** + * Array::find polyfill + * + * @param {Array} arr + * @param {Function} predicate + * @return {Array} + */ + static find(arr, predicate) { + let i; + let l; + if (Array.prototype.find) { + return Array.prototype.find.call(arr, predicate); + } + for (i = 0, l = arr.length; i < l; i += 1) { + const value = arr[i]; + if (predicate(value, i)) { + return value; + } + } + return undefined; + } + + /** + * Object::assign polyfill + * + * @param {Object} obj + * @param {Object} ...objs + * @return {Object} + */ + static assign(obj, ...assigners) { + const result = obj; + let i; + let l; + if (Object.assign) { + return Object.assign(obj, ...assigners); + } + for (i = 0, l = assigners.length; i < l; i += 1) { + const assigner = assigners[i]; + if (typeof assigner === 'object' && assigner !== null) { + const keys = Object.keys(assigner); + keys.forEach((key) => { + result[key] = assigner[key]; + }); + } + } + return obj; + } + + /** + * Get short version/alias for a browser name + * + * @example + * getBrowserAlias('Microsoft Edge') // edge + * + * @param {string} browserName + * @return {string} + */ + static getBrowserAlias(browserName) { + return BROWSER_ALIASES_MAP[browserName]; + } + + /** + * Get short version/alias for a browser name + * + * @example + * getBrowserAlias('edge') // Microsoft Edge + * + * @param {string} browserAlias + * @return {string} + */ + static getBrowserTypeByAlias(browserAlias) { + return BROWSER_MAP[browserAlias] || ''; + } +} diff --git a/node_modules/dotenv/CHANGELOG.md b/node_modules/dotenv/CHANGELOG.md new file mode 100644 index 0000000..e35152a --- /dev/null +++ b/node_modules/dotenv/CHANGELOG.md @@ -0,0 +1,475 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [Unreleased](https://github.com/motdotla/dotenv/compare/v16.4.5...master) + +## [16.4.5](https://github.com/motdotla/dotenv/compare/v16.4.4...v16.4.5) (2024-02-19) + +### Changed + +- 🐞 fix recent regression when using `path` option. return to historical behavior: do not attempt to auto find `.env` if `path` set. (regression was introduced in `16.4.3`) [#814](https://github.com/motdotla/dotenv/pull/814) + +## [16.4.4](https://github.com/motdotla/dotenv/compare/v16.4.3...v16.4.4) (2024-02-13) + +### Changed + +- 🐞 Replaced chaining operator `?.` with old school `&&` (fixing node 12 failures) [#812](https://github.com/motdotla/dotenv/pull/812) + +## [16.4.3](https://github.com/motdotla/dotenv/compare/v16.4.2...v16.4.3) (2024-02-12) + +### Changed + +- Fixed processing of multiple files in `options.path` [#805](https://github.com/motdotla/dotenv/pull/805) + +## [16.4.2](https://github.com/motdotla/dotenv/compare/v16.4.1...v16.4.2) (2024-02-10) + +### Changed + +- Changed funding link in package.json to [`dotenvx.com`](https://dotenvx.com) + +## [16.4.1](https://github.com/motdotla/dotenv/compare/v16.4.0...v16.4.1) (2024-01-24) + +- Patch support for array as `path` option [#797](https://github.com/motdotla/dotenv/pull/797) + +## [16.4.0](https://github.com/motdotla/dotenv/compare/v16.3.2...v16.4.0) (2024-01-23) + +- Add `error.code` to error messages around `.env.vault` decryption handling [#795](https://github.com/motdotla/dotenv/pull/795) +- Add ability to find `.env.vault` file when filename(s) passed as an array [#784](https://github.com/motdotla/dotenv/pull/784) + +## [16.3.2](https://github.com/motdotla/dotenv/compare/v16.3.1...v16.3.2) (2024-01-18) + +### Added + +- Add debug message when no encoding set [#735](https://github.com/motdotla/dotenv/pull/735) + +### Changed + +- Fix output typing for `populate` [#792](https://github.com/motdotla/dotenv/pull/792) +- Use subarray instead of slice [#793](https://github.com/motdotla/dotenv/pull/793) + +## [16.3.1](https://github.com/motdotla/dotenv/compare/v16.3.0...v16.3.1) (2023-06-17) + +### Added + +- Add missing type definitions for `processEnv` and `DOTENV_KEY` options. [#756](https://github.com/motdotla/dotenv/pull/756) + +## [16.3.0](https://github.com/motdotla/dotenv/compare/v16.2.0...v16.3.0) (2023-06-16) + +### Added + +- Optionally pass `DOTENV_KEY` to options rather than relying on `process.env.DOTENV_KEY`. Defaults to `process.env.DOTENV_KEY` [#754](https://github.com/motdotla/dotenv/pull/754) + +## [16.2.0](https://github.com/motdotla/dotenv/compare/v16.1.4...v16.2.0) (2023-06-15) + +### Added + +- Optionally write to your own target object rather than `process.env`. Defaults to `process.env`. [#753](https://github.com/motdotla/dotenv/pull/753) +- Add import type URL to types file [#751](https://github.com/motdotla/dotenv/pull/751) + +## [16.1.4](https://github.com/motdotla/dotenv/compare/v16.1.3...v16.1.4) (2023-06-04) + +### Added + +- Added `.github/` to `.npmignore` [#747](https://github.com/motdotla/dotenv/pull/747) + +## [16.1.3](https://github.com/motdotla/dotenv/compare/v16.1.2...v16.1.3) (2023-05-31) + +### Removed + +- Removed `browser` keys for `path`, `os`, and `crypto` in package.json. These were set to false incorrectly as of 16.1. Instead, if using dotenv on the front-end make sure to include polyfills for `path`, `os`, and `crypto`. [node-polyfill-webpack-plugin](https://github.com/Richienb/node-polyfill-webpack-plugin) provides these. + +## [16.1.2](https://github.com/motdotla/dotenv/compare/v16.1.1...v16.1.2) (2023-05-31) + +### Changed + +- Exposed private function `_configDotenv` as `configDotenv`. [#744](https://github.com/motdotla/dotenv/pull/744) + +## [16.1.1](https://github.com/motdotla/dotenv/compare/v16.1.0...v16.1.1) (2023-05-30) + +### Added + +- Added type definition for `decrypt` function + +### Changed + +- Fixed `{crypto: false}` in `packageJson.browser` + +## [16.1.0](https://github.com/motdotla/dotenv/compare/v16.0.3...v16.1.0) (2023-05-30) + +### Added + +- Add `populate` convenience method [#733](https://github.com/motdotla/dotenv/pull/733) +- Accept URL as path option [#720](https://github.com/motdotla/dotenv/pull/720) +- Add dotenv to `npm fund` command +- Spanish language README [#698](https://github.com/motdotla/dotenv/pull/698) +- Add `.env.vault` support. 🎉 ([#730](https://github.com/motdotla/dotenv/pull/730)) + +ℹ️ `.env.vault` extends the `.env` file format standard with a localized encrypted vault file. Package it securely with your production code deploys. It's cloud agnostic so that you can deploy your secrets anywhere – without [risky third-party integrations](https://techcrunch.com/2023/01/05/circleci-breach/). [read more](https://github.com/motdotla/dotenv#-deploying) + +### Changed + +- Fixed "cannot resolve 'fs'" error on tools like Replit [#693](https://github.com/motdotla/dotenv/pull/693) + +## [16.0.3](https://github.com/motdotla/dotenv/compare/v16.0.2...v16.0.3) (2022-09-29) + +### Changed + +- Added library version to debug logs ([#682](https://github.com/motdotla/dotenv/pull/682)) + +## [16.0.2](https://github.com/motdotla/dotenv/compare/v16.0.1...v16.0.2) (2022-08-30) + +### Added + +- Export `env-options.js` and `cli-options.js` in package.json for use with downstream [dotenv-expand](https://github.com/motdotla/dotenv-expand) module + +## [16.0.1](https://github.com/motdotla/dotenv/compare/v16.0.0...v16.0.1) (2022-05-10) + +### Changed + +- Minor README clarifications +- Development ONLY: updated devDependencies as recommended for development only security risks ([#658](https://github.com/motdotla/dotenv/pull/658)) + +## [16.0.0](https://github.com/motdotla/dotenv/compare/v15.0.1...v16.0.0) (2022-02-02) + +### Added + +- _Breaking:_ Backtick support 🎉 ([#615](https://github.com/motdotla/dotenv/pull/615)) + +If you had values containing the backtick character, please quote those values with either single or double quotes. + +## [15.0.1](https://github.com/motdotla/dotenv/compare/v15.0.0...v15.0.1) (2022-02-02) + +### Changed + +- Properly parse empty single or double quoted values 🐞 ([#614](https://github.com/motdotla/dotenv/pull/614)) + +## [15.0.0](https://github.com/motdotla/dotenv/compare/v14.3.2...v15.0.0) (2022-01-31) + +`v15.0.0` is a major new release with some important breaking changes. + +### Added + +- _Breaking:_ Multiline parsing support (just works. no need for the flag.) + +### Changed + +- _Breaking:_ `#` marks the beginning of a comment (UNLESS the value is wrapped in quotes. Please update your `.env` files to wrap in quotes any values containing `#`. For example: `SECRET_HASH="something-with-a-#-hash"`). + +..Understandably, (as some teams have noted) this is tedious to do across the entire team. To make it less tedious, we recommend using [dotenv cli](https://github.com/dotenv-org/cli) going forward. It's an optional plugin that will keep your `.env` files in sync between machines, environments, or team members. + +### Removed + +- _Breaking:_ Remove multiline option (just works out of the box now. no need for the flag.) + +## [14.3.2](https://github.com/motdotla/dotenv/compare/v14.3.1...v14.3.2) (2022-01-25) + +### Changed + +- Preserve backwards compatibility on values containing `#` 🐞 ([#603](https://github.com/motdotla/dotenv/pull/603)) + +## [14.3.1](https://github.com/motdotla/dotenv/compare/v14.3.0...v14.3.1) (2022-01-25) + +### Changed + +- Preserve backwards compatibility on exports by re-introducing the prior in-place exports 🐞 ([#606](https://github.com/motdotla/dotenv/pull/606)) + +## [14.3.0](https://github.com/motdotla/dotenv/compare/v14.2.0...v14.3.0) (2022-01-24) + +### Added + +- Add `multiline` option 🎉 ([#486](https://github.com/motdotla/dotenv/pull/486)) + +## [14.2.0](https://github.com/motdotla/dotenv/compare/v14.1.1...v14.2.0) (2022-01-17) + +### Added + +- Add `dotenv_config_override` cli option +- Add `DOTENV_CONFIG_OVERRIDE` command line env option + +## [14.1.1](https://github.com/motdotla/dotenv/compare/v14.1.0...v14.1.1) (2022-01-17) + +### Added + +- Add React gotcha to FAQ on README + +## [14.1.0](https://github.com/motdotla/dotenv/compare/v14.0.1...v14.1.0) (2022-01-17) + +### Added + +- Add `override` option 🎉 ([#595](https://github.com/motdotla/dotenv/pull/595)) + +## [14.0.1](https://github.com/motdotla/dotenv/compare/v14.0.0...v14.0.1) (2022-01-16) + +### Added + +- Log error on failure to load `.env` file ([#594](https://github.com/motdotla/dotenv/pull/594)) + +## [14.0.0](https://github.com/motdotla/dotenv/compare/v13.0.1...v14.0.0) (2022-01-16) + +### Added + +- _Breaking:_ Support inline comments for the parser 🎉 ([#568](https://github.com/motdotla/dotenv/pull/568)) + +## [13.0.1](https://github.com/motdotla/dotenv/compare/v13.0.0...v13.0.1) (2022-01-16) + +### Changed + +* Hide comments and newlines from debug output ([#404](https://github.com/motdotla/dotenv/pull/404)) + +## [13.0.0](https://github.com/motdotla/dotenv/compare/v12.0.4...v13.0.0) (2022-01-16) + +### Added + +* _Breaking:_ Add type file for `config.js` ([#539](https://github.com/motdotla/dotenv/pull/539)) + +## [12.0.4](https://github.com/motdotla/dotenv/compare/v12.0.3...v12.0.4) (2022-01-16) + +### Changed + +* README updates +* Minor order adjustment to package json format + +## [12.0.3](https://github.com/motdotla/dotenv/compare/v12.0.2...v12.0.3) (2022-01-15) + +### Changed + +* Simplified jsdoc for consistency across editors + +## [12.0.2](https://github.com/motdotla/dotenv/compare/v12.0.1...v12.0.2) (2022-01-15) + +### Changed + +* Improve embedded jsdoc type documentation + +## [12.0.1](https://github.com/motdotla/dotenv/compare/v12.0.0...v12.0.1) (2022-01-15) + +### Changed + +* README updates and clarifications + +## [12.0.0](https://github.com/motdotla/dotenv/compare/v11.0.0...v12.0.0) (2022-01-15) + +### Removed + +- _Breaking:_ drop support for Flow static type checker ([#584](https://github.com/motdotla/dotenv/pull/584)) + +### Changed + +- Move types/index.d.ts to lib/main.d.ts ([#585](https://github.com/motdotla/dotenv/pull/585)) +- Typescript cleanup ([#587](https://github.com/motdotla/dotenv/pull/587)) +- Explicit typescript inclusion in package.json ([#566](https://github.com/motdotla/dotenv/pull/566)) + +## [11.0.0](https://github.com/motdotla/dotenv/compare/v10.0.0...v11.0.0) (2022-01-11) + +### Changed + +- _Breaking:_ drop support for Node v10 ([#558](https://github.com/motdotla/dotenv/pull/558)) +- Patch debug option ([#550](https://github.com/motdotla/dotenv/pull/550)) + +## [10.0.0](https://github.com/motdotla/dotenv/compare/v9.0.2...v10.0.0) (2021-05-20) + +### Added + +- Add generic support to parse function +- Allow for import "dotenv/config.js" +- Add support to resolve home directory in path via ~ + +## [9.0.2](https://github.com/motdotla/dotenv/compare/v9.0.1...v9.0.2) (2021-05-10) + +### Changed + +- Support windows newlines with debug mode + +## [9.0.1](https://github.com/motdotla/dotenv/compare/v9.0.0...v9.0.1) (2021-05-08) + +### Changed + +- Updates to README + +## [9.0.0](https://github.com/motdotla/dotenv/compare/v8.6.0...v9.0.0) (2021-05-05) + +### Changed + +- _Breaking:_ drop support for Node v8 + +## [8.6.0](https://github.com/motdotla/dotenv/compare/v8.5.1...v8.6.0) (2021-05-05) + +### Added + +- define package.json in exports + +## [8.5.1](https://github.com/motdotla/dotenv/compare/v8.5.0...v8.5.1) (2021-05-05) + +### Changed + +- updated dev dependencies via npm audit + +## [8.5.0](https://github.com/motdotla/dotenv/compare/v8.4.0...v8.5.0) (2021-05-05) + +### Added + +- allow for `import "dotenv/config"` + +## [8.4.0](https://github.com/motdotla/dotenv/compare/v8.3.0...v8.4.0) (2021-05-05) + +### Changed + +- point to exact types file to work with VS Code + +## [8.3.0](https://github.com/motdotla/dotenv/compare/v8.2.0...v8.3.0) (2021-05-05) + +### Changed + +- _Breaking:_ drop support for Node v8 (mistake to be released as minor bump. later bumped to 9.0.0. see above.) + +## [8.2.0](https://github.com/motdotla/dotenv/compare/v8.1.0...v8.2.0) (2019-10-16) + +### Added + +- TypeScript types + +## [8.1.0](https://github.com/motdotla/dotenv/compare/v8.0.0...v8.1.0) (2019-08-18) + +### Changed + +- _Breaking:_ drop support for Node v6 ([#392](https://github.com/motdotla/dotenv/issues/392)) + +# [8.0.0](https://github.com/motdotla/dotenv/compare/v7.0.0...v8.0.0) (2019-05-02) + +### Changed + +- _Breaking:_ drop support for Node v6 ([#302](https://github.com/motdotla/dotenv/issues/392)) + +## [7.0.0] - 2019-03-12 + +### Fixed + +- Fix removing unbalanced quotes ([#376](https://github.com/motdotla/dotenv/pull/376)) + +### Removed + +- Removed `load` alias for `config` for consistency throughout code and documentation. + +## [6.2.0] - 2018-12-03 + +### Added + +- Support preload configuration via environment variables ([#351](https://github.com/motdotla/dotenv/issues/351)) + +## [6.1.0] - 2018-10-08 + +### Added + +- `debug` option for `config` and `parse` methods will turn on logging + +## [6.0.0] - 2018-06-02 + +### Changed + +- _Breaking:_ drop support for Node v4 ([#304](https://github.com/motdotla/dotenv/pull/304)) + +## [5.0.0] - 2018-01-29 + +### Added + +- Testing against Node v8 and v9 +- Documentation on trim behavior of values +- Documentation on how to use with `import` + +### Changed + +- _Breaking_: default `path` is now `path.resolve(process.cwd(), '.env')` +- _Breaking_: does not write over keys already in `process.env` if the key has a falsy value +- using `const` and `let` instead of `var` + +### Removed + +- Testing against Node v7 + +## [4.0.0] - 2016-12-23 + +### Changed + +- Return Object with parsed content or error instead of false ([#165](https://github.com/motdotla/dotenv/pull/165)). + +### Removed + +- `verbose` option removed in favor of returning result. + +## [3.0.0] - 2016-12-20 + +### Added + +- `verbose` option will log any error messages. Off by default. +- parses email addresses correctly +- allow importing config method directly in ES6 + +### Changed + +- Suppress error messages by default ([#154](https://github.com/motdotla/dotenv/pull/154)) +- Ignoring more files for NPM to make package download smaller + +### Fixed + +- False positive test due to case-sensitive variable ([#124](https://github.com/motdotla/dotenv/pull/124)) + +### Removed + +- `silent` option removed in favor of `verbose` + +## [2.0.0] - 2016-01-20 + +### Added + +- CHANGELOG to ["make it easier for users and contributors to see precisely what notable changes have been made between each release"](http://keepachangelog.com/). Linked to from README +- LICENSE to be more explicit about what was defined in `package.json`. Linked to from README +- Testing nodejs v4 on travis-ci +- added examples of how to use dotenv in different ways +- return parsed object on success rather than boolean true + +### Changed + +- README has shorter description not referencing ruby gem since we don't have or want feature parity + +### Removed + +- Variable expansion and escaping so environment variables are encouraged to be fully orthogonal + +## [1.2.0] - 2015-06-20 + +### Added + +- Preload hook to require dotenv without including it in your code + +### Changed + +- clarified license to be "BSD-2-Clause" in `package.json` + +### Fixed + +- retain spaces in string vars + +## [1.1.0] - 2015-03-31 + +### Added + +- Silent option to silence `console.log` when `.env` missing + +## [1.0.0] - 2015-03-13 + +### Removed + +- support for multiple `.env` files. should always use one `.env` file for the current environment + +[7.0.0]: https://github.com/motdotla/dotenv/compare/v6.2.0...v7.0.0 +[6.2.0]: https://github.com/motdotla/dotenv/compare/v6.1.0...v6.2.0 +[6.1.0]: https://github.com/motdotla/dotenv/compare/v6.0.0...v6.1.0 +[6.0.0]: https://github.com/motdotla/dotenv/compare/v5.0.0...v6.0.0 +[5.0.0]: https://github.com/motdotla/dotenv/compare/v4.0.0...v5.0.0 +[4.0.0]: https://github.com/motdotla/dotenv/compare/v3.0.0...v4.0.0 +[3.0.0]: https://github.com/motdotla/dotenv/compare/v2.0.0...v3.0.0 +[2.0.0]: https://github.com/motdotla/dotenv/compare/v1.2.0...v2.0.0 +[1.2.0]: https://github.com/motdotla/dotenv/compare/v1.1.0...v1.2.0 +[1.1.0]: https://github.com/motdotla/dotenv/compare/v1.0.0...v1.1.0 +[1.0.0]: https://github.com/motdotla/dotenv/compare/v0.4.0...v1.0.0 diff --git a/node_modules/dotenv/LICENSE b/node_modules/dotenv/LICENSE new file mode 100644 index 0000000..c430ad8 --- /dev/null +++ b/node_modules/dotenv/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2015, Scott Motte +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/dotenv/README-es.md b/node_modules/dotenv/README-es.md new file mode 100644 index 0000000..154c139 --- /dev/null +++ b/node_modules/dotenv/README-es.md @@ -0,0 +1,448 @@ +
+🎉 announcing dotenvx. run anywhere, multi-environment, encrypted envs. +
+ +  + +
+ +

+ + Dotenv es apoyado por la comunidad. + +

+Gracias espaciales a: +
+
+ +
+ Warp +
+ Warp es una rápida e impresionante terminal basada en Rust, reinventado para funcionar como una aplicación moderna. +
+ Haga más en la CLI con edición de texto real, resultado básado en bloques, y busqueda de comandos de IA. +
+
+
+ +
+ Retool +
+ Retool ayuda a los desarrolladores a crear software interno personalizado, como aplicaciones CRUD y paneles de administración, realmente rápido. +
+ Construya Interfaces de Usuario de forma visual con componentes flexibles, conéctese a cualquier fuente de datos, y escriba lógica de negocio en JavaScript. +
+
+
+ +
+ WorkOS +
+ Su Apliación, Lista para la Empresa. +
+ Agrega Inicio de Sesión Único, Autenticación Multi-Factor, y mucho más, en minutos en lugar de meses. +
+
+
+
+
+
+
+ +
+ +# dotenv [![NPM version](https://img.shields.io/npm/v/dotenv.svg?style=flat-square)](https://www.npmjs.com/package/dotenv) + +dotenv + +Dotenv es un módulo de dependencia cero que carga las variables de entorno desde un archivo `.env` en [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env). El almacenamiento de la configuración del entorno separado del código está basado en la metodología [The Twelve-Factor App](http://12factor.net/config). + +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) +[![LICENSE](https://img.shields.io/github/license/motdotla/dotenv.svg)](LICENSE) + +## Instalación + +```bash +# instalación local (recomendado) +npm install dotenv --save +``` + +O installación con yarn? `yarn add dotenv` + +## Uso + +Cree un archivo `.env` en la raíz de su proyecto: + +```dosini +S3_BUCKET="YOURS3BUCKET" +SECRET_KEY="YOURSECRETKEYGOESHERE" +``` + +Tan prónto como sea posible en su aplicación, importe y configure dotenv: + +```javascript +require('dotenv').config() +console.log(process.env) // elimine esto después que haya confirmado que esta funcionando +``` + +.. o usa ES6? + +```javascript +import * as dotenv from 'dotenv' // vea en https://github.com/motdotla/dotenv#como-uso-dotenv-con-import +// REVISAR LINK DE REFERENCIA DE IMPORTACIÓN +dotenv.config() +import express from 'express' +``` + +Eso es todo. `process.env` ahora tiene las claves y los valores que definiste en tu archivo `.env`: + +```javascript +require('dotenv').config() + +... + +s3.getBucketCors({Bucket: process.env.S3_BUCKET}, function(err, data) {}) +``` + +### Valores multilínea + +Si necesita variables de varias líneas, por ejemplo, claves privadas, ahora se admiten en la versión (`>= v15.0.0`) con saltos de línea: + +```dosini +PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY----- +... +Kh9NV... +... +-----END RSA PRIVATE KEY-----" +``` + +Alternativamente, puede usar comillas dobles y usar el carácter `\n`: + +```dosini +PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nKh9NV...\n-----END RSA PRIVATE KEY-----\n" +``` + +### Comentarios + +Los comentarios pueden ser agregados en tu archivo o en la misma línea: + +```dosini +# This is a comment +SECRET_KEY=YOURSECRETKEYGOESHERE # comment +SECRET_HASH="something-with-a-#-hash" +``` + +Los comentarios comienzan donde existe un `#`, entonces, si su valor contiene un `#`, enciérrelo entre comillas. Este es un cambio importante desde la versión `>= v15.0.0` en adelante. + +### Análisis + +El motor que analiza el contenido de su archivo que contiene variables de entorno está disponible para su uso. Este Acepta una Cadena o un Búfer y devolverá un Objeto con las claves y los valores analizados. + +```javascript +const dotenv = require('dotenv') +const buf = Buffer.from('BASICO=basico') +const config = dotenv.parse(buf) // devolverá un objeto +console.log(typeof config, config) // objeto { BASICO : 'basico' } +``` + +### Precarga + +Puede usar el `--require` (`-r`) [opción de línea de comando](https://nodejs.org/api/cli.html#-r---require-module) para precargar dotenv. Al hacer esto, no necesita requerir ni cargar dotnev en el código de su aplicación. + +```bash +$ node -r dotenv/config tu_script.js +``` + +Las opciones de configuración a continuación se admiten como argumentos de línea de comandos en el formato `dotenv_config_