diff --git a/package.json b/package.json index 8adc552..a9952dc 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "clean": "rimraf [ node_modules dist cache ]", "test:docker": "docker compose --env-file=.env.test up --exit-code-from test-runner --build", "test:integration": "mocha --spec=tests/integration/**.test.ts", - "test:integration:local": "docker compose up arlocal -d ; yarn test:integration $* ; docker compose down -v", + "test:integration:local": "docker compose up arlocal -d ; yarn test:integration $*; docker compose down -v", "docker:run": "docker compose up arns-service --build", "docker:integration": "docker compose up --exit-code-from test-runner --build", "format:fix": "yarn prettier --write .", @@ -31,6 +31,7 @@ "dependencies": { "@ardrive/ardrive-promise-cache": "^1.1.4", "@aws-sdk/client-s3": "^3.490.0", + "@aws-sdk/lib-storage": "^3.554.0", "@koa/cors": "^4.0.0", "@koa/router": "^12.0.0", "arweave": "^1.14.4", diff --git a/src/constants.ts b/src/constants.ts index 35aa32e..927b7ad 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -18,6 +18,7 @@ import { EvaluationOptions } from 'warp-contracts'; export const PREFETCH_CONTRACTS = process.env.PREFETCH_CONTRACTS === 'true'; export const BOOTSTRAP_CACHE = process.env.BOOTSTRAP_CACHE === 'true'; +export const SAVE_CACHE_TO_S3 = process.env.SAVE_CACHE_TO_S3 === 'true'; export const BLOCKLISTED_CONTRACT_IDS = new Set( process.env.BLOCKLISTED_CONTRACT_IDS ? process.env.BLOCKLISTED_CONTRACT_IDS.split(',') diff --git a/src/system.ts b/src/system.ts index 515c65b..b69a6c4 100644 --- a/src/system.ts +++ b/src/system.ts @@ -24,10 +24,26 @@ import { ListObjectsV2Command, GetObjectCommand, } from '@aws-sdk/client-s3'; +import { Upload } from '@aws-sdk/lib-storage'; import fs from 'node:fs'; import { Readable } from 'stream'; import path from 'node:path'; -import { BOOTSTRAP_CACHE, PREFETCH_CONTRACTS } from './constants'; +import { + BOOTSTRAP_CACHE, + PREFETCH_CONTRACTS, + SAVE_CACHE_TO_S3, +} from './constants'; +import pLimit from 'p-limit'; + +const bucket = process.env.WARP_CACHE_BUCKET || 'arns-warp-cache'; +const cacheDirectory = process.env.WARP_CACHE_KEY || 'cache'; +const region = process.env.AWS_REGION || 'us-west-2'; +const s3CacheIntervalMs = +( + process.env.S3_CACHE_INTERVAL_MS || 3 * 60 * 60 * 1000 +); // default to 3 hours +const s3 = new S3Client({ + region, +}); export const bootstrapCache = async () => { if (BOOTSTRAP_CACHE) { @@ -37,6 +53,16 @@ export const bootstrapCache = async () => { if (PREFETCH_CONTRACTS) { await prefetchContracts(); } + + if (SAVE_CACHE_TO_S3) { + // save cache to S3 every s3CacheIntervalMs + logger.info('Cache will be saved to S3 on an interval', { + intervalMs: s3CacheIntervalMs, + }); + setInterval(async () => { + await saveCacheToS3(); + }, s3CacheIntervalMs); + } }; let successfullyPrefetchedContracts = false; @@ -108,12 +134,9 @@ export const prefetchContracts = async () => { export const fetchCacheFromS3 = async () => { const startTimeMs = Date.now(); - const s3 = new S3Client({ - region: process.env.AWS_REGION, - }); const params = { - Bucket: process.env.WARP_CACHE_BUCKET || 'arns-warp-cache', - Key: process.env.WARP_CACHE_KEY || 'cache', + Bucket: bucket, + Key: cacheDirectory, }; logger.info('Bootstrapping warp cache from S3', { @@ -173,3 +196,108 @@ export const fetchCacheFromS3 = async () => { }); } }; + +export const saveCacheToS3 = async () => { + const startTimeMs = Date.now(); + + logger.info('Saving warp cache to S3', { + bucket, + }); + + try { + // read files from local file system + const parallelLimit = pLimit(10); + const uploadFolder = async ({ + folderPath, + bucket, + keyPrefix, + }: { + folderPath: string; + bucket: string; + keyPrefix: string; + }) => { + const files = fs.readdirSync(folderPath); + logger.debug('Uploading folder to S3', { + folderPath, + bucket, + keyPrefix, + files: files.length, + }); + await Promise.all( + files.map(async (file) => { + // wrap in a pLimit to avoid resource exhaustion + return parallelLimit(() => { + const filePath = path.join(folderPath, file); + if (fs.statSync(filePath).isFile()) { + logger.debug('Uploading file to S3', { + filePath, + bucket, + keyPrefix, + }); + const fileStream = fs.createReadStream(filePath); + const upload = new Upload({ + client: s3, + params: { + Bucket: bucket, + Key: filePath, + Body: fileStream, + }, + }); + + const fileStartTime = Date.now(); + + // catch errors for a single file + return upload + .done() + .then(() => { + logger.debug('Successfully uploaded file to S3', { + filePath, + bucket, + keyPrefix, + durationMs: Date.now() - fileStartTime, + }); + }) + .catch((error: unknown) => { + const message = + error instanceof Error ? error : new Error('Unknown error'); + logger.error('Failed to upload file to S3', { + error: message, + file, + }); + }); + } else { + logger.debug('Recursively uploading folder to S3', { + filePath, + bucket, + keyPrefix, + }); + // recursively upload folders + return uploadFolder({ + folderPath: filePath, + bucket, + keyPrefix: keyPrefix + file + '/', + }); + } + }); + }), + ); + }; + + // upload files to S3 recursively and in a pLimit to avoid resource exhaustion + await uploadFolder({ + folderPath: cacheDirectory, + bucket, + keyPrefix: '', + }); + + logger.info('Successfully saved warp cache to S3', { + durationMs: Date.now() - startTimeMs, + bucket, + }); + } catch (error: unknown) { + const message = error instanceof Error ? error : new Error('Unknown error'); + logger.error('Failed to save cache to S3', { + error: message, + }); + } +}; diff --git a/yarn.lock b/yarn.lock index e592f32..9cbfeda 100644 --- a/yarn.lock +++ b/yarn.lock @@ -443,6 +443,19 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@aws-sdk/lib-storage@^3.554.0": + version "3.554.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/lib-storage/-/lib-storage-3.554.0.tgz#23bd5b867e610369c6983ae687f1ab7fb1fbd5ac" + integrity sha512-WMn2EObllRKI0ELi31SoUGPowQ23/LCAXkG1o1VEas5kqobwgVgp9D8zqs9A/MEaZYl0yDqd94uKQJd7rUM/yg== + dependencies: + "@smithy/abort-controller" "^2.2.0" + "@smithy/middleware-endpoint" "^2.5.1" + "@smithy/smithy-client" "^2.5.1" + buffer "5.6.0" + events "3.3.0" + stream-browserify "3.0.0" + tslib "^2.6.2" + "@aws-sdk/middleware-bucket-endpoint@3.489.0": version "3.489.0" resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.489.0.tgz#80a06f1c229fae364b5916e47178d118340e0f51" @@ -1697,6 +1710,14 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/abort-controller@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-2.2.0.tgz#18983401a5e2154b5c94057730024a7d14cbcd35" + integrity sha512-wRlta7GuLWpTqtFfGo+nZyOO1vEvewdNR1R4rTxpC8XU6vG/NDyrFBhwLZsqg1NUoR1noVaXJPC/7ZK47QCySw== + dependencies: + "@smithy/types" "^2.12.0" + tslib "^2.6.2" + "@smithy/chunked-blob-reader-native@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.0.1.tgz#0599eaed8c2cd15c7ab43a1838cef1258ff27133" @@ -1804,6 +1825,17 @@ "@smithy/util-base64" "^2.0.1" tslib "^2.5.0" +"@smithy/fetch-http-handler@^2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-2.5.0.tgz#0b8e1562807fdf91fe7dd5cde620d7a03ddc10ac" + integrity sha512-BOWEBeppWhLn/no/JxUL/ghTfANTjT7kg3Ww2rPqTUY9R4yHPXxJ9JhMe3Z03LN3aPwiwlpDIUcVw1xDyHqEhw== + 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" + "@smithy/hash-blob-browser@^2.0.17": version "2.0.17" resolved "https://registry.yarnpkg.com/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.17.tgz#4249f1fba27cb7c40dbf1fa38a31e61dbf9149b9" @@ -1848,6 +1880,13 @@ dependencies: tslib "^2.5.0" +"@smithy/is-array-buffer@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz#f84f0d9f9a36601a9ca9381688bd1b726fd39111" + integrity sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA== + dependencies: + tslib "^2.6.2" + "@smithy/md5-js@^2.0.18": version "2.0.18" resolved "https://registry.yarnpkg.com/@smithy/md5-js/-/md5-js-2.0.18.tgz#85f26fc83e75b440144341292cbb75ddf69dd0de" @@ -1879,6 +1918,19 @@ "@smithy/util-middleware" "^2.0.9" tslib "^2.5.0" +"@smithy/middleware-endpoint@^2.5.1": + version "2.5.1" + resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-2.5.1.tgz#1333c58304aff4d843e8ef4b85c8cb88975dd5ad" + integrity sha512-1/8kFp6Fl4OsSIVTWHnNjLnTL8IqpIb/D3sTSczrKFnrE9VMNWxnrRKNvpUHOJ6zpGD5f62TPm7+17ilTJpiCQ== + 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" + "@smithy/middleware-retry@^2.0.26": version "2.0.26" resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-2.0.26.tgz#894cf86b0f5bc742e09c52df8df4c2941fbd9883" @@ -1902,6 +1954,14 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/middleware-serde@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-2.3.0.tgz#a7615ba646a88b6f695f2d55de13d8158181dd13" + integrity sha512-sIADe7ojwqTyvEQBe1nc/GXB9wdHhi9UwyX0lTyttmUWDJLP655ZYE1WngnNyXREme8I27KCaUhyhZWRXL0q7Q== + dependencies: + "@smithy/types" "^2.12.0" + tslib "^2.6.2" + "@smithy/middleware-stack@^2.0.10": version "2.0.10" resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-2.0.10.tgz#fb7c660dcc921b61a77e6cb39ed3eada9ed38585" @@ -1910,6 +1970,14 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/middleware-stack@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-2.2.0.tgz#3fb49eae6313f16f6f30fdaf28e11a7321f34d9f" + integrity sha512-Qntc3jrtwwrsAC+X8wms8zhrTr0sFXnyEGhZd9sLtsJ/6gGQKFzNB+wWbOcpJd7BR8ThNCoKt76BuQahfMvpeA== + dependencies: + "@smithy/types" "^2.12.0" + tslib "^2.6.2" + "@smithy/node-config-provider@^2.1.9": version "2.1.9" resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-2.1.9.tgz#2e9e5ee7c4412be6696a74b26f9ed2a66e2a5fb4" @@ -1920,6 +1988,16 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/node-config-provider@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-2.3.0.tgz#9fac0c94a14c5b5b8b8fa37f20c310a844ab9922" + integrity sha512-0elK5/03a1JPWMDPaS726Iw6LpQg80gFut1tNpPfxFuChEEklo2yL823V94SpTZTxmKlXFtFgsP55uh3dErnIg== + dependencies: + "@smithy/property-provider" "^2.2.0" + "@smithy/shared-ini-file-loader" "^2.4.0" + "@smithy/types" "^2.12.0" + tslib "^2.6.2" + "@smithy/node-http-handler@^2.2.2": version "2.2.2" resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-2.2.2.tgz#f9f8cd49f270bc50a0de8a4587bbdaae1c7c4e80" @@ -1931,6 +2009,17 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/node-http-handler@^2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-2.5.0.tgz#7b5e0565dd23d340380489bd5fe4316d2bed32de" + integrity sha512-mVGyPBzkkGQsPoxQUbxlEfRjrj6FPyA3u3u2VXGr9hT8wilsoQdZdvKpMBFMB8Crfhv5dNkKHIW0Yyuc7eABqA== + 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" + "@smithy/property-provider@^2.0.0", "@smithy/property-provider@^2.0.17": version "2.0.17" resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-2.0.17.tgz#288475021613649811dc79a9fab4894be01cd069" @@ -1939,6 +2028,14 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/property-provider@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-2.2.0.tgz#37e3525a3fa3e11749f86a4f89f0fd7765a6edb0" + integrity sha512-+xiil2lFhtTRzXkx8F053AV46QnIw6e7MV8od5Mi68E1ICOjCeCHw2XfLnDEUHnT9WGUIkwcqavXjfwuJbGlpg== + dependencies: + "@smithy/types" "^2.12.0" + tslib "^2.6.2" + "@smithy/protocol-http@^3.0.12": version "3.0.12" resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-3.0.12.tgz#9f606efd191593f6dbde58fa822465b92b8afbca" @@ -1947,6 +2044,14 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/protocol-http@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-3.3.0.tgz#a37df7b4bb4960cdda560ce49acfd64c455e4090" + integrity sha512-Xy5XK1AFWW2nlY/biWZXu6/krgbaf2dg0q492D8M5qthsnU2H+UgFeZLbM76FnH7s6RO/xhQRkj+T6KBO3JzgQ== + dependencies: + "@smithy/types" "^2.12.0" + tslib "^2.6.2" + "@smithy/querystring-builder@^2.0.16": version "2.0.16" resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-2.0.16.tgz#1a9a02b1fb938688cdab5e585cb7c62c8054bc41" @@ -1956,6 +2061,15 @@ "@smithy/util-uri-escape" "^2.0.0" tslib "^2.5.0" +"@smithy/querystring-builder@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-2.2.0.tgz#22937e19fcd0aaa1a3e614ef8cb6f8e86756a4ef" + integrity sha512-L1kSeviUWL+emq3CUVSgdogoM/D9QMFaqxL/dd0X7PCNWmPXqt+ExtrBjqT0V7HLN03Vs9SuiLrG3zy3JGnE5A== + dependencies: + "@smithy/types" "^2.12.0" + "@smithy/util-uri-escape" "^2.2.0" + tslib "^2.6.2" + "@smithy/querystring-parser@^2.0.16": version "2.0.16" resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-2.0.16.tgz#90d9589539ffe8fb4864c8bf6f1f1c9def962a40" @@ -1964,6 +2078,14 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/querystring-parser@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-2.2.0.tgz#24a5633f4b3806ff2888d4c2f4169e105fdffd79" + integrity sha512-BvHCDrKfbG5Yhbpj4vsbuPV2GgcpHiAkLeIlcA1LtfpMz3jrqizP1+OguSNSj1MwBHEiN+jwNisXLGdajGDQJA== + dependencies: + "@smithy/types" "^2.12.0" + tslib "^2.6.2" + "@smithy/service-error-classification@^2.0.9": version "2.0.9" resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-2.0.9.tgz#4459433f6727f1b7e953a9bab189672b3b157224" @@ -1979,6 +2101,14 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/shared-ini-file-loader@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.4.0.tgz#1636d6eb9bff41e36ac9c60364a37fd2ffcb9947" + integrity sha512-WyujUJL8e1B6Z4PBfAqC/aGY1+C7T0w20Gih3yrvJSk97gpiVfB+y7c46T4Nunk+ZngLq0rOIdeVeIklk0R3OA== + dependencies: + "@smithy/types" "^2.12.0" + tslib "^2.6.2" + "@smithy/signature-v4@^2.0.0": version "2.0.19" resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-2.0.19.tgz#2b926fc00b2e61ec586289fe28927e10766a3afd" @@ -2005,6 +2135,25 @@ "@smithy/util-stream" "^2.0.24" tslib "^2.5.0" +"@smithy/smithy-client@^2.5.1": + version "2.5.1" + resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-2.5.1.tgz#0fd2efff09dc65500d260e590f7541f8a387eae3" + integrity sha512-jrbSQrYCho0yDaaf92qWgd+7nAeap5LtHTI51KXqmpIFCceKU3K9+vIVTUH72bOJngBMqa4kyu1VJhRcSrk/CQ== + dependencies: + "@smithy/middleware-endpoint" "^2.5.1" + "@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" + +"@smithy/types@^2.12.0": + version "2.12.0" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.12.0.tgz#c44845f8ba07e5e8c88eda5aed7e6a0c462da041" + integrity sha512-QwYgloJ0sVNBeBuBs65cIkTbfzV/Q6ZNPCJ99EICFEdJYG50nGIY/uYXp+TbsdJReIuPr0a0kXmCvren3MbRRw== + dependencies: + tslib "^2.6.2" + "@smithy/types@^2.8.0": version "2.8.0" resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.8.0.tgz#bdbaa0a54c9c3538d6c763c6f32d3e4f76fe0df9" @@ -2021,6 +2170,15 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/url-parser@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-2.2.0.tgz#6fcda6116391a4f61fef5580eb540e128359b3c0" + integrity sha512-hoA4zm61q1mNTpksiSWp2nEl1dt3j726HdRhiNgVJQMj7mLp7dprtF57mOB6JvEk/x9d2bsuL5hlqZbBuHQylQ== + dependencies: + "@smithy/querystring-parser" "^2.2.0" + "@smithy/types" "^2.12.0" + tslib "^2.6.2" + "@smithy/util-base64@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@smithy/util-base64/-/util-base64-2.0.1.tgz#57f782dafc187eddea7c8a1ff2a7c188ed1a02c4" @@ -2029,6 +2187,15 @@ "@smithy/util-buffer-from" "^2.0.0" tslib "^2.5.0" +"@smithy/util-base64@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@smithy/util-base64/-/util-base64-2.3.0.tgz#312dbb4d73fb94249c7261aee52de4195c2dd8e2" + integrity sha512-s3+eVwNeJuXUwuMbusncZNViuhv2LjVJ1nMwTqSA0XAC7gjKhqqxRdJPhR8+YrkoZ9IiIbFk/yK6ACe/xlF+hw== + dependencies: + "@smithy/util-buffer-from" "^2.2.0" + "@smithy/util-utf8" "^2.3.0" + tslib "^2.6.2" + "@smithy/util-body-length-browser@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.1.tgz#424485cc81c640d18c17c683e0e6edb57e8e2ab9" @@ -2051,6 +2218,14 @@ "@smithy/is-array-buffer" "^2.0.0" tslib "^2.5.0" +"@smithy/util-buffer-from@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz#6fc88585165ec73f8681d426d96de5d402021e4b" + integrity sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA== + dependencies: + "@smithy/is-array-buffer" "^2.2.0" + tslib "^2.6.2" + "@smithy/util-config-provider@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@smithy/util-config-provider/-/util-config-provider-2.1.0.tgz#c733a862892772aaeb373a3e8af5182556da0ef9" @@ -2098,6 +2273,13 @@ dependencies: tslib "^2.5.0" +"@smithy/util-hex-encoding@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/util-hex-encoding/-/util-hex-encoding-2.2.0.tgz#87edb7c88c2f422cfca4bb21f1394ae9602c5085" + integrity sha512-7iKXR+/4TpLK194pVjKiasIyqMtTYJsgKgM242Y9uzt5dhHnUDvMNb+3xIhRJ9QhvqGii/5cRUt4fJn3dtXNHQ== + dependencies: + tslib "^2.6.2" + "@smithy/util-middleware@^2.0.9": version "2.0.9" resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-2.0.9.tgz#54a372fa723ace66046cdf91439fb1648a246d5c" @@ -2106,6 +2288,14 @@ "@smithy/types" "^2.8.0" tslib "^2.5.0" +"@smithy/util-middleware@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-2.2.0.tgz#80cfad40f6cca9ffe42a5899b5cb6abd53a50006" + integrity sha512-L1qpleXf9QD6LwLCJ5jddGkgWyuSvWBkJwWAZ6kFkdifdso+sk3L3O1HdmPvCdnCK3IS4qWyPxev01QMnfHSBw== + dependencies: + "@smithy/types" "^2.12.0" + tslib "^2.6.2" + "@smithy/util-retry@^2.0.9": version "2.0.9" resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-2.0.9.tgz#ef6d6e41bcc5df330b76cca913d5e637c70497fc" @@ -2129,6 +2319,20 @@ "@smithy/util-utf8" "^2.0.2" tslib "^2.5.0" +"@smithy/util-stream@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-2.2.0.tgz#b1279e417992a0f74afa78d7501658f174ed7370" + integrity sha512-17faEXbYWIRst1aU9SvPZyMdWmqIrduZjVOqCPMIsWFNxs5yQQgFrJL6b2SdiCzyW9mJoDjFtgi53xx7EH+BXA== + 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" + "@smithy/util-uri-escape@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz#19955b1a0f517a87ae77ac729e0e411963dfda95" @@ -2136,6 +2340,13 @@ dependencies: tslib "^2.5.0" +"@smithy/util-uri-escape@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/util-uri-escape/-/util-uri-escape-2.2.0.tgz#56f5764051a33b67bc93fdd2a869f971b0635406" + integrity sha512-jtmJMyt1xMD/d8OtbVJ2gFZOSKc+ueYJZPW20ULW1GOp/q/YIM0wNh+u8ZFao9UaIGz4WoPW8hC64qlWLIfoDA== + dependencies: + tslib "^2.6.2" + "@smithy/util-utf8@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-2.0.2.tgz#626b3e173ad137208e27ed329d6bea70f4a1a7f7" @@ -2144,6 +2355,14 @@ "@smithy/util-buffer-from" "^2.0.0" tslib "^2.5.0" +"@smithy/util-utf8@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-2.3.0.tgz#dd96d7640363259924a214313c3cf16e7dd329c5" + integrity sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A== + dependencies: + "@smithy/util-buffer-from" "^2.2.0" + tslib "^2.6.2" + "@smithy/util-waiter@^2.0.16": version "2.0.16" resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-2.0.16.tgz#3065566dd81951e24d843979ed1e6278794a955c" @@ -3159,7 +3378,7 @@ base-x@^3.0.2: dependencies: safe-buffer "^5.0.1" -base64-js@^1.3.1, base64-js@^1.5.1: +base64-js@^1.0.2, base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -3381,6 +3600,14 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== +buffer@5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" + integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + buffer@^5.5.0, buffer@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" @@ -5194,7 +5421,7 @@ iconv-lite@^0.6.2: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -ieee754@^1.1.13, ieee754@^1.2.1: +ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -7596,7 +7823,7 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -stream-browserify@^3.0.0: +stream-browserify@3.0.0, stream-browserify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== @@ -7948,7 +8175,7 @@ tslib@^2.1.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338" integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA== -tslib@^2.3.1: +tslib@^2.3.1, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==