@slycode/slycode 0.2.10 → 0.2.12

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 (366) hide show
  1. package/dist/messaging/index.js +4 -2
  2. package/dist/messaging/index.js.map +1 -1
  3. package/dist/messaging/stt.d.ts +1 -0
  4. package/dist/messaging/stt.js +66 -57
  5. package/dist/messaging/stt.js.map +1 -1
  6. package/dist/messaging/types.d.ts +1 -0
  7. package/dist/web/.next/BUILD_ID +1 -1
  8. package/dist/web/.next/build-manifest.json +2 -2
  9. package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/auth/httpAuthSchemeProvider.js +126 -0
  10. package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/endpoint/endpointResolver.js +33 -0
  11. package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/endpoint/ruleset.js +7 -0
  12. package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/index.js +3057 -0
  13. package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/models/S3ServiceException.js +12 -0
  14. package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/models/errors.js +203 -0
  15. package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/runtimeConfig.js +67 -0
  16. package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/runtimeConfig.shared.js +56 -0
  17. package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/schemas/schemas_0.js +3258 -0
  18. package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/package.json +127 -0
  19. package/dist/web/.next/prerender-manifest.json +3 -3
  20. package/dist/web/.next/server/app/_global-error.html +2 -2
  21. package/dist/web/.next/server/app/_global-error.rsc +1 -1
  22. package/dist/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  23. package/dist/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  24. package/dist/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  25. package/dist/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  26. package/dist/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  27. package/dist/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  28. package/dist/web/.next/server/app/_not-found.html +1 -1
  29. package/dist/web/.next/server/app/_not-found.rsc +2 -2
  30. package/dist/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  31. package/dist/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  32. package/dist/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  33. package/dist/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  34. package/dist/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  35. package/dist/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  36. package/dist/web/.next/server/app/api/cli-assets/assistant/route.js.nft.json +1 -1
  37. package/dist/web/.next/server/app/api/cli-assets/fix/route.js.nft.json +1 -1
  38. package/dist/web/.next/server/app/api/cli-assets/import/route.js.nft.json +1 -1
  39. package/dist/web/.next/server/app/api/cli-assets/route.js.nft.json +1 -1
  40. package/dist/web/.next/server/app/api/cli-assets/store/preview/route.js.nft.json +1 -1
  41. package/dist/web/.next/server/app/api/cli-assets/store/route.js.nft.json +1 -1
  42. package/dist/web/.next/server/app/api/cli-assets/sync/route.js.nft.json +1 -1
  43. package/dist/web/.next/server/app/api/cli-assets/updates/route.js.nft.json +1 -1
  44. package/dist/web/.next/server/app/api/dashboard/route.js.nft.json +1 -1
  45. package/dist/web/.next/server/app/api/file/route.js.nft.json +1 -1
  46. package/dist/web/.next/server/app/api/git-status/route.js.nft.json +1 -1
  47. package/dist/web/.next/server/app/api/kanban/route.js.nft.json +1 -1
  48. package/dist/web/.next/server/app/api/kanban/stream/route.js.nft.json +1 -1
  49. package/dist/web/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  50. package/dist/web/.next/server/app/api/projects/reorder/route.js.nft.json +1 -1
  51. package/dist/web/.next/server/app/api/projects/route.js.nft.json +1 -1
  52. package/dist/web/.next/server/app/api/scheduler/route.js.nft.json +1 -1
  53. package/dist/web/.next/server/app/api/search/route.js.nft.json +1 -1
  54. package/dist/web/.next/server/app/api/sly-actions/invalidate/route.js.nft.json +1 -1
  55. package/dist/web/.next/server/app/api/sly-actions/route.js.nft.json +1 -1
  56. package/dist/web/.next/server/app/api/transcribe/route.js +5 -5
  57. package/dist/web/.next/server/app/api/transcribe/route.js.nft.json +1 -1
  58. package/dist/web/.next/server/app/api/version-check/route.js.nft.json +1 -1
  59. package/dist/web/.next/server/app/page.js.nft.json +1 -1
  60. package/dist/web/.next/server/app/page_client-reference-manifest.js +1 -1
  61. package/dist/web/.next/server/app/project/[id]/page.js.nft.json +1 -1
  62. package/dist/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
  63. package/dist/web/.next/server/chunks/[root-of-the-server]__1b9e0d6e._.js +19 -0
  64. package/dist/web/.next/server/chunks/{[root-of-the-server]__104b2da3._.js → [root-of-the-server]__4297cb97._.js} +3 -3
  65. package/dist/web/.next/server/chunks/[root-of-the-server]__52da7fe0._.js +5 -0
  66. package/dist/web/.next/server/chunks/{[root-of-the-server]__41df0777._.js → [root-of-the-server]__cf14e306._.js} +2 -2
  67. package/dist/web/.next/server/chunks/[root-of-the-server]__d5272169._.js +3 -0
  68. package/dist/web/.next/server/chunks/[root-of-the-server]__d56e68cb._.js +3 -0
  69. package/dist/web/.next/server/chunks/[root-of-the-server]__f5dae2ad._.js +3 -0
  70. package/dist/web/.next/server/chunks/{node_modules_ec9ae6c4._.js → node_modules_269a84e6._.js} +5 -5
  71. package/dist/web/.next/server/chunks/node_modules_9fc3887b._.js +3 -0
  72. package/dist/web/.next/server/chunks/node_modules_@aws-sdk_credential-provider-sso_dist-es_loadSso_570f147e.js +3 -0
  73. package/dist/web/.next/server/chunks/node_modules_@aws-sdk_nested-clients_dist-es_submodules_sts_index_c78619b3.js +1 -1
  74. package/dist/web/.next/server/chunks/node_modules_@smithy_smithy-client_dist-es_create-aggregated-client_db42850b.js +3 -0
  75. package/dist/web/.next/server/chunks/node_modules_c58ca22f._.js +3 -0
  76. package/dist/web/.next/server/chunks/node_modules_f96dfac4._.js +7 -0
  77. package/dist/web/.next/server/pages/404.html +1 -1
  78. package/dist/web/.next/server/pages/500.html +2 -2
  79. package/dist/web/.next/server/server-reference-manifest.js +1 -1
  80. package/dist/web/.next/server/server-reference-manifest.json +1 -1
  81. package/dist/web/.next/static/chunks/{0bab8c7c82cef548.js → 17bf7ad67057dc74.js} +1 -1
  82. package/dist/web/.next/static/chunks/{1b46e836090e130b.js → 29b5d391d655a999.js} +1 -1
  83. package/dist/web/.next/static/chunks/3df3846316317676.css +1 -0
  84. package/dist/web/.next/static/chunks/{345c46e638c28d26.js → 8cb404d087e9f3c7.js} +1 -1
  85. package/dist/web/.next/static/chunks/{de965b463aff71a9.js → e8b318caa49fce00.js} +1 -1
  86. package/dist/web/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js +119 -0
  87. package/dist/web/node_modules/@aws/lambda-invoke-store/package.json +55 -0
  88. package/dist/web/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js +31 -0
  89. package/dist/web/node_modules/@aws-crypto/crc32/build/main/index.js +108 -0
  90. package/dist/web/node_modules/@aws-crypto/crc32/package.json +32 -0
  91. package/dist/web/node_modules/@aws-crypto/crc32c/build/main/aws_crc32c.js +31 -0
  92. package/dist/web/node_modules/@aws-crypto/crc32c/build/main/index.js +78 -0
  93. package/dist/web/node_modules/@aws-crypto/crc32c/package.json +32 -0
  94. package/dist/web/node_modules/@aws-crypto/util/build/main/convertToBuffer.js +24 -0
  95. package/dist/web/node_modules/@aws-crypto/util/build/main/index.js +14 -0
  96. package/dist/web/node_modules/@aws-crypto/util/build/main/isEmptyData.js +13 -0
  97. package/dist/web/node_modules/@aws-crypto/util/build/main/numToUint8.js +15 -0
  98. package/dist/web/node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js +20 -0
  99. package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +32 -0
  100. package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/package.json +60 -0
  101. package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +47 -0
  102. package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/package.json +61 -0
  103. package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js +65 -0
  104. package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/package.json +66 -0
  105. package/dist/web/node_modules/@aws-crypto/util/package.json +32 -0
  106. package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/auth/httpAuthSchemeProvider.js +126 -0
  107. package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js +33 -0
  108. package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/ruleset.js +7 -0
  109. package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +3057 -0
  110. package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/models/S3ServiceException.js +12 -0
  111. package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/models/errors.js +203 -0
  112. package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js +67 -0
  113. package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.shared.js +56 -0
  114. package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/schemas/schemas_0.js +3258 -0
  115. package/dist/web/node_modules/@aws-sdk/client-s3/package.json +127 -0
  116. package/dist/web/node_modules/@aws-sdk/core/dist-cjs/index.js +2212 -0
  117. package/dist/web/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +51 -0
  118. package/dist/web/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +307 -0
  119. package/dist/web/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1859 -0
  120. package/dist/web/node_modules/@aws-sdk/core/package.json +121 -0
  121. package/dist/web/node_modules/@aws-sdk/crc64-nvme/dist-cjs/index.js +101 -0
  122. package/dist/web/node_modules/@aws-sdk/crc64-nvme/package.json +50 -0
  123. package/dist/web/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +41 -0
  124. package/dist/web/node_modules/@aws-sdk/credential-provider-env/package.json +63 -0
  125. package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +46 -0
  126. package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +70 -0
  127. package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +53 -0
  128. package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +17 -0
  129. package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +5 -0
  130. package/dist/web/node_modules/@aws-sdk/credential-provider-http/package.json +70 -0
  131. package/dist/web/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +224 -0
  132. package/dist/web/node_modules/@aws-sdk/credential-provider-ini/package.json +74 -0
  133. package/dist/web/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +286 -0
  134. package/dist/web/node_modules/@aws-sdk/credential-provider-login/package.json +68 -0
  135. package/dist/web/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +156 -0
  136. package/dist/web/node_modules/@aws-sdk/credential-provider-node/package.json +72 -0
  137. package/dist/web/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +79 -0
  138. package/dist/web/node_modules/@aws-sdk/credential-provider-process/package.json +64 -0
  139. package/dist/web/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +192 -0
  140. package/dist/web/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +8 -0
  141. package/dist/web/node_modules/@aws-sdk/credential-provider-sso/package.json +66 -0
  142. package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +34 -0
  143. package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +62 -0
  144. package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +27 -0
  145. package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/package.json +73 -0
  146. package/dist/web/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-cjs/index.js +352 -0
  147. package/dist/web/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +60 -0
  148. package/dist/web/node_modules/@aws-sdk/middleware-expect-continue/dist-cjs/index.js +48 -0
  149. package/dist/web/node_modules/@aws-sdk/middleware-expect-continue/package.json +58 -0
  150. package/dist/web/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/getCrc32ChecksumAlgorithmFunction.js +26 -0
  151. package/dist/web/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js +451 -0
  152. package/dist/web/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +78 -0
  153. package/dist/web/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js +41 -0
  154. package/dist/web/node_modules/@aws-sdk/middleware-host-header/package.json +59 -0
  155. package/dist/web/node_modules/@aws-sdk/middleware-location-constraint/dist-cjs/index.js +30 -0
  156. package/dist/web/node_modules/@aws-sdk/middleware-location-constraint/package.json +57 -0
  157. package/dist/web/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +48 -0
  158. package/dist/web/node_modules/@aws-sdk/middleware-logger/package.json +59 -0
  159. package/dist/web/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +29 -0
  160. package/dist/web/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js +33 -0
  161. package/dist/web/node_modules/@aws-sdk/middleware-recursion-detection/package.json +63 -0
  162. package/dist/web/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +570 -0
  163. package/dist/web/node_modules/@aws-sdk/middleware-sdk-s3/package.json +72 -0
  164. package/dist/web/node_modules/@aws-sdk/middleware-ssec/dist-cjs/index.js +73 -0
  165. package/dist/web/node_modules/@aws-sdk/middleware-ssec/package.json +57 -0
  166. package/dist/web/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +194 -0
  167. package/dist/web/node_modules/@aws-sdk/middleware-user-agent/package.json +63 -0
  168. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/auth/httpAuthSchemeProvider.js +56 -0
  169. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/endpointResolver.js +18 -0
  170. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/ruleset.js +133 -0
  171. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +170 -0
  172. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/SigninServiceException.js +12 -0
  173. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/errors.js +64 -0
  174. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.js +53 -0
  175. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.shared.js +49 -0
  176. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/schemas/schemas_0.js +125 -0
  177. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/auth/httpAuthSchemeProvider.js +56 -0
  178. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/endpointResolver.js +18 -0
  179. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/ruleset.js +106 -0
  180. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +160 -0
  181. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/models/SSOServiceException.js +12 -0
  182. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/models/errors.js +56 -0
  183. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.js +53 -0
  184. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.shared.js +49 -0
  185. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/schemas/schemas_0.js +90 -0
  186. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +56 -0
  187. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/endpointResolver.js +18 -0
  188. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.js +106 -0
  189. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +172 -0
  190. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/models/SSOOIDCServiceException.js +12 -0
  191. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/models/errors.js +195 -0
  192. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.js +53 -0
  193. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.shared.js +49 -0
  194. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/schemas/schemas_0.js +140 -0
  195. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/STSClient.js +54 -0
  196. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthExtensionConfiguration.js +43 -0
  197. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js +62 -0
  198. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/EndpointParameters.js +19 -0
  199. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/endpointResolver.js +18 -0
  200. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/ruleset.js +145 -0
  201. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +202 -0
  202. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/STSServiceException.js +12 -0
  203. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/errors.js +95 -0
  204. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.js +67 -0
  205. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.shared.js +50 -0
  206. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeExtensions.js +13 -0
  207. package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/schemas/schemas_0.js +195 -0
  208. package/dist/web/node_modules/@aws-sdk/nested-clients/package.json +147 -0
  209. package/dist/web/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +38 -0
  210. package/dist/web/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.js +20 -0
  211. package/dist/web/node_modules/@aws-sdk/region-config-resolver/package.json +62 -0
  212. package/dist/web/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +121 -0
  213. package/dist/web/node_modules/@aws-sdk/signature-v4-multi-region/package.json +61 -0
  214. package/dist/web/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +157 -0
  215. package/dist/web/node_modules/@aws-sdk/token-providers/package.json +70 -0
  216. package/dist/web/node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js +27 -0
  217. package/dist/web/node_modules/@aws-sdk/util-arn-parser/package.json +55 -0
  218. package/dist/web/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +406 -0
  219. package/dist/web/node_modules/@aws-sdk/util-endpoints/package.json +60 -0
  220. package/dist/web/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +185 -0
  221. package/dist/web/node_modules/@aws-sdk/util-user-agent-node/package.json +69 -0
  222. package/dist/web/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +131 -0
  223. package/dist/web/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +23 -0
  224. package/dist/web/node_modules/@aws-sdk/xml-builder/package.json +63 -0
  225. package/dist/web/node_modules/@smithy/config-resolver/dist-cjs/index.js +198 -0
  226. package/dist/web/node_modules/@smithy/config-resolver/package.json +66 -0
  227. package/dist/web/node_modules/@smithy/core/dist-cjs/index.js +345 -0
  228. package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1096 -0
  229. package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +22 -0
  230. package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +259 -0
  231. package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +884 -0
  232. package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +698 -0
  233. package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +694 -0
  234. package/dist/web/node_modules/@smithy/core/package.json +146 -0
  235. package/dist/web/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +372 -0
  236. package/dist/web/node_modules/@smithy/credential-provider-imds/package.json +70 -0
  237. package/dist/web/node_modules/@smithy/eventstream-codec/dist-cjs/index.js +388 -0
  238. package/dist/web/node_modules/@smithy/eventstream-codec/package.json +65 -0
  239. package/dist/web/node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js +7 -0
  240. package/dist/web/node_modules/@smithy/eventstream-serde-config-resolver/package.json +62 -0
  241. package/dist/web/node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js +53 -0
  242. package/dist/web/node_modules/@smithy/eventstream-serde-node/package.json +62 -0
  243. package/dist/web/node_modules/@smithy/eventstream-serde-universal/dist-cjs/index.js +132 -0
  244. package/dist/web/node_modules/@smithy/eventstream-serde-universal/package.json +66 -0
  245. package/dist/web/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +233 -0
  246. package/dist/web/node_modules/@smithy/fetch-http-handler/package.json +69 -0
  247. package/dist/web/node_modules/@smithy/hash-node/dist-cjs/index.js +42 -0
  248. package/dist/web/node_modules/@smithy/hash-node/package.json +65 -0
  249. package/dist/web/node_modules/@smithy/hash-stream-node/dist-cjs/index.js +67 -0
  250. package/dist/web/node_modules/@smithy/hash-stream-node/package.json +65 -0
  251. package/dist/web/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  252. package/dist/web/node_modules/@smithy/is-array-buffer/package.json +61 -0
  253. package/dist/web/node_modules/@smithy/middleware-content-length/dist-cjs/index.js +46 -0
  254. package/dist/web/node_modules/@smithy/middleware-content-length/package.json +64 -0
  255. package/dist/web/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +7 -0
  256. package/dist/web/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js +35 -0
  257. package/dist/web/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +264 -0
  258. package/dist/web/node_modules/@smithy/middleware-endpoint/package.json +75 -0
  259. package/dist/web/node_modules/@smithy/middleware-retry/dist-cjs/index.js +355 -0
  260. package/dist/web/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js +7 -0
  261. package/dist/web/node_modules/@smithy/middleware-retry/package.json +79 -0
  262. package/dist/web/node_modules/@smithy/middleware-serde/dist-cjs/index.js +104 -0
  263. package/dist/web/node_modules/@smithy/middleware-serde/package.json +66 -0
  264. package/dist/web/node_modules/@smithy/middleware-stack/dist-cjs/index.js +285 -0
  265. package/dist/web/node_modules/@smithy/middleware-stack/package.json +64 -0
  266. package/dist/web/node_modules/@smithy/node-config-provider/dist-cjs/index.js +62 -0
  267. package/dist/web/node_modules/@smithy/node-config-provider/package.json +66 -0
  268. package/dist/web/node_modules/@smithy/node-http-handler/dist-cjs/index.js +762 -0
  269. package/dist/web/node_modules/@smithy/node-http-handler/package.json +68 -0
  270. package/dist/web/node_modules/@smithy/property-provider/dist-cjs/index.js +117 -0
  271. package/dist/web/node_modules/@smithy/property-provider/package.json +61 -0
  272. package/dist/web/node_modules/@smithy/protocol-http/dist-cjs/index.js +169 -0
  273. package/dist/web/node_modules/@smithy/protocol-http/package.json +62 -0
  274. package/dist/web/node_modules/@smithy/querystring-builder/dist-cjs/index.js +26 -0
  275. package/dist/web/node_modules/@smithy/querystring-builder/package.json +61 -0
  276. package/dist/web/node_modules/@smithy/querystring-parser/dist-cjs/index.js +27 -0
  277. package/dist/web/node_modules/@smithy/querystring-parser/package.json +61 -0
  278. package/dist/web/node_modules/@smithy/service-error-classification/dist-cjs/index.js +77 -0
  279. package/dist/web/node_modules/@smithy/service-error-classification/package.json +60 -0
  280. package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +26 -0
  281. package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +12 -0
  282. package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +15 -0
  283. package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +196 -0
  284. package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js +16 -0
  285. package/dist/web/node_modules/@smithy/shared-ini-file-loader/package.json +73 -0
  286. package/dist/web/node_modules/@smithy/signature-v4/dist-cjs/index.js +556 -0
  287. package/dist/web/node_modules/@smithy/signature-v4/package.json +70 -0
  288. package/dist/web/node_modules/@smithy/smithy-client/dist-cjs/index.js +635 -0
  289. package/dist/web/node_modules/@smithy/smithy-client/package.json +70 -0
  290. package/dist/web/node_modules/@smithy/types/dist-cjs/index.js +91 -0
  291. package/dist/web/node_modules/@smithy/types/package.json +61 -0
  292. package/dist/web/node_modules/@smithy/url-parser/dist-cjs/index.js +23 -0
  293. package/dist/web/node_modules/@smithy/url-parser/package.json +62 -0
  294. package/dist/web/node_modules/@smithy/util-base64/dist-cjs/fromBase64.js +16 -0
  295. package/dist/web/node_modules/@smithy/util-base64/dist-cjs/index.js +27 -0
  296. package/dist/web/node_modules/@smithy/util-base64/dist-cjs/toBase64.js +19 -0
  297. package/dist/web/node_modules/@smithy/util-base64/package.json +74 -0
  298. package/dist/web/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js +30 -0
  299. package/dist/web/node_modules/@smithy/util-body-length-browser/package.json +61 -0
  300. package/dist/web/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +32 -0
  301. package/dist/web/node_modules/@smithy/util-body-length-node/package.json +62 -0
  302. package/dist/web/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  303. package/dist/web/node_modules/@smithy/util-buffer-from/package.json +62 -0
  304. package/dist/web/node_modules/@smithy/util-config-provider/dist-cjs/index.js +30 -0
  305. package/dist/web/node_modules/@smithy/util-config-provider/package.json +63 -0
  306. package/dist/web/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +74 -0
  307. package/dist/web/node_modules/@smithy/util-defaults-mode-node/package.json +67 -0
  308. package/dist/web/node_modules/@smithy/util-endpoints/dist-cjs/index.js +472 -0
  309. package/dist/web/node_modules/@smithy/util-endpoints/package.json +69 -0
  310. package/dist/web/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +38 -0
  311. package/dist/web/node_modules/@smithy/util-hex-encoding/package.json +61 -0
  312. package/dist/web/node_modules/@smithy/util-middleware/dist-cjs/index.js +15 -0
  313. package/dist/web/node_modules/@smithy/util-middleware/package.json +67 -0
  314. package/dist/web/node_modules/@smithy/util-retry/dist-cjs/index.js +278 -0
  315. package/dist/web/node_modules/@smithy/util-retry/package.json +71 -0
  316. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js +36 -0
  317. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js +7 -0
  318. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js +64 -0
  319. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js +39 -0
  320. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js +12 -0
  321. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js +60 -0
  322. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js +103 -0
  323. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js +31 -0
  324. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js +41 -0
  325. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +34 -0
  326. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/headStream.js +42 -0
  327. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/index.js +108 -0
  328. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +68 -0
  329. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +54 -0
  330. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js +10 -0
  331. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/splitStream.js +16 -0
  332. package/dist/web/node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +10 -0
  333. package/dist/web/node_modules/@smithy/util-stream/package.json +99 -0
  334. package/dist/web/node_modules/@smithy/util-uri-escape/dist-cjs/index.js +9 -0
  335. package/dist/web/node_modules/@smithy/util-uri-escape/package.json +60 -0
  336. package/dist/web/node_modules/@smithy/util-utf8/dist-cjs/index.js +32 -0
  337. package/dist/web/node_modules/@smithy/util-utf8/package.json +67 -0
  338. package/dist/web/node_modules/@smithy/util-waiter/dist-cjs/index.js +179 -0
  339. package/dist/web/node_modules/@smithy/util-waiter/package.json +63 -0
  340. package/dist/web/node_modules/@smithy/uuid/dist-cjs/index.js +36 -0
  341. package/dist/web/node_modules/@smithy/uuid/dist-cjs/randomUUID.js +6 -0
  342. package/dist/web/node_modules/@smithy/uuid/package.json +66 -0
  343. package/dist/web/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
  344. package/dist/web/node_modules/fast-xml-parser/package.json +94 -0
  345. package/dist/web/node_modules/tslib/package.json +47 -0
  346. package/dist/web/node_modules/tslib/tslib.js +484 -0
  347. package/dist/web/package-lock.json +470 -161
  348. package/dist/web/package.json +3 -1
  349. package/dist/web/src/app/api/transcribe/route.ts +84 -68
  350. package/dist/web/src/components/VoiceControlBar.tsx +1 -0
  351. package/dist/web/src/lib/webm-to-ogg-opus.ts +254 -0
  352. package/dist/web/tsconfig.tsbuildinfo +1 -1
  353. package/package.json +1 -1
  354. package/templates/kanban-seed.json +1 -1
  355. package/dist/web/.next/server/chunks/[root-of-the-server]__0f8687da._.js +0 -3
  356. package/dist/web/.next/server/chunks/[root-of-the-server]__1cdc76ef._.js +0 -3
  357. package/dist/web/.next/server/chunks/[root-of-the-server]__3998d59e._.js +0 -19
  358. package/dist/web/.next/server/chunks/[root-of-the-server]__3dc5531f._.js +0 -5
  359. package/dist/web/.next/server/chunks/[root-of-the-server]__403750fd._.js +0 -3
  360. package/dist/web/.next/server/chunks/[root-of-the-server]__934c9bb4._.js +0 -5
  361. package/dist/web/.next/server/chunks/[root-of-the-server]__e00fb85f._.js +0 -9
  362. package/dist/web/.next/server/chunks/a9bf9_@aws-sdk_core_dist-es_submodules_protocols_json_AwsRestJsonProtocol_764d7a83.js +0 -3
  363. package/dist/web/.next/static/chunks/f3d7065d54a0b9ac.css +0 -1
  364. /package/dist/web/.next/static/{_fCicMElBguqtWA_EpzdZ → rlJUIaeDUP-JDj2nvHySS}/_buildManifest.js +0 -0
  365. /package/dist/web/.next/static/{_fCicMElBguqtWA_EpzdZ → rlJUIaeDUP-JDj2nvHySS}/_clientMiddlewareManifest.json +0 -0
  366. /package/dist/web/.next/static/{_fCicMElBguqtWA_EpzdZ → rlJUIaeDUP-JDj2nvHySS}/_ssgManifest.js +0 -0
