@ultrst-armada/kloks 1.26.3 → 1.26.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/README.md +39 -0
  2. package/index.d.ts +16 -10
  3. package/index.js +3 -0
  4. package/package.json +60 -7
  5. package/packages/audio-midi/dist/{audioClipEngine-BOT33JKI.js → audioClipEngine-LKZRWTJ3.js} +2 -2
  6. package/packages/audio-midi/dist/{audioInputManager-BLDGGLAR.js → audioInputManager-5BNHLOJM.js} +1 -1
  7. package/packages/audio-midi/dist/{chunk-N55BWOC6.js → chunk-M4JFGTHE.js} +1 -1
  8. package/packages/audio-midi/dist/{chunk-3GRGELA4.js → chunk-OUOFTYHY.js} +50 -11
  9. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Compressor/manifest.json +7 -0
  10. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Delay/manifest.json +7 -0
  11. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Equalizer/manifest.json +7 -0
  12. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Limiter/manifest.json +7 -0
  13. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/MultibandCompressor/manifest.json +7 -0
  14. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Reverb/manifest.json +7 -0
  15. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Saturation/manifest.json +7 -0
  16. package/packages/audio-midi/dist/index.d.ts +10 -1
  17. package/packages/audio-midi/dist/index.js +36 -20
  18. package/packages/audio-midi/package.json +8 -0
  19. package/packages/backend/dist/ai-models/index.js +2 -2
  20. package/packages/backend/dist/ai-routing/index.js +3 -3
  21. package/packages/backend/dist/api/BaseApiRoute.d.ts +1 -1
  22. package/packages/backend/dist/api/index.js +1 -1
  23. package/packages/backend/dist/auth/CanonicalAuthClient.d.ts +6 -6
  24. package/packages/backend/dist/auth/index.js +2 -1
  25. package/packages/backend/dist/chunk-2Y2EXYDK.js +0 -0
  26. package/packages/backend/dist/{chunk-3S2NSIFA.js → chunk-3FZSYSJC.js} +16 -10
  27. package/packages/backend/dist/chunk-5F5V7NAG.js +54 -0
  28. package/packages/backend/dist/{chunk-WAQDOIGQ.js → chunk-BVXGUHLZ.js} +1 -1
  29. package/packages/backend/dist/chunk-DAG2L4RN.js +0 -0
  30. package/packages/backend/dist/{chunk-KPZQUA7R.js → chunk-G7PPVOFP.js} +16 -53
  31. package/packages/backend/dist/{chunk-GKQ42CYW.js → chunk-H6ET362U.js} +3 -3
  32. package/packages/backend/dist/chunk-HUY4272L.js +69 -0
  33. package/packages/backend/dist/chunk-JQKKMUCT.js +0 -0
  34. package/packages/backend/dist/{chunk-PT6J6UEU.js → chunk-LMAU62ZG.js} +4 -4
  35. package/packages/backend/dist/{chunk-EDKCP5CQ.js → chunk-MZK362U4.js} +16 -16
  36. package/packages/backend/dist/{chunk-U4UI6KK4.js → chunk-NGEB3CF5.js} +3 -35
  37. package/packages/backend/dist/{chunk-3VWBZEMG.js → chunk-NTKUQVCQ.js} +4 -5
  38. package/packages/backend/dist/chunk-NY2SQOXI.js +34 -0
  39. package/packages/backend/dist/{chunk-JOTDEFRG.js → chunk-OXEP3AP6.js} +5 -4
  40. package/packages/backend/dist/chunk-RABSY2JU.js +0 -0
  41. package/packages/backend/dist/{chunk-GWCLYVJT.js → chunk-RFPGUJAZ.js} +9 -9
  42. package/packages/backend/dist/{chunk-TWCEVES2.js → chunk-WC6EPW3A.js} +1 -1
  43. package/packages/backend/dist/{chunk-FU6TYLI2.js → chunk-Y5ENDXU2.js} +72 -129
  44. package/packages/backend/dist/{chunk-EO5VUYYU.js → chunk-Y7ZE6D5H.js} +4 -4
  45. package/packages/backend/dist/{chunk-RCCQ7IRM.js → chunk-ZBNSK26X.js} +2 -2
  46. package/packages/backend/dist/control-plane/AuditLogger.d.ts +1 -1
  47. package/packages/backend/dist/control-plane/ControlPlaneManager.d.ts +1 -1
  48. package/packages/backend/dist/control-plane/index.js +1 -1
  49. package/packages/backend/dist/core/dynamicRouteResolver.d.ts +1 -1
  50. package/packages/backend/dist/core/routesCore.d.ts +1 -1
  51. package/packages/backend/dist/core/vercelTransformer.d.ts +1 -1
  52. package/packages/backend/dist/core/workspaceCore.d.ts +2 -2
  53. package/packages/backend/dist/data/BaseDataProvider.d.ts +1 -1
  54. package/packages/backend/dist/development/index.js +30 -17
  55. package/packages/backend/dist/development/playwrightInspectionService.js +1 -2
  56. package/packages/backend/dist/development/webContainerService.js +1 -2
  57. package/packages/backend/dist/index.d.ts +4 -24
  58. package/packages/backend/dist/index.js +12 -4655
  59. package/packages/backend/dist/krnl-ai-services.d.ts +9 -9
  60. package/packages/backend/dist/krnl-ai-services.js +5 -6
  61. package/packages/backend/dist/krnl-services.js +8 -7
  62. package/packages/backend/dist/node.d.ts +28 -0
  63. package/packages/backend/dist/node.js +4754 -0
  64. package/packages/backend/dist/resourceEngine/BaseResourceFetcher.d.ts +3 -3
  65. package/packages/backend/dist/resourceEngine/CloudflareResourceFetcher.d.ts +3 -3
  66. package/packages/backend/dist/resourceEngine/ResourceFetcherRegistry.d.ts +5 -5
  67. package/packages/backend/dist/resourceEngine/VercelResourceFetcher.d.ts +3 -3
  68. package/packages/backend/dist/resourceEngine/adapters/CloudflareResourceAdapter.d.ts +2 -2
  69. package/packages/backend/dist/resourceEngine/adapters/VercelResourceAdapter.d.ts +2 -2
  70. package/packages/backend/dist/resourceEngine/calculator/UniversalResourceCalculator.d.ts +1 -1
  71. package/packages/backend/dist/resourceEngine/calculator/types.d.ts +1 -1
  72. package/packages/backend/dist/resourceEngine/index.d.ts +6 -6
  73. package/packages/backend/dist/resourceEngine/types/depm/entities.d.ts +2 -2
  74. package/packages/backend/dist/resourceEngine/types.d.ts +1 -1
  75. package/packages/backend/dist/resourceEngine/weightEngine/helpers.d.ts +1 -1
  76. package/packages/backend/dist/resourceEngine/weightEngine/index.d.ts +2 -2
  77. package/packages/backend/dist/resourceEngine/weightEngine/weightEngine.d.ts +1 -1
  78. package/packages/backend/dist/resourceEngine/weightEngine.d.ts +1 -1
  79. package/packages/backend/dist/server/services/assetPoolService/assetPoolService.d.ts +3 -3
  80. package/packages/backend/dist/server/services/projectService/projectService.d.ts +3 -3
  81. package/packages/backend/dist/services/index.d.ts +2 -10
  82. package/packages/backend/dist/services/index.js +1 -37
  83. package/packages/backend/dist/services/node.d.ts +10 -0
  84. package/packages/backend/dist/services/node.js +38 -0
  85. package/packages/backend/dist/srkl/index.js +1 -1
  86. package/packages/backend/dist/storage/BaseStorageAdapter.d.ts +1 -1
  87. package/packages/backend/dist/storage/S3Adapter.d.ts +5 -0
  88. package/packages/backend/dist/storage/googleDriveSdk.d.ts +1 -7
  89. package/packages/backend/dist/storage/index.d.ts +1 -10
  90. package/packages/backend/dist/storage/index.js +5 -40
  91. package/packages/backend/dist/storage/node.d.ts +14 -0
  92. package/packages/backend/dist/storage/node.js +66 -0
  93. package/packages/backend/dist/workspace/WorkspaceCloneSyncEngine.d.ts +1 -1
  94. package/packages/backend/dist/workspace/index.d.ts +1 -5
  95. package/packages/backend/dist/workspace/index.js +4 -24
  96. package/packages/backend/dist/workspace/node.d.ts +8 -0
  97. package/packages/backend/dist/workspace/node.js +30 -0
  98. package/packages/backend/package.json +35 -3
  99. package/packages/functions/dist/base-DDYO-DzM.d.ts +64 -0
  100. package/packages/functions/dist/base.d.ts +1 -0
  101. package/packages/functions/dist/base.js +6 -0
  102. package/packages/functions/dist/chunk-6EHIZHO4.js +555 -0
  103. package/packages/functions/dist/chunk-Z4LM5TOJ.js +114 -0
  104. package/packages/functions/dist/index.d.ts +4 -373
  105. package/packages/functions/dist/index.js +53 -1693
  106. package/packages/functions/dist/node.d.ts +110 -0
  107. package/packages/functions/dist/node.js +442 -0
  108. package/packages/functions/dist/portable.d.ts +207 -0
  109. package/packages/functions/dist/portable.js +94 -0
  110. package/packages/functions/package.json +23 -1
  111. package/packages/{functions/dist/chunk-K6H7T3EP.js → services/dist/chunk-P54QSKOQ.js} +1 -3
  112. package/packages/{state-graph/dist/dist-es-TLPJYZTE.js → services/dist/dist-es-2P6LFFZL.js} +1 -1
  113. package/packages/{state-graph/dist/dist-es-5IACWOIO.js → services/dist/dist-es-OZCE67MW.js} +1 -1
  114. package/packages/services/dist/{dist-es-3DGJJFOU.js → dist-es-RUJB3ALN.js} +3 -3
  115. package/packages/{state-graph/dist/dist-es-QZ6GKMM7.js → services/dist/dist-es-SSJGP5AI.js} +4 -4
  116. package/packages/services/dist/{loadSso-M3ZIZDGO.js → loadSso-3PZYFUB7.js} +1 -1
  117. package/packages/{functions/dist/signin-YXALFRYB.js → services/dist/signin-WYPGSXHF.js} +1 -1
  118. package/packages/{state-graph/dist/sso-oidc-NXFKRL6O.js → services/dist/sso-oidc-PQMIMLJU.js} +1 -1
  119. package/packages/{state-graph/dist/sts-MICPT37B.js → services/dist/sts-Z7LR3AZH.js} +1 -1
  120. package/packages/state-graph/dist/browser.d.ts +8 -18
  121. package/packages/state-graph/dist/browser.js +334 -23
  122. package/packages/state-graph/dist/browser.test.d.ts +1 -0
  123. package/packages/state-graph/dist/{chunk-KG6QYS26.js → chunk-5KP74NMF.js} +80 -80
  124. package/packages/state-graph/dist/{chunk-4UVGXFEM.js → chunk-LVULR5M4.js} +1 -1
  125. package/packages/state-graph/dist/{chunk-S22PMERU.js → chunk-OXUDG6HE.js} +1 -1
  126. package/packages/state-graph/dist/{chunk-2CQQGFMF.js → chunk-UKTICGGV.js} +2616 -432
  127. package/packages/state-graph/dist/domain/index.js +2 -3
  128. package/packages/state-graph/dist/engine/AudioConcepts.d.ts +1 -1
  129. package/packages/state-graph/dist/engine/GraphConcepts.d.ts +1 -1
  130. package/packages/state-graph/dist/engine/core/archetypes/audioArchetypes.d.ts +1 -1
  131. package/packages/state-graph/dist/engine/core/archetypes/effectArchetypes.d.ts +1 -1
  132. package/packages/state-graph/dist/engine/core/archetypes/primitiveArchetypes.d.ts +1 -1
  133. package/packages/state-graph/dist/engine/core/archetypes/routingArchetypes.d.ts +1 -1
  134. package/packages/state-graph/dist/engine/core/archetypes/triggerModuleArchetypes.d.ts +1 -1
  135. package/packages/state-graph/dist/engine/core/assets/containerSprites.d.ts +1 -1
  136. package/packages/state-graph/dist/engine/core/assets/effectSprites.d.ts +1 -1
  137. package/packages/state-graph/dist/engine/core/assets/primitiveSprites.d.ts +1 -1
  138. package/packages/state-graph/dist/engine/core/assets/routingSprites.d.ts +1 -1
  139. package/packages/state-graph/dist/engine/core/canonicalIo/CanonicalAudioInputEndpoint.d.ts +1 -1
  140. package/packages/state-graph/dist/engine/core/canonicalIo/CanonicalMidiInputEndpoint.d.ts +1 -1
  141. package/packages/state-graph/dist/engine/core/canonicalIo/topLevelIoRegistry.d.ts +6 -6
  142. package/packages/state-graph/dist/engine/core/canonicalIo/types.d.ts +1 -1
  143. package/packages/state-graph/dist/engine/core/graphDataService.d.ts +1 -1
  144. package/packages/state-graph/dist/engine/core/hierarchy/index.d.ts +11 -11
  145. package/packages/state-graph/dist/engine/core/hierarchy/nodes/GraphNodeParent.d.ts +3 -3
  146. package/packages/state-graph/dist/engine/core/hierarchy/nodes/GraphNodeTypes.d.ts +1 -1
  147. package/packages/state-graph/dist/engine/core/hierarchy/sockets/GraphSocketParent.d.ts +2 -2
  148. package/packages/state-graph/dist/engine/core/hierarchy/sockets/GraphSocketTypes.d.ts +1 -1
  149. package/packages/state-graph/dist/engine/core/hierarchy/ui/UIElementBase.d.ts +3 -3
  150. package/packages/state-graph/dist/engine/core/hierarchy/wires/GraphWireParent.d.ts +2 -2
  151. package/packages/state-graph/dist/engine/core/hierarchy/wires/GraphWireTypes.d.ts +1 -1
  152. package/packages/state-graph/dist/engine/core/nodeArchetypeRegistry.d.ts +1 -1
  153. package/packages/state-graph/dist/engine/core/socketRegistry/containersSockets.d.ts +1 -1
  154. package/packages/state-graph/dist/engine/core/socketRegistry/customRegistry.d.ts +1 -1
  155. package/packages/state-graph/dist/engine/core/socketRegistry/landmarksSockets.d.ts +1 -1
  156. package/packages/state-graph/dist/engine/core/socketRegistry/primitivesSockets.d.ts +1 -1
  157. package/packages/state-graph/dist/engine/core/socketRegistry/processorsSockets.d.ts +1 -1
  158. package/packages/state-graph/dist/engine/core/sockets/arrangementControlSockets.d.ts +1 -1
  159. package/packages/state-graph/dist/engine/core/sockets/audioSockets.d.ts +1 -1
  160. package/packages/state-graph/dist/engine/core/sockets/folderButtonSockets.d.ts +1 -1
  161. package/packages/state-graph/dist/engine/core/sockets/moduleSockets.d.ts +1 -1
  162. package/packages/state-graph/dist/engine/core/sockets/playbackSockets.d.ts +1 -1
  163. package/packages/state-graph/dist/engine/core/sockets/primitiveSockets.d.ts +1 -1
  164. package/packages/state-graph/dist/engine/core/sockets/routingSockets.d.ts +1 -1
  165. package/packages/state-graph/dist/engine/core/sockets/samplerSockets.d.ts +1 -1
  166. package/packages/state-graph/dist/engine/core/sockets/stripSockets.d.ts +1 -1
  167. package/packages/state-graph/dist/engine/functions/arrangementFactory.d.ts +1 -1
  168. package/packages/state-graph/dist/engine/functions/codeNodeParser/codeNodeParser.d.ts +2 -2
  169. package/packages/state-graph/dist/engine/functions/codeNodeParser/helpers.d.ts +1 -1
  170. package/packages/state-graph/dist/engine/functions/connection/portMatching.d.ts +1 -1
  171. package/packages/state-graph/dist/engine/functions/connection/signalCompatibility/helpers.d.ts +1 -1
  172. package/packages/state-graph/dist/engine/functions/connection/signalCompatibility/signalCompatibility.d.ts +1 -1
  173. package/packages/state-graph/dist/engine/functions/connection/signalCompatibility.d.ts +1 -1
  174. package/packages/state-graph/dist/engine/functions/connection/wireValidation.d.ts +1 -1
  175. package/packages/state-graph/dist/engine/functions/containerClipSync.d.ts +1 -1
  176. package/packages/state-graph/dist/engine/functions/containerFactory/containerFactory.d.ts +1 -1
  177. package/packages/state-graph/dist/engine/functions/effectLogic.d.ts +1 -1
  178. package/packages/state-graph/dist/engine/functions/graphManager/graphManager.d.ts +1 -1
  179. package/packages/state-graph/dist/engine/functions/graphManager.d.ts +1 -1
  180. package/packages/state-graph/dist/engine/functions/nodeFactory/nodeFactory.d.ts +8 -8
  181. package/packages/state-graph/dist/engine/functions/nodeFactory.d.ts +2 -2
  182. package/packages/state-graph/dist/engine/functions/signalTable/audioMidiSignals.d.ts +1 -1
  183. package/packages/state-graph/dist/engine/functions/signalTable/canonicalEffectsTable.d.ts +1 -1
  184. package/packages/state-graph/dist/engine/functions/signalTable/dataSignals.d.ts +1 -1
  185. package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner/helpers.d.ts +1 -1
  186. package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner/socketCompatibilitySpawner.d.ts +1 -1
  187. package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner.d.ts +1 -1
  188. package/packages/state-graph/dist/engine/functions/spawnNodeFactory.d.ts +1 -1
  189. package/packages/state-graph/dist/engine/predictive/predictiveGraphEngine/helpers.d.ts +1 -1
  190. package/packages/state-graph/dist/engine/predictive/predictiveGraphEngine.d.ts +2 -2
  191. package/packages/state-graph/dist/engine/types/auth.d.ts +1 -1
  192. package/packages/state-graph/dist/engine/types/hardwareBus.d.ts +1 -1
  193. package/packages/state-graph/dist/engine/types/legacyTypes.d.ts +1 -1
  194. package/packages/state-graph/dist/engine/types/nodesArrangement.d.ts +2 -2
  195. package/packages/state-graph/dist/engine/types/nodesAudio.d.ts +5 -5
  196. package/packages/state-graph/dist/engine/types/nodesControl.d.ts +2 -2
  197. package/packages/state-graph/dist/engine/types/nodesPlayback.d.ts +2 -2
  198. package/packages/state-graph/dist/engine/types/nodesPrimitives.d.ts +6 -6
  199. package/packages/state-graph/dist/engine/types/nodesRouting.d.ts +2 -2
  200. package/packages/state-graph/dist/engine/types/sceneData.d.ts +2 -2
  201. package/packages/state-graph/dist/engine/types/sceneState.d.ts +4 -4
  202. package/packages/state-graph/dist/engine/types/signals.d.ts +2 -2
  203. package/packages/state-graph/dist/engine/types/stripsTypes.d.ts +2 -2
  204. package/packages/state-graph/dist/index.js +110 -2850
  205. package/packages/state-graph/dist/rules/index.js +0 -1
  206. package/packages/state-graph/dist/spatial/index.js +0 -1
  207. package/packages/state-graph/dist/state/index.js +0 -1
  208. package/packages/state-graph/dist/store/CommandApi.d.ts +2 -2
  209. package/packages/state-graph/dist/store/index.js +2 -3
  210. package/packages/state-graph/package.json +7 -2
  211. package/scripts/normalize-package-declarations.mjs +63 -0
  212. package/packages/backend/dist/chunk-SXDYW3QA.js +0 -579
  213. package/packages/functions/dist/bowser-F6LIZBYW.js +0 -2821
  214. package/packages/functions/dist/chunk-34KJBG4F.js +0 -357
  215. package/packages/functions/dist/chunk-EAQYK3U2.js +0 -41
  216. package/packages/functions/dist/chunk-IOAPEUC7.js +0 -3424
  217. package/packages/functions/dist/chunk-J64ZDIIX.js +0 -2753
  218. package/packages/functions/dist/chunk-N3MSTUJN.js +0 -4785
  219. package/packages/functions/dist/chunk-VP26OHBN.js +0 -480
  220. package/packages/functions/dist/chunk-VRLVLNLG.js +0 -1727
  221. package/packages/functions/dist/dist-TKZ5TDRN.js +0 -1124
  222. package/packages/functions/dist/dist-W7ZJS3LZ.js +0 -899
  223. package/packages/functions/dist/dist-es-3DGJJFOU.js +0 -338
  224. package/packages/functions/dist/dist-es-5IACWOIO.js +0 -69
  225. package/packages/functions/dist/dist-es-BWLDIBIA.js +0 -47
  226. package/packages/functions/dist/dist-es-DO3F4OBN.js +0 -377
  227. package/packages/functions/dist/dist-es-NN7AKU7P.js +0 -175
  228. package/packages/functions/dist/dist-es-QZ6GKMM7.js +0 -220
  229. package/packages/functions/dist/dist-es-R3VEGXOP.js +0 -87
  230. package/packages/functions/dist/dist-es-TLPJYZTE.js +0 -294
  231. package/packages/functions/dist/event-streams-DRE6QVD6.js +0 -940
  232. package/packages/functions/dist/loadSso-M3ZIZDGO.js +0 -586
  233. package/packages/functions/dist/multipart-parser-YYFFJ4QD.js +0 -371
  234. package/packages/functions/dist/src-2QCYQXYH.js +0 -1396
  235. package/packages/functions/dist/sso-oidc-NXFKRL6O.js +0 -847
  236. package/packages/functions/dist/sts-MICPT37B.js +0 -1253
  237. package/packages/functions/dist/transformers.node-R6VHTGC2.js +0 -43879
  238. package/packages/services/dist/chunk-K6H7T3EP.js +0 -1991
  239. package/packages/services/dist/dist-es-5IACWOIO.js +0 -69
  240. package/packages/services/dist/dist-es-QZ6GKMM7.js +0 -220
  241. package/packages/services/dist/dist-es-TLPJYZTE.js +0 -294
  242. package/packages/services/dist/signin-YXALFRYB.js +0 -831
  243. package/packages/services/dist/sso-oidc-NXFKRL6O.js +0 -847
  244. package/packages/services/dist/sts-MICPT37B.js +0 -1253
  245. package/packages/state-graph/dist/bowser-F6LIZBYW.js +0 -2821
  246. package/packages/state-graph/dist/chunk-34KJBG4F.js +0 -357
  247. package/packages/state-graph/dist/chunk-EAQYK3U2.js +0 -41
  248. package/packages/state-graph/dist/chunk-IOAPEUC7.js +0 -3424
  249. package/packages/state-graph/dist/chunk-J64ZDIIX.js +0 -2753
  250. package/packages/state-graph/dist/chunk-K6H7T3EP.js +0 -1991
  251. package/packages/state-graph/dist/chunk-N3MSTUJN.js +0 -4785
  252. package/packages/state-graph/dist/chunk-VP26OHBN.js +0 -480
  253. package/packages/state-graph/dist/chunk-VRLVLNLG.js +0 -1727
  254. package/packages/state-graph/dist/dist-TKZ5TDRN.js +0 -1124
  255. package/packages/state-graph/dist/dist-W7ZJS3LZ.js +0 -899
  256. package/packages/state-graph/dist/dist-es-3DGJJFOU.js +0 -338
  257. package/packages/state-graph/dist/dist-es-BWLDIBIA.js +0 -47
  258. package/packages/state-graph/dist/dist-es-DO3F4OBN.js +0 -377
  259. package/packages/state-graph/dist/dist-es-NN7AKU7P.js +0 -175
  260. package/packages/state-graph/dist/dist-es-R3VEGXOP.js +0 -87
  261. package/packages/state-graph/dist/event-streams-DRE6QVD6.js +0 -940
  262. package/packages/state-graph/dist/loadSso-M3ZIZDGO.js +0 -586
  263. package/packages/state-graph/dist/multipart-parser-YYFFJ4QD.js +0 -371
  264. package/packages/state-graph/dist/signin-YXALFRYB.js +0 -831
  265. package/packages/state-graph/dist/src-2QCYQXYH.js +0 -1396
  266. package/packages/state-graph/dist/transformers.node-R6VHTGC2.js +0 -43879
  267. package/packages/backend/dist/{chunk-LMWXONZG.js → chunk-EREYT3WJ.js} +3 -3
