Skip to content

Commit

Permalink
chore(internal): replace deprecated aws-sdk packages with @smithy (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmeadows authored and stainless-app[bot] committed Jun 25, 2024
1 parent f224eff commit e21df2d
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 99 deletions.
3 changes: 1 addition & 2 deletions packages/bedrock-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
"@aws-crypto/sha256-js": "^4.0.0",
"@aws-sdk/client-bedrock-runtime": "^3.423.0",
"@aws-sdk/credential-providers": "^3.341.0",
"@aws-sdk/protocol-http": "^3.341.0",
"@aws-sdk/signature-v4": "^3.341.0",
"@smithy/eventstream-serde-node": "^2.0.10",
"@smithy/fetch-http-handler": "^2.2.1",
"@smithy/protocol-http": "^3.0.6",
"@smithy/signature-v4": "^3.1.1",
"@smithy/smithy-client": "^2.1.9",
"@smithy/types": "^2.3.4",
"@smithy/util-base64": "^2.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/bedrock-sdk/src/auth.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assert from 'assert';
import { SignatureV4 } from '@aws-sdk/signature-v4';
import { SignatureV4 } from '@smithy/signature-v4';
import { fromNodeProviderChain } from '@aws-sdk/credential-providers';
import { HttpRequest } from '@aws-sdk/protocol-http';
import { HttpRequest } from '@smithy/protocol-http';
import { Sha256 } from '@aws-crypto/sha256-js';
import type { RequestInit } from '@anthropic-ai/sdk/_shims/index';

Expand Down
156 changes: 61 additions & 95 deletions packages/bedrock-sdk/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -477,14 +477,6 @@
"@smithy/types" "^2.9.1"
tslib "^2.5.0"

"@aws-sdk/protocol-http@^3.341.0":
version "3.374.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/protocol-http/-/protocol-http-3.374.0.tgz#e35e76096b995bbed803897a9f4587d11ca34088"
integrity sha512-9WpRUbINdGroV3HiZZIBoJvL2ndoWk39OfwxWs2otxByppJZNN14bg/lvCx5e8ggHUti7IBk5rb0nqQZ4m05pg==
dependencies:
"@smithy/protocol-http" "^1.1.0"
tslib "^2.5.0"

"@aws-sdk/[email protected]":
version "3.496.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.496.0.tgz#133c8a4a6d5e7672077ba124751f40b2d6efc3ed"
Expand All @@ -497,14 +489,6 @@
"@smithy/util-middleware" "^2.1.1"
tslib "^2.5.0"

"@aws-sdk/signature-v4@^3.341.0":
version "3.374.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4/-/signature-v4-3.374.0.tgz#bd727f4c392acb81bc667aa4cfceeba608250771"
integrity sha512-2xLJvSdzcZZAg0lsDLUAuSQuihzK0dcxIK7WmfuJeF7DGKJFmp9czQmz5f3qiDz6IDQzvgK1M9vtJSVCslJbyQ==
dependencies:
"@smithy/signature-v4" "^1.0.1"
tslib "^2.5.0"

"@aws-sdk/[email protected]":
version "3.496.0"
resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.496.0.tgz#5b5baf0801fd591de4a28146afbdc8250197f9fa"
Expand Down Expand Up @@ -1282,16 +1266,6 @@
"@smithy/url-parser" "^2.1.1"
tslib "^2.5.0"

"@smithy/eventstream-codec@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-1.1.0.tgz#bfe1308ba84ff3db3e79dc1ced8231c52ac0fc36"
integrity sha512-3tEbUb8t8an226jKB6V/Q2XU/J53lCwCzULuBPEaF4JjSh+FlCMp7TmogE/Aij5J9DwlsZ4VAD/IRDuQ/0ZtMw==
dependencies:
"@aws-crypto/crc32" "3.0.0"
"@smithy/types" "^1.2.0"
"@smithy/util-hex-encoding" "^1.1.0"
tslib "^2.5.0"

"@smithy/eventstream-codec@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-2.1.1.tgz#4405ab0f9c77d439c575560c4886e59ee17d6d38"
Expand Down Expand Up @@ -1366,20 +1340,20 @@
"@smithy/types" "^2.9.1"
tslib "^2.5.0"

"@smithy/is-array-buffer@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-1.1.0.tgz#29948072da2b57575aa9898cda863932e842ab11"
integrity sha512-twpQ/n+3OWZJ7Z+xu43MJErmhB/WO/mMTnqR6PwWQShvSJ/emx5d1N59LQZk6ZpTAeuRWrc+eHhkzTp9NFjNRQ==
dependencies:
tslib "^2.5.0"

"@smithy/is-array-buffer@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-2.1.1.tgz#07b4c77ae67ed58a84400c76edd482271f9f957b"
integrity sha512-xozSQrcUinPpNPNPds4S7z/FakDTh1MZWtRP/2vQtYB/u3HYrX2UXuZs+VhaKBd6Vc7g2XPr2ZtwGBNDN6fNKQ==
dependencies:
tslib "^2.5.0"

"@smithy/is-array-buffer@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz#9a95c2d46b8768946a9eec7f935feaddcffa5e7a"
integrity sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==
dependencies:
tslib "^2.6.2"

"@smithy/middleware-content-length@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-2.1.1.tgz#df767de12d594bc5622009fb0fc8343522697d8c"
Expand Down Expand Up @@ -1462,14 +1436,6 @@
"@smithy/types" "^2.9.1"
tslib "^2.5.0"

"@smithy/protocol-http@^1.1.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-1.2.0.tgz#a554e4dabb14508f0bc2cdef9c3710e2b294be04"
integrity sha512-GfGfruksi3nXdFok5RhgtOnWe5f6BndzYfmEXISD+5gAGdayFGpjWu5pIqIweTudMtse20bGbc+7MFZXT1Tb8Q==
dependencies:
"@smithy/types" "^1.2.0"
tslib "^2.5.0"

"@smithy/protocol-http@^3.0.6", "@smithy/protocol-http@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-3.1.1.tgz#eee522d0ed964a72b735d64925e07bcfb7a7806f"
Expand Down Expand Up @@ -1510,20 +1476,6 @@
"@smithy/types" "^2.9.1"
tslib "^2.5.0"

"@smithy/signature-v4@^1.0.1":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-1.1.0.tgz#e85309995c2475d39598a4f56e68b7ed856bdfa6"
integrity sha512-fDo3m7YqXBs7neciOePPd/X9LPm5QLlDMdIC4m1H6dgNLnXfLMFNIxEfPyohGA8VW9Wn4X8lygnPSGxDZSmp0Q==
dependencies:
"@smithy/eventstream-codec" "^1.1.0"
"@smithy/is-array-buffer" "^1.1.0"
"@smithy/types" "^1.2.0"
"@smithy/util-hex-encoding" "^1.1.0"
"@smithy/util-middleware" "^1.1.0"
"@smithy/util-uri-escape" "^1.1.0"
"@smithy/util-utf8" "^1.1.0"
tslib "^2.5.0"

"@smithy/signature-v4@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-2.1.1.tgz#6080171e3d694f40d3f553bbc236c5c433efd4d2"
Expand All @@ -1538,6 +1490,19 @@
"@smithy/util-utf8" "^2.1.1"
tslib "^2.5.0"

"@smithy/signature-v4@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-3.1.1.tgz#4882aacb3260a47b8279b2ffc6a135e03e225260"
integrity sha512-2/vlG86Sr489XX8TA/F+VDA+P04ESef04pSz0wRtlQBExcSPjqO08rvrkcas2zLnJ51i+7ukOURCkgqixBYjSQ==
dependencies:
"@smithy/is-array-buffer" "^3.0.0"
"@smithy/types" "^3.2.0"
"@smithy/util-hex-encoding" "^3.0.0"
"@smithy/util-middleware" "^3.0.2"
"@smithy/util-uri-escape" "^3.0.0"
"@smithy/util-utf8" "^3.0.0"
tslib "^2.6.2"

"@smithy/smithy-client@^2.1.9", "@smithy/smithy-client@^2.3.1":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-2.3.1.tgz#0c3a4a0d3935c7ad2240cc23181f276705212b1f"
Expand All @@ -1550,20 +1515,20 @@
"@smithy/util-stream" "^2.1.1"
tslib "^2.5.0"

"@smithy/types@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@smithy/types/-/types-1.2.0.tgz#9dc65767b0ee3d6681704fcc67665d6fc9b6a34e"
integrity sha512-z1r00TvBqF3dh4aHhya7nz1HhvCg4TRmw51fjMrh5do3h+ngSstt/yKlNbHeb9QxJmFbmN8KEVSWgb1bRvfEoA==
dependencies:
tslib "^2.5.0"

"@smithy/types@^2.3.4", "@smithy/types@^2.9.1":
version "2.9.1"
resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.9.1.tgz#ed04d4144eed3b8bd26d20fc85aae8d6e357ebb9"
integrity sha512-vjXlKNXyprDYDuJ7UW5iobdmyDm6g8dDG+BFUncAg/3XJaN45Gy5RWWWUVgrzIK7S4R1KWgIX5LeJcfvSI24bw==
dependencies:
tslib "^2.5.0"

"@smithy/types@^3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.2.0.tgz#1350fe8a50d5e35e12ffb34be46d946860b2b5ab"
integrity sha512-cKyeKAPazZRVqm7QPvcPD2jEIt2wqDPAL1KJKb0f/5I7uhollvsWZuZKLclmyP6a+Jwmr3OV3t+X0pZUUHS9BA==
dependencies:
tslib "^2.6.2"

"@smithy/url-parser@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-2.1.1.tgz#a30de227b6734650d740b6dff74d488b874e85e3"
Expand Down Expand Up @@ -1595,14 +1560,6 @@
dependencies:
tslib "^2.5.0"

"@smithy/util-buffer-from@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-1.1.0.tgz#a000bd9f95c0e8d5b0edb0112f2a586daa5bed49"
integrity sha512-9m6NXE0ww+ra5HKHCHig20T+FAwxBAm7DIdwc/767uGWbRcY720ybgPacQNB96JMOI7xVr/CDa3oMzKmW4a+kw==
dependencies:
"@smithy/is-array-buffer" "^1.1.0"
tslib "^2.5.0"

"@smithy/util-buffer-from@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-2.1.1.tgz#f9346bf8b23c5ba6f6bdb61dd9db779441ba8d08"
Expand All @@ -1611,6 +1568,14 @@
"@smithy/is-array-buffer" "^2.1.1"
tslib "^2.5.0"

"@smithy/util-buffer-from@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz#559fc1c86138a89b2edaefc1e6677780c24594e3"
integrity sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==
dependencies:
"@smithy/is-array-buffer" "^3.0.0"
tslib "^2.6.2"

"@smithy/util-config-provider@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@smithy/util-config-provider/-/util-config-provider-2.2.1.tgz#aea0a80236d6cedaee60473802899cff4a8cc0ba"
Expand Down Expand Up @@ -1651,26 +1616,19 @@
"@smithy/types" "^2.9.1"
tslib "^2.5.0"

"@smithy/util-hex-encoding@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@smithy/util-hex-encoding/-/util-hex-encoding-1.1.0.tgz#b5ba919aa076a3fd5e93e368e34ae2b732fa2090"
integrity sha512-7UtIE9eH0u41zpB60Jzr0oNCQ3hMJUabMcKRUVjmyHTXiWDE4vjSqN6qlih7rCNeKGbioS7f/y2Jgym4QZcKFg==
dependencies:
tslib "^2.5.0"

"@smithy/util-hex-encoding@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@smithy/util-hex-encoding/-/util-hex-encoding-2.1.1.tgz#978252b9fb242e0a59bae4ead491210688e0d15f"
integrity sha512-3UNdP2pkYUUBGEXzQI9ODTDK+Tcu1BlCyDBaRHwyxhA+8xLP8agEKQq4MGmpjqb4VQAjq9TwlCQX0kP6XDKYLg==
dependencies:
tslib "^2.5.0"

"@smithy/util-middleware@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-1.1.0.tgz#9f186489437ca2ef753c5e1de2930f76fd1edc14"
integrity sha512-6hhckcBqVgjWAqLy2vqlPZ3rfxLDhFWEmM7oLh2POGvsi7j0tHkbN7w4DFhuBExVJAbJ/qqxqZdRY6Fu7/OezQ==
"@smithy/util-hex-encoding@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz#32938b33d5bf2a15796cd3f178a55b4155c535e6"
integrity sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==
dependencies:
tslib "^2.5.0"
tslib "^2.6.2"

"@smithy/util-middleware@^2.1.1":
version "2.1.1"
Expand All @@ -1680,6 +1638,14 @@
"@smithy/types" "^2.9.1"
tslib "^2.5.0"

"@smithy/util-middleware@^3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-3.0.2.tgz#6daeb9db060552d851801cd7a0afd68769e2f98b"
integrity sha512-7WW5SD0XVrpfqljBYzS5rLR+EiDzl7wCVJZ9Lo6ChNFV4VYDk37Z1QI5w/LnYtU/QKnSawYoHRd7VjSyC8QRQQ==
dependencies:
"@smithy/types" "^3.2.0"
tslib "^2.6.2"

"@smithy/util-retry@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-2.1.1.tgz#f2d3566b6e5b841028c7240c852007d4037e49b2"
Expand All @@ -1703,27 +1669,19 @@
"@smithy/util-utf8" "^2.1.1"
tslib "^2.5.0"

"@smithy/util-uri-escape@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@smithy/util-uri-escape/-/util-uri-escape-1.1.0.tgz#a8c5edaf19c0efdb9b51661e840549cf600a1808"
integrity sha512-/jL/V1xdVRt5XppwiaEU8Etp5WHZj609n0xMTuehmCqdoOFbId1M+aEeDWZsQ+8JbEB/BJ6ynY2SlYmOaKtt8w==
dependencies:
tslib "^2.5.0"

"@smithy/util-uri-escape@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@smithy/util-uri-escape/-/util-uri-escape-2.1.1.tgz#7eedc93b73ecda68f12fb9cf92e9fa0fbbed4d83"
integrity sha512-saVzI1h6iRBUVSqtnlOnc9ssU09ypo7n+shdQ8hBTZno/9rZ3AuRYvoHInV57VF7Qn7B+pFJG7qTzFiHxWlWBw==
dependencies:
tslib "^2.5.0"

"@smithy/util-utf8@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-1.1.0.tgz#b791ab1e3f694374edfe22811e39dd8424a1be69"
integrity sha512-p/MYV+JmqmPyjdgyN2UxAeYDj9cBqCjp0C/NsTWnnjoZUVqoeZ6IrW915L9CAKWVECgv9lVQGc4u/yz26/bI1A==
"@smithy/util-uri-escape@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz#e43358a78bf45d50bb736770077f0f09195b6f54"
integrity sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==
dependencies:
"@smithy/util-buffer-from" "^1.1.0"
tslib "^2.5.0"
tslib "^2.6.2"

"@smithy/util-utf8@^2.1.1":
version "2.1.1"
Expand All @@ -1733,6 +1691,14 @@
"@smithy/util-buffer-from" "^2.1.1"
tslib "^2.5.0"

"@smithy/util-utf8@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-3.0.0.tgz#1a6a823d47cbec1fd6933e5fc87df975286d9d6a"
integrity sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==
dependencies:
"@smithy/util-buffer-from" "^3.0.0"
tslib "^2.6.2"

"@ts-morph/common@~0.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.20.0.tgz#3f161996b085ba4519731e4d24c35f6cba5b80af"
Expand Down

0 comments on commit e21df2d

Please sign in to comment.