@@ -0,0 +1,762 @@
1
+ 'use strict';
2
+
3
+ var protocolHttp = require('@smithy/protocol-http');
4
+ var querystringBuilder = require('@smithy/querystring-builder');
5
+ var node_https = require('node:https');
6
+ var node_stream = require('node:stream');
7
+ var http2 = require('node:http2');
8
+
9
+ function buildAbortError(abortSignal) {
10
+ const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal
11
+ ? abortSignal.reason
12
+ : undefined;
13
+ if (reason) {
14
+ if (reason instanceof Error) {
15
+ const abortError = new Error("Request aborted");
16
+ abortError.name = "AbortError";
17
+ abortError.cause = reason;
18
+ return abortError;
19
+ }
20
+ const abortError = new Error(String(reason));
21
+ abortError.name = "AbortError";
22
+ return abortError;
23
+ }
24
+ const abortError = new Error("Request aborted");
25
+ abortError.name = "AbortError";
26
+ return abortError;
27
+ }
28
+
29
+ const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
30
+
31
+ const getTransformedHeaders = (headers) => {
32
+ const transformedHeaders = {};
33
+ for (const name of Object.keys(headers)) {
34
+ const headerValues = headers[name];
35
+ transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
36
+ }
37
+ return transformedHeaders;
38
+ };
39
+
40
+ const timing = {
41
+ setTimeout: (cb, ms) => setTimeout(cb, ms),
42
+ clearTimeout: (timeoutId) => clearTimeout(timeoutId),
43
+ };
44
+
45
+ const DEFER_EVENT_LISTENER_TIME$2 = 1000;
46
+ const setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
47
+ if (!timeoutInMs) {
48
+ return -1;
49
+ }
50
+ const registerTimeout = (offset) => {
51
+ const timeoutId = timing.setTimeout(() => {
52
+ request.destroy();
53
+ reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {
54
+ name: "TimeoutError",
55
+ }));
56
+ }, timeoutInMs - offset);
57
+ const doWithSocket = (socket) => {
58
+ if (socket?.connecting) {
59
+ socket.on("connect", () => {
60
+ timing.clearTimeout(timeoutId);
61
+ });
62
+ }
63
+ else {
64
+ timing.clearTimeout(timeoutId);
65
+ }
66
+ };
67
+ if (request.socket) {
68
+ doWithSocket(request.socket);
69
+ }
70
+ else {
71
+ request.on("socket", doWithSocket);
72
+ }
73
+ };
74
+ if (timeoutInMs < 2000) {
75
+ registerTimeout(0);
76
+ return 0;
77
+ }
78
+ return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);
79
+ };
80
+
81
+ const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {
82
+ if (timeoutInMs) {
83
+ return timing.setTimeout(() => {
84
+ let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;
85
+ if (throwOnRequestTimeout) {
86
+ const error = Object.assign(new Error(msg), {
87
+ name: "TimeoutError",
88
+ code: "ETIMEDOUT",
89
+ });
90
+ req.destroy(error);
91
+ reject(error);
92
+ }
93
+ else {
94
+ msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;
95
+ logger?.warn?.(msg);
96
+ }
97
+ }, timeoutInMs);
98
+ }
99
+ return -1;
100
+ };
101
+
102
+ const DEFER_EVENT_LISTENER_TIME$1 = 3000;
103
+ const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {
104
+ if (keepAlive !== true) {
105
+ return -1;
106
+ }
107
+ const registerListener = () => {
108
+ if (request.socket) {
109
+ request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
110
+ }
111
+ else {
112
+ request.on("socket", (socket) => {
113
+ socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
114
+ });
115
+ }
116
+ };
117
+ if (deferTimeMs === 0) {
118
+ registerListener();
119
+ return 0;
120
+ }
121
+ return timing.setTimeout(registerListener, deferTimeMs);
122
+ };
123
+
124
+ const DEFER_EVENT_LISTENER_TIME = 3000;
125
+ const setSocketTimeout = (request, reject, timeoutInMs = 0) => {
126
+ const registerTimeout = (offset) => {
127
+ const timeout = timeoutInMs - offset;
128
+ const onTimeout = () => {
129
+ request.destroy();
130
+ reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" }));
131
+ };
132
+ if (request.socket) {
133
+ request.socket.setTimeout(timeout, onTimeout);
134
+ request.on("close", () => request.socket?.removeListener("timeout", onTimeout));
135
+ }
136
+ else {
137
+ request.setTimeout(timeout, onTimeout);
138
+ }
139
+ };
140
+ if (0 < timeoutInMs && timeoutInMs < 6000) {
141
+ registerTimeout(0);
142
+ return 0;
143
+ }
144
+ return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
145
+ };
146
+
147
+ const MIN_WAIT_TIME = 6_000;
148
+ async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {
149
+ const headers = request.headers ?? {};
150
+ const expect = headers.Expect || headers.expect;
151
+ let timeoutId = -1;
152
+ let sendBody = true;
153
+ if (!externalAgent && expect === "100-continue") {
154
+ sendBody = await Promise.race([
155
+ new Promise((resolve) => {
156
+ timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
157
+ }),
158
+ new Promise((resolve) => {
159
+ httpRequest.on("continue", () => {
160
+ timing.clearTimeout(timeoutId);
161
+ resolve(true);
162
+ });
163
+ httpRequest.on("response", () => {
164
+ timing.clearTimeout(timeoutId);
165
+ resolve(false);
166
+ });
167
+ httpRequest.on("error", () => {
168
+ timing.clearTimeout(timeoutId);
169
+ resolve(false);
170
+ });
171
+ }),
172
+ ]);
173
+ }
174
+ if (sendBody) {
175
+ writeBody(httpRequest, request.body);
176
+ }
177
+ }
178
+ function writeBody(httpRequest, body) {
179
+ if (body instanceof node_stream.Readable) {
180
+ body.pipe(httpRequest);
181
+ return;
182
+ }
183
+ if (body) {
184
+ const isBuffer = Buffer.isBuffer(body);
185
+ const isString = typeof body === "string";
186
+ if (isBuffer || isString) {
187
+ if (isBuffer && body.byteLength === 0) {
188
+ httpRequest.end();
189
+ }
190
+ else {
191
+ httpRequest.end(body);
192
+ }
193
+ return;
194
+ }
195
+ const uint8 = body;
196
+ if (typeof uint8 === "object" &&
197
+ uint8.buffer &&
198
+ typeof uint8.byteOffset === "number" &&
199
+ typeof uint8.byteLength === "number") {
200
+ httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));
201
+ return;
202
+ }
203
+ httpRequest.end(Buffer.from(body));
204
+ return;
205
+ }
206
+ httpRequest.end();
207
+ }
208
+
209
+ const DEFAULT_REQUEST_TIMEOUT = 0;
210
+ let hAgent = undefined;
211
+ let hRequest = undefined;
212
+ class NodeHttpHandler {
213
+ config;
214
+ configProvider;
215
+ socketWarningTimestamp = 0;
216
+ externalAgent = false;
217
+ metadata = { handlerProtocol: "http/1.1" };
218
+ static create(instanceOrOptions) {
219
+ if (typeof instanceOrOptions?.handle === "function") {
220
+ return instanceOrOptions;
221
+ }
222
+ return new NodeHttpHandler(instanceOrOptions);
223
+ }
224
+ static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {
225
+ const { sockets, requests, maxSockets } = agent;
226
+ if (typeof maxSockets !== "number" || maxSockets === Infinity) {
227
+ return socketWarningTimestamp;
228
+ }
229
+ const interval = 15_000;
230
+ if (Date.now() - interval < socketWarningTimestamp) {
231
+ return socketWarningTimestamp;
232
+ }
233
+ if (sockets && requests) {
234
+ for (const origin in sockets) {
235
+ const socketsInUse = sockets[origin]?.length ?? 0;
236
+ const requestsEnqueued = requests[origin]?.length ?? 0;
237
+ if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
238
+ logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
239
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
240
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);
241
+ return Date.now();
242
+ }
243
+ }
244
+ }
245
+ return socketWarningTimestamp;
246
+ }
247
+ constructor(options) {
248
+ this.configProvider = new Promise((resolve, reject) => {
249
+ if (typeof options === "function") {
250
+ options()
251
+ .then((_options) => {
252
+ resolve(this.resolveDefaultConfig(_options));
253
+ })
254
+ .catch(reject);
255
+ }
256
+ else {
257
+ resolve(this.resolveDefaultConfig(options));
258
+ }
259
+ });
260
+ }
261
+ destroy() {
262
+ this.config?.httpAgent?.destroy();
263
+ this.config?.httpsAgent?.destroy();
264
+ }
265
+ async handle(request, { abortSignal, requestTimeout } = {}) {
266
+ if (!this.config) {
267
+ this.config = await this.configProvider;
268
+ }
269
+ const config = this.config;
270
+ const isSSL = request.protocol === "https:";
271
+ if (!isSSL && !this.config.httpAgent) {
272
+ this.config.httpAgent = await this.config.httpAgentProvider();
273
+ }
274
+ return new Promise((_resolve, _reject) => {
275
+ let writeRequestBodyPromise = undefined;
276
+ const timeouts = [];
277
+ const resolve = async (arg) => {
278
+ await writeRequestBodyPromise;
279
+ timeouts.forEach(timing.clearTimeout);
280
+ _resolve(arg);
281
+ };
282
+ const reject = async (arg) => {
283
+ await writeRequestBodyPromise;
284
+ timeouts.forEach(timing.clearTimeout);
285
+ _reject(arg);
286
+ };
287
+ if (abortSignal?.aborted) {
288
+ const abortError = buildAbortError(abortSignal);
289
+ reject(abortError);
290
+ return;
291
+ }
292
+ const headers = request.headers ?? {};
293
+ const expectContinue = (headers.Expect ?? headers.expect) === "100-continue";
294
+ let agent = isSSL ? config.httpsAgent : config.httpAgent;
295
+ if (expectContinue && !this.externalAgent) {
296
+ agent = new (isSSL ? node_https.Agent : hAgent)({
297
+ keepAlive: false,
298
+ maxSockets: Infinity,
299
+ });
300
+ }
301
+ timeouts.push(timing.setTimeout(() => {
302
+ this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);
303
+ }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000)));
304
+ const queryString = querystringBuilder.buildQueryString(request.query || {});
305
+ let auth = undefined;
306
+ if (request.username != null || request.password != null) {
307
+ const username = request.username ?? "";
308
+ const password = request.password ?? "";
309
+ auth = `${username}:${password}`;
310
+ }
311
+ let path = request.path;
312
+ if (queryString) {
313
+ path += `?${queryString}`;
314
+ }
315
+ if (request.fragment) {
316
+ path += `#${request.fragment}`;
317
+ }
318
+ let hostname = request.hostname ?? "";
319
+ if (hostname[0] === "[" && hostname.endsWith("]")) {
320
+ hostname = request.hostname.slice(1, -1);
321
+ }
322
+ else {
323
+ hostname = request.hostname;
324
+ }
325
+ const nodeHttpsOptions = {
326
+ headers: request.headers,
327
+ host: hostname,
328
+ method: request.method,
329
+ path,
330
+ port: request.port,
331
+ agent,
332
+ auth,
333
+ };
334
+ const requestFunc = isSSL ? node_https.request : hRequest;
335
+ const req = requestFunc(nodeHttpsOptions, (res) => {
336
+ const httpResponse = new protocolHttp.HttpResponse({
337
+ statusCode: res.statusCode || -1,
338
+ reason: res.statusMessage,
339
+ headers: getTransformedHeaders(res.headers),
340
+ body: res,
341
+ });
342
+ resolve({ response: httpResponse });
343
+ });
344
+ req.on("error", (err) => {
345
+ if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
346
+ reject(Object.assign(err, { name: "TimeoutError" }));
347
+ }
348
+ else {
349
+ reject(err);
350
+ }
351
+ });
352
+ if (abortSignal) {
353
+ const onAbort = () => {
354
+ req.destroy();
355
+ const abortError = buildAbortError(abortSignal);
356
+ reject(abortError);
357
+ };
358
+ if (typeof abortSignal.addEventListener === "function") {
359
+ const signal = abortSignal;
360
+ signal.addEventListener("abort", onAbort, { once: true });
361
+ req.once("close", () => signal.removeEventListener("abort", onAbort));
362
+ }
363
+ else {
364
+ abortSignal.onabort = onAbort;
365
+ }
366
+ }
367
+ const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
368
+ timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout));
369
+ timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console));
370
+ timeouts.push(setSocketTimeout(req, reject, config.socketTimeout));
371
+ const httpAgent = nodeHttpsOptions.agent;
372
+ if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
373
+ timeouts.push(setSocketKeepAlive(req, {
374
+ keepAlive: httpAgent.keepAlive,
375
+ keepAliveMsecs: httpAgent.keepAliveMsecs,
376
+ }));
377
+ }
378
+ writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => {
379
+ timeouts.forEach(timing.clearTimeout);
380
+ return _reject(e);
381
+ });
382
+ });
383
+ }
384
+ updateHttpClientConfig(key, value) {
385
+ this.config = undefined;
386
+ this.configProvider = this.configProvider.then((config) => {
387
+ return {
388
+ ...config,
389
+ [key]: value,
390
+ };
391
+ });
392
+ }
393
+ httpHandlerConfigs() {
394
+ return this.config ?? {};
395
+ }
396
+ resolveDefaultConfig(options) {
397
+ const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};
398
+ const keepAlive = true;
399
+ const maxSockets = 50;
400
+ return {
401
+ connectionTimeout,
402
+ requestTimeout,
403
+ socketTimeout,
404
+ socketAcquisitionWarningTimeout,
405
+ throwOnRequestTimeout,
406
+ httpAgentProvider: async () => {
407
+ const { Agent, request } = await import('node:http');
408
+ hRequest = request;
409
+ hAgent = Agent;
410
+ if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") {
411
+ this.externalAgent = true;
412
+ return httpAgent;
413
+ }
414
+ return new hAgent({ keepAlive, maxSockets, ...httpAgent });
415
+ },
416
+ httpsAgent: (() => {
417
+ if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
418
+ this.externalAgent = true;
419
+ return httpsAgent;
420
+ }
421
+ return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });
422
+ })(),
423
+ logger,
424
+ };
425
+ }
426
+ }
427
+
428
+ class NodeHttp2ConnectionPool {
429
+ sessions = [];
430
+ constructor(sessions) {
431
+ this.sessions = sessions ?? [];
432
+ }
433
+ poll() {
434
+ if (this.sessions.length > 0) {
435
+ return this.sessions.shift();
436
+ }
437
+ }
438
+ offerLast(session) {
439
+ this.sessions.push(session);
440
+ }
441
+ contains(session) {
442
+ return this.sessions.includes(session);
443
+ }
444
+ remove(session) {
445
+ this.sessions = this.sessions.filter((s) => s !== session);
446
+ }
447
+ [Symbol.iterator]() {
448
+ return this.sessions[Symbol.iterator]();
449
+ }
450
+ destroy(connection) {
451
+ for (const session of this.sessions) {
452
+ if (session === connection) {
453
+ if (!session.destroyed) {
454
+ session.destroy();
455
+ }
456
+ }
457
+ }
458
+ }
459
+ }
460
+
461
+ class NodeHttp2ConnectionManager {
462
+ constructor(config) {
463
+ this.config = config;
464
+ if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
465
+ throw new RangeError("maxConcurrency must be greater than zero.");
466
+ }
467
+ }
468
+ config;
469
+ sessionCache = new Map();
470
+ lease(requestContext, connectionConfiguration) {
471
+ const url = this.getUrlString(requestContext);
472
+ const existingPool = this.sessionCache.get(url);
473
+ if (existingPool) {
474
+ const existingSession = existingPool.poll();
475
+ if (existingSession && !this.config.disableConcurrency) {
476
+ return existingSession;
477
+ }
478
+ }
479
+ const session = http2.connect(url);
480
+ if (this.config.maxConcurrency) {
481
+ session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
482
+ if (err) {
483
+ throw new Error("Fail to set maxConcurrentStreams to " +
484
+ this.config.maxConcurrency +
485
+ "when creating new session for " +
486
+ requestContext.destination.toString());
487
+ }
488
+ });
489
+ }
490
+ session.unref();
491
+ const destroySessionCb = () => {
492
+ session.destroy();
493
+ this.deleteSession(url, session);
494
+ };
495
+ session.on("goaway", destroySessionCb);
496
+ session.on("error", destroySessionCb);
497
+ session.on("frameError", destroySessionCb);
498
+ session.on("close", () => this.deleteSession(url, session));
499
+ if (connectionConfiguration.requestTimeout) {
500
+ session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);
501
+ }
502
+ const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool();
503
+ connectionPool.offerLast(session);
504
+ this.sessionCache.set(url, connectionPool);
505
+ return session;
506
+ }
507
+ deleteSession(authority, session) {
508
+ const existingConnectionPool = this.sessionCache.get(authority);
509
+ if (!existingConnectionPool) {
510
+ return;
511
+ }
512
+ if (!existingConnectionPool.contains(session)) {
513
+ return;
514
+ }
515
+ existingConnectionPool.remove(session);
516
+ this.sessionCache.set(authority, existingConnectionPool);
517
+ }
518
+ release(requestContext, session) {
519
+ const cacheKey = this.getUrlString(requestContext);
520
+ this.sessionCache.get(cacheKey)?.offerLast(session);
521
+ }
522
+ destroy() {
523
+ for (const [key, connectionPool] of this.sessionCache) {
524
+ for (const session of connectionPool) {
525
+ if (!session.destroyed) {
526
+ session.destroy();
527
+ }
528
+ connectionPool.remove(session);
529
+ }
530
+ this.sessionCache.delete(key);
531
+ }
532
+ }
533
+ setMaxConcurrentStreams(maxConcurrentStreams) {
534
+ if (maxConcurrentStreams && maxConcurrentStreams <= 0) {
535
+ throw new RangeError("maxConcurrentStreams must be greater than zero.");
536
+ }
537
+ this.config.maxConcurrency = maxConcurrentStreams;
538
+ }
539
+ setDisableConcurrentStreams(disableConcurrentStreams) {
540
+ this.config.disableConcurrency = disableConcurrentStreams;
541
+ }
542
+ getUrlString(request) {
543
+ return request.destination.toString();
544
+ }
545
+ }
546
+
547
+ class NodeHttp2Handler {
548
+ config;
549
+ configProvider;
550
+ metadata = { handlerProtocol: "h2" };
551
+ connectionManager = new NodeHttp2ConnectionManager({});
552
+ static create(instanceOrOptions) {
553
+ if (typeof instanceOrOptions?.handle === "function") {
554
+ return instanceOrOptions;
555
+ }
556
+ return new NodeHttp2Handler(instanceOrOptions);
557
+ }
558
+ constructor(options) {
559
+ this.configProvider = new Promise((resolve, reject) => {
560
+ if (typeof options === "function") {
561
+ options()
562
+ .then((opts) => {
563
+ resolve(opts || {});
564
+ })
565
+ .catch(reject);
566
+ }
567
+ else {
568
+ resolve(options || {});
569
+ }
570
+ });
571
+ }
572
+ destroy() {
573
+ this.connectionManager.destroy();
574
+ }
575
+ async handle(request, { abortSignal, requestTimeout } = {}) {
576
+ if (!this.config) {
577
+ this.config = await this.configProvider;
578
+ this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);
579
+ if (this.config.maxConcurrentStreams) {
580
+ this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);
581
+ }
582
+ }
583
+ const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
584
+ const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
585
+ return new Promise((_resolve, _reject) => {
586
+ let fulfilled = false;
587
+ let writeRequestBodyPromise = undefined;
588
+ const resolve = async (arg) => {
589
+ await writeRequestBodyPromise;
590
+ _resolve(arg);
591
+ };
592
+ const reject = async (arg) => {
593
+ await writeRequestBodyPromise;
594
+ _reject(arg);
595
+ };
596
+ if (abortSignal?.aborted) {
597
+ fulfilled = true;
598
+ const abortError = buildAbortError(abortSignal);
599
+ reject(abortError);
600
+ return;
601
+ }
602
+ const { hostname, method, port, protocol, query } = request;
603
+ let auth = "";
604
+ if (request.username != null || request.password != null) {
605
+ const username = request.username ?? "";
606
+ const password = request.password ?? "";
607
+ auth = `${username}:${password}@`;
608
+ }
609
+ const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
610
+ const requestContext = { destination: new URL(authority) };
611
+ const session = this.connectionManager.lease(requestContext, {
612
+ requestTimeout: this.config?.sessionTimeout,
613
+ disableConcurrentStreams: disableConcurrentStreams || false,
614
+ });
615
+ const rejectWithDestroy = (err) => {
616
+ if (disableConcurrentStreams) {
617
+ this.destroySession(session);
618
+ }
619
+ fulfilled = true;
620
+ reject(err);
621
+ };
622
+ const queryString = querystringBuilder.buildQueryString(query || {});
623
+ let path = request.path;
624
+ if (queryString) {
625
+ path += `?${queryString}`;
626
+ }
627
+ if (request.fragment) {
628
+ path += `#${request.fragment}`;
629
+ }
630
+ const req = session.request({
631
+ ...request.headers,
632
+ [http2.constants.HTTP2_HEADER_PATH]: path,
633
+ [http2.constants.HTTP2_HEADER_METHOD]: method,
634
+ });
635
+ session.ref();
636
+ req.on("response", (headers) => {
637
+ const httpResponse = new protocolHttp.HttpResponse({
638
+ statusCode: headers[":status"] || -1,
639
+ headers: getTransformedHeaders(headers),
640
+ body: req,
641
+ });
642
+ fulfilled = true;
643
+ resolve({ response: httpResponse });
644
+ if (disableConcurrentStreams) {
645
+ session.close();
646
+ this.connectionManager.deleteSession(authority, session);
647
+ }
648
+ });
649
+ if (effectiveRequestTimeout) {
650
+ req.setTimeout(effectiveRequestTimeout, () => {
651
+ req.close();
652
+ const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);
653
+ timeoutError.name = "TimeoutError";
654
+ rejectWithDestroy(timeoutError);
655
+ });
656
+ }
657
+ if (abortSignal) {
658
+ const onAbort = () => {
659
+ req.close();
660
+ const abortError = buildAbortError(abortSignal);
661
+ rejectWithDestroy(abortError);
662
+ };
663
+ if (typeof abortSignal.addEventListener === "function") {
664
+ const signal = abortSignal;
665
+ signal.addEventListener("abort", onAbort, { once: true });
666
+ req.once("close", () => signal.removeEventListener("abort", onAbort));
667
+ }
668
+ else {
669
+ abortSignal.onabort = onAbort;
670
+ }
671
+ }
672
+ req.on("frameError", (type, code, id) => {
673
+ rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
674
+ });
675
+ req.on("error", rejectWithDestroy);
676
+ req.on("aborted", () => {
677
+ rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`));
678
+ });
679
+ req.on("close", () => {
680
+ session.unref();
681
+ if (disableConcurrentStreams) {
682
+ session.destroy();
683
+ }
684
+ if (!fulfilled) {
685
+ rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
686
+ }
687
+ });
688
+ writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout);
689
+ });
690
+ }
691
+ updateHttpClientConfig(key, value) {
692
+ this.config = undefined;
693
+ this.configProvider = this.configProvider.then((config) => {
694
+ return {
695
+ ...config,
696
+ [key]: value,
697
+ };
698
+ });
699
+ }
700
+ httpHandlerConfigs() {
701
+ return this.config ?? {};
702
+ }
703
+ destroySession(session) {
704
+ if (!session.destroyed) {
705
+ session.destroy();
706
+ }
707
+ }
708
+ }
709
+
710
+ class Collector extends node_stream.Writable {
711
+ bufferedBytes = [];
712
+ _write(chunk, encoding, callback) {
713
+ this.bufferedBytes.push(chunk);
714
+ callback();
715
+ }
716
+ }
717
+
718
+ const streamCollector = (stream) => {
719
+ if (isReadableStreamInstance(stream)) {
720
+ return collectReadableStream(stream);
721
+ }
722
+ return new Promise((resolve, reject) => {
723
+ const collector = new Collector();
724
+ stream.pipe(collector);
725
+ stream.on("error", (err) => {
726
+ collector.end();
727
+ reject(err);
728
+ });
729
+ collector.on("error", reject);
730
+ collector.on("finish", function () {
731
+ const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
732
+ resolve(bytes);
733
+ });
734
+ });
735
+ };
736
+ const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream;
737
+ async function collectReadableStream(stream) {
738
+ const chunks = [];
739
+ const reader = stream.getReader();
740
+ let isDone = false;
741
+ let length = 0;
742
+ while (!isDone) {
743
+ const { done, value } = await reader.read();
744
+ if (value) {
745
+ chunks.push(value);
746
+ length += value.length;
747
+ }
748
+ isDone = done;
749
+ }
750
+ const collected = new Uint8Array(length);
751
+ let offset = 0;
752
+ for (const chunk of chunks) {
753
+ collected.set(chunk, offset);
754
+ offset += chunk.length;
755
+ }
756
+ return collected;
757
+ }
758
+
759
+ exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;
760
+ exports.NodeHttp2Handler = NodeHttp2Handler;
761
+ exports.NodeHttpHandler = NodeHttpHandler;
762
+ exports.streamCollector = streamCollector;