@@ -1,3424 +0,0 @@
1
- import {
2
- CONFIG_PREFIX_SEPARATOR,
3
- NODE_REGION_CONFIG_FILE_OPTIONS,
4
- NODE_REGION_CONFIG_OPTIONS,
5
- SelectorType,
6
- booleanSelector,
7
- loadConfig
8
- } from "./chunk-J64ZDIIX.js";
9
- import {
10
- AlgorithmId,
11
- EndpointURLScheme,
12
- HttpRequest,
13
- HttpResponse,
14
- NormalizedSchema,
15
- SMITHY_CONTEXT_KEY,
16
- getSmithyContext,
17
- hasOwn,
18
- isValidHostLabel,
19
- normalizeProvider,
20
- parseRfc7231DateTime,
21
- toEndpointV1,
22
- v4
23
- } from "./chunk-VRLVLNLG.js";
24
-
25
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js
26
- var getAllAliases = (name, aliases) => {
27
- const _aliases = [];
28
- if (name) {
29
- _aliases.push(name);
30
- }
31
- if (aliases) {
32
- for (const alias of aliases) {
33
- _aliases.push(alias);
34
- }
35
- }
36
- return _aliases;
37
- };
38
- var getMiddlewareNameWithAliases = (name, aliases) => {
39
- return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`;
40
- };
41
- var constructStack = () => {
42
- let absoluteEntries = [];
43
- let relativeEntries = [];
44
- let identifyOnResolve = false;
45
- const entriesNameSet = /* @__PURE__ */ new Set();
46
- const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]);
47
- const removeByName = (toRemove) => {
48
- let isRemoved = false;
49
- const filterCb = (entry) => {
50
- const aliases = getAllAliases(entry.name, entry.aliases);
51
- if (aliases.includes(toRemove)) {
52
- isRemoved = true;
53
- for (const alias of aliases) {
54
- entriesNameSet.delete(alias);
55
- }
56
- return false;
57
- }
58
- return true;
59
- };
60
- absoluteEntries = absoluteEntries.filter(filterCb);
61
- relativeEntries = relativeEntries.filter(filterCb);
62
- return isRemoved;
63
- };
64
- const removeByReference = (toRemove) => {
65
- let isRemoved = false;
66
- const filterCb = (entry) => {
67
- if (entry.middleware === toRemove) {
68
- isRemoved = true;
69
- for (const alias of getAllAliases(entry.name, entry.aliases)) {
70
- entriesNameSet.delete(alias);
71
- }
72
- return false;
73
- }
74
- return true;
75
- };
76
- absoluteEntries = absoluteEntries.filter(filterCb);
77
- relativeEntries = relativeEntries.filter(filterCb);
78
- return isRemoved;
79
- };
80
- const cloneTo = (toStack) => {
81
- absoluteEntries.forEach((entry) => {
82
- toStack.add(entry.middleware, { ...entry });
83
- });
84
- relativeEntries.forEach((entry) => {
85
- toStack.addRelativeTo(entry.middleware, { ...entry });
86
- });
87
- toStack.identifyOnResolve?.(stack.identifyOnResolve());
88
- return toStack;
89
- };
90
- const expandRelativeMiddlewareList = (from) => {
91
- const expandedMiddlewareList = [];
92
- from.before.forEach((entry) => {
93
- if (entry.before.length === 0 && entry.after.length === 0) {
94
- expandedMiddlewareList.push(entry);
95
- } else {
96
- expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
97
- }
98
- });
99
- expandedMiddlewareList.push(from);
100
- from.after.reverse().forEach((entry) => {
101
- if (entry.before.length === 0 && entry.after.length === 0) {
102
- expandedMiddlewareList.push(entry);
103
- } else {
104
- expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
105
- }
106
- });
107
- return expandedMiddlewareList;
108
- };
109
- const getMiddlewareList = (debug = false) => {
110
- const normalizedAbsoluteEntries = [];
111
- const normalizedRelativeEntries = [];
112
- const normalizedEntriesNameMap = {};
113
- absoluteEntries.forEach((entry) => {
114
- const normalizedEntry = {
115
- ...entry,
116
- before: [],
117
- after: []
118
- };
119
- for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
120
- normalizedEntriesNameMap[alias] = normalizedEntry;
121
- }
122
- normalizedAbsoluteEntries.push(normalizedEntry);
123
- });
124
- relativeEntries.forEach((entry) => {
125
- const normalizedEntry = {
126
- ...entry,
127
- before: [],
128
- after: []
129
- };
130
- for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
131
- normalizedEntriesNameMap[alias] = normalizedEntry;
132
- }
133
- normalizedRelativeEntries.push(normalizedEntry);
134
- });
135
- normalizedRelativeEntries.forEach((entry) => {
136
- if (entry.toMiddleware) {
137
- const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
138
- if (toMiddleware === void 0) {
139
- if (debug) {
140
- return;
141
- }
142
- throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`);
143
- }
144
- if (entry.relation === "after") {
145
- toMiddleware.after.push(entry);
146
- }
147
- if (entry.relation === "before") {
148
- toMiddleware.before.push(entry);
149
- }
150
- }
151
- });
152
- const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => {
153
- wholeList.push(...expandedMiddlewareList);
154
- return wholeList;
155
- }, []);
156
- return mainChain;
157
- };
158
- const stack = {
159
- add: (middleware, options = {}) => {
160
- const { name, override, aliases: _aliases } = options;
161
- const entry = {
162
- step: "initialize",
163
- priority: "normal",
164
- middleware,
165
- ...options
166
- };
167
- const aliases = getAllAliases(name, _aliases);
168
- if (aliases.length > 0) {
169
- if (aliases.some((alias) => entriesNameSet.has(alias))) {
170
- if (!override) {
171
- throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
172
- }
173
- for (const alias of aliases) {
174
- const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias));
175
- if (toOverrideIndex === -1) {
176
- continue;
177
- }
178
- const toOverride = absoluteEntries[toOverrideIndex];
179
- if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {
180
- 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.`);
181
- }
182
- absoluteEntries.splice(toOverrideIndex, 1);
183
- }
184
- }
185
- for (const alias of aliases) {
186
- entriesNameSet.add(alias);
187
- }
188
- }
189
- absoluteEntries.push(entry);
190
- },
191
- addRelativeTo: (middleware, options) => {
192
- const { name, override, aliases: _aliases } = options;
193
- const entry = {
194
- middleware,
195
- ...options
196
- };
197
- const aliases = getAllAliases(name, _aliases);
198
- if (aliases.length > 0) {
199
- if (aliases.some((alias) => entriesNameSet.has(alias))) {
200
- if (!override) {
201
- throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
202
- }
203
- for (const alias of aliases) {
204
- const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias));
205
- if (toOverrideIndex === -1) {
206
- continue;
207
- }
208
- const toOverride = relativeEntries[toOverrideIndex];
209
- if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {
210
- 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.`);
211
- }
212
- relativeEntries.splice(toOverrideIndex, 1);
213
- }
214
- }
215
- for (const alias of aliases) {
216
- entriesNameSet.add(alias);
217
- }
218
- }
219
- relativeEntries.push(entry);
220
- },
221
- clone: () => cloneTo(constructStack()),
222
- use: (plugin) => {
223
- plugin.applyToStack(stack);
224
- },
225
- remove: (toRemove) => {
226
- if (typeof toRemove === "string") {
227
- return removeByName(toRemove);
228
- } else {
229
- return removeByReference(toRemove);
230
- }
231
- },
232
- removeByTag: (toRemove) => {
233
- let isRemoved = false;
234
- const filterCb = (entry) => {
235
- const { tags, name, aliases: _aliases } = entry;
236
- if (tags && tags.includes(toRemove)) {
237
- const aliases = getAllAliases(name, _aliases);
238
- for (const alias of aliases) {
239
- entriesNameSet.delete(alias);
240
- }
241
- isRemoved = true;
242
- return false;
243
- }
244
- return true;
245
- };
246
- absoluteEntries = absoluteEntries.filter(filterCb);
247
- relativeEntries = relativeEntries.filter(filterCb);
248
- return isRemoved;
249
- },
250
- concat: (from) => {
251
- const cloned = cloneTo(constructStack());
252
- cloned.use(from);
253
- cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));
254
- return cloned;
255
- },
256
- applyToStack: cloneTo,
257
- identify: () => {
258
- return getMiddlewareList(true).map((mw) => {
259
- const step = mw.step ?? mw.relation + " " + mw.toMiddleware;
260
- return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step;
261
- });
262
- },
263
- identifyOnResolve(toggle) {
264
- if (typeof toggle === "boolean") {
265
- identifyOnResolve = toggle;
266
- }
267
- return identifyOnResolve;
268
- },
269
- resolve: (handler, context) => {
270
- for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
271
- handler = middleware(handler, context);
272
- }
273
- if (identifyOnResolve) {
274
- console.log(stack.identify());
275
- }
276
- return handler;
277
- }
278
- };
279
- return stack;
280
- };
281
- var stepWeights = {
282
- initialize: 5,
283
- serialize: 4,
284
- build: 3,
285
- finalizeRequest: 2,
286
- deserialize: 1
287
- };
288
- var priorityWeights = {
289
- high: 3,
290
- normal: 2,
291
- low: 1
292
- };
293
-
294
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client.js
295
- var Client = class {
296
- config;
297
- middlewareStack = constructStack();
298
- initConfig;
299
- handlers;
300
- constructor(config) {
301
- this.config = config;
302
- const { protocol, protocolSettings } = config;
303
- if (protocolSettings) {
304
- if (typeof protocol === "function") {
305
- config.protocol = new protocol(protocolSettings);
306
- }
307
- }
308
- }
309
- send(command, optionsOrCb, cb) {
310
- const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0;
311
- const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb;
312
- const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true;
313
- let handler;
314
- if (useHandlerCache) {
315
- if (!this.handlers) {
316
- this.handlers = /* @__PURE__ */ new WeakMap();
317
- }
318
- const handlers = this.handlers;
319
- if (handlers.has(command.constructor)) {
320
- handler = handlers.get(command.constructor);
321
- } else {
322
- handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
323
- handlers.set(command.constructor, handler);
324
- }
325
- } else {
326
- delete this.handlers;
327
- handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
328
- }
329
- if (callback) {
330
- handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => {
331
- });
332
- } else {
333
- return handler(command).then((result) => result.output);
334
- }
335
- }
336
- destroy() {
337
- this.config?.requestHandler?.destroy?.();
338
- delete this.handlers;
339
- }
340
- };
341
-
342
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js
343
- var SENSITIVE_STRING = "***SensitiveInformation***";
344
- function schemaLogFilter(schema, data) {
345
- if (data == null) {
346
- return data;
347
- }
348
- const ns = NormalizedSchema.of(schema);
349
- if (ns.getMergedTraits().sensitive) {
350
- return SENSITIVE_STRING;
351
- }
352
- if (ns.isListSchema()) {
353
- const valueSchema = ns.getValueSchema();
354
- if (valueSchema.getMergedTraits().sensitive) {
355
- return SENSITIVE_STRING;
356
- }
357
- if (Array.isArray(data)) {
358
- return data.map((value) => schemaLogFilter(valueSchema, value));
359
- }
360
- } else if (ns.isMapSchema()) {
361
- const valueSchema = ns.getValueSchema();
362
- if (ns.getKeySchema().getMergedTraits().sensitive || valueSchema.getMergedTraits().sensitive) {
363
- return SENSITIVE_STRING;
364
- }
365
- if (typeof data === "object") {
366
- return Object.fromEntries(Object.entries(data).map(([key, value]) => [key, schemaLogFilter(valueSchema, value)]));
367
- }
368
- } else if (ns.isStructSchema() && typeof data === "object") {
369
- const object = data;
370
- const newObject = {};
371
- for (const [member, memberNs] of ns.structIterator()) {
372
- if (object[member] != null) {
373
- newObject[member] = schemaLogFilter(memberNs, object[member]);
374
- }
375
- }
376
- return newObject;
377
- }
378
- return data;
379
- }
380
-
381
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js
382
- var operationEventStreamMarker = /* @__PURE__ */ Symbol.for("@smithy/op-event-stream");
383
- var Command = class {
384
- middlewareStack = constructStack();
385
- schema;
386
- static classBuilder() {
387
- return new ClassBuilder();
388
- }
389
- resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) {
390
- for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {
391
- this.middlewareStack.use(mw);
392
- }
393
- const stack = clientStack.concat(this.middlewareStack);
394
- const { logger } = configuration;
395
- const additionalSmithyContext = additionalContext[SMITHY_CONTEXT_KEY];
396
- const handlerExecutionContext = {
397
- logger,
398
- clientName,
399
- commandName,
400
- inputFilterSensitiveLog,
401
- outputFilterSensitiveLog,
402
- ...additionalContext,
403
- [SMITHY_CONTEXT_KEY]: {
404
- ...additionalSmithyContext,
405
- commandInstance: this,
406
- ...smithyContext,
407
- ...options?.metricsRecorder === void 0 ? {} : { metricsRecorder: options.metricsRecorder },
408
- ...options?.abortSignal === void 0 ? {} : { abortSignal: options.abortSignal }
409
- }
410
- };
411
- const { requestHandler } = configuration;
412
- let requestOptions = options ?? {};
413
- if (requestOptions.metricsRecorder) {
414
- requestOptions = { ...requestOptions };
415
- delete requestOptions.metricsRecorder;
416
- }
417
- let isEventStream;
418
- const schema = this.schema;
419
- const marker = schema?.[operationEventStreamMarker];
420
- if (marker !== void 0) {
421
- isEventStream = marker;
422
- } else if (schema) {
423
- if (Array.isArray(schema) && schema[0] === 9) {
424
- const [, , , , input$, output$] = schema;
425
- isEventStream = schema[operationEventStreamMarker] = Boolean(NormalizedSchema.of(input$).getEventStreamMember() || NormalizedSchema.of(output$).getEventStreamMember());
426
- }
427
- }
428
- if (isEventStream) {
429
- requestOptions = {
430
- isEventStream,
431
- ...requestOptions
432
- };
433
- }
434
- return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext);
435
- }
436
- };
437
- var ClassBuilder = class {
438
- _init = () => {
439
- };
440
- _ep = {};
441
- _middlewareFn = () => [];
442
- _commandName = "";
443
- _clientName = "";
444
- _additionalContext = {};
445
- _smithyContext = {};
446
- _inputFilterSensitiveLog = void 0;
447
- _outputFilterSensitiveLog = void 0;
448
- _serializer = null;
449
- _deserializer = null;
450
- _operationSchema;
451
- init(cb) {
452
- this._init = cb;
453
- }
454
- ep(endpointParameterInstructions) {
455
- this._ep = endpointParameterInstructions;
456
- return this;
457
- }
458
- m(middlewareSupplier) {
459
- this._middlewareFn = middlewareSupplier;
460
- return this;
461
- }
462
- s(service, operation, smithyContext = {}) {
463
- this._smithyContext = {
464
- service,
465
- operation,
466
- ...smithyContext
467
- };
468
- return this;
469
- }
470
- c(additionalContext = {}) {
471
- this._additionalContext = additionalContext;
472
- return this;
473
- }
474
- n(clientName, commandName) {
475
- this._clientName = clientName;
476
- this._commandName = commandName;
477
- return this;
478
- }
479
- f(inputFilter = (_) => _, outputFilter = (_) => _) {
480
- this._inputFilterSensitiveLog = inputFilter;
481
- this._outputFilterSensitiveLog = outputFilter;
482
- return this;
483
- }
484
- ser(serializer) {
485
- this._serializer = serializer;
486
- return this;
487
- }
488
- de(deserializer) {
489
- this._deserializer = deserializer;
490
- return this;
491
- }
492
- sc(operation) {
493
- this._operationSchema = operation;
494
- this._smithyContext.operationSchema = operation;
495
- return this;
496
- }
497
- build() {
498
- const closure = this;
499
- let CommandRef;
500
- return CommandRef = class extends Command {
501
- input;
502
- static getEndpointParameterInstructions() {
503
- return closure._ep;
504
- }
505
- constructor(...[input]) {
506
- super();
507
- this.input = input ?? {};
508
- closure._init(this);
509
- this.schema = closure._operationSchema;
510
- }
511
- resolveMiddleware(stack, configuration, options) {
512
- const op = closure._operationSchema;
513
- const input = op?.[4] ?? op?.input;
514
- const output = op?.[5] ?? op?.output;
515
- return this.resolveMiddlewareWithContext(stack, configuration, options, {
516
- CommandCtor: CommandRef,
517
- middlewareFn: closure._middlewareFn,
518
- clientName: closure._clientName,
519
- commandName: closure._commandName,
520
- inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _),
521
- outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _),
522
- smithyContext: closure._smithyContext,
523
- additionalContext: closure._additionalContext
524
- });
525
- }
526
- serialize = closure._serializer;
527
- deserialize = closure._deserializer;
528
- };
529
- }
530
- };
531
-
532
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js
533
- var createAggregatedClient = (commands, Client2, options) => {
534
- for (const [command, CommandCtor] of Object.entries(commands)) {
535
- const methodImpl = async function(args, optionsOrCb, cb) {
536
- const command2 = new CommandCtor(args);
537
- if (typeof optionsOrCb === "function") {
538
- this.send(command2, optionsOrCb);
539
- } else if (typeof cb === "function") {
540
- if (typeof optionsOrCb !== "object") {
541
- throw new Error(`Expected http options but got ${typeof optionsOrCb}`);
542
- }
543
- this.send(command2, optionsOrCb || {}, cb);
544
- } else {
545
- return this.send(command2, optionsOrCb);
546
- }
547
- };
548
- const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, "");
549
- Client2.prototype[methodName] = methodImpl;
550
- }
551
- const { paginators = {}, waiters = {} } = options ?? {};
552
- for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {
553
- if (Client2.prototype[paginatorName] === void 0) {
554
- Client2.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) {
555
- return paginatorFn({
556
- ...paginationConfiguration,
557
- client: this
558
- }, commandInput, ...rest);
559
- };
560
- }
561
- }
562
- for (const [waiterName, waiterFn] of Object.entries(waiters)) {
563
- if (Client2.prototype[waiterName] === void 0) {
564
- Client2.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) {
565
- let config = waiterConfiguration;
566
- if (typeof waiterConfiguration === "number") {
567
- config = {
568
- maxWaitTime: waiterConfiguration
569
- };
570
- }
571
- return waiterFn({
572
- ...config,
573
- client: this
574
- }, commandInput, ...rest);
575
- };
576
- }
577
- }
578
- };
579
-
580
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js
581
- var ServiceException = class _ServiceException extends Error {
582
- static shapeId = "smithy.ts.sdk.synthetic.nonamespace.client#ServiceException";
583
- $fault;
584
- $response;
585
- $retryable;
586
- $metadata;
587
- constructor(options) {
588
- super(options.message);
589
- Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);
590
- this.name = options.name;
591
- this.$fault = options.$fault;
592
- this.$metadata = options.$metadata;
593
- }
594
- static isInstance(value) {
595
- if (!value) {
596
- return false;
597
- }
598
- const candidate = value;
599
- return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server");
600
- }
601
- static [Symbol.hasInstance](instance) {
602
- if (!instance) {
603
- return false;
604
- }
605
- const candidate = instance;
606
- if (this === _ServiceException) {
607
- return _ServiceException.isInstance(instance);
608
- }
609
- if (_ServiceException.isInstance(instance)) {
610
- if (this.prototype.isPrototypeOf(instance)) {
611
- return true;
612
- }
613
- const targetId = Object.prototype.hasOwnProperty.call(this, "shapeId") ? this.shapeId : void 0;
614
- let candidateHasShapeId = false;
615
- if (targetId) {
616
- let proto = Object.getPrototypeOf(candidate);
617
- while (proto && proto !== Object.prototype) {
618
- const ctor = proto.constructor;
619
- const candidateId = ctor !== _ServiceException && Object.prototype.hasOwnProperty.call(ctor, "shapeId") ? ctor?.shapeId : void 0;
620
- if (candidateId) {
621
- candidateHasShapeId = true;
622
- if (candidateId === targetId) {
623
- return true;
624
- }
625
- }
626
- proto = Object.getPrototypeOf(proto);
627
- }
628
- }
629
- if (targetId && candidateHasShapeId) {
630
- return false;
631
- }
632
- const targetName = this.name;
633
- if (targetName && targetName.length >= 6) {
634
- if (candidate.name === targetName) {
635
- return true;
636
- }
637
- let proto = Object.getPrototypeOf(candidate);
638
- while (proto && proto !== Object.prototype) {
639
- const ctorName = proto.constructor?.name;
640
- if (ctorName && ctorName !== "Error" && ctorName === targetName) {
641
- return true;
642
- }
643
- proto = Object.getPrototypeOf(proto);
644
- }
645
- }
646
- }
647
- return false;
648
- }
649
- };
650
- var decorateServiceException = (exception, additions = {}) => {
651
- Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => {
652
- if (exception[k] == void 0 || exception[k] === "") {
653
- exception[k] = v;
654
- }
655
- });
656
- const message = exception.message || exception.Message || "UnknownError";
657
- exception.message = message;
658
- delete exception.Message;
659
- return exception;
660
- };
661
-
662
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js
663
- var loadConfigsForDefaultMode = (mode) => {
664
- switch (mode) {
665
- case "standard":
666
- return {
667
- retryMode: "standard",
668
- connectionTimeout: 3100
669
- };
670
- case "in-region":
671
- return {
672
- retryMode: "standard",
673
- connectionTimeout: 1100
674
- };
675
- case "cross-region":
676
- return {
677
- retryMode: "standard",
678
- connectionTimeout: 3100
679
- };
680
- case "mobile":
681
- return {
682
- retryMode: "standard",
683
- connectionTimeout: 3e4
684
- };
685
- default:
686
- return {};
687
- }
688
- };
689
-
690
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js
691
- var warningEmitted = false;
692
- var emitWarningIfUnsupportedVersion = (version) => {
693
- if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) {
694
- warningEmitted = true;
695
- }
696
- };
697
-
698
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js
699
- var knownAlgorithms = Object.values(AlgorithmId);
700
- var getChecksumConfiguration = (runtimeConfig) => {
701
- const checksumAlgorithms = [];
702
- for (const id in AlgorithmId) {
703
- if (!hasOwn(AlgorithmId, id)) {
704
- continue;
705
- }
706
- const algorithmId = AlgorithmId[id];
707
- if (runtimeConfig[algorithmId] === void 0) {
708
- continue;
709
- }
710
- checksumAlgorithms.push({
711
- algorithmId: () => algorithmId,
712
- checksumConstructor: () => runtimeConfig[algorithmId]
713
- });
714
- }
715
- for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) {
716
- checksumAlgorithms.push({
717
- algorithmId: () => id,
718
- checksumConstructor: () => ChecksumCtor
719
- });
720
- }
721
- return {
722
- addChecksumAlgorithm(algo) {
723
- runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {};
724
- const id = algo.algorithmId();
725
- const ctor = algo.checksumConstructor();
726
- if (knownAlgorithms.includes(id)) {
727
- runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor;
728
- } else {
729
- runtimeConfig.checksumAlgorithms[id] = ctor;
730
- }
731
- checksumAlgorithms.push(algo);
732
- },
733
- checksumAlgorithms() {
734
- return checksumAlgorithms;
735
- }
736
- };
737
- };
738
- var resolveChecksumRuntimeConfig = (clientConfig) => {
739
- const runtimeConfig = {};
740
- clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
741
- const id = checksumAlgorithm.algorithmId();
742
- if (knownAlgorithms.includes(id)) {
743
- runtimeConfig[id] = checksumAlgorithm.checksumConstructor();
744
- }
745
- });
746
- return runtimeConfig;
747
- };
748
-
749
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js
750
- var getRetryConfiguration = (runtimeConfig) => {
751
- return {
752
- setRetryStrategy(retryStrategy) {
753
- runtimeConfig.retryStrategy = retryStrategy;
754
- },
755
- retryStrategy() {
756
- return runtimeConfig.retryStrategy;
757
- }
758
- };
759
- };
760
- var resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {
761
- const runtimeConfig = {};
762
- runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
763
- return runtimeConfig;
764
- };
765
-
766
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js
767
- var getDefaultExtensionConfiguration = (runtimeConfig) => {
768
- return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));
769
- };
770
- var resolveDefaultRuntimeConfig = (config) => {
771
- return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));
772
- };
773
-
774
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js
775
- var getValueFromTextNode = (obj) => {
776
- const textNodeName = "#text";
777
- for (const key in obj) {
778
- if (!hasOwn(obj, key)) {
779
- continue;
780
- }
781
- if (obj[key][textNodeName] !== void 0) {
782
- obj[key] = obj[key][textNodeName];
783
- } else if (typeof obj[key] === "object" && obj[key] !== null) {
784
- obj[key] = getValueFromTextNode(obj[key]);
785
- }
786
- }
787
- return obj;
788
- };
789
-
790
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js
791
- var NoOpLogger = class {
792
- trace() {
793
- }
794
- debug() {
795
- }
796
- info() {
797
- }
798
- warn() {
799
- }
800
- error() {
801
- }
802
- };
803
-
804
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client-command-builder.js
805
- function makeBuilder(common, service, name, ep) {
806
- return function makeCommand(added, plugins, op, $, smithyContext = {}) {
807
- const epMerged = Object.assign({}, common, added);
808
- return Command.classBuilder().ep(epMerged).m(function(CommandCtor, clientStack, config, options) {
809
- const list = plugins.call(this, CommandCtor, clientStack, config, options);
810
- list.unshift(ep(config, CommandCtor.getEndpointParameterInstructions()));
811
- return list;
812
- }).s(service, op, smithyContext).n(name, op.charAt(0).toUpperCase() + op.slice(1) + "Command").sc($).build();
813
- };
814
- }
815
-
816
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js
817
- function setCredentialFeature(credentials, feature, value) {
818
- if (!credentials.$source) {
819
- credentials.$source = {};
820
- }
821
- credentials.$source[feature] = value;
822
- return credentials;
823
- }
824
-
825
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js
826
- var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
827
- var CONFIG_ENDPOINT_URL = "endpoint_url";
828
- var getEndpointUrlConfig = (serviceId) => ({
829
- environmentVariableSelector: (env2) => {
830
- const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase());
831
- const serviceEndpointUrl = env2[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
832
- if (serviceEndpointUrl) {
833
- return serviceEndpointUrl;
834
- }
835
- const endpointUrl = env2[ENV_ENDPOINT_URL];
836
- if (endpointUrl) {
837
- return endpointUrl;
838
- }
839
- return void 0;
840
- },
841
- configFileSelector: (profile, config) => {
842
- if (profile.services) {
843
- const servicesSectionKey = ["services", profile.services].join(CONFIG_PREFIX_SEPARATOR);
844
- if (!config || !config[servicesSectionKey]) {
845
- throw new Error(`The services section "${profile.services}" specified in the profile is not present in the shared configuration file.`);
846
- }
847
- const servicesSection = config[servicesSectionKey];
848
- const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase());
849
- const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(CONFIG_PREFIX_SEPARATOR)];
850
- if (endpointUrl2) {
851
- return endpointUrl2;
852
- }
853
- }
854
- const endpointUrl = profile[CONFIG_ENDPOINT_URL];
855
- if (endpointUrl) {
856
- return endpointUrl;
857
- }
858
- return void 0;
859
- },
860
- default: void 0
861
- });
862
-
863
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getIgnoreConfiguredEndpointUrls.js
864
- var ENV_IGNORE_CONFIGURED_ENDPOINT_URLS = "AWS_IGNORE_CONFIGURED_ENDPOINT_URLS";
865
- var CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS = "ignore_configured_endpoint_urls";
866
- var ignoreConfiguredEndpointUrlsConfigSelectors = {
867
- environmentVariableSelector: (env2) => booleanSelector(env2, ENV_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.ENV),
868
- configFileSelector: (profile) => booleanSelector(profile, CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.CONFIG),
869
- default: false
870
- };
871
-
872
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromConfig.js
873
- var getEndpointFromConfig = async (serviceId) => {
874
- const ignore = await loadConfig(ignoreConfiguredEndpointUrlsConfigSelectors)();
875
- if (ignore) {
876
- return void 0;
877
- }
878
- return loadConfig(getEndpointUrlConfig(serviceId ?? ""))();
879
- };
880
-
881
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/s3.js
882
- var resolveParamsForS3 = async (endpointParams) => {
883
- const bucket = endpointParams?.Bucket || "";
884
- if (typeof endpointParams.Bucket === "string") {
885
- endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?"));
886
- }
887
- if (isArnBucketName(bucket)) {
888
- if (endpointParams.ForcePathStyle === true) {
889
- throw new Error("Path-style addressing cannot be used with ARN buckets");
890
- }
891
- } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) {
892
- endpointParams.ForcePathStyle = true;
893
- }
894
- if (endpointParams.DisableMultiRegionAccessPoints) {
895
- endpointParams.disableMultiRegionAccessPoints = true;
896
- endpointParams.DisableMRAP = true;
897
- }
898
- return endpointParams;
899
- };
900
- var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;
901
- var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
902
- var DOTS_PATTERN = /\.\./;
903
- var isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);
904
- var isArnBucketName = (bucketName) => {
905
- const [arn, partition2, service, , , bucket] = bucketName.split(":");
906
- const isArn = arn === "arn" && bucketName.split(":").length >= 6;
907
- const isValidArn = Boolean(isArn && partition2 && service && bucket);
908
- if (isArn && !isValidArn) {
909
- throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
910
- }
911
- return isValidArn;
912
- };
913
-
914
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/createConfigValueProvider.js
915
- var createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {
916
- const configProvider = async () => {
917
- let configValue;
918
- if (isClientContextParam) {
919
- const clientContextParams = config.clientContextParams;
920
- const nestedValue = clientContextParams?.[configKey];
921
- configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];
922
- } else {
923
- configValue = config[configKey] ?? config[canonicalEndpointParamKey];
924
- }
925
- if (typeof configValue === "function") {
926
- return configValue();
927
- }
928
- return configValue;
929
- };
930
- if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") {
931
- return async () => {
932
- const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
933
- const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;
934
- return configValue;
935
- };
936
- }
937
- if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") {
938
- return async () => {
939
- const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
940
- const configValue = credentials?.accountId ?? credentials?.AccountId;
941
- return configValue;
942
- };
943
- }
944
- if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") {
945
- return async () => {
946
- if (config.isCustomEndpoint === false) {
947
- return void 0;
948
- }
949
- const endpoint = await configProvider();
950
- if (endpoint && typeof endpoint === "object") {
951
- if ("url" in endpoint) {
952
- return endpoint.url.href;
953
- }
954
- if ("hostname" in endpoint) {
955
- const { protocol, hostname, port, path } = endpoint;
956
- return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`;
957
- }
958
- }
959
- return endpoint;
960
- };
961
- }
962
- return configProvider;
963
- };
964
-
965
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromInstructions.js
966
- function bindGetEndpointFromInstructions(getEndpointFromConfig2) {
967
- return async (commandInput, instructionsSupplier, clientConfig, context) => {
968
- if (!clientConfig.isCustomEndpoint && !clientConfig.ignoreConfiguredEndpointUrls) {
969
- let endpointFromConfig;
970
- if (clientConfig.serviceConfiguredEndpoint) {
971
- endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
972
- } else {
973
- endpointFromConfig = await getEndpointFromConfig2(clientConfig.serviceId);
974
- }
975
- if (endpointFromConfig) {
976
- clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
977
- clientConfig.isCustomEndpoint = true;
978
- context?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${endpointFromConfig}`);
979
- }
980
- }
981
- const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);
982
- if (typeof clientConfig.endpointProvider !== "function") {
983
- throw new Error("config.endpointProvider is not set.");
984
- }
985
- const endpoint = clientConfig.endpointProvider(endpointParams, context);
986
- if (clientConfig.isCustomEndpoint && clientConfig.endpoint) {
987
- const customEndpoint = await clientConfig.endpoint();
988
- if (customEndpoint?.headers) {
989
- endpoint.headers ??= {};
990
- for (const [name, value] of Object.entries(customEndpoint.headers)) {
991
- endpoint.headers[name] = Array.isArray(value) ? value : [value];
992
- }
993
- }
994
- }
995
- return endpoint;
996
- };
997
- }
998
- var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
999
- const endpointParams = {};
1000
- const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};
1001
- for (const [name, instruction] of Object.entries(instructions)) {
1002
- switch (instruction.type) {
1003
- case "staticContextParams":
1004
- endpointParams[name] = instruction.value;
1005
- break;
1006
- case "contextParams":
1007
- endpointParams[name] = commandInput[instruction.name];
1008
- break;
1009
- case "clientContextParams":
1010
- case "builtInParams":
1011
- endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")();
1012
- break;
1013
- case "operationContextParams":
1014
- endpointParams[name] = instruction.get(commandInput);
1015
- break;
1016
- default:
1017
- throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction));
1018
- }
1019
- }
1020
- if (Object.keys(instructions).length === 0) {
1021
- Object.assign(endpointParams, clientConfig);
1022
- }
1023
- if (String(clientConfig.serviceId).toLowerCase() === "s3") {
1024
- await resolveParamsForS3(endpointParams);
1025
- }
1026
- return endpointParams;
1027
- };
1028
-
1029
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js
1030
- function setFeature(context, feature, value) {
1031
- if (!context.__smithy_context) {
1032
- context.__smithy_context = { features: {} };
1033
- } else if (!context.__smithy_context.features) {
1034
- context.__smithy_context.features = {};
1035
- }
1036
- context.__smithy_context.features[feature] = value;
1037
- }
1038
- function bindEndpointMiddleware(getEndpointFromConfig2) {
1039
- const getEndpointFromInstructions2 = bindGetEndpointFromInstructions(getEndpointFromConfig2);
1040
- return ({ config, instructions }) => {
1041
- return (next, context) => async (args) => {
1042
- if (config.isCustomEndpoint) {
1043
- setFeature(context, "ENDPOINT_OVERRIDE", "N");
1044
- }
1045
- const endpoint = await getEndpointFromInstructions2(args.input, {
1046
- getEndpointParameterInstructions() {
1047
- return instructions;
1048
- }
1049
- }, { ...config }, context);
1050
- context.endpointV2 = endpoint;
1051
- context.authSchemes = endpoint.properties?.authSchemes;
1052
- const authScheme = context.authSchemes?.[0];
1053
- if (authScheme) {
1054
- context["signing_region"] = authScheme.signingRegion;
1055
- context["signing_service"] = authScheme.signingName;
1056
- const smithyContext = getSmithyContext(context);
1057
- const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
1058
- if (httpAuthOption) {
1059
- httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
1060
- signing_region: authScheme.signingRegion,
1061
- signingRegion: authScheme.signingRegion,
1062
- signing_service: authScheme.signingName,
1063
- signingName: authScheme.signingName,
1064
- signingRegionSet: authScheme.signingRegionSet
1065
- }, authScheme.properties);
1066
- }
1067
- }
1068
- return next({
1069
- ...args
1070
- });
1071
- };
1072
- };
1073
- }
1074
-
1075
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js
1076
- var serializerMiddlewareOption = {
1077
- name: "serializerMiddleware",
1078
- step: "serialize",
1079
- tags: ["SERIALIZER"],
1080
- override: true
1081
- };
1082
- var endpointMiddlewareOptions = {
1083
- step: "serialize",
1084
- tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"],
1085
- name: "endpointV2Middleware",
1086
- override: true,
1087
- relation: "before",
1088
- toMiddleware: serializerMiddlewareOption.name
1089
- };
1090
- function bindGetEndpointPlugin(getEndpointFromConfig2) {
1091
- const endpointMiddleware2 = bindEndpointMiddleware(getEndpointFromConfig2);
1092
- return (config, instructions) => ({
1093
- applyToStack: (clientStack) => {
1094
- clientStack.addRelativeTo(endpointMiddleware2({
1095
- config,
1096
- instructions
1097
- }), endpointMiddlewareOptions);
1098
- }
1099
- });
1100
- }
1101
-
1102
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js
1103
- function bindResolveEndpointConfig(getEndpointFromConfig2) {
1104
- return (input) => {
1105
- const tls = input.tls ?? true;
1106
- const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;
1107
- const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : void 0;
1108
- const isCustomEndpoint = !!endpoint;
1109
- const resolvedConfig = Object.assign(input, {
1110
- endpoint: customEndpointProvider,
1111
- tls,
1112
- isCustomEndpoint,
1113
- useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),
1114
- useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false),
1115
- ignoreConfiguredEndpointUrls: !!input.ignoreConfiguredEndpointUrls
1116
- });
1117
- let configuredEndpointPromise = void 0;
1118
- resolvedConfig.serviceConfiguredEndpoint = async () => {
1119
- if (input.serviceId && !configuredEndpointPromise) {
1120
- configuredEndpointPromise = getEndpointFromConfig2(input.serviceId);
1121
- }
1122
- return configuredEndpointPromise;
1123
- };
1124
- return resolvedConfig;
1125
- };
1126
- }
1127
-
1128
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/bdd/BinaryDecisionDiagram.js
1129
- var BinaryDecisionDiagram = class _BinaryDecisionDiagram {
1130
- nodes;
1131
- root;
1132
- conditions;
1133
- results;
1134
- constructor(bdd, root, conditions, results) {
1135
- this.nodes = bdd;
1136
- this.root = root;
1137
- this.conditions = conditions;
1138
- this.results = results;
1139
- }
1140
- static from(bdd, root, conditions, results) {
1141
- return new _BinaryDecisionDiagram(bdd, root, conditions, results);
1142
- }
1143
- };
1144
-
1145
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js
1146
- var EndpointCache = class {
1147
- capacity;
1148
- data = /* @__PURE__ */ new Map();
1149
- parameters = [];
1150
- constructor({ size, params }) {
1151
- this.capacity = size ?? 50;
1152
- if (params) {
1153
- this.parameters = params;
1154
- }
1155
- }
1156
- get(endpointParams, resolver) {
1157
- const key = this.hash(endpointParams);
1158
- if (key === false) {
1159
- return resolver();
1160
- }
1161
- if (!this.data.has(key)) {
1162
- if (this.data.size > this.capacity + 10) {
1163
- const keys = this.data.keys();
1164
- let i = 0;
1165
- while (true) {
1166
- const { value, done } = keys.next();
1167
- this.data.delete(value);
1168
- if (done || ++i > 10) {
1169
- break;
1170
- }
1171
- }
1172
- }
1173
- this.data.set(key, resolver());
1174
- }
1175
- return this.data.get(key);
1176
- }
1177
- size() {
1178
- return this.data.size;
1179
- }
1180
- hash(endpointParams) {
1181
- let buffer = "";
1182
- const { parameters } = this;
1183
- if (parameters.length === 0) {
1184
- return false;
1185
- }
1186
- for (const param of parameters) {
1187
- const raw = endpointParams[param];
1188
- const val = raw == null ? "\0" : String(raw);
1189
- if (val.includes("|;")) {
1190
- return false;
1191
- }
1192
- buffer += val + "|;";
1193
- }
1194
- return buffer;
1195
- }
1196
- };
1197
-
1198
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointError.js
1199
- var EndpointError = class extends Error {
1200
- constructor(message) {
1201
- super(message);
1202
- this.name = "EndpointError";
1203
- }
1204
- };
1205
-
1206
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/debugId.js
1207
- var debugId = "endpoints";
1208
-
1209
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/toDebugString.js
1210
- function toDebugString(input) {
1211
- if (typeof input !== "object" || input == null) {
1212
- return input;
1213
- }
1214
- if ("ref" in input) {
1215
- return `$${toDebugString(input.ref)}`;
1216
- }
1217
- if ("fn" in input) {
1218
- return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`;
1219
- }
1220
- return JSON.stringify(input, null, 2);
1221
- }
1222
-
1223
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/customEndpointFunctions.js
1224
- var customEndpointFunctions = {};
1225
-
1226
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/booleanEquals.js
1227
- var booleanEquals = (value1, value2) => value1 === value2;
1228
-
1229
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/coalesce.js
1230
- function coalesce(...args) {
1231
- for (const arg of args) {
1232
- if (arg != null) {
1233
- return arg;
1234
- }
1235
- }
1236
- return void 0;
1237
- }
1238
-
1239
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js
1240
- var getAttrPathList = (path) => {
1241
- const parts = path.split(".");
1242
- const pathList = [];
1243
- for (const part of parts) {
1244
- const squareBracketIndex = part.indexOf("[");
1245
- if (squareBracketIndex !== -1) {
1246
- if (part.indexOf("]") !== part.length - 1) {
1247
- throw new EndpointError(`Path: '${path}' does not end with ']'`);
1248
- }
1249
- const arrayIndex = part.slice(squareBracketIndex + 1, -1);
1250
- if (Number.isNaN(parseInt(arrayIndex))) {
1251
- throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);
1252
- }
1253
- if (squareBracketIndex !== 0) {
1254
- pathList.push(part.slice(0, squareBracketIndex));
1255
- }
1256
- pathList.push(arrayIndex);
1257
- } else {
1258
- pathList.push(part);
1259
- }
1260
- }
1261
- return pathList;
1262
- };
1263
-
1264
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js
1265
- var getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {
1266
- if (typeof acc !== "object") {
1267
- throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);
1268
- } else if (Array.isArray(acc)) {
1269
- const i = parseInt(index);
1270
- return acc[i < 0 ? acc.length + i : i];
1271
- }
1272
- return acc[index];
1273
- }, value);
1274
-
1275
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isSet.js
1276
- var isSet = (value) => value != null;
1277
-
1278
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/ite.js
1279
- function ite(condition, trueValue, falseValue) {
1280
- return condition ? trueValue : falseValue;
1281
- }
1282
-
1283
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/not.js
1284
- var not = (value) => !value;
1285
-
1286
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isIpAddress.js
1287
- 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}$`);
1288
- var isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]");
1289
-
1290
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js
1291
- var DEFAULT_PORTS = {
1292
- [EndpointURLScheme.HTTP]: 80,
1293
- [EndpointURLScheme.HTTPS]: 443
1294
- };
1295
- var parseURL = (value) => {
1296
- const whatwgURL = (() => {
1297
- try {
1298
- if (value instanceof URL) {
1299
- return value;
1300
- }
1301
- if (typeof value === "object" && "hostname" in value) {
1302
- const { hostname: hostname2, port, protocol: protocol2 = "", path = "", query = {} } = value;
1303
- const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path}`);
1304
- url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&");
1305
- return url;
1306
- }
1307
- return new URL(value);
1308
- } catch (ignored) {
1309
- return null;
1310
- }
1311
- })();
1312
- if (!whatwgURL) {
1313
- console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);
1314
- return null;
1315
- }
1316
- const urlString = whatwgURL.href;
1317
- const { host, hostname, pathname, protocol, search } = whatwgURL;
1318
- if (search) {
1319
- return null;
1320
- }
1321
- const scheme = protocol.slice(0, -1);
1322
- if (!Object.values(EndpointURLScheme).includes(scheme)) {
1323
- return null;
1324
- }
1325
- const isIp = isIpAddress(hostname);
1326
- const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);
1327
- const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;
1328
- return {
1329
- scheme,
1330
- authority,
1331
- path: pathname,
1332
- normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`,
1333
- isIp
1334
- };
1335
- };
1336
-
1337
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/split.js
1338
- function split(value, delimiter, limit) {
1339
- if (limit === 1) {
1340
- return [value];
1341
- }
1342
- if (value === "") {
1343
- return [""];
1344
- }
1345
- const parts = value.split(delimiter);
1346
- if (limit === 0) {
1347
- return parts;
1348
- }
1349
- return parts.slice(0, limit - 1).concat(parts.slice(1).join(delimiter));
1350
- }
1351
-
1352
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/stringEquals.js
1353
- var stringEquals = (value1, value2) => value1 === value2;
1354
-
1355
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/substring.js
1356
- var substring = (input, start, stop, reverse) => {
1357
- if (input == null || start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) {
1358
- return null;
1359
- }
1360
- if (!reverse) {
1361
- return input.substring(start, stop);
1362
- }
1363
- return input.substring(input.length - stop, input.length - start);
1364
- };
1365
-
1366
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/uriEncode.js
1367
- var uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
1368
-
1369
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/endpointFunctions.js
1370
- var endpointFunctions = {
1371
- booleanEquals,
1372
- coalesce,
1373
- getAttr,
1374
- isSet,
1375
- isValidHostLabel,
1376
- ite,
1377
- not,
1378
- parseURL,
1379
- split,
1380
- stringEquals,
1381
- substring,
1382
- uriEncode
1383
- };
1384
-
1385
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateTemplate.js
1386
- var evaluateTemplate = (template, options) => {
1387
- const evaluatedTemplateArr = [];
1388
- const { referenceRecord, endpointParams } = options;
1389
- let currentIndex = 0;
1390
- while (currentIndex < template.length) {
1391
- const openingBraceIndex = template.indexOf("{", currentIndex);
1392
- if (openingBraceIndex === -1) {
1393
- evaluatedTemplateArr.push(template.slice(currentIndex));
1394
- break;
1395
- }
1396
- evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));
1397
- const closingBraceIndex = template.indexOf("}", openingBraceIndex);
1398
- if (closingBraceIndex === -1) {
1399
- evaluatedTemplateArr.push(template.slice(openingBraceIndex));
1400
- break;
1401
- }
1402
- if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") {
1403
- evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));
1404
- currentIndex = closingBraceIndex + 2;
1405
- }
1406
- const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);
1407
- if (parameterName.includes("#")) {
1408
- const [refName, attrName] = parameterName.split("#");
1409
- evaluatedTemplateArr.push(getAttr(referenceRecord[refName] ?? endpointParams[refName], attrName));
1410
- } else {
1411
- evaluatedTemplateArr.push(referenceRecord[parameterName] ?? endpointParams[parameterName]);
1412
- }
1413
- currentIndex = closingBraceIndex + 1;
1414
- }
1415
- return evaluatedTemplateArr.join("");
1416
- };
1417
-
1418
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getReferenceValue.js
1419
- var getReferenceValue = ({ ref }, options) => {
1420
- return options.referenceRecord[ref] ?? options.endpointParams[ref];
1421
- };
1422
-
1423
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateExpression.js
1424
- var evaluateExpression = (obj, keyName, options) => {
1425
- if (typeof obj === "string") {
1426
- return evaluateTemplate(obj, options);
1427
- } else if (obj["fn"]) {
1428
- return group.callFunction(obj, options);
1429
- } else if (obj["ref"]) {
1430
- return getReferenceValue(obj, options);
1431
- }
1432
- throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
1433
- };
1434
- var callFunction = ({ fn, argv }, options) => {
1435
- const evaluatedArgs = Array(argv.length);
1436
- for (let i = 0; i < evaluatedArgs.length; ++i) {
1437
- const arg = argv[i];
1438
- if (typeof arg === "boolean" || typeof arg === "number") {
1439
- evaluatedArgs[i] = arg;
1440
- } else {
1441
- evaluatedArgs[i] = group.evaluateExpression(arg, "arg", options);
1442
- }
1443
- }
1444
- const namespaceSeparatorIndex = fn.indexOf(".");
1445
- if (namespaceSeparatorIndex !== -1) {
1446
- const namespaceFunctions = customEndpointFunctions[fn.slice(0, namespaceSeparatorIndex)];
1447
- const customFunction = namespaceFunctions?.[fn.slice(namespaceSeparatorIndex + 1)];
1448
- if (typeof customFunction === "function") {
1449
- return customFunction(...evaluatedArgs);
1450
- }
1451
- }
1452
- const callable = endpointFunctions[fn];
1453
- if (typeof callable === "function") {
1454
- return callable(...evaluatedArgs);
1455
- }
1456
- throw new Error(`function ${fn} not loaded in endpointFunctions.`);
1457
- };
1458
- var group = {
1459
- evaluateExpression,
1460
- callFunction
1461
- };
1462
-
1463
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateCondition.js
1464
- var evaluateCondition = (condition, options) => {
1465
- const { assign } = condition;
1466
- if (assign && assign in options.referenceRecord) {
1467
- throw new EndpointError(`'${assign}' is already defined in Reference Record.`);
1468
- }
1469
- const value = callFunction(condition, options);
1470
- options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(condition)} = ${toDebugString(value)}`);
1471
- const result = value === "" ? true : !!value;
1472
- if (assign != null) {
1473
- return { result, toAssign: { name: assign, value } };
1474
- }
1475
- return { result };
1476
- };
1477
-
1478
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointHeaders.js
1479
- var getEndpointHeaders = (headers, options) => Object.entries(headers ?? {}).reduce((acc, [headerKey, headerVal]) => {
1480
- acc[headerKey] = headerVal.map((headerValEntry) => {
1481
- const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options);
1482
- if (typeof processedExpr !== "string") {
1483
- throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);
1484
- }
1485
- return processedExpr;
1486
- });
1487
- return acc;
1488
- }, {});
1489
-
1490
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointProperties.js
1491
- var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => {
1492
- acc[propertyKey] = group2.getEndpointProperty(propertyVal, options);
1493
- return acc;
1494
- }, {});
1495
- var getEndpointProperty = (property, options) => {
1496
- if (Array.isArray(property)) {
1497
- return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));
1498
- }
1499
- switch (typeof property) {
1500
- case "string":
1501
- return evaluateTemplate(property, options);
1502
- case "object":
1503
- if (property === null) {
1504
- throw new EndpointError(`Unexpected endpoint property: ${property}`);
1505
- }
1506
- return group2.getEndpointProperties(property, options);
1507
- case "boolean":
1508
- return property;
1509
- default:
1510
- throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);
1511
- }
1512
- };
1513
- var group2 = {
1514
- getEndpointProperty,
1515
- getEndpointProperties
1516
- };
1517
-
1518
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointUrl.js
1519
- var getEndpointUrl = (endpointUrl, options) => {
1520
- const expression = evaluateExpression(endpointUrl, "Endpoint URL", options);
1521
- if (typeof expression === "string") {
1522
- try {
1523
- return new URL(expression);
1524
- } catch (error) {
1525
- console.error(`Failed to construct URL with ${expression}`, error);
1526
- throw error;
1527
- }
1528
- }
1529
- throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);
1530
- };
1531
-
1532
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/decideEndpoint.js
1533
- var RESULT = 1e8;
1534
- var decideEndpoint = (bdd, options) => {
1535
- const { nodes, root, results, conditions } = bdd;
1536
- let ref = root;
1537
- const referenceRecord = {};
1538
- const closure = {
1539
- referenceRecord,
1540
- endpointParams: options.endpointParams,
1541
- logger: options.logger
1542
- };
1543
- while (ref !== 1 && ref !== -1 && ref < RESULT) {
1544
- const node_i = 3 * (Math.abs(ref) - 1);
1545
- const [condition_i, highRef, lowRef] = [nodes[node_i], nodes[node_i + 1], nodes[node_i + 2]];
1546
- const [fn, argv, assign] = conditions[condition_i];
1547
- const evaluation = evaluateCondition({ fn, assign, argv }, closure);
1548
- if (evaluation.toAssign) {
1549
- const { name, value } = evaluation.toAssign;
1550
- referenceRecord[name] = value;
1551
- }
1552
- ref = ref >= 0 === evaluation.result ? highRef : lowRef;
1553
- }
1554
- if (ref >= RESULT) {
1555
- const result = results[ref - RESULT];
1556
- if (result[0] === -1) {
1557
- const [, errorExpression] = result;
1558
- throw new EndpointError(evaluateExpression(errorExpression, "Error", closure));
1559
- }
1560
- const [url, properties, headers] = result;
1561
- return {
1562
- url: getEndpointUrl(url, closure),
1563
- properties: getEndpointProperties(properties, closure),
1564
- headers: getEndpointHeaders(headers ?? {}, closure)
1565
- };
1566
- }
1567
- throw new EndpointError(`No matching endpoint.`);
1568
- };
1569
-
1570
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js
1571
- var getEndpointFromInstructions = bindGetEndpointFromInstructions(getEndpointFromConfig);
1572
- var resolveEndpointConfig = bindResolveEndpointConfig(getEndpointFromConfig);
1573
- var endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig);
1574
- var getEndpointPlugin = bindGetEndpointPlugin(getEndpointFromConfig);
1575
-
1576
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js
1577
- var THROTTLING_ERROR_CODES = [
1578
- "BandwidthLimitExceeded",
1579
- "EC2ThrottledException",
1580
- "LimitExceededException",
1581
- "PriorRequestNotComplete",
1582
- "ProvisionedThroughputExceededException",
1583
- "RequestLimitExceeded",
1584
- "RequestThrottled",
1585
- "RequestThrottledException",
1586
- "SlowDown",
1587
- "ThrottledException",
1588
- "Throttling",
1589
- "ThrottlingException",
1590
- "TooManyRequestsException",
1591
- "TransactionInProgressException"
1592
- ];
1593
- var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"];
1594
- var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];
1595
- var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"];
1596
- var NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND", "EAI_AGAIN"];
1597
-
1598
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js
1599
- var isRetryableByTrait = (error) => error?.$retryable !== void 0;
1600
- var isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected;
1601
- var isBrowserNetworkError = (error) => {
1602
- const errorMessages = /* @__PURE__ */ new Set([
1603
- "Failed to fetch",
1604
- "NetworkError when attempting to fetch resource",
1605
- "The Internet connection appears to be offline",
1606
- "Load failed",
1607
- "Network request failed"
1608
- ]);
1609
- const isValid = error && error instanceof TypeError;
1610
- if (!isValid) {
1611
- return false;
1612
- }
1613
- return errorMessages.has(error.message);
1614
- };
1615
- var isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error.name) || error.$retryable?.throttling == true;
1616
- var isTransientError = (error, depth = 0) => error?.name !== "AbortError" && (isRetryableByTrait(error) || isClockSkewCorrectedError(error) || error.name === "InvalidSignatureException" && error.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error) || isNodeJsHttp2TransientError(error) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1));
1617
- var isServerError = (error) => {
1618
- if (error.$metadata?.httpStatusCode !== void 0) {
1619
- const statusCode = error.$metadata.httpStatusCode;
1620
- if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {
1621
- return true;
1622
- }
1623
- return false;
1624
- }
1625
- return false;
1626
- };
1627
- function isNodeJsHttp2TransientError(error) {
1628
- return error.code === "ERR_HTTP2_STREAM_ERROR" && error.message.includes("NGHTTP2_REFUSED_STREAM");
1629
- }
1630
-
1631
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRateLimiter.js
1632
- var DefaultRateLimiter = class _DefaultRateLimiter {
1633
- static setTimeoutFn = (fn, delay) => setTimeout(fn, delay);
1634
- beta;
1635
- minCapacity;
1636
- minFillRate;
1637
- scaleConstant;
1638
- smooth;
1639
- enabled = false;
1640
- availableTokens = 0;
1641
- lastMaxRate = 0;
1642
- measuredTxRate = 0;
1643
- requestCount = 0;
1644
- fillRate;
1645
- lastThrottleTime;
1646
- lastTimestamp = 0;
1647
- lastTxRateBucket;
1648
- maxCapacity;
1649
- timeWindow = 0;
1650
- constructor(options) {
1651
- this.beta = options?.beta ?? 0.7;
1652
- this.minCapacity = options?.minCapacity ?? 1;
1653
- this.minFillRate = options?.minFillRate ?? 0.5;
1654
- this.scaleConstant = options?.scaleConstant ?? 0.4;
1655
- this.smooth = options?.smooth ?? 0.8;
1656
- this.lastThrottleTime = this.getCurrentTimeInSeconds();
1657
- this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());
1658
- this.fillRate = this.minFillRate;
1659
- this.maxCapacity = this.minCapacity;
1660
- }
1661
- async getSendToken() {
1662
- return this.acquireTokenBucket(1);
1663
- }
1664
- updateClientSendingRate(response) {
1665
- let calculatedRate;
1666
- this.updateMeasuredRate();
1667
- const retryErrorInfo = response;
1668
- const isThrottling = retryErrorInfo?.errorType === "THROTTLING" || isThrottlingError(retryErrorInfo?.error ?? response);
1669
- if (isThrottling) {
1670
- const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);
1671
- this.lastMaxRate = rateToUse;
1672
- this.calculateTimeWindow();
1673
- this.lastThrottleTime = this.getCurrentTimeInSeconds();
1674
- calculatedRate = this.cubicThrottle(rateToUse);
1675
- this.enableTokenBucket();
1676
- } else {
1677
- this.calculateTimeWindow();
1678
- calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());
1679
- }
1680
- const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);
1681
- this.updateTokenBucketRate(newRate);
1682
- }
1683
- getCurrentTimeInSeconds() {
1684
- return Date.now() / 1e3;
1685
- }
1686
- async acquireTokenBucket(amount) {
1687
- if (!this.enabled) {
1688
- return;
1689
- }
1690
- this.refillTokenBucket();
1691
- while (amount > this.availableTokens) {
1692
- const delay = (amount - this.availableTokens) / this.fillRate * 1e3;
1693
- await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay));
1694
- this.refillTokenBucket();
1695
- }
1696
- this.availableTokens = this.availableTokens - amount;
1697
- }
1698
- refillTokenBucket() {
1699
- const timestamp = this.getCurrentTimeInSeconds();
1700
- if (!this.lastTimestamp) {
1701
- this.lastTimestamp = timestamp;
1702
- return;
1703
- }
1704
- const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;
1705
- this.availableTokens = Math.min(this.maxCapacity, this.availableTokens + fillAmount);
1706
- this.lastTimestamp = timestamp;
1707
- }
1708
- calculateTimeWindow() {
1709
- this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));
1710
- }
1711
- cubicThrottle(rateToUse) {
1712
- return this.getPrecise(rateToUse * this.beta);
1713
- }
1714
- cubicSuccess(timestamp) {
1715
- return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);
1716
- }
1717
- enableTokenBucket() {
1718
- this.enabled = true;
1719
- }
1720
- updateTokenBucketRate(newRate) {
1721
- this.refillTokenBucket();
1722
- this.fillRate = Math.max(newRate, this.minFillRate);
1723
- this.maxCapacity = Math.max(newRate, this.minCapacity);
1724
- this.availableTokens = Math.min(this.availableTokens, this.maxCapacity);
1725
- }
1726
- updateMeasuredRate() {
1727
- const t = this.getCurrentTimeInSeconds();
1728
- const timeBucket = Math.floor(t * 2) / 2;
1729
- this.requestCount++;
1730
- if (timeBucket > this.lastTxRateBucket) {
1731
- const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);
1732
- this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));
1733
- this.requestCount = 0;
1734
- this.lastTxRateBucket = timeBucket;
1735
- }
1736
- }
1737
- getPrecise(num) {
1738
- return parseFloat(num.toFixed(8));
1739
- }
1740
- };
1741
-
1742
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/constants.js
1743
- var MAXIMUM_RETRY_DELAY = 20 * 1e3;
1744
- var INITIAL_RETRY_TOKENS = 500;
1745
- var NO_RETRY_INCREMENT = 1;
1746
- var INVOCATION_ID_HEADER = "amz-sdk-invocation-id";
1747
- var REQUEST_HEADER = "amz-sdk-request";
1748
-
1749
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/retries-2026-config.js
1750
- var Retry = class _Retry {
1751
- static v2026 = typeof process !== "undefined" && process.env?.SMITHY_NEW_RETRIES_2026 === "true";
1752
- static delay() {
1753
- return _Retry.v2026 ? 50 : 100;
1754
- }
1755
- static throttlingDelay() {
1756
- return _Retry.v2026 ? 1e3 : 500;
1757
- }
1758
- static cost() {
1759
- return _Retry.v2026 ? 14 : 5;
1760
- }
1761
- static throttlingCost() {
1762
- return _Retry.v2026 ? 5 : 10;
1763
- }
1764
- static modifiedCostType() {
1765
- return _Retry.v2026 ? "THROTTLING" : "TRANSIENT";
1766
- }
1767
- };
1768
-
1769
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryBackoffStrategy.js
1770
- var DefaultRetryBackoffStrategy = class {
1771
- x = Retry.delay();
1772
- computeNextBackoffDelay(i) {
1773
- const b = Math.random();
1774
- const r = 2;
1775
- const t_i = b * Math.min(this.x * r ** i, MAXIMUM_RETRY_DELAY);
1776
- return Math.floor(t_i);
1777
- }
1778
- setDelayBase(delay) {
1779
- this.x = delay;
1780
- }
1781
- };
1782
-
1783
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js
1784
- var DefaultRetryToken = class {
1785
- delay;
1786
- count;
1787
- cost;
1788
- longPoll;
1789
- $retryLog = {
1790
- acquisitionDelay: 0
1791
- };
1792
- constructor(delay, count, cost, longPoll) {
1793
- this.delay = delay;
1794
- this.count = count;
1795
- this.cost = cost;
1796
- this.longPoll = longPoll;
1797
- }
1798
- getRetryCount() {
1799
- return this.count;
1800
- }
1801
- getRetryDelay() {
1802
- return Math.min(MAXIMUM_RETRY_DELAY, this.delay);
1803
- }
1804
- getRetryCost() {
1805
- return this.cost;
1806
- }
1807
- isLongPoll() {
1808
- return this.longPoll;
1809
- }
1810
- };
1811
-
1812
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/config.js
1813
- var RETRY_MODES;
1814
- (function(RETRY_MODES2) {
1815
- RETRY_MODES2["STANDARD"] = "standard";
1816
- RETRY_MODES2["ADAPTIVE"] = "adaptive";
1817
- })(RETRY_MODES || (RETRY_MODES = {}));
1818
- var DEFAULT_MAX_ATTEMPTS = 3;
1819
- var DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;
1820
-
1821
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js
1822
- var refusal = {
1823
- incompatible: 1,
1824
- attempts: 2,
1825
- capacity: 3
1826
- };
1827
- var StandardRetryStrategy = class {
1828
- mode = RETRY_MODES.STANDARD;
1829
- retryBackoffStrategy;
1830
- capacity = INITIAL_RETRY_TOKENS;
1831
- maxAttemptsProvider;
1832
- baseDelay;
1833
- constructor(arg1) {
1834
- if (typeof arg1 === "number") {
1835
- this.maxAttemptsProvider = async () => arg1;
1836
- } else if (typeof arg1 === "function") {
1837
- this.maxAttemptsProvider = arg1;
1838
- } else if (arg1 && typeof arg1 === "object") {
1839
- this.maxAttemptsProvider = async () => arg1.maxAttempts;
1840
- this.baseDelay = arg1.baseDelay;
1841
- this.retryBackoffStrategy = arg1.backoff;
1842
- }
1843
- this.maxAttemptsProvider ??= async () => DEFAULT_MAX_ATTEMPTS;
1844
- this.baseDelay ??= Retry.delay();
1845
- this.retryBackoffStrategy ??= new DefaultRetryBackoffStrategy();
1846
- }
1847
- async acquireInitialRetryToken(retryTokenScope) {
1848
- return new DefaultRetryToken(Retry.delay(), 0, void 0, Retry.v2026 && retryTokenScope.includes(":longpoll"));
1849
- }
1850
- async refreshRetryTokenForRetry(token, errorInfo) {
1851
- const maxAttempts = await this.getMaxAttempts();
1852
- const retryCode = this.retryCode(token, errorInfo, maxAttempts);
1853
- const shouldRetry = retryCode === 0;
1854
- const isLongPoll = token.isLongPoll?.();
1855
- if (shouldRetry || isLongPoll) {
1856
- const errorType = errorInfo.errorType;
1857
- this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? Retry.throttlingDelay() : this.baseDelay);
1858
- const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());
1859
- let retryDelay = delayFromErrorType;
1860
- if (errorInfo.retryAfterHint instanceof Date) {
1861
- retryDelay = Math.max(delayFromErrorType, Math.min(errorInfo.retryAfterHint.getTime() - Date.now(), delayFromErrorType + 5e3));
1862
- }
1863
- if (!shouldRetry) {
1864
- const longPollBackoff = Retry.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0;
1865
- if (longPollBackoff > 0) {
1866
- await new Promise((r) => setTimeout(r, longPollBackoff));
1867
- }
1868
- } else {
1869
- const capacityCost = this.getCapacityCost(errorType);
1870
- this.capacity -= capacityCost;
1871
- const nextToken = new DefaultRetryToken(0, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false);
1872
- await new Promise((r) => setTimeout(r, retryDelay));
1873
- nextToken.$retryLog.acquisitionDelay = retryDelay;
1874
- return nextToken;
1875
- }
1876
- }
1877
- throw new Error("No retry token available");
1878
- }
1879
- recordSuccess(token) {
1880
- this.capacity = Math.min(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));
1881
- }
1882
- getCapacity() {
1883
- return this.capacity;
1884
- }
1885
- async maxAttempts() {
1886
- return this.maxAttemptsProvider();
1887
- }
1888
- async getMaxAttempts() {
1889
- try {
1890
- return await this.maxAttemptsProvider();
1891
- } catch (ignored) {
1892
- console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);
1893
- return DEFAULT_MAX_ATTEMPTS;
1894
- }
1895
- }
1896
- retryCode(tokenToRenew, errorInfo, maxAttempts) {
1897
- const attempts = tokenToRenew.getRetryCount() + 1;
1898
- const retryableStatus = this.isRetryableError(errorInfo.errorType) ? 0 : refusal.incompatible;
1899
- const attemptStatus = attempts < maxAttempts ? 0 : refusal.attempts;
1900
- const capacityStatus = this.capacity >= this.getCapacityCost(errorInfo.errorType) ? 0 : refusal.capacity;
1901
- return retryableStatus || attemptStatus || capacityStatus;
1902
- }
1903
- getCapacityCost(errorType) {
1904
- return errorType === Retry.modifiedCostType() ? Retry.throttlingCost() : Retry.cost();
1905
- }
1906
- isRetryableError(errorType) {
1907
- return errorType === "THROTTLING" || errorType === "TRANSIENT";
1908
- }
1909
- };
1910
-
1911
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/AdaptiveRetryStrategy.js
1912
- var AdaptiveRetryStrategy = class {
1913
- mode = RETRY_MODES.ADAPTIVE;
1914
- rateLimiter;
1915
- standardRetryStrategy;
1916
- constructor(maxAttemptsProvider, options) {
1917
- const { rateLimiter } = options ?? {};
1918
- this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();
1919
- this.standardRetryStrategy = options ? new StandardRetryStrategy({
1920
- maxAttempts: typeof maxAttemptsProvider === "number" ? maxAttemptsProvider : 3,
1921
- ...options
1922
- }) : new StandardRetryStrategy(maxAttemptsProvider);
1923
- }
1924
- async acquireInitialRetryToken(retryTokenScope) {
1925
- const token = await this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);
1926
- await this.rateLimiter.getSendToken();
1927
- return token;
1928
- }
1929
- async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
1930
- this.rateLimiter.updateClientSendingRate(errorInfo);
1931
- const token = await this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
1932
- await this.rateLimiter.getSendToken();
1933
- return token;
1934
- }
1935
- recordSuccess(token) {
1936
- this.rateLimiter.updateClientSendingRate({});
1937
- this.standardRetryStrategy.recordSuccess(token);
1938
- }
1939
- async maxAttemptsProvider() {
1940
- return this.standardRetryStrategy.maxAttempts();
1941
- }
1942
- };
1943
-
1944
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js
1945
- var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
1946
- var CONFIG_MAX_ATTEMPTS = "max_attempts";
1947
- var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
1948
- environmentVariableSelector: (env2) => {
1949
- const value = env2[ENV_MAX_ATTEMPTS];
1950
- if (!value) {
1951
- return void 0;
1952
- }
1953
- const maxAttempt = parseInt(value);
1954
- if (Number.isNaN(maxAttempt)) {
1955
- throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
1956
- }
1957
- return maxAttempt;
1958
- },
1959
- configFileSelector: (profile) => {
1960
- const value = profile[CONFIG_MAX_ATTEMPTS];
1961
- if (!value) {
1962
- return void 0;
1963
- }
1964
- const maxAttempt = parseInt(value);
1965
- if (Number.isNaN(maxAttempt)) {
1966
- throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
1967
- }
1968
- return maxAttempt;
1969
- },
1970
- default: DEFAULT_MAX_ATTEMPTS
1971
- };
1972
- var resolveRetryConfig = (input, defaults) => {
1973
- const { retryStrategy, retryMode } = input;
1974
- const { defaultMaxAttempts = DEFAULT_MAX_ATTEMPTS, defaultBaseDelay = Retry.delay() } = defaults ?? {};
1975
- const maxAttemptsProvider = normalizeProvider(input.maxAttempts ?? defaultMaxAttempts);
1976
- let controller = retryStrategy ? Promise.resolve(retryStrategy) : void 0;
1977
- const getDefault = async () => {
1978
- const maxAttempts = await maxAttemptsProvider();
1979
- const adaptive = await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE;
1980
- if (adaptive) {
1981
- return new AdaptiveRetryStrategy(maxAttemptsProvider, {
1982
- maxAttempts,
1983
- baseDelay: defaultBaseDelay
1984
- });
1985
- }
1986
- return new StandardRetryStrategy({
1987
- maxAttempts,
1988
- baseDelay: defaultBaseDelay
1989
- });
1990
- };
1991
- return Object.assign(input, {
1992
- maxAttempts: maxAttemptsProvider,
1993
- retryStrategy: () => controller ??= getDefault()
1994
- });
1995
- };
1996
- var ENV_RETRY_MODE = "AWS_RETRY_MODE";
1997
- var CONFIG_RETRY_MODE = "retry_mode";
1998
- var NODE_RETRY_MODE_CONFIG_OPTIONS = {
1999
- environmentVariableSelector: (env2) => env2[ENV_RETRY_MODE],
2000
- configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
2001
- default: DEFAULT_RETRY_MODE
2002
- };
2003
-
2004
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/isStreamingPayload/isStreamingPayload.js
2005
- import { Readable } from "stream";
2006
- var isStreamingPayload = (request) => request?.body instanceof Readable || typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream;
2007
-
2008
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js
2009
- var race = (promise, signal) => {
2010
- if (!signal) {
2011
- return promise;
2012
- }
2013
- let cleanup = () => {
2014
- };
2015
- const aborted = new Promise((_, reject) => {
2016
- const handler = () => reject(createAbortError());
2017
- if (signal.aborted) {
2018
- handler();
2019
- } else if (typeof signal.addEventListener === "function") {
2020
- signal.addEventListener("abort", handler, { once: true });
2021
- cleanup = () => signal.removeEventListener("abort", handler);
2022
- } else {
2023
- signal.onabort = handler;
2024
- }
2025
- });
2026
- return Promise.race([promise, aborted]).finally(cleanup);
2027
- };
2028
- var createAbortError = () => Object.assign(new Error("Request aborted"), { name: "AbortError" });
2029
- var isAbortError = (error) => typeof error === "object" && error !== null && "name" in error && error.name === "AbortError";
2030
-
2031
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js
2032
- function parseRetryAfterHeader(response, logger) {
2033
- if (!HttpResponse.isInstance(response)) {
2034
- return;
2035
- }
2036
- for (const header in response.headers) {
2037
- if (!hasOwn(response.headers, header)) {
2038
- continue;
2039
- }
2040
- const h = header.toLowerCase();
2041
- if (h === "retry-after") {
2042
- const retryAfter = response.headers[header];
2043
- let retryAfterSeconds = NaN;
2044
- if (retryAfter.endsWith("GMT")) {
2045
- try {
2046
- const date = parseRfc7231DateTime(retryAfter);
2047
- retryAfterSeconds = (date.getTime() - Date.now()) / 1e3;
2048
- } catch (e) {
2049
- logger?.trace?.("Failed to parse retry-after header");
2050
- logger?.trace?.(e);
2051
- }
2052
- } else if (retryAfter.match(/ GMT, ((\d+)|(\d+\.\d+))$/)) {
2053
- retryAfterSeconds = Number(retryAfter.match(/ GMT, ([\d.]+)$/)?.[1]);
2054
- } else if (retryAfter.match(/^((\d+)|(\d+\.\d+))$/)) {
2055
- retryAfterSeconds = Number(retryAfter);
2056
- } else if (Date.parse(retryAfter) >= Date.now()) {
2057
- retryAfterSeconds = (Date.parse(retryAfter) - Date.now()) / 1e3;
2058
- }
2059
- if (isNaN(retryAfterSeconds)) {
2060
- return;
2061
- }
2062
- return new Date(Date.now() + retryAfterSeconds * 1e3);
2063
- } else if (h === "x-amz-retry-after") {
2064
- const v = response.headers[header];
2065
- const backoffMilliseconds = Number(v);
2066
- if (isNaN(backoffMilliseconds)) {
2067
- logger?.trace?.(`Failed to parse x-amz-retry-after=${v}`);
2068
- return;
2069
- }
2070
- return new Date(Date.now() + backoffMilliseconds);
2071
- }
2072
- }
2073
- }
2074
-
2075
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js
2076
- var asSdkError = (error) => {
2077
- if (error instanceof Error) {
2078
- return error;
2079
- }
2080
- if (error instanceof Object) {
2081
- return Object.assign(new Error(), error);
2082
- }
2083
- if (typeof error === "string") {
2084
- return new Error(error);
2085
- }
2086
- return new Error(`AWS SDK error wrapper for ${error}`);
2087
- };
2088
-
2089
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js
2090
- function bindRetryMiddleware(isStreamingPayload2) {
2091
- return (options) => (next, context) => async (args) => {
2092
- let retryStrategy = await options.retryStrategy();
2093
- const maxAttempts = await options.maxAttempts();
2094
- const abortSignal = context[SMITHY_CONTEXT_KEY]?.abortSignal;
2095
- if (isRetryStrategyV2(retryStrategy)) {
2096
- retryStrategy = retryStrategy;
2097
- const retryTokenScope = (context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : "");
2098
- let retryToken = await race(retryStrategy.acquireInitialRetryToken(retryTokenScope), abortSignal);
2099
- let lastError = new Error();
2100
- let attempts = 0;
2101
- let totalRetryDelay = 0;
2102
- const { request } = args;
2103
- const isRequest = HttpRequest.isInstance(request);
2104
- if (isRequest) {
2105
- request.headers[INVOCATION_ID_HEADER] = v4();
2106
- }
2107
- while (true) {
2108
- try {
2109
- if (isRequest) {
2110
- request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
2111
- }
2112
- const { response, output } = await next(args);
2113
- retryStrategy.recordSuccess(retryToken);
2114
- output.$metadata.attempts = attempts + 1;
2115
- output.$metadata.totalRetryDelay = totalRetryDelay;
2116
- return { response, output };
2117
- } catch (e) {
2118
- const retryErrorInfo = getRetryErrorInfo(e, options.logger);
2119
- lastError = asSdkError(e);
2120
- if (isRequest && isStreamingPayload2(request)) {
2121
- (context.logger instanceof NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request.");
2122
- throw lastError;
2123
- }
2124
- try {
2125
- retryToken = await race(retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo), abortSignal);
2126
- } catch (refreshError) {
2127
- if (abortSignal?.aborted && isAbortError(refreshError)) {
2128
- throw refreshError;
2129
- }
2130
- if (!lastError.$metadata) {
2131
- lastError.$metadata = {};
2132
- }
2133
- lastError.$metadata.attempts = attempts + 1;
2134
- lastError.$metadata.totalRetryDelay = totalRetryDelay;
2135
- throw lastError;
2136
- }
2137
- attempts = retryToken.getRetryCount();
2138
- const delay = retryToken.getRetryDelay();
2139
- totalRetryDelay += (retryToken?.$retryLog?.acquisitionDelay ?? 0) + delay;
2140
- if (delay > 0) {
2141
- await race(new Promise((resolve) => setTimeout(resolve, delay)), abortSignal);
2142
- }
2143
- }
2144
- }
2145
- } else {
2146
- retryStrategy = retryStrategy;
2147
- if (retryStrategy?.mode) {
2148
- context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
2149
- }
2150
- return retryStrategy.retry(next, args);
2151
- }
2152
- };
2153
- }
2154
- var isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined";
2155
- var getRetryErrorInfo = (error, logger) => {
2156
- const errorInfo = {
2157
- error,
2158
- errorType: getRetryErrorType(error)
2159
- };
2160
- const retryAfterHint = parseRetryAfterHeader(error.$response, logger);
2161
- if (retryAfterHint) {
2162
- errorInfo.retryAfterHint = retryAfterHint;
2163
- }
2164
- return errorInfo;
2165
- };
2166
- var getRetryErrorType = (error) => {
2167
- if (isThrottlingError(error)) {
2168
- return "THROTTLING";
2169
- }
2170
- if (isTransientError(error)) {
2171
- return "TRANSIENT";
2172
- }
2173
- if (isServerError(error)) {
2174
- return "SERVER_ERROR";
2175
- }
2176
- return "CLIENT_ERROR";
2177
- };
2178
- var retryMiddlewareOptions = {
2179
- name: "retryMiddleware",
2180
- tags: ["RETRY"],
2181
- step: "finalizeRequest",
2182
- priority: "high",
2183
- override: true
2184
- };
2185
- function bindGetRetryPlugin(isStreamingPayload2) {
2186
- const retryMiddleware2 = bindRetryMiddleware(isStreamingPayload2);
2187
- return (options) => ({
2188
- applyToStack: (clientStack) => {
2189
- clientStack.add(retryMiddleware2(options), retryMiddlewareOptions);
2190
- }
2191
- });
2192
- }
2193
-
2194
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/retry/index.js
2195
- var retryMiddleware = bindRetryMiddleware(isStreamingPayload);
2196
- var getRetryPlugin = bindGetRetryPlugin(isStreamingPayload);
2197
-
2198
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js
2199
- function resolveHostHeaderConfig(input) {
2200
- return input;
2201
- }
2202
- var hostHeaderMiddleware = (options) => (next) => async (args) => {
2203
- if (!HttpRequest.isInstance(args.request)) {
2204
- return next(args);
2205
- }
2206
- const { request } = args;
2207
- const { handlerProtocol = "" } = options.requestHandler.metadata || {};
2208
- if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) {
2209
- delete request.headers["host"];
2210
- request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : "");
2211
- } else if (!request.headers["host"]) {
2212
- let host = request.hostname;
2213
- if (request.port != null) {
2214
- host += `:${request.port}`;
2215
- }
2216
- request.headers["host"] = host;
2217
- }
2218
- return next(args);
2219
- };
2220
- var hostHeaderMiddlewareOptions = {
2221
- name: "hostHeaderMiddleware",
2222
- step: "build",
2223
- priority: "low",
2224
- tags: ["HOST"],
2225
- override: true
2226
- };
2227
- var getHostHeaderPlugin = (options) => ({
2228
- applyToStack: (clientStack) => {
2229
- clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);
2230
- }
2231
- });
2232
-
2233
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-logger/loggerMiddleware.js
2234
- var loggerMiddleware = () => (next, context) => async (args) => {
2235
- try {
2236
- const response = await next(args);
2237
- const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;
2238
- const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
2239
- const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
2240
- const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
2241
- const { $metadata, ...outputWithoutMetadata } = response.output;
2242
- logger?.info?.({
2243
- clientName,
2244
- commandName,
2245
- input: inputFilterSensitiveLog(args.input),
2246
- output: outputFilterSensitiveLog(outputWithoutMetadata),
2247
- metadata: $metadata
2248
- });
2249
- return response;
2250
- } catch (error) {
2251
- const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;
2252
- const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
2253
- const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
2254
- logger?.error?.({
2255
- clientName,
2256
- commandName,
2257
- input: inputFilterSensitiveLog(args.input),
2258
- error,
2259
- metadata: error.$metadata
2260
- });
2261
- throw error;
2262
- }
2263
- };
2264
- var loggerMiddlewareOptions = {
2265
- name: "loggerMiddleware",
2266
- tags: ["LOGGER"],
2267
- step: "initialize",
2268
- override: true
2269
- };
2270
- var getLoggerPlugin = (options) => ({
2271
- applyToStack: (clientStack) => {
2272
- clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);
2273
- }
2274
- });
2275
-
2276
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/configuration.js
2277
- var recursionDetectionMiddlewareOptions = {
2278
- step: "build",
2279
- tags: ["RECURSION_DETECTION", "TRACE_CONTEXT_PROPAGATION"],
2280
- name: "recursionDetectionMiddleware",
2281
- override: true,
2282
- priority: "low"
2283
- };
2284
-
2285
- // ../../node_modules/.pnpm/@aws+lambda-invoke-store@0.3.0/node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js
2286
- var PROTECTED_KEYS = {
2287
- REQUEST_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_REQUEST_ID"),
2288
- X_RAY_TRACE_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),
2289
- TENANT_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_TENANT_ID"),
2290
- TRACEPARENT: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_TRACEPARENT"),
2291
- TRACESTATE: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_TRACESTATE"),
2292
- BAGGAGE: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_BAGGAGE")
2293
- };
2294
- var NO_GLOBAL_AWS_LAMBDA = ["true", "1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA ?? "");
2295
- if (!NO_GLOBAL_AWS_LAMBDA) {
2296
- globalThis.awslambda = globalThis.awslambda || {};
2297
- }
2298
- var InvokeStoreBase = class {
2299
- static PROTECTED_KEYS = PROTECTED_KEYS;
2300
- isProtectedKey(key) {
2301
- return Object.values(PROTECTED_KEYS).includes(key);
2302
- }
2303
- getRequestId() {
2304
- return this.get(PROTECTED_KEYS.REQUEST_ID) ?? "-";
2305
- }
2306
- getXRayTraceId() {
2307
- return this.get(PROTECTED_KEYS.X_RAY_TRACE_ID);
2308
- }
2309
- getTenantId() {
2310
- return this.get(PROTECTED_KEYS.TENANT_ID);
2311
- }
2312
- getTraceparent() {
2313
- return this.get(PROTECTED_KEYS.TRACEPARENT);
2314
- }
2315
- getTracestate() {
2316
- return this.get(PROTECTED_KEYS.TRACESTATE);
2317
- }
2318
- getBaggage() {
2319
- return this.get(PROTECTED_KEYS.BAGGAGE);
2320
- }
2321
- };
2322
- var InvokeStoreSingle = class extends InvokeStoreBase {
2323
- currentContext;
2324
- getContext() {
2325
- return this.currentContext;
2326
- }
2327
- hasContext() {
2328
- return this.currentContext !== void 0;
2329
- }
2330
- get(key) {
2331
- return this.currentContext?.[key];
2332
- }
2333
- set(key, value) {
2334
- if (this.isProtectedKey(key)) {
2335
- throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);
2336
- }
2337
- this.currentContext = this.currentContext || {};
2338
- this.currentContext[key] = value;
2339
- }
2340
- run(context, fn) {
2341
- this.currentContext = context;
2342
- return fn();
2343
- }
2344
- };
2345
- var InvokeStoreMulti = class _InvokeStoreMulti extends InvokeStoreBase {
2346
- als;
2347
- static async create() {
2348
- const instance = new _InvokeStoreMulti();
2349
- const asyncHooks = await import("async_hooks");
2350
- instance.als = new asyncHooks.AsyncLocalStorage();
2351
- return instance;
2352
- }
2353
- getContext() {
2354
- return this.als.getStore();
2355
- }
2356
- hasContext() {
2357
- return this.als.getStore() !== void 0;
2358
- }
2359
- get(key) {
2360
- return this.als.getStore()?.[key];
2361
- }
2362
- set(key, value) {
2363
- if (this.isProtectedKey(key)) {
2364
- throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);
2365
- }
2366
- const store = this.als.getStore();
2367
- if (!store) {
2368
- throw new Error("No context available");
2369
- }
2370
- store[key] = value;
2371
- }
2372
- run(context, fn) {
2373
- return this.als.run(context, fn);
2374
- }
2375
- };
2376
- var InvokeStore;
2377
- (function(InvokeStore2) {
2378
- let instance = null;
2379
- async function getInstanceAsync(forceInvokeStoreMulti) {
2380
- if (!instance) {
2381
- instance = (async () => {
2382
- const isMulti = forceInvokeStoreMulti === true || "AWS_LAMBDA_MAX_CONCURRENCY" in process.env;
2383
- const newInstance = isMulti ? await InvokeStoreMulti.create() : new InvokeStoreSingle();
2384
- if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda?.InvokeStore) {
2385
- return globalThis.awslambda.InvokeStore;
2386
- } else if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda) {
2387
- globalThis.awslambda.InvokeStore = newInstance;
2388
- return newInstance;
2389
- } else {
2390
- return newInstance;
2391
- }
2392
- })();
2393
- }
2394
- return instance;
2395
- }
2396
- InvokeStore2.getInstanceAsync = getInstanceAsync;
2397
- InvokeStore2._testing = process.env.AWS_LAMBDA_BENCHMARK_MODE === "1" ? {
2398
- reset: () => {
2399
- instance = null;
2400
- if (globalThis.awslambda?.InvokeStore) {
2401
- delete globalThis.awslambda.InvokeStore;
2402
- }
2403
- globalThis.awslambda = { InvokeStore: void 0 };
2404
- }
2405
- } : void 0;
2406
- })(InvokeStore || (InvokeStore = {}));
2407
-
2408
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.js
2409
- var AWS_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
2410
- var _X_AMZN_TRACE_ID = "_X_AMZN_TRACE_ID";
2411
- var X_AMZN_TRACE_ID = "X-Amzn-Trace-Id";
2412
- var TRACEPARENT = "traceparent";
2413
- var TRACESTATE = "tracestate";
2414
- var BAGGAGE = "baggage";
2415
- var recursionDetectionMiddleware = () => (next) => async (args) => {
2416
- const { request } = args;
2417
- if (!HttpRequest.isInstance(request)) {
2418
- return next(args);
2419
- }
2420
- let invokeStore;
2421
- {
2422
- const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === X_AMZN_TRACE_ID.toLowerCase()) ?? X_AMZN_TRACE_ID;
2423
- if (!request.headers.hasOwnProperty(traceIdHeader)) {
2424
- const functionName = process.env[AWS_LAMBDA_FUNCTION_NAME];
2425
- const traceIdFromEnv = process.env[_X_AMZN_TRACE_ID];
2426
- invokeStore ??= await InvokeStore.getInstanceAsync();
2427
- const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();
2428
- const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
2429
- const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
2430
- if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
2431
- request.headers[X_AMZN_TRACE_ID] = traceId;
2432
- }
2433
- }
2434
- }
2435
- {
2436
- sanitizeTraceHeaders(request.headers);
2437
- const existingTraceparent = request.headers[TRACEPARENT];
2438
- if (!existingTraceparent) {
2439
- const traceparent = (invokeStore ??= await InvokeStore.getInstanceAsync())?.getTraceparent?.();
2440
- if (traceparent) {
2441
- request.headers[TRACEPARENT] = traceparent;
2442
- const tracestate = invokeStore?.getTracestate?.();
2443
- if (tracestate) {
2444
- request.headers[TRACESTATE] = tracestate;
2445
- }
2446
- const baggage = invokeStore?.getBaggage?.();
2447
- if (baggage) {
2448
- request.headers[BAGGAGE] = baggage;
2449
- }
2450
- }
2451
- }
2452
- }
2453
- return next(args);
2454
- };
2455
- function sanitizeTraceHeaders(headers) {
2456
- for (const header of Object.keys(headers)) {
2457
- const lower = header.toLowerCase();
2458
- if (header !== lower && (lower === TRACEPARENT || lower === TRACESTATE || lower === BAGGAGE)) {
2459
- headers[lower] = headers[header];
2460
- delete headers[header];
2461
- }
2462
- }
2463
- }
2464
-
2465
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.js
2466
- var getRecursionDetectionPlugin = (options) => ({
2467
- applyToStack: (clientStack) => {
2468
- clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);
2469
- }
2470
- });
2471
-
2472
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/resolveAuthOptions.js
2473
- var resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {
2474
- if (!authSchemePreference || authSchemePreference.length === 0) {
2475
- return candidateAuthOptions;
2476
- }
2477
- const preferredAuthOptions = [];
2478
- for (const preferredSchemeName of authSchemePreference) {
2479
- for (const candidateAuthOption of candidateAuthOptions) {
2480
- const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1];
2481
- if (candidateAuthSchemeName === preferredSchemeName) {
2482
- preferredAuthOptions.push(candidateAuthOption);
2483
- }
2484
- }
2485
- }
2486
- for (const candidateAuthOption of candidateAuthOptions) {
2487
- if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {
2488
- preferredAuthOptions.push(candidateAuthOption);
2489
- }
2490
- }
2491
- return preferredAuthOptions;
2492
- };
2493
-
2494
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js
2495
- function convertHttpAuthSchemesToMap(httpAuthSchemes) {
2496
- const map = /* @__PURE__ */ new Map();
2497
- for (const scheme of httpAuthSchemes) {
2498
- map.set(scheme.schemeId, scheme);
2499
- }
2500
- return map;
2501
- }
2502
- var httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {
2503
- const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));
2504
- const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
2505
- const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
2506
- const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
2507
- const smithyContext = getSmithyContext(context);
2508
- const failureReasons = [];
2509
- for (const option of resolvedOptions) {
2510
- const scheme = authSchemes.get(option.schemeId);
2511
- if (!scheme) {
2512
- failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`);
2513
- continue;
2514
- }
2515
- const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));
2516
- if (!identityProvider) {
2517
- failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
2518
- continue;
2519
- }
2520
- const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};
2521
- option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
2522
- option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
2523
- smithyContext.selectedHttpAuthScheme = {
2524
- httpAuthOption: option,
2525
- identity: await identityProvider(option.identityProperties),
2526
- signer: scheme.signer
2527
- };
2528
- break;
2529
- }
2530
- if (!smithyContext.selectedHttpAuthScheme) {
2531
- throw new Error(failureReasons.join("\n"));
2532
- }
2533
- return next(args);
2534
- };
2535
-
2536
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js
2537
- var httpAuthSchemeEndpointRuleSetMiddlewareOptions = {
2538
- step: "serialize",
2539
- tags: ["HTTP_AUTH_SCHEME"],
2540
- name: "httpAuthSchemeMiddleware",
2541
- override: true,
2542
- relation: "before",
2543
- toMiddleware: "endpointV2Middleware"
2544
- };
2545
- var getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({
2546
- applyToStack: (clientStack) => {
2547
- clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
2548
- httpAuthSchemeParametersProvider,
2549
- identityProviderConfigProvider
2550
- }), httpAuthSchemeEndpointRuleSetMiddlewareOptions);
2551
- }
2552
- });
2553
-
2554
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js
2555
- var defaultErrorHandler = (signingProperties) => (error) => {
2556
- throw error;
2557
- };
2558
- var defaultSuccessHandler = (httpResponse, signingProperties) => {
2559
- };
2560
- var httpSigningMiddleware = (config) => (next, context) => async (args) => {
2561
- if (!HttpRequest.isInstance(args.request)) {
2562
- return next(args);
2563
- }
2564
- const smithyContext = getSmithyContext(context);
2565
- const scheme = smithyContext.selectedHttpAuthScheme;
2566
- if (!scheme) {
2567
- throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
2568
- }
2569
- const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme;
2570
- const output = await next({
2571
- ...args,
2572
- request: await signer.sign(args.request, identity, signingProperties)
2573
- }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
2574
- (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
2575
- return output;
2576
- };
2577
-
2578
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/getHttpSigningMiddleware.js
2579
- var httpSigningMiddlewareOptions = {
2580
- step: "finalizeRequest",
2581
- tags: ["HTTP_SIGNING"],
2582
- name: "httpSigningMiddleware",
2583
- aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"],
2584
- override: true,
2585
- relation: "after",
2586
- toMiddleware: "retryMiddleware"
2587
- };
2588
- var getHttpSigningPlugin = (config) => ({
2589
- applyToStack: (clientStack) => {
2590
- clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);
2591
- }
2592
- });
2593
-
2594
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js
2595
- var DefaultIdentityProviderConfig = class {
2596
- authSchemes = /* @__PURE__ */ new Map();
2597
- constructor(config) {
2598
- for (const key in config) {
2599
- if (!hasOwn(config, key)) {
2600
- continue;
2601
- }
2602
- const value = config[key];
2603
- if (value !== void 0) {
2604
- this.authSchemes.set(key, value);
2605
- }
2606
- }
2607
- }
2608
- getIdentityProvider(schemeId) {
2609
- return this.authSchemes.get(schemeId);
2610
- }
2611
- };
2612
-
2613
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/noAuth.js
2614
- var NoAuthSigner = class {
2615
- async sign(httpRequest, identity, signingProperties) {
2616
- return httpRequest;
2617
- }
2618
- };
2619
-
2620
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/memoizeIdentityProvider.js
2621
- var createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(identity) {
2622
- return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;
2623
- };
2624
- var EXPIRATION_MS = 3e5;
2625
- var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);
2626
- var doesIdentityRequireRefresh = (identity) => identity.expiration !== void 0;
2627
- var memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
2628
- if (provider === void 0) {
2629
- return void 0;
2630
- }
2631
- const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider;
2632
- let resolved;
2633
- let pending;
2634
- let hasResult;
2635
- let isConstant = false;
2636
- const coalesceProvider = async (options) => {
2637
- if (!pending) {
2638
- pending = normalizedProvider(options);
2639
- }
2640
- try {
2641
- resolved = await pending;
2642
- hasResult = true;
2643
- isConstant = false;
2644
- } finally {
2645
- pending = void 0;
2646
- }
2647
- return resolved;
2648
- };
2649
- if (isExpired === void 0) {
2650
- return async (options) => {
2651
- if (!hasResult || options?.forceRefresh) {
2652
- resolved = await coalesceProvider(options);
2653
- }
2654
- return resolved;
2655
- };
2656
- }
2657
- return async (options) => {
2658
- if (!hasResult || options?.forceRefresh) {
2659
- resolved = await coalesceProvider(options);
2660
- }
2661
- if (isConstant) {
2662
- return resolved;
2663
- }
2664
- if (!requiresRefresh(resolved)) {
2665
- isConstant = true;
2666
- return resolved;
2667
- }
2668
- if (isExpired(resolved)) {
2669
- await coalesceProvider(options);
2670
- return resolved;
2671
- }
2672
- return resolved;
2673
- };
2674
- };
2675
-
2676
- // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/normalizeProvider.js
2677
- var normalizeProvider2 = (input) => {
2678
- if (typeof input === "function") {
2679
- return input;
2680
- }
2681
- const promisified = Promise.resolve(input);
2682
- return () => promisified;
2683
- };
2684
-
2685
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/configurations.js
2686
- var DEFAULT_UA_APP_ID = void 0;
2687
- function isValidUserAgentAppId(appId) {
2688
- if (appId === void 0) {
2689
- return true;
2690
- }
2691
- return typeof appId === "string" && appId.length <= 50;
2692
- }
2693
- function resolveUserAgentConfig(input) {
2694
- const normalizedAppIdProvider = normalizeProvider2(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
2695
- const { customUserAgent } = input;
2696
- return Object.assign(input, {
2697
- customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
2698
- userAgentAppId: async () => {
2699
- const appId = await normalizedAppIdProvider();
2700
- if (!isValidUserAgentAppId(appId)) {
2701
- const logger = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
2702
- if (typeof appId !== "string") {
2703
- logger?.warn("userAgentAppId must be a string or undefined.");
2704
- } else if (appId.length > 50) {
2705
- logger?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.");
2706
- }
2707
- }
2708
- return appId;
2709
- }
2710
- });
2711
- }
2712
-
2713
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/partitions.js
2714
- var partitionsInfo = {
2715
- "partitions": [
2716
- {
2717
- "id": "aws",
2718
- "outputs": {
2719
- "dnsSuffix": "amazonaws.com",
2720
- "dualStackDnsSuffix": "api.aws",
2721
- "implicitGlobalRegion": "us-east-1",
2722
- "name": "aws",
2723
- "supportsDualStack": true,
2724
- "supportsFIPS": true
2725
- },
2726
- "regionRegex": "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
2727
- "regions": {
2728
- "af-south-1": {
2729
- "description": "Africa (Cape Town)"
2730
- },
2731
- "ap-east-1": {
2732
- "description": "Asia Pacific (Hong Kong)"
2733
- },
2734
- "ap-east-2": {
2735
- "description": "Asia Pacific (Taipei)"
2736
- },
2737
- "ap-northeast-1": {
2738
- "description": "Asia Pacific (Tokyo)"
2739
- },
2740
- "ap-northeast-2": {
2741
- "description": "Asia Pacific (Seoul)"
2742
- },
2743
- "ap-northeast-3": {
2744
- "description": "Asia Pacific (Osaka)"
2745
- },
2746
- "ap-south-1": {
2747
- "description": "Asia Pacific (Mumbai)"
2748
- },
2749
- "ap-south-2": {
2750
- "description": "Asia Pacific (Hyderabad)"
2751
- },
2752
- "ap-southeast-1": {
2753
- "description": "Asia Pacific (Singapore)"
2754
- },
2755
- "ap-southeast-2": {
2756
- "description": "Asia Pacific (Sydney)"
2757
- },
2758
- "ap-southeast-3": {
2759
- "description": "Asia Pacific (Jakarta)"
2760
- },
2761
- "ap-southeast-4": {
2762
- "description": "Asia Pacific (Melbourne)"
2763
- },
2764
- "ap-southeast-5": {
2765
- "description": "Asia Pacific (Malaysia)"
2766
- },
2767
- "ap-southeast-6": {
2768
- "description": "Asia Pacific (New Zealand)"
2769
- },
2770
- "ap-southeast-7": {
2771
- "description": "Asia Pacific (Thailand)"
2772
- },
2773
- "aws-global": {
2774
- "description": "aws global region"
2775
- },
2776
- "ca-central-1": {
2777
- "description": "Canada (Central)"
2778
- },
2779
- "ca-west-1": {
2780
- "description": "Canada West (Calgary)"
2781
- },
2782
- "eu-central-1": {
2783
- "description": "Europe (Frankfurt)"
2784
- },
2785
- "eu-central-2": {
2786
- "description": "Europe (Zurich)"
2787
- },
2788
- "eu-north-1": {
2789
- "description": "Europe (Stockholm)"
2790
- },
2791
- "eu-south-1": {
2792
- "description": "Europe (Milan)"
2793
- },
2794
- "eu-south-2": {
2795
- "description": "Europe (Spain)"
2796
- },
2797
- "eu-west-1": {
2798
- "description": "Europe (Ireland)"
2799
- },
2800
- "eu-west-2": {
2801
- "description": "Europe (London)"
2802
- },
2803
- "eu-west-3": {
2804
- "description": "Europe (Paris)"
2805
- },
2806
- "il-central-1": {
2807
- "description": "Israel (Tel Aviv)"
2808
- },
2809
- "me-central-1": {
2810
- "description": "Middle East (UAE)"
2811
- },
2812
- "me-south-1": {
2813
- "description": "Middle East (Bahrain)"
2814
- },
2815
- "mx-central-1": {
2816
- "description": "Mexico (Central)"
2817
- },
2818
- "sa-east-1": {
2819
- "description": "South America (Sao Paulo)"
2820
- },
2821
- "us-east-1": {
2822
- "description": "US East (N. Virginia)"
2823
- },
2824
- "us-east-2": {
2825
- "description": "US East (Ohio)"
2826
- },
2827
- "us-west-1": {
2828
- "description": "US West (N. California)"
2829
- },
2830
- "us-west-2": {
2831
- "description": "US West (Oregon)"
2832
- }
2833
- }
2834
- },
2835
- {
2836
- "id": "aws-cn",
2837
- "outputs": {
2838
- "dnsSuffix": "amazonaws.com.cn",
2839
- "dualStackDnsSuffix": "api.amazonwebservices.com.cn",
2840
- "implicitGlobalRegion": "cn-northwest-1",
2841
- "name": "aws-cn",
2842
- "supportsDualStack": true,
2843
- "supportsFIPS": true
2844
- },
2845
- "regionRegex": "^cn\\-\\w+\\-\\d+$",
2846
- "regions": {
2847
- "aws-cn-global": {
2848
- "description": "aws-cn global region"
2849
- },
2850
- "cn-north-1": {
2851
- "description": "China (Beijing)"
2852
- },
2853
- "cn-northwest-1": {
2854
- "description": "China (Ningxia)"
2855
- }
2856
- }
2857
- },
2858
- {
2859
- "id": "aws-eusc",
2860
- "outputs": {
2861
- "dnsSuffix": "amazonaws.eu",
2862
- "dualStackDnsSuffix": "api.amazonwebservices.eu",
2863
- "implicitGlobalRegion": "eusc-de-east-1",
2864
- "name": "aws-eusc",
2865
- "supportsDualStack": true,
2866
- "supportsFIPS": true
2867
- },
2868
- "regionRegex": "^eusc\\-(de)\\-\\w+\\-\\d+$",
2869
- "regions": {
2870
- "eusc-de-east-1": {
2871
- "description": "AWS European Sovereign Cloud (Germany)"
2872
- }
2873
- }
2874
- },
2875
- {
2876
- "id": "aws-iso",
2877
- "outputs": {
2878
- "dnsSuffix": "c2s.ic.gov",
2879
- "dualStackDnsSuffix": "api.aws.ic.gov",
2880
- "implicitGlobalRegion": "us-iso-east-1",
2881
- "name": "aws-iso",
2882
- "supportsDualStack": true,
2883
- "supportsFIPS": true
2884
- },
2885
- "regionRegex": "^us\\-iso\\-\\w+\\-\\d+$",
2886
- "regions": {
2887
- "aws-iso-global": {
2888
- "description": "aws-iso global region"
2889
- },
2890
- "us-iso-east-1": {
2891
- "description": "US ISO East"
2892
- },
2893
- "us-iso-west-1": {
2894
- "description": "US ISO WEST"
2895
- }
2896
- }
2897
- },
2898
- {
2899
- "id": "aws-iso-b",
2900
- "outputs": {
2901
- "dnsSuffix": "sc2s.sgov.gov",
2902
- "dualStackDnsSuffix": "api.aws.scloud",
2903
- "implicitGlobalRegion": "us-isob-east-1",
2904
- "name": "aws-iso-b",
2905
- "supportsDualStack": true,
2906
- "supportsFIPS": true
2907
- },
2908
- "regionRegex": "^us\\-isob\\-\\w+\\-\\d+$",
2909
- "regions": {
2910
- "aws-iso-b-global": {
2911
- "description": "aws-iso-b global region"
2912
- },
2913
- "us-isob-east-1": {
2914
- "description": "US ISOB East (Ohio)"
2915
- },
2916
- "us-isob-west-1": {
2917
- "description": "US ISOB West"
2918
- }
2919
- }
2920
- },
2921
- {
2922
- "id": "aws-iso-e",
2923
- "outputs": {
2924
- "dnsSuffix": "cloud.adc-e.uk",
2925
- "dualStackDnsSuffix": "api.cloud-aws.adc-e.uk",
2926
- "implicitGlobalRegion": "eu-isoe-west-1",
2927
- "name": "aws-iso-e",
2928
- "supportsDualStack": true,
2929
- "supportsFIPS": true
2930
- },
2931
- "regionRegex": "^eu\\-isoe\\-\\w+\\-\\d+$",
2932
- "regions": {
2933
- "aws-iso-e-global": {
2934
- "description": "aws-iso-e global region"
2935
- },
2936
- "eu-isoe-west-1": {
2937
- "description": "EU ISOE West"
2938
- }
2939
- }
2940
- },
2941
- {
2942
- "id": "aws-iso-f",
2943
- "outputs": {
2944
- "dnsSuffix": "csp.hci.ic.gov",
2945
- "dualStackDnsSuffix": "api.aws.hci.ic.gov",
2946
- "implicitGlobalRegion": "us-isof-south-1",
2947
- "name": "aws-iso-f",
2948
- "supportsDualStack": true,
2949
- "supportsFIPS": true
2950
- },
2951
- "regionRegex": "^us\\-isof\\-\\w+\\-\\d+$",
2952
- "regions": {
2953
- "aws-iso-f-global": {
2954
- "description": "aws-iso-f global region"
2955
- },
2956
- "us-isof-east-1": {
2957
- "description": "US ISOF EAST"
2958
- },
2959
- "us-isof-south-1": {
2960
- "description": "US ISOF SOUTH"
2961
- }
2962
- }
2963
- },
2964
- {
2965
- "id": "aws-us-gov",
2966
- "outputs": {
2967
- "dnsSuffix": "amazonaws.com",
2968
- "dualStackDnsSuffix": "api.aws",
2969
- "implicitGlobalRegion": "us-gov-west-1",
2970
- "name": "aws-us-gov",
2971
- "supportsDualStack": true,
2972
- "supportsFIPS": true
2973
- },
2974
- "regionRegex": "^us\\-gov\\-\\w+\\-\\d+$",
2975
- "regions": {
2976
- "aws-us-gov-global": {
2977
- "description": "aws-us-gov global region"
2978
- },
2979
- "us-gov-east-1": {
2980
- "description": "AWS GovCloud (US-East)"
2981
- },
2982
- "us-gov-west-1": {
2983
- "description": "AWS GovCloud (US-West)"
2984
- }
2985
- }
2986
- }
2987
- ],
2988
- "version": "1.1"
2989
- };
2990
-
2991
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/partition.js
2992
- var selectedPartitionsInfo = partitionsInfo;
2993
- var selectedUserAgentPrefix = "";
2994
- var partition = (value) => {
2995
- const { partitions } = selectedPartitionsInfo;
2996
- for (const partition2 of partitions) {
2997
- const { regions, outputs } = partition2;
2998
- for (const [region, regionData] of Object.entries(regions)) {
2999
- if (region === value) {
3000
- return {
3001
- ...outputs,
3002
- ...regionData
3003
- };
3004
- }
3005
- }
3006
- }
3007
- for (const partition2 of partitions) {
3008
- const { regionRegex, outputs } = partition2;
3009
- if (new RegExp(regionRegex).test(value)) {
3010
- return {
3011
- ...outputs
3012
- };
3013
- }
3014
- }
3015
- const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws");
3016
- if (!DEFAULT_PARTITION) {
3017
- throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");
3018
- }
3019
- return {
3020
- ...DEFAULT_PARTITION.outputs
3021
- };
3022
- };
3023
- var getUserAgentPrefix = () => selectedUserAgentPrefix;
3024
-
3025
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
3026
- Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true";
3027
- function setFeature2(context, feature, value) {
3028
- if (!context.__aws_sdk_context) {
3029
- context.__aws_sdk_context = {
3030
- features: {}
3031
- };
3032
- } else if (!context.__aws_sdk_context.features) {
3033
- context.__aws_sdk_context.features = {};
3034
- }
3035
- context.__aws_sdk_context.features[feature] = value;
3036
- }
3037
-
3038
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/check-features.js
3039
- var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
3040
- async function checkFeatures(context, config, args) {
3041
- const request = args.request;
3042
- if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
3043
- setFeature2(context, "PROTOCOL_RPC_V2_CBOR", "M");
3044
- }
3045
- if (typeof config.retryStrategy === "function") {
3046
- const retryStrategy = await config.retryStrategy();
3047
- if (typeof retryStrategy.mode === "string") {
3048
- switch (retryStrategy.mode) {
3049
- case RETRY_MODES.ADAPTIVE:
3050
- setFeature2(context, "RETRY_MODE_ADAPTIVE", "F");
3051
- break;
3052
- case RETRY_MODES.STANDARD:
3053
- setFeature2(context, "RETRY_MODE_STANDARD", "E");
3054
- break;
3055
- }
3056
- }
3057
- }
3058
- if (typeof config.accountIdEndpointMode === "function") {
3059
- const endpointV2 = context.endpointV2;
3060
- if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
3061
- setFeature2(context, "ACCOUNT_ID_ENDPOINT", "O");
3062
- }
3063
- switch (await config.accountIdEndpointMode?.()) {
3064
- case "disabled":
3065
- setFeature2(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
3066
- break;
3067
- case "preferred":
3068
- setFeature2(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
3069
- break;
3070
- case "required":
3071
- setFeature2(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
3072
- break;
3073
- }
3074
- }
3075
- const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;
3076
- if (identity?.$source) {
3077
- const credentials = identity;
3078
- if (credentials.accountId) {
3079
- setFeature2(context, "RESOLVED_ACCOUNT_ID", "T");
3080
- }
3081
- for (const [key, value] of Object.entries(credentials.$source ?? {})) {
3082
- setFeature2(context, key, value);
3083
- }
3084
- }
3085
- }
3086
-
3087
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/constants.js
3088
- var USER_AGENT = "user-agent";
3089
- var X_AMZ_USER_AGENT = "x-amz-user-agent";
3090
- var SPACE = " ";
3091
- var UA_NAME_SEPARATOR = "/";
3092
- var UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g;
3093
- var UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g;
3094
- var UA_ESCAPE_CHAR = "-";
3095
-
3096
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/encode-features.js
3097
- var BYTE_LIMIT = 1024;
3098
- function encodeFeatures(features) {
3099
- let buffer = "";
3100
- for (const key in features) {
3101
- const val = features[key];
3102
- if (buffer.length + val.length + 1 <= BYTE_LIMIT) {
3103
- if (buffer.length) {
3104
- buffer += "," + val;
3105
- } else {
3106
- buffer += val;
3107
- }
3108
- continue;
3109
- }
3110
- break;
3111
- }
3112
- return buffer;
3113
- }
3114
-
3115
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/user-agent-middleware.js
3116
- var userAgentMiddleware = (options) => (next, context) => async (args) => {
3117
- const { request } = args;
3118
- if (!HttpRequest.isInstance(request)) {
3119
- return next(args);
3120
- }
3121
- const { headers } = request;
3122
- const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
3123
- const defaultUserAgent2 = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
3124
- await checkFeatures(context, options, args);
3125
- const awsContext = context;
3126
- defaultUserAgent2.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
3127
- const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
3128
- const appId = await options.userAgentAppId();
3129
- if (appId) {
3130
- defaultUserAgent2.push(escapeUserAgent([`app`, `${appId}`]));
3131
- }
3132
- const prefix = getUserAgentPrefix();
3133
- const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent2, ...userAgent, ...customUserAgent]).join(SPACE);
3134
- const normalUAValue = [
3135
- ...defaultUserAgent2.filter((section) => section.startsWith("aws-sdk-")),
3136
- ...customUserAgent
3137
- ].join(SPACE);
3138
- if (options.runtime !== "browser") {
3139
- if (normalUAValue) {
3140
- headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
3141
- }
3142
- headers[USER_AGENT] = sdkUserAgentValue;
3143
- } else {
3144
- headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
3145
- }
3146
- return next({
3147
- ...args,
3148
- request
3149
- });
3150
- };
3151
- var escapeUserAgent = (userAgentPair) => {
3152
- const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);
3153
- const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);
3154
- const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);
3155
- const prefix = name.substring(0, prefixSeparatorIndex);
3156
- let uaName = name.substring(prefixSeparatorIndex + 1);
3157
- if (prefix === "api") {
3158
- uaName = uaName.toLowerCase();
3159
- }
3160
- return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
3161
- switch (index) {
3162
- case 0:
3163
- return item;
3164
- case 1:
3165
- return `${acc}/${item}`;
3166
- default:
3167
- return `${acc}#${item}`;
3168
- }
3169
- }, "");
3170
- };
3171
- var getUserAgentMiddlewareOptions = {
3172
- name: "getUserAgentMiddleware",
3173
- step: "build",
3174
- priority: "low",
3175
- tags: ["SET_USER_AGENT", "USER_AGENT"],
3176
- override: true
3177
- };
3178
- var getUserAgentPlugin = (config) => ({
3179
- applyToStack: (clientStack) => {
3180
- clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
3181
- }
3182
- });
3183
-
3184
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js
3185
- var state = {
3186
- warningEmitted: false
3187
- };
3188
- var emitWarningIfUnsupportedVersion2 = (version) => {
3189
- if (version && !state.warningEmitted) {
3190
- if (process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED === "true") {
3191
- state.warningEmitted = true;
3192
- return;
3193
- }
3194
- const userMajorVersion = parseInt(version.substring(1, version.indexOf(".")));
3195
- const vv = 22;
3196
- if (userMajorVersion < vv) {
3197
- state.warningEmitted = true;
3198
- process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3)
3199
- versions published after the first week of January 2027
3200
- will require node >=${vv}. You are running node ${version}.
3201
-
3202
- To continue receiving updates to AWS services, bug fixes,
3203
- and security updates please upgrade to node >=${vv}.
3204
-
3205
- More information can be found at: https://a.co/c895JFp`);
3206
- }
3207
- }
3208
- };
3209
-
3210
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/getDefaultSocketTimeout.js
3211
- var isDefaultSocketTimeoutEnabled = () => typeof process === "object" && process?.env?.AWS_ENABLE_DEFAULT_SOCKET_TIMEOUT_2026 === "true";
3212
- var getDefaultSocketTimeout = (requestHandler, timeoutMs) => {
3213
- if (!isDefaultSocketTimeoutEnabled()) {
3214
- return void 0;
3215
- }
3216
- if (typeof requestHandler?.handle === "function") {
3217
- return void 0;
3218
- }
3219
- return timeoutMs;
3220
- };
3221
-
3222
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/defaultUserAgent.js
3223
- import { platform, release } from "os";
3224
- import { env } from "process";
3225
-
3226
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getRuntimeUserAgentPair.js
3227
- import { versions } from "process";
3228
- var getRuntimeUserAgentPair = () => {
3229
- const runtimesToCheck = ["deno", "bun", "llrt"];
3230
- for (const runtime of runtimesToCheck) {
3231
- if (versions[runtime]) {
3232
- return [`md/${runtime}`, versions[runtime]];
3233
- }
3234
- }
3235
- return ["md/nodejs", versions.node];
3236
- };
3237
-
3238
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/crt-availability.js
3239
- var crtAvailability = {
3240
- isCrtAvailable: false
3241
- };
3242
-
3243
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/is-crt-available.js
3244
- var isCrtAvailable = () => {
3245
- if (crtAvailability.isCrtAvailable) {
3246
- return ["md/crt-avail"];
3247
- }
3248
- return null;
3249
- };
3250
-
3251
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/defaultUserAgent.js
3252
- var createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
3253
- const runtimeUserAgentPair = getRuntimeUserAgentPair();
3254
- return async (config) => {
3255
- const sections = [
3256
- ["aws-sdk-js", clientVersion],
3257
- ["ua", "2.1"],
3258
- [`os/${platform()}`, release()],
3259
- ["lang/js"],
3260
- runtimeUserAgentPair
3261
- ];
3262
- const crtAvailable = isCrtAvailable();
3263
- if (crtAvailable) {
3264
- sections.push(crtAvailable);
3265
- }
3266
- if (serviceId) {
3267
- sections.push([`api/${serviceId}`, clientVersion]);
3268
- }
3269
- if (env.AWS_EXECUTION_ENV) {
3270
- sections.push([`exec-env/${env.AWS_EXECUTION_ENV}`]);
3271
- }
3272
- const appId = await config?.userAgentAppId?.();
3273
- const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
3274
- return resolvedUserAgent;
3275
- };
3276
- };
3277
-
3278
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.js
3279
- var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
3280
- var UA_APP_ID_INI_NAME = "sdk_ua_app_id";
3281
- var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
3282
- var NODE_APP_ID_CONFIG_OPTIONS = {
3283
- environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME],
3284
- configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
3285
- default: DEFAULT_UA_APP_ID
3286
- };
3287
-
3288
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/isVirtualHostableS3Bucket.js
3289
- var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
3290
- if (allowSubDomains) {
3291
- for (const label of value.split(".")) {
3292
- if (!isVirtualHostableS3Bucket(label)) {
3293
- return false;
3294
- }
3295
- }
3296
- return true;
3297
- }
3298
- if (!isValidHostLabel(value)) {
3299
- return false;
3300
- }
3301
- if (value.length < 3 || value.length > 63) {
3302
- return false;
3303
- }
3304
- if (value !== value.toLowerCase()) {
3305
- return false;
3306
- }
3307
- if (isIpAddress(value)) {
3308
- return false;
3309
- }
3310
- return true;
3311
- };
3312
-
3313
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js
3314
- var ARN_DELIMITER = ":";
3315
- var RESOURCE_DELIMITER = "/";
3316
- var parseArn = (value) => {
3317
- const segments = value.split(ARN_DELIMITER);
3318
- if (segments.length < 6) {
3319
- return null;
3320
- }
3321
- const [arn, partition2, service, region, accountId, ...resourcePath] = segments;
3322
- if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") {
3323
- return null;
3324
- }
3325
- const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();
3326
- return {
3327
- partition: partition2,
3328
- service,
3329
- region,
3330
- accountId,
3331
- resourceId
3332
- };
3333
- };
3334
-
3335
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/aws.js
3336
- var awsEndpointFunctions = {
3337
- isVirtualHostableS3Bucket,
3338
- parseArn,
3339
- partition
3340
- };
3341
- customEndpointFunctions.aws = awsEndpointFunctions;
3342
-
3343
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/stsRegionDefaultResolver.js
3344
- function stsRegionDefaultResolver(loaderConfig = {}) {
3345
- return loadConfig({
3346
- ...NODE_REGION_CONFIG_OPTIONS,
3347
- async default() {
3348
- if (!warning.silence) {
3349
- console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
3350
- }
3351
- return "us-east-1";
3352
- }
3353
- }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
3354
- }
3355
- var warning = {
3356
- silence: false
3357
- };
3358
-
3359
- // ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/extensions.js
3360
- var getAwsRegionExtensionConfiguration = (runtimeConfig) => {
3361
- return {
3362
- setRegion(region) {
3363
- runtimeConfig.region = region;
3364
- },
3365
- region() {
3366
- return runtimeConfig.region;
3367
- }
3368
- };
3369
- };
3370
- var resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {
3371
- return {
3372
- region: awsRegionExtensionConfiguration.region()
3373
- };
3374
- };
3375
-
3376
- export {
3377
- emitWarningIfUnsupportedVersion2 as emitWarningIfUnsupportedVersion,
3378
- setCredentialFeature,
3379
- Client,
3380
- Command,
3381
- createAggregatedClient,
3382
- ServiceException,
3383
- decorateServiceException,
3384
- loadConfigsForDefaultMode,
3385
- emitWarningIfUnsupportedVersion as emitWarningIfUnsupportedVersion2,
3386
- getDefaultExtensionConfiguration,
3387
- resolveDefaultRuntimeConfig,
3388
- getValueFromTextNode,
3389
- NoOpLogger,
3390
- makeBuilder,
3391
- resolveParams,
3392
- BinaryDecisionDiagram,
3393
- EndpointCache,
3394
- customEndpointFunctions,
3395
- decideEndpoint,
3396
- resolveEndpointConfig,
3397
- getEndpointPlugin,
3398
- DEFAULT_RETRY_MODE,
3399
- NODE_MAX_ATTEMPT_CONFIG_OPTIONS,
3400
- resolveRetryConfig,
3401
- NODE_RETRY_MODE_CONFIG_OPTIONS,
3402
- getRetryPlugin,
3403
- getDefaultSocketTimeout,
3404
- resolveHostHeaderConfig,
3405
- getHostHeaderPlugin,
3406
- getLoggerPlugin,
3407
- getRecursionDetectionPlugin,
3408
- getHttpAuthSchemeEndpointRuleSetPlugin,
3409
- getHttpSigningPlugin,
3410
- normalizeProvider2 as normalizeProvider,
3411
- DefaultIdentityProviderConfig,
3412
- NoAuthSigner,
3413
- isIdentityExpired,
3414
- doesIdentityRequireRefresh,
3415
- memoizeIdentityProvider,
3416
- resolveUserAgentConfig,
3417
- getUserAgentPlugin,
3418
- createDefaultUserAgentProvider,
3419
- NODE_APP_ID_CONFIG_OPTIONS,
3420
- awsEndpointFunctions,
3421
- stsRegionDefaultResolver,
3422
- getAwsRegionExtensionConfiguration,
3423
- resolveAwsRegionExtensionConfiguration
3424
- };