@hasna/connectors 1.3.0 → 1.3.2

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 (708) hide show
  1. package/bin/index.js +248 -2116
  2. package/bin/mcp.js +176 -1690
  3. package/bin/serve.js +130 -1246
  4. package/connectors/connect-gmail/src/cli/index.ts +32 -3
  5. package/connectors/connect-mercury/CLAUDE.md +1 -0
  6. package/connectors/connect-yousign/CLAUDE.md +48 -0
  7. package/connectors/connect-yousign/bun.lock +32 -0
  8. package/connectors/connect-yousign/node_modules/@types/bun/LICENSE +21 -0
  9. package/connectors/connect-yousign/node_modules/@types/bun/README.md +20 -0
  10. package/connectors/connect-yousign/node_modules/@types/bun/index.d.ts +1 -0
  11. package/connectors/connect-yousign/node_modules/@types/bun/package.json +53 -0
  12. package/connectors/connect-yousign/node_modules/@types/node/LICENSE +21 -0
  13. package/connectors/connect-yousign/node_modules/@types/node/README.md +15 -0
  14. package/connectors/connect-yousign/node_modules/@types/node/assert/strict.d.ts +105 -0
  15. package/connectors/connect-yousign/node_modules/@types/node/assert.d.ts +955 -0
  16. package/connectors/connect-yousign/node_modules/@types/node/async_hooks.d.ts +623 -0
  17. package/connectors/connect-yousign/node_modules/@types/node/buffer.buffer.d.ts +466 -0
  18. package/connectors/connect-yousign/node_modules/@types/node/buffer.d.ts +1810 -0
  19. package/connectors/connect-yousign/node_modules/@types/node/child_process.d.ts +1433 -0
  20. package/connectors/connect-yousign/node_modules/@types/node/cluster.d.ts +486 -0
  21. package/connectors/connect-yousign/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  22. package/connectors/connect-yousign/node_modules/@types/node/console.d.ts +151 -0
  23. package/connectors/connect-yousign/node_modules/@types/node/constants.d.ts +20 -0
  24. package/connectors/connect-yousign/node_modules/@types/node/crypto.d.ts +4065 -0
  25. package/connectors/connect-yousign/node_modules/@types/node/dgram.d.ts +564 -0
  26. package/connectors/connect-yousign/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
  27. package/connectors/connect-yousign/node_modules/@types/node/dns/promises.d.ts +503 -0
  28. package/connectors/connect-yousign/node_modules/@types/node/dns.d.ts +922 -0
  29. package/connectors/connect-yousign/node_modules/@types/node/domain.d.ts +166 -0
  30. package/connectors/connect-yousign/node_modules/@types/node/events.d.ts +1047 -0
  31. package/connectors/connect-yousign/node_modules/@types/node/fs/promises.d.ts +1329 -0
  32. package/connectors/connect-yousign/node_modules/@types/node/fs.d.ts +4678 -0
  33. package/connectors/connect-yousign/node_modules/@types/node/globals.d.ts +150 -0
  34. package/connectors/connect-yousign/node_modules/@types/node/globals.typedarray.d.ts +101 -0
  35. package/connectors/connect-yousign/node_modules/@types/node/http.d.ts +2188 -0
  36. package/connectors/connect-yousign/node_modules/@types/node/http2.d.ts +2480 -0
  37. package/connectors/connect-yousign/node_modules/@types/node/https.d.ts +405 -0
  38. package/connectors/connect-yousign/node_modules/@types/node/index.d.ts +115 -0
  39. package/connectors/connect-yousign/node_modules/@types/node/inspector/promises.d.ts +41 -0
  40. package/connectors/connect-yousign/node_modules/@types/node/inspector.d.ts +269 -0
  41. package/connectors/connect-yousign/node_modules/@types/node/inspector.generated.d.ts +4401 -0
  42. package/connectors/connect-yousign/node_modules/@types/node/module.d.ts +757 -0
  43. package/connectors/connect-yousign/node_modules/@types/node/net.d.ts +933 -0
  44. package/connectors/connect-yousign/node_modules/@types/node/os.d.ts +507 -0
  45. package/connectors/connect-yousign/node_modules/@types/node/package.json +155 -0
  46. package/connectors/connect-yousign/node_modules/@types/node/path/posix.d.ts +8 -0
  47. package/connectors/connect-yousign/node_modules/@types/node/path/win32.d.ts +8 -0
  48. package/connectors/connect-yousign/node_modules/@types/node/path.d.ts +187 -0
  49. package/connectors/connect-yousign/node_modules/@types/node/perf_hooks.d.ts +643 -0
  50. package/connectors/connect-yousign/node_modules/@types/node/process.d.ts +2175 -0
  51. package/connectors/connect-yousign/node_modules/@types/node/punycode.d.ts +117 -0
  52. package/connectors/connect-yousign/node_modules/@types/node/querystring.d.ts +152 -0
  53. package/connectors/connect-yousign/node_modules/@types/node/quic.d.ts +910 -0
  54. package/connectors/connect-yousign/node_modules/@types/node/readline/promises.d.ts +161 -0
  55. package/connectors/connect-yousign/node_modules/@types/node/readline.d.ts +542 -0
  56. package/connectors/connect-yousign/node_modules/@types/node/repl.d.ts +415 -0
  57. package/connectors/connect-yousign/node_modules/@types/node/sea.d.ts +162 -0
  58. package/connectors/connect-yousign/node_modules/@types/node/sqlite.d.ts +1065 -0
  59. package/connectors/connect-yousign/node_modules/@types/node/stream/consumers.d.ts +38 -0
  60. package/connectors/connect-yousign/node_modules/@types/node/stream/promises.d.ts +211 -0
  61. package/connectors/connect-yousign/node_modules/@types/node/stream/web.d.ts +296 -0
  62. package/connectors/connect-yousign/node_modules/@types/node/stream.d.ts +1770 -0
  63. package/connectors/connect-yousign/node_modules/@types/node/string_decoder.d.ts +67 -0
  64. package/connectors/connect-yousign/node_modules/@types/node/test/reporters.d.ts +96 -0
  65. package/connectors/connect-yousign/node_modules/@types/node/test.d.ts +2275 -0
  66. package/connectors/connect-yousign/node_modules/@types/node/timers/promises.d.ts +108 -0
  67. package/connectors/connect-yousign/node_modules/@types/node/timers.d.ts +159 -0
  68. package/connectors/connect-yousign/node_modules/@types/node/tls.d.ts +1203 -0
  69. package/connectors/connect-yousign/node_modules/@types/node/trace_events.d.ts +197 -0
  70. package/connectors/connect-yousign/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
  71. package/connectors/connect-yousign/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  72. package/connectors/connect-yousign/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  73. package/connectors/connect-yousign/node_modules/@types/node/ts5.6/index.d.ts +117 -0
  74. package/connectors/connect-yousign/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  75. package/connectors/connect-yousign/node_modules/@types/node/ts5.7/index.d.ts +117 -0
  76. package/connectors/connect-yousign/node_modules/@types/node/tty.d.ts +250 -0
  77. package/connectors/connect-yousign/node_modules/@types/node/url.d.ts +541 -0
  78. package/connectors/connect-yousign/node_modules/@types/node/util/types.d.ts +558 -0
  79. package/connectors/connect-yousign/node_modules/@types/node/util.d.ts +1687 -0
  80. package/connectors/connect-yousign/node_modules/@types/node/v8.d.ts +988 -0
  81. package/connectors/connect-yousign/node_modules/@types/node/vm.d.ts +1208 -0
  82. package/connectors/connect-yousign/node_modules/@types/node/wasi.d.ts +202 -0
  83. package/connectors/connect-yousign/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
  84. package/connectors/connect-yousign/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  85. package/connectors/connect-yousign/node_modules/@types/node/web-globals/console.d.ts +9 -0
  86. package/connectors/connect-yousign/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  87. package/connectors/connect-yousign/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  88. package/connectors/connect-yousign/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  89. package/connectors/connect-yousign/node_modules/@types/node/web-globals/events.d.ts +106 -0
  90. package/connectors/connect-yousign/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
  91. package/connectors/connect-yousign/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  92. package/connectors/connect-yousign/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  93. package/connectors/connect-yousign/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  94. package/connectors/connect-yousign/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  95. package/connectors/connect-yousign/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  96. package/connectors/connect-yousign/node_modules/@types/node/web-globals/streams.d.ts +115 -0
  97. package/connectors/connect-yousign/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  98. package/connectors/connect-yousign/node_modules/@types/node/web-globals/url.d.ts +24 -0
  99. package/connectors/connect-yousign/node_modules/@types/node/worker_threads.d.ts +717 -0
  100. package/connectors/connect-yousign/node_modules/@types/node/zlib.d.ts +682 -0
  101. package/connectors/connect-yousign/node_modules/bun-types/CLAUDE.md +105 -0
  102. package/connectors/connect-yousign/node_modules/bun-types/README.md +33 -0
  103. package/connectors/connect-yousign/node_modules/bun-types/bun.d.ts +8481 -0
  104. package/connectors/connect-yousign/node_modules/bun-types/bun.ns.d.ts +5 -0
  105. package/connectors/connect-yousign/node_modules/bun-types/bundle.d.ts +74 -0
  106. package/connectors/connect-yousign/node_modules/bun-types/deprecated.d.ts +184 -0
  107. package/connectors/connect-yousign/node_modules/bun-types/devserver.d.ts +187 -0
  108. package/connectors/connect-yousign/node_modules/bun-types/docs/README.md +28 -0
  109. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/bytecode.mdx +447 -0
  110. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/css.mdx +1024 -0
  111. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/esbuild.mdx +304 -0
  112. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/executables.mdx +1318 -0
  113. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/fullstack.mdx +1086 -0
  114. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/hot-reloading.mdx +229 -0
  115. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/html-static.mdx +498 -0
  116. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/index.mdx +1840 -0
  117. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/loaders.mdx +451 -0
  118. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/macros.mdx +328 -0
  119. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/minifier.mdx +1286 -0
  120. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/plugins.mdx +477 -0
  121. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/standalone-html.mdx +314 -0
  122. package/connectors/connect-yousign/node_modules/bun-types/docs/feedback.mdx +75 -0
  123. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx +29 -0
  124. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx +26 -0
  125. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx +27 -0
  126. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx +17 -0
  127. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx +41 -0
  128. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx +16 -0
  129. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx +16 -0
  130. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx +16 -0
  131. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx +17 -0
  132. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx +16 -0
  133. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx +16 -0
  134. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx +16 -0
  135. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx +43 -0
  136. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx +27 -0
  137. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx +16 -0
  138. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx +17 -0
  139. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx +27 -0
  140. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx +18 -0
  141. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx +16 -0
  142. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx +16 -0
  143. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx +43 -0
  144. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx +18 -0
  145. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx +204 -0
  146. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx +161 -0
  147. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx +194 -0
  148. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/railway.mdx +145 -0
  149. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/render.mdx +82 -0
  150. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/vercel.mdx +97 -0
  151. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/astro.mdx +82 -0
  152. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx +80 -0
  153. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/docker.mdx +151 -0
  154. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx +195 -0
  155. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx +31 -0
  156. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/express.mdx +43 -0
  157. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/gel.mdx +261 -0
  158. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/hono.mdx +47 -0
  159. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx +92 -0
  160. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx +234 -0
  161. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx +60 -0
  162. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx +103 -0
  163. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx +96 -0
  164. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx +55 -0
  165. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx +169 -0
  166. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx +164 -0
  167. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx +114 -0
  168. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/react.mdx +52 -0
  169. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/remix.mdx +97 -0
  170. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx +54 -0
  171. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx +62 -0
  172. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx +49 -0
  173. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/stric.mdx +54 -0
  174. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx +138 -0
  175. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx +114 -0
  176. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx +791 -0
  177. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx +87 -0
  178. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/vite.mdx +77 -0
  179. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx +71 -0
  180. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx +97 -0
  181. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/cluster.mdx +69 -0
  182. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/fetch-unix.mdx +35 -0
  183. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/fetch.mdx +26 -0
  184. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/file-uploads.mdx +97 -0
  185. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/hot.mdx +28 -0
  186. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/proxy.mdx +50 -0
  187. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/server.mdx +48 -0
  188. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/simple.mdx +20 -0
  189. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/stream-file.mdx +50 -0
  190. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/stream-iterator.mdx +49 -0
  191. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx +22 -0
  192. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/tls.mdx +32 -0
  193. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/index.mdx +10 -0
  194. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-dev.mdx +28 -0
  195. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-git.mdx +40 -0
  196. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-optional.mdx +27 -0
  197. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-peer.mdx +45 -0
  198. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-tarball.mdx +35 -0
  199. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add.mdx +44 -0
  200. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx +76 -0
  201. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/cicd.mdx +43 -0
  202. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/custom-registry.mdx +32 -0
  203. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx +230 -0
  204. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/git-diff-bun-lockfile.mdx +48 -0
  205. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/jfrog-artifactory.mdx +28 -0
  206. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/npm-alias.mdx +25 -0
  207. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/registry-scope.mdx +40 -0
  208. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/trusted.mdx +52 -0
  209. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/workspaces.mdx +70 -0
  210. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/yarnlock.mdx +51 -0
  211. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/argv.mdx +66 -0
  212. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/ctrl-c.mdx +18 -0
  213. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/ipc.mdx +69 -0
  214. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/nanoseconds.mdx +15 -0
  215. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/os-signals.mdx +31 -0
  216. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/spawn-stderr.mdx +34 -0
  217. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/spawn-stdout.mdx +28 -0
  218. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/spawn.mdx +43 -0
  219. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/stdin.mdx +62 -0
  220. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/arraybuffer.mdx +30 -0
  221. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/buffer.mdx +21 -0
  222. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/exists.mdx +18 -0
  223. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/json.mdx +19 -0
  224. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/mime.mdx +22 -0
  225. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/stream.mdx +28 -0
  226. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/string.mdx +24 -0
  227. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/uint8array.mdx +23 -0
  228. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/watch.mdx +66 -0
  229. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/build-time-constants.mdx +295 -0
  230. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/cicd.mdx +45 -0
  231. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/codesign-macos-executable.mdx +61 -0
  232. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/define-constant.mdx +149 -0
  233. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/delete-directory.mdx +39 -0
  234. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/delete-file.mdx +21 -0
  235. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/heap-snapshot.mdx +28 -0
  236. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-html.mdx +15 -0
  237. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-json.mdx +46 -0
  238. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-json5.mdx +74 -0
  239. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-toml.mdx +32 -0
  240. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-yaml.mdx +104 -0
  241. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/read-env.mdx +37 -0
  242. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/set-env.mdx +51 -0
  243. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/shell.mdx +42 -0
  244. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/timezone.mdx +38 -0
  245. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/tsconfig-paths.mdx +31 -0
  246. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/typescript.mdx +51 -0
  247. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/vscode-debugger.mdx +47 -0
  248. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/web-debugger.mdx +103 -0
  249. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-arraybuffer.mdx +13 -0
  250. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-blob.mdx +13 -0
  251. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-json.mdx +14 -0
  252. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-string.mdx +14 -0
  253. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-uint8array.mdx +13 -0
  254. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-array.mdx +16 -0
  255. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-arraybuffer.mdx +16 -0
  256. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-blob.mdx +16 -0
  257. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-buffer.mdx +17 -0
  258. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-json.mdx +16 -0
  259. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-string.mdx +16 -0
  260. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-typedarray.mdx +24 -0
  261. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/bail.mdx +24 -0
  262. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/concurrent-test-glob.mdx +146 -0
  263. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/coverage-threshold.mdx +67 -0
  264. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/coverage.mdx +49 -0
  265. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/happy-dom.mdx +73 -0
  266. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/migrate-from-jest.mdx +125 -0
  267. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/mock-clock.mdx +50 -0
  268. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/mock-functions.mdx +70 -0
  269. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/rerun-each.mdx +16 -0
  270. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/run-tests.mdx +116 -0
  271. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/skip-tests.mdx +43 -0
  272. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/snapshot.mdx +102 -0
  273. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/spy-on.mdx +49 -0
  274. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/svelte-test.mdx +113 -0
  275. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/testing-library.mdx +93 -0
  276. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/timeout.mdx +17 -0
  277. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/todo-tests.mdx +74 -0
  278. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/update-snapshots.mdx +49 -0
  279. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/watch-mode.mdx +24 -0
  280. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/base64.mdx +17 -0
  281. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/deep-equals.mdx +41 -0
  282. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/deflate.mdx +20 -0
  283. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/detect-bun.mdx +28 -0
  284. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/entrypoint.mdx +19 -0
  285. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/escape-html.mdx +24 -0
  286. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx +16 -0
  287. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/gzip.mdx +20 -0
  288. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/hash-a-password.mdx +56 -0
  289. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx +15 -0
  290. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/import-meta-file.mdx +15 -0
  291. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/import-meta-path.mdx +15 -0
  292. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx +25 -0
  293. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/main.mdx +43 -0
  294. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx +16 -0
  295. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/sleep.mdx +24 -0
  296. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/upgrade.mdx +93 -0
  297. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/version.mdx +23 -0
  298. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx +17 -0
  299. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/compression.mdx +33 -0
  300. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/context.mdx +79 -0
  301. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/pubsub.mdx +43 -0
  302. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/simple.mdx +38 -0
  303. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/append.mdx +54 -0
  304. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/basic.mdx +46 -0
  305. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/blob.mdx +30 -0
  306. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/cat.mdx +19 -0
  307. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/file-cp.mdx +18 -0
  308. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/filesink.mdx +54 -0
  309. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/response.mdx +19 -0
  310. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/stdout.mdx +23 -0
  311. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/stream.mdx +19 -0
  312. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/unlink.mdx +18 -0
  313. package/connectors/connect-yousign/node_modules/bun-types/docs/index.mdx +133 -0
  314. package/connectors/connect-yousign/node_modules/bun-types/docs/installation.mdx +372 -0
  315. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/bunx.mdx +91 -0
  316. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/catalogs.mdx +292 -0
  317. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/add.mdx +179 -0
  318. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/audit.mdx +60 -0
  319. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/info.mdx +70 -0
  320. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/install.mdx +591 -0
  321. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/link.mdx +61 -0
  322. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/outdated.mdx +197 -0
  323. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/patch.mdx +69 -0
  324. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/pm.mdx +323 -0
  325. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/publish.mdx +131 -0
  326. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/remove.mdx +16 -0
  327. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/update.mdx +140 -0
  328. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/why.mdx +84 -0
  329. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/filter.mdx +127 -0
  330. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/global-cache.mdx +72 -0
  331. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/isolated-installs.mdx +220 -0
  332. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/lifecycle.mdx +64 -0
  333. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/lockfile.mdx +64 -0
  334. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/npmrc.mdx +245 -0
  335. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/overrides.mdx +83 -0
  336. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/scopes-registries.mdx +35 -0
  337. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/security-scanner-api.mdx +95 -0
  338. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/workspaces.mdx +115 -0
  339. package/connectors/connect-yousign/node_modules/bun-types/docs/project/benchmarking.mdx +296 -0
  340. package/connectors/connect-yousign/node_modules/bun-types/docs/project/bindgen.mdx +223 -0
  341. package/connectors/connect-yousign/node_modules/bun-types/docs/project/building-windows.mdx +143 -0
  342. package/connectors/connect-yousign/node_modules/bun-types/docs/project/contributing.mdx +366 -0
  343. package/connectors/connect-yousign/node_modules/bun-types/docs/project/feedback.mdx +20 -0
  344. package/connectors/connect-yousign/node_modules/bun-types/docs/project/license.mdx +78 -0
  345. package/connectors/connect-yousign/node_modules/bun-types/docs/project/roadmap.mdx +8 -0
  346. package/connectors/connect-yousign/node_modules/bun-types/docs/quickstart.mdx +251 -0
  347. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/archive.mdx +452 -0
  348. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/auto-install.mdx +97 -0
  349. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/binary-data.mdx +846 -0
  350. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/bun-apis.mdx +59 -0
  351. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/bunfig.mdx +754 -0
  352. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/c-compiler.mdx +204 -0
  353. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/child-process.mdx +659 -0
  354. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/color.mdx +267 -0
  355. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/console.mdx +67 -0
  356. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/cookies.mdx +454 -0
  357. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/debugger.mdx +335 -0
  358. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/environment-variables.mdx +231 -0
  359. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/ffi.mdx +567 -0
  360. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/file-io.mdx +306 -0
  361. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/file-system-router.mdx +118 -0
  362. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/file-types.mdx +482 -0
  363. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/glob.mdx +181 -0
  364. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/globals.mdx +72 -0
  365. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/hashing.mdx +315 -0
  366. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/html-rewriter.mdx +333 -0
  367. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/cookies.mdx +79 -0
  368. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/error-handling.mdx +40 -0
  369. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/metrics.mdx +36 -0
  370. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/routing.mdx +289 -0
  371. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/server.mdx +645 -0
  372. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/tls.mdx +101 -0
  373. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/websockets.mdx +414 -0
  374. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/index.mdx +223 -0
  375. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/json5.mdx +271 -0
  376. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/jsonl.mdx +188 -0
  377. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/jsx.mdx +115 -0
  378. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/markdown.mdx +344 -0
  379. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/module-resolution.mdx +374 -0
  380. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/dns.mdx +111 -0
  381. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/fetch.mdx +484 -0
  382. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/tcp.mdx +239 -0
  383. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/udp.mdx +180 -0
  384. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/node-api.mdx +19 -0
  385. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/nodejs-compat.mdx +468 -0
  386. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/plugins.mdx +419 -0
  387. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/redis.mdx +583 -0
  388. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/repl.mdx +176 -0
  389. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/s3.mdx +881 -0
  390. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/secrets.mdx +340 -0
  391. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/semver.mdx +57 -0
  392. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/shell.mdx +637 -0
  393. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/sql.mdx +1404 -0
  394. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/sqlite.mdx +721 -0
  395. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/streams.mdx +232 -0
  396. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/templating/create.mdx +269 -0
  397. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/templating/init.mdx +58 -0
  398. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/transpiler.mdx +288 -0
  399. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/typescript.mdx +58 -0
  400. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/utils.mdx +1010 -0
  401. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/watch-mode.mdx +161 -0
  402. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/web-apis.mdx +29 -0
  403. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/workers.mdx +314 -0
  404. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/yaml.mdx +469 -0
  405. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/add.mdx +166 -0
  406. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/build.mdx +197 -0
  407. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/bunx.mdx +49 -0
  408. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/feedback.mdx +17 -0
  409. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/init.mdx +84 -0
  410. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/install.mdx +173 -0
  411. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/link.mdx +163 -0
  412. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/outdated.mdx +140 -0
  413. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/patch.mdx +171 -0
  414. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/publish.mdx +198 -0
  415. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/remove.mdx +146 -0
  416. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/run.mdx +305 -0
  417. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/test.mdx +105 -0
  418. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/update.mdx +144 -0
  419. package/connectors/connect-yousign/node_modules/bun-types/docs/test/code-coverage.mdx +409 -0
  420. package/connectors/connect-yousign/node_modules/bun-types/docs/test/configuration.mdx +520 -0
  421. package/connectors/connect-yousign/node_modules/bun-types/docs/test/dates-times.mdx +129 -0
  422. package/connectors/connect-yousign/node_modules/bun-types/docs/test/discovery.mdx +90 -0
  423. package/connectors/connect-yousign/node_modules/bun-types/docs/test/dom.mdx +226 -0
  424. package/connectors/connect-yousign/node_modules/bun-types/docs/test/index.mdx +409 -0
  425. package/connectors/connect-yousign/node_modules/bun-types/docs/test/lifecycle.mdx +366 -0
  426. package/connectors/connect-yousign/node_modules/bun-types/docs/test/mocks.mdx +637 -0
  427. package/connectors/connect-yousign/node_modules/bun-types/docs/test/reporters.mdx +126 -0
  428. package/connectors/connect-yousign/node_modules/bun-types/docs/test/runtime-behavior.mdx +342 -0
  429. package/connectors/connect-yousign/node_modules/bun-types/docs/test/snapshots.mdx +434 -0
  430. package/connectors/connect-yousign/node_modules/bun-types/docs/test/writing-tests.mdx +672 -0
  431. package/connectors/connect-yousign/node_modules/bun-types/docs/typescript.mdx +54 -0
  432. package/connectors/connect-yousign/node_modules/bun-types/extensions.d.ts +40 -0
  433. package/connectors/connect-yousign/node_modules/bun-types/fetch.d.ts +79 -0
  434. package/connectors/connect-yousign/node_modules/bun-types/ffi.d.ts +1154 -0
  435. package/connectors/connect-yousign/node_modules/bun-types/globals.d.ts +2067 -0
  436. package/connectors/connect-yousign/node_modules/bun-types/html-rewriter.d.ts +186 -0
  437. package/connectors/connect-yousign/node_modules/bun-types/index.d.ts +32 -0
  438. package/connectors/connect-yousign/node_modules/bun-types/jsc.d.ts +233 -0
  439. package/connectors/connect-yousign/node_modules/bun-types/jsx.d.ts +11 -0
  440. package/connectors/connect-yousign/node_modules/bun-types/overrides.d.ts +376 -0
  441. package/connectors/connect-yousign/node_modules/bun-types/package.json +37 -0
  442. package/connectors/connect-yousign/node_modules/bun-types/redis.d.ts +3352 -0
  443. package/connectors/connect-yousign/node_modules/bun-types/s3.d.ts +1335 -0
  444. package/connectors/connect-yousign/node_modules/bun-types/security.d.ts +101 -0
  445. package/connectors/connect-yousign/node_modules/bun-types/serve.d.ts +1296 -0
  446. package/connectors/connect-yousign/node_modules/bun-types/shell.d.ts +380 -0
  447. package/connectors/connect-yousign/node_modules/bun-types/sql.d.ts +887 -0
  448. package/connectors/connect-yousign/node_modules/bun-types/sqlite.d.ts +1322 -0
  449. package/connectors/connect-yousign/node_modules/bun-types/test-globals.d.ts +22 -0
  450. package/connectors/connect-yousign/node_modules/bun-types/test.d.ts +2392 -0
  451. package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/branding.d.ts +283 -0
  452. package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/index.d.ts +1207 -0
  453. package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/messages.d.ts +395 -0
  454. package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/overloads.d.ts +669 -0
  455. package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/utils.d.ts +431 -0
  456. package/connectors/connect-yousign/node_modules/bun-types/wasm.d.ts +193 -0
  457. package/connectors/connect-yousign/node_modules/chalk/license +9 -0
  458. package/connectors/connect-yousign/node_modules/chalk/package.json +83 -0
  459. package/connectors/connect-yousign/node_modules/chalk/readme.md +297 -0
  460. package/connectors/connect-yousign/node_modules/chalk/source/index.d.ts +325 -0
  461. package/connectors/connect-yousign/node_modules/chalk/source/index.js +225 -0
  462. package/connectors/connect-yousign/node_modules/chalk/source/utilities.js +33 -0
  463. package/connectors/connect-yousign/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  464. package/connectors/connect-yousign/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  465. package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  466. package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
  467. package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  468. package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
  469. package/connectors/connect-yousign/node_modules/commander/LICENSE +22 -0
  470. package/connectors/connect-yousign/node_modules/commander/Readme.md +1157 -0
  471. package/connectors/connect-yousign/node_modules/commander/esm.mjs +16 -0
  472. package/connectors/connect-yousign/node_modules/commander/index.js +24 -0
  473. package/connectors/connect-yousign/node_modules/commander/lib/argument.js +149 -0
  474. package/connectors/connect-yousign/node_modules/commander/lib/command.js +2509 -0
  475. package/connectors/connect-yousign/node_modules/commander/lib/error.js +39 -0
  476. package/connectors/connect-yousign/node_modules/commander/lib/help.js +520 -0
  477. package/connectors/connect-yousign/node_modules/commander/lib/option.js +330 -0
  478. package/connectors/connect-yousign/node_modules/commander/lib/suggestSimilar.js +101 -0
  479. package/connectors/connect-yousign/node_modules/commander/package-support.json +16 -0
  480. package/connectors/connect-yousign/node_modules/commander/package.json +84 -0
  481. package/connectors/connect-yousign/node_modules/commander/typings/esm.d.mts +3 -0
  482. package/connectors/connect-yousign/node_modules/commander/typings/index.d.ts +969 -0
  483. package/connectors/connect-yousign/node_modules/typescript/LICENSE.txt +55 -0
  484. package/connectors/connect-yousign/node_modules/typescript/README.md +50 -0
  485. package/connectors/connect-yousign/node_modules/typescript/SECURITY.md +41 -0
  486. package/connectors/connect-yousign/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  487. package/connectors/connect-yousign/node_modules/typescript/bin/tsc +2 -0
  488. package/connectors/connect-yousign/node_modules/typescript/bin/tsserver +2 -0
  489. package/connectors/connect-yousign/node_modules/typescript/lib/_tsc.js +133818 -0
  490. package/connectors/connect-yousign/node_modules/typescript/lib/_tsserver.js +659 -0
  491. package/connectors/connect-yousign/node_modules/typescript/lib/_typingsInstaller.js +222 -0
  492. package/connectors/connect-yousign/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
  493. package/connectors/connect-yousign/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
  494. package/connectors/connect-yousign/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
  495. package/connectors/connect-yousign/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
  496. package/connectors/connect-yousign/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
  497. package/connectors/connect-yousign/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
  498. package/connectors/connect-yousign/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
  499. package/connectors/connect-yousign/node_modules/typescript/lib/lib.d.ts +22 -0
  500. package/connectors/connect-yousign/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
  501. package/connectors/connect-yousign/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
  502. package/connectors/connect-yousign/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
  503. package/connectors/connect-yousign/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
  504. package/connectors/connect-yousign/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
  505. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
  506. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
  507. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
  508. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
  509. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
  510. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
  511. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
  512. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
  513. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
  514. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  515. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
  516. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
  517. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
  518. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
  519. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
  520. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
  521. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  522. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
  523. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
  524. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
  525. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
  526. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
  527. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
  528. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  529. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
  530. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
  531. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
  532. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
  533. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
  534. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
  535. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
  536. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
  537. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
  538. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
  539. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
  540. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
  541. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
  542. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
  543. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
  544. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
  545. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
  546. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
  547. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
  548. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
  549. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
  550. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
  551. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
  552. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
  553. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
  554. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
  555. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
  556. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
  557. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
  558. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
  559. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
  560. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
  561. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
  562. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
  563. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
  564. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
  565. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
  566. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
  567. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  568. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
  569. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
  570. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
  571. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
  572. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
  573. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
  574. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
  575. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
  576. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
  577. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
  578. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
  579. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
  580. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
  581. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es6.d.ts +23 -0
  582. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
  583. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
  584. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
  585. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  586. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
  587. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
  588. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
  589. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
  590. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
  591. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
  592. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
  593. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
  594. package/connectors/connect-yousign/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
  595. package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
  596. package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
  597. package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
  598. package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
  599. package/connectors/connect-yousign/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
  600. package/connectors/connect-yousign/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
  601. package/connectors/connect-yousign/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
  602. package/connectors/connect-yousign/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
  603. package/connectors/connect-yousign/node_modules/typescript/lib/tsc.js +8 -0
  604. package/connectors/connect-yousign/node_modules/typescript/lib/tsserver.js +8 -0
  605. package/connectors/connect-yousign/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  606. package/connectors/connect-yousign/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  607. package/connectors/connect-yousign/node_modules/typescript/lib/typesMap.json +497 -0
  608. package/connectors/connect-yousign/node_modules/typescript/lib/typescript.d.ts +11437 -0
  609. package/connectors/connect-yousign/node_modules/typescript/lib/typescript.js +200276 -0
  610. package/connectors/connect-yousign/node_modules/typescript/lib/typingsInstaller.js +8 -0
  611. package/connectors/connect-yousign/node_modules/typescript/lib/watchGuard.js +53 -0
  612. package/connectors/connect-yousign/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
  613. package/connectors/connect-yousign/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
  614. package/connectors/connect-yousign/node_modules/typescript/package.json +120 -0
  615. package/connectors/connect-yousign/node_modules/undici-types/LICENSE +21 -0
  616. package/connectors/connect-yousign/node_modules/undici-types/README.md +6 -0
  617. package/connectors/connect-yousign/node_modules/undici-types/agent.d.ts +32 -0
  618. package/connectors/connect-yousign/node_modules/undici-types/api.d.ts +43 -0
  619. package/connectors/connect-yousign/node_modules/undici-types/balanced-pool.d.ts +30 -0
  620. package/connectors/connect-yousign/node_modules/undici-types/cache-interceptor.d.ts +173 -0
  621. package/connectors/connect-yousign/node_modules/undici-types/cache.d.ts +36 -0
  622. package/connectors/connect-yousign/node_modules/undici-types/client-stats.d.ts +15 -0
  623. package/connectors/connect-yousign/node_modules/undici-types/client.d.ts +108 -0
  624. package/connectors/connect-yousign/node_modules/undici-types/connector.d.ts +34 -0
  625. package/connectors/connect-yousign/node_modules/undici-types/content-type.d.ts +21 -0
  626. package/connectors/connect-yousign/node_modules/undici-types/cookies.d.ts +30 -0
  627. package/connectors/connect-yousign/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
  628. package/connectors/connect-yousign/node_modules/undici-types/dispatcher.d.ts +276 -0
  629. package/connectors/connect-yousign/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  630. package/connectors/connect-yousign/node_modules/undici-types/errors.d.ts +161 -0
  631. package/connectors/connect-yousign/node_modules/undici-types/eventsource.d.ts +66 -0
  632. package/connectors/connect-yousign/node_modules/undici-types/fetch.d.ts +211 -0
  633. package/connectors/connect-yousign/node_modules/undici-types/formdata.d.ts +108 -0
  634. package/connectors/connect-yousign/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  635. package/connectors/connect-yousign/node_modules/undici-types/global-origin.d.ts +7 -0
  636. package/connectors/connect-yousign/node_modules/undici-types/h2c-client.d.ts +73 -0
  637. package/connectors/connect-yousign/node_modules/undici-types/handlers.d.ts +15 -0
  638. package/connectors/connect-yousign/node_modules/undici-types/header.d.ts +160 -0
  639. package/connectors/connect-yousign/node_modules/undici-types/index.d.ts +88 -0
  640. package/connectors/connect-yousign/node_modules/undici-types/interceptors.d.ts +73 -0
  641. package/connectors/connect-yousign/node_modules/undici-types/mock-agent.d.ts +68 -0
  642. package/connectors/connect-yousign/node_modules/undici-types/mock-call-history.d.ts +111 -0
  643. package/connectors/connect-yousign/node_modules/undici-types/mock-client.d.ts +27 -0
  644. package/connectors/connect-yousign/node_modules/undici-types/mock-errors.d.ts +12 -0
  645. package/connectors/connect-yousign/node_modules/undici-types/mock-interceptor.d.ts +94 -0
  646. package/connectors/connect-yousign/node_modules/undici-types/mock-pool.d.ts +27 -0
  647. package/connectors/connect-yousign/node_modules/undici-types/package.json +55 -0
  648. package/connectors/connect-yousign/node_modules/undici-types/patch.d.ts +29 -0
  649. package/connectors/connect-yousign/node_modules/undici-types/pool-stats.d.ts +19 -0
  650. package/connectors/connect-yousign/node_modules/undici-types/pool.d.ts +41 -0
  651. package/connectors/connect-yousign/node_modules/undici-types/proxy-agent.d.ts +29 -0
  652. package/connectors/connect-yousign/node_modules/undici-types/readable.d.ts +68 -0
  653. package/connectors/connect-yousign/node_modules/undici-types/retry-agent.d.ts +8 -0
  654. package/connectors/connect-yousign/node_modules/undici-types/retry-handler.d.ts +125 -0
  655. package/connectors/connect-yousign/node_modules/undici-types/round-robin-pool.d.ts +41 -0
  656. package/connectors/connect-yousign/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  657. package/connectors/connect-yousign/node_modules/undici-types/util.d.ts +18 -0
  658. package/connectors/connect-yousign/node_modules/undici-types/utility.d.ts +7 -0
  659. package/connectors/connect-yousign/node_modules/undici-types/webidl.d.ts +341 -0
  660. package/connectors/connect-yousign/node_modules/undici-types/websocket.d.ts +186 -0
  661. package/connectors/connect-yousign/package.json +52 -0
  662. package/connectors/connect-yousign/src/api/client.ts +119 -0
  663. package/connectors/connect-yousign/src/api/index.ts +221 -0
  664. package/connectors/connect-yousign/src/cli/index.ts +555 -0
  665. package/connectors/connect-yousign/src/index.ts +21 -0
  666. package/connectors/connect-yousign/src/types/index.ts +275 -0
  667. package/connectors/connect-yousign/src/utils/config.ts +121 -0
  668. package/connectors/connect-yousign/tsconfig.json +16 -0
  669. package/dashboard/dist/assets/index-CSlS3oNV.css +1 -0
  670. package/dashboard/dist/assets/index-sSIkMXYs.js +284 -0
  671. package/dashboard/dist/index.html +2 -2
  672. package/dist/index.d.ts +1 -1
  673. package/dist/index.js +22 -312
  674. package/dist/lib/installer.d.ts +7 -6
  675. package/dist/lib/registry.d.ts +1 -22
  676. package/dist/mcp/index.d.ts +1 -1
  677. package/dist/server/auth.d.ts +2 -4
  678. package/package.json +1 -2
  679. package/dashboard/dist/assets/index-DmR_QNtT.css +0 -1
  680. package/dashboard/dist/assets/index-Dp-apHbC.js +0 -284
  681. package/dist/db/agents.d.ts +0 -38
  682. package/dist/db/agents.test.d.ts +0 -1
  683. package/dist/db/database.d.ts +0 -7
  684. package/dist/db/jobs.d.ts +0 -53
  685. package/dist/db/jobs.test.d.ts +0 -1
  686. package/dist/db/locks.d.ts +0 -59
  687. package/dist/db/locks.test.d.ts +0 -1
  688. package/dist/db/promotions.d.ts +0 -5
  689. package/dist/db/promotions.test.d.ts +0 -1
  690. package/dist/db/rate.d.ts +0 -57
  691. package/dist/db/rate.test.d.ts +0 -1
  692. package/dist/db/usage.d.ts +0 -17
  693. package/dist/db/usage.test.d.ts +0 -1
  694. package/dist/db/workflows.d.ts +0 -26
  695. package/dist/db/workflows.test.d.ts +0 -1
  696. package/dist/lib/fuzzy.d.ts +0 -16
  697. package/dist/lib/fuzzy.test.d.ts +0 -1
  698. package/dist/lib/llm.d.ts +0 -38
  699. package/dist/lib/llm.test.d.ts +0 -1
  700. package/dist/lib/lock.d.ts +0 -22
  701. package/dist/lib/lock.test.d.ts +0 -1
  702. package/dist/lib/scheduler.d.ts +0 -20
  703. package/dist/lib/scheduler.test.d.ts +0 -1
  704. package/dist/lib/strip.d.ts +0 -20
  705. package/dist/lib/strip.test.d.ts +0 -1
  706. package/dist/lib/synonyms.d.ts +0 -12
  707. package/dist/lib/synonyms.test.d.ts +0 -1
  708. package/dist/lib/workflow-runner.d.ts +0 -22
@@ -0,0 +1,2392 @@
1
+ /**
2
+ *
3
+ * To run tests, run `bun test`
4
+ *
5
+ * @example
6
+ *
7
+ * ```bash
8
+ * $ bun test
9
+ * ```
10
+ *
11
+ * @example
12
+ * ```bash
13
+ * $ bun test <filename>
14
+ * ```
15
+ */
16
+ declare module "bun:test" {
17
+ export type Mock<T extends (...args: any[]) => any> = JestMock.Mock<T>;
18
+
19
+ export const mock: {
20
+ <T extends (...args: any[]) => any>(Function?: T): Mock<T>;
21
+
22
+ /**
23
+ * Replace the module `id` with the return value of `factory`.
24
+ *
25
+ * This is useful for mocking modules.
26
+ *
27
+ * If the module is already loaded, exports are overwritten with the return
28
+ * value of `factory`. If the export didn't exist before, it will not be
29
+ * added to existing import statements. This is due to how ESM works.
30
+ *
31
+ * @param id module ID to mock
32
+ * @param factory a function returning an object that will be used as the exports of the mocked module
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * import { mock } from "bun:test";
37
+ *
38
+ * mock.module("fs/promises", () => {
39
+ * return {
40
+ * readFile: () => Promise.resolve("hello world"),
41
+ * };
42
+ * });
43
+ *
44
+ * import { readFile } from "fs/promises";
45
+ *
46
+ * console.log(await readFile("hello.txt", "utf8")); // hello world
47
+ * ```
48
+ */
49
+ module(id: string, factory: () => any): void | Promise<void>;
50
+ /**
51
+ * Restore the previous value of mocks.
52
+ */
53
+ restore(): void;
54
+
55
+ /**
56
+ * Reset all mock function state (calls, results, etc.) without restoring their original implementation.
57
+ */
58
+ clearAllMocks(): void;
59
+ };
60
+
61
+ /**
62
+ * Control the system time used by:
63
+ * - `Date.now()`
64
+ * - `new Date()`
65
+ * - `Intl.DateTimeFormat().format()`
66
+ *
67
+ * In the future, we may add support for more functions, but we haven't done that yet.
68
+ *
69
+ * @param now The time to set the system time to. If not provided, the system time will be reset.
70
+ * @returns `this`
71
+ * @since v0.6.13
72
+ *
73
+ * ## Set Date to a specific time
74
+ *
75
+ * ```js
76
+ * import { setSystemTime } from 'bun:test';
77
+ *
78
+ * setSystemTime(new Date('2020-01-01T00:00:00.000Z'));
79
+ * console.log(new Date().toISOString()); // 2020-01-01T00:00:00.000Z
80
+ * ```
81
+ * ## Reset Date to the current time
82
+ *
83
+ * ```js
84
+ * import { setSystemTime } from 'bun:test';
85
+ *
86
+ * setSystemTime();
87
+ * ```
88
+ */
89
+ export function setSystemTime(now?: Date | number): ThisType<void>;
90
+
91
+ export namespace jest {
92
+ function restoreAllMocks(): void;
93
+ function clearAllMocks(): void;
94
+ function resetAllMocks(): void;
95
+ function fn<T extends (...args: any[]) => any>(func?: T): Mock<T>;
96
+ function setSystemTime(now?: number | Date): void;
97
+ function setTimeout(milliseconds: number): void;
98
+ function useFakeTimers(options?: { now?: number | Date }): typeof vi;
99
+ function useRealTimers(): typeof vi;
100
+ function advanceTimersByTime(milliseconds: number): typeof vi;
101
+ function advanceTimersToNextTimer(): typeof vi;
102
+ function runAllTimers(): typeof vi;
103
+ function runOnlyPendingTimers(): typeof vi;
104
+ function getTimerCount(): number;
105
+ function clearAllTimers(): void;
106
+ function isFakeTimers(): boolean;
107
+ function spyOn<T extends object, K extends keyof T>(
108
+ obj: T,
109
+ methodOrPropertyValue: K,
110
+ ): Mock<Extract<T[K], (...args: any[]) => any>>;
111
+
112
+ /**
113
+ * Constructs the type of a mock function, e.g. the return type of `jest.fn()`.
114
+ */
115
+ type Mock<T extends (...args: any[]) => any = (...args: any[]) => any> = JestMock.Mock<T>;
116
+ /**
117
+ * Wraps a class, function or object type with Jest mock type definitions.
118
+ */
119
+ // type Mocked<T extends object> = JestMock.Mocked<T>;
120
+ /**
121
+ * Wraps a class type with Jest mock type definitions.
122
+ */
123
+ // type MockedClass<T extends JestMock.ClassLike> = JestMock.MockedClass<T>;
124
+ /**
125
+ * Wraps a function type with Jest mock type definitions.
126
+ */
127
+ // type MockedFunction<T extends (...args: any[]) => any> = JestMock.MockedFunction<T>;
128
+ /**
129
+ * Wraps an object type with Jest mock type definitions.
130
+ */
131
+ // type MockedObject<T extends object> = JestMock.MockedObject<T>;
132
+ /**
133
+ * Constructs the type of a replaced property.
134
+ */
135
+ type Replaced<T> = JestMock.Replaced<T>;
136
+ /**
137
+ * Constructs the type of a spied class or function.
138
+ */
139
+ type Spied<T extends JestMock.ClassLike | ((...args: any[]) => any)> = JestMock.Spied<T>;
140
+ /**
141
+ * Constructs the type of a spied class.
142
+ */
143
+ type SpiedClass<T extends JestMock.ClassLike> = JestMock.SpiedClass<T>;
144
+ /**
145
+ * Constructs the type of a spied function.
146
+ */
147
+ type SpiedFunction<T extends (...args: any[]) => any> = JestMock.SpiedFunction<T>;
148
+ /**
149
+ * Constructs the type of a spied getter.
150
+ */
151
+ type SpiedGetter<T> = JestMock.SpiedGetter<T>;
152
+ /**
153
+ * Constructs the type of a spied setter.
154
+ */
155
+ type SpiedSetter<T> = JestMock.SpiedSetter<T>;
156
+ }
157
+
158
+ /**
159
+ * Create a spy on an object property or method
160
+ */
161
+ export function spyOn<T extends object, K extends keyof T>(
162
+ obj: T,
163
+ methodOrPropertyValue: K,
164
+ ): Mock<Extract<T[K], (...args: any[]) => any>>;
165
+
166
+ /**
167
+ * Vitest-compatible mocking utilities
168
+ * Provides Vitest-style mocking API for easier migration from Vitest to Bun
169
+ */
170
+ export const vi: {
171
+ /**
172
+ * Create a mock function
173
+ */
174
+ fn: typeof jest.fn;
175
+ /**
176
+ * Create a spy on an object property or method
177
+ */
178
+ spyOn: typeof spyOn;
179
+ /**
180
+ * Mock a module
181
+ */
182
+ mock: typeof mock.module;
183
+ /**
184
+ * Restore all mocks to their original implementation
185
+ */
186
+ restoreAllMocks: typeof jest.restoreAllMocks;
187
+ /**
188
+ * Clear all mock state (calls, results, etc.) without restoring original implementation
189
+ */
190
+ clearAllMocks: typeof jest.clearAllMocks;
191
+ resetAllMocks: typeof jest.resetAllMocks;
192
+ useFakeTimers: typeof jest.useFakeTimers;
193
+ useRealTimers: typeof jest.useRealTimers;
194
+ advanceTimersByTime: typeof jest.advanceTimersByTime;
195
+ advanceTimersToNextTimer: typeof jest.advanceTimersToNextTimer;
196
+ runAllTimers: typeof jest.runAllTimers;
197
+ runOnlyPendingTimers: typeof jest.runOnlyPendingTimers;
198
+ getTimerCount: typeof jest.getTimerCount;
199
+ clearAllTimers: typeof jest.clearAllTimers;
200
+ isFakeTimers: typeof jest.isFakeTimers;
201
+ };
202
+
203
+ interface FunctionLike {
204
+ readonly name: string;
205
+ }
206
+
207
+ type DescribeLabel = number | string | Function | FunctionLike;
208
+
209
+ /**
210
+ * Describes a group of related tests.
211
+ *
212
+ * @example
213
+ * function sum(a, b) {
214
+ * return a + b;
215
+ * }
216
+ * describe("sum()", () => {
217
+ * test("can sum two values", () => {
218
+ * expect(sum(1, 1)).toBe(2);
219
+ * });
220
+ * });
221
+ *
222
+ * @param label the label for the tests
223
+ * @param fn the function that defines the tests
224
+ *
225
+ * @category Testing
226
+ */
227
+ export interface Describe<T extends Readonly<any[]>> {
228
+ (fn: () => void): void;
229
+
230
+ (label: DescribeLabel, fn: (...args: T) => void): void;
231
+ /**
232
+ * Skips all other tests, except this group of tests.
233
+ */
234
+ only: Describe<T>;
235
+ /**
236
+ * Skips this group of tests.
237
+ */
238
+ skip: Describe<T>;
239
+ /**
240
+ * Marks this group of tests as to be written or to be fixed.
241
+ */
242
+ todo: Describe<T>;
243
+ /**
244
+ * Marks this group of tests to be executed concurrently.
245
+ */
246
+ concurrent: Describe<T>;
247
+ /**
248
+ * Marks this group of tests to be executed serially (one after another),
249
+ * even when the --concurrent flag is used.
250
+ */
251
+ serial: Describe<T>;
252
+ /**
253
+ * Runs this group of tests, only if `condition` is true.
254
+ *
255
+ * This is the opposite of `describe.skipIf()`.
256
+ *
257
+ * @param condition if these tests should run
258
+ */
259
+ if(condition: boolean): Describe<T>;
260
+ /**
261
+ * Skips this group of tests, if `condition` is true.
262
+ *
263
+ * @param condition if these tests should be skipped
264
+ */
265
+ skipIf(condition: boolean): Describe<T>;
266
+ /**
267
+ * Marks this group of tests as to be written or to be fixed, if `condition` is true.
268
+ *
269
+ * @param condition if these tests should be skipped
270
+ */
271
+ todoIf(condition: boolean): Describe<T>;
272
+ /**
273
+ * Returns a function that runs for each item in `table`.
274
+ *
275
+ * @param table Array of Arrays with the arguments that are passed into the test fn for each row.
276
+ */
277
+ each<T extends Readonly<[any, ...any[]]>>(table: readonly T[]): Describe<[...T]>;
278
+ each<T extends any[]>(table: readonly T[]): Describe<[...T]>;
279
+ each<const T>(table: T[]): Describe<[T]>;
280
+ }
281
+ /**
282
+ * Describes a group of related tests.
283
+ *
284
+ * @example
285
+ * function sum(a, b) {
286
+ * return a + b;
287
+ * }
288
+ * describe("sum()", () => {
289
+ * test("can sum two values", () => {
290
+ * expect(sum(1, 1)).toBe(2);
291
+ * });
292
+ * });
293
+ *
294
+ * @param label the label for the tests
295
+ * @param fn the function that defines the tests
296
+ */
297
+ export const describe: Describe<[]>;
298
+ /**
299
+ * Skips a group of related tests.
300
+ *
301
+ * This is equivalent to calling `describe.skip()`.
302
+ *
303
+ * @param label the label for the tests
304
+ * @param fn the function that defines the tests
305
+ */
306
+ export const xdescribe: Describe<[]>;
307
+
308
+ type HookOptions = number | { timeout?: number };
309
+ /**
310
+ * Runs a function, once, before all the tests.
311
+ *
312
+ * This is useful for running set up tasks, like initializing
313
+ * a global variable or connecting to a database.
314
+ *
315
+ * If this function throws, tests will not run in this file.
316
+ *
317
+ * @example
318
+ * let database;
319
+ * beforeAll(async () => {
320
+ * database = await connect("localhost");
321
+ * });
322
+ *
323
+ * @param fn the function to run
324
+ */
325
+ export function beforeAll(
326
+ fn: (() => void | Promise<unknown>) | ((done: (err?: unknown) => void) => void),
327
+ options?: HookOptions,
328
+ ): void;
329
+ /**
330
+ * Runs a function before each test.
331
+ *
332
+ * This is useful for running set up tasks, like initializing
333
+ * a global variable or connecting to a database.
334
+ *
335
+ * If this function throws, the test will not run.
336
+ *
337
+ * @param fn the function to run
338
+ */
339
+ export function beforeEach(
340
+ fn: (() => void | Promise<unknown>) | ((done: (err?: unknown) => void) => void),
341
+ options?: HookOptions,
342
+ ): void;
343
+ /**
344
+ * Runs a function, once, after all the tests.
345
+ *
346
+ * This is useful for running clean up tasks, like closing
347
+ * a socket or deleting temporary files.
348
+ *
349
+ * @example
350
+ * let database;
351
+ * afterAll(async () => {
352
+ * if (database) {
353
+ * await database.close();
354
+ * }
355
+ * });
356
+ *
357
+ * @param fn the function to run
358
+ */
359
+ export function afterAll(
360
+ fn: (() => void | Promise<unknown>) | ((done: (err?: unknown) => void) => void),
361
+ options?: HookOptions,
362
+ ): void;
363
+ /**
364
+ * Runs a function after each test.
365
+ *
366
+ * This is useful for running clean up tasks, like closing
367
+ * a socket or deleting temporary files.
368
+ *
369
+ * @param fn the function to run
370
+ */
371
+ export function afterEach(
372
+ fn: (() => void | Promise<unknown>) | ((done: (err?: unknown) => void) => void),
373
+ options?: HookOptions,
374
+ ): void;
375
+ /**
376
+ * Runs a function after a test finishes, including after all afterEach hooks.
377
+ *
378
+ * This is useful for cleanup tasks that need to run at the very end of a test,
379
+ * after all other hooks have completed.
380
+ *
381
+ * Can only be called inside a test, not in describe blocks.
382
+ *
383
+ * @example
384
+ * test("my test", () => {
385
+ * onTestFinished(() => {
386
+ * // This runs after all afterEach hooks
387
+ * console.log("Test finished!");
388
+ * });
389
+ * });
390
+ *
391
+ * @param fn the function to run
392
+ */
393
+ export function onTestFinished(
394
+ fn: (() => void | Promise<unknown>) | ((done: (err?: unknown) => void) => void),
395
+ options?: HookOptions,
396
+ ): void;
397
+ /**
398
+ * Sets the default timeout for all tests in the current file. If a test specifies a timeout, it will
399
+ * override this value. The default timeout is 5000ms (5 seconds).
400
+ *
401
+ * @param milliseconds the number of milliseconds for the default timeout
402
+ */
403
+ export function setDefaultTimeout(milliseconds: number): void;
404
+ export interface TestOptions {
405
+ /**
406
+ * Sets the timeout for the test in milliseconds.
407
+ *
408
+ * If the test does not complete within this time, the test will fail with:
409
+ * ```ts
410
+ * 'Timeout: test {name} timed out after 5000ms'
411
+ * ```
412
+ *
413
+ * @default 5000 // 5 seconds
414
+ */
415
+ timeout?: number;
416
+ /**
417
+ * Sets the number of times to retry the test if it fails.
418
+ *
419
+ * @default 0
420
+ */
421
+ retry?: number;
422
+ /**
423
+ * Sets the number of times to repeat the test, regardless of whether it passed or failed.
424
+ *
425
+ * @default 0
426
+ */
427
+ repeats?: number;
428
+ }
429
+
430
+ namespace __internal {
431
+ type IfNeverThenElse<T, Else> = [T] extends [never] ? Else : T;
432
+
433
+ type IsTuple<T> = T extends readonly unknown[]
434
+ ? number extends T["length"]
435
+ ? false // It's an array with unknown length, not a tuple
436
+ : true // It's an array with a fixed length (a tuple)
437
+ : false; // Not an array at all
438
+
439
+ /**
440
+ * Accepts `[1, 2, 3] | ["a", "b", "c"]` and returns `[1 | "a", 2 | "b", 3 | "c"]`
441
+ */
442
+ type Flatten<T, Copy extends T = T> = { [Key in keyof T]: Copy[Key] };
443
+ }
444
+
445
+ /**
446
+ * Runs a test.
447
+ *
448
+ * @example
449
+ * test("can check if using Bun", () => {
450
+ * expect(Bun).toBeDefined();
451
+ * });
452
+ *
453
+ * test("can make a fetch() request", async () => {
454
+ * const response = await fetch("https://example.com/");
455
+ * expect(response.ok).toBe(true);
456
+ * });
457
+ *
458
+ * test("can set a timeout", async () => {
459
+ * await Bun.sleep(100);
460
+ * }, 50); // or { timeout: 50 }
461
+ *
462
+ * @param label the label for the test
463
+ * @param fn the test function
464
+ * @param options the test timeout or options
465
+ *
466
+ * @category Testing
467
+ */
468
+ export interface Test<T extends ReadonlyArray<unknown>> {
469
+ (
470
+ label: string,
471
+
472
+ fn: (
473
+ ...args: __internal.IsTuple<T> extends true
474
+ ? [...table: __internal.Flatten<T>, done: (err?: unknown) => void]
475
+ : T
476
+ ) => void | Promise<unknown>,
477
+
478
+ /**
479
+ * - If a `number`, sets the timeout for the test in milliseconds.
480
+ * - If an `object`, sets the options for the test.
481
+ * - `timeout` sets the timeout for the test in milliseconds.
482
+ * - `retry` sets the number of times to retry the test if it fails.
483
+ * - `repeats` sets the number of times to repeat the test, regardless of whether it passed or failed.
484
+ */
485
+ options?: number | TestOptions,
486
+ ): void;
487
+ /**
488
+ * Skips all other tests, except this test.
489
+ */
490
+ only: Test<T>;
491
+ /**
492
+ * Skips this test.
493
+ */
494
+ skip: Test<T>;
495
+ /**
496
+ * Marks this test as to be written or to be fixed.
497
+ *
498
+ * These tests will not be executed unless the `--todo` flag is passed. With the flag,
499
+ * if the test passes, the test will be marked as `fail` in the results; you will have to
500
+ * remove the `.todo` or check that your test
501
+ * is implemented correctly.
502
+ */
503
+ todo: Test<T>;
504
+ /**
505
+ * Marks this test as failing.
506
+ *
507
+ * Use `test.failing` when you are writing a test and expecting it to fail.
508
+ * These tests will behave the other way normal tests do. If failing test
509
+ * will throw any errors then it will pass. If it does not throw it will
510
+ * fail.
511
+ *
512
+ * `test.failing` is very similar to {@link test.todo} except that it always
513
+ * runs, regardless of the `--todo` flag.
514
+ */
515
+ failing: Test<T>;
516
+ /**
517
+ * Runs the test concurrently with other concurrent tests.
518
+ */
519
+ concurrent: Test<T>;
520
+ /**
521
+ * Forces the test to run serially (not in parallel),
522
+ * even when the --concurrent flag is used.
523
+ */
524
+ serial: Test<T>;
525
+ /**
526
+ * Runs this test, if `condition` is true.
527
+ *
528
+ * This is the opposite of `test.skipIf()`.
529
+ *
530
+ * @param condition if the test should run
531
+ */
532
+ if(condition: boolean): Test<T>;
533
+ /**
534
+ * Skips this test, if `condition` is true.
535
+ *
536
+ * @param condition if the test should be skipped
537
+ */
538
+ skipIf(condition: boolean): Test<T>;
539
+ /**
540
+ * Marks this test as to be written or to be fixed, if `condition` is true.
541
+ *
542
+ * @param condition if the test should be marked TODO
543
+ */
544
+ todoIf(condition: boolean): Test<T>;
545
+ /**
546
+ * Marks this test as failing, if `condition` is true.
547
+ *
548
+ * @param condition if the test should be marked as failing
549
+ */
550
+ failingIf(condition: boolean): Test<T>;
551
+ /**
552
+ * Runs the test concurrently with other concurrent tests, if `condition` is true.
553
+ *
554
+ * @param condition if the test should run concurrently
555
+ */
556
+ concurrentIf(condition: boolean): Test<T>;
557
+ /**
558
+ * Forces the test to run serially (not in parallel), if `condition` is true.
559
+ * This applies even when the --concurrent flag is used.
560
+ *
561
+ * @param condition if the test should run serially
562
+ */
563
+ serialIf(condition: boolean): Test<T>;
564
+ /**
565
+ * Returns a function that runs for each item in `table`.
566
+ *
567
+ * @param table Array of Arrays with the arguments that are passed into the test fn for each row.
568
+ */
569
+ each<T extends Readonly<[unknown, ...unknown[]]>>(table: readonly T[]): Test<T>;
570
+ each<T extends unknown[]>(table: readonly T[]): Test<T>;
571
+ each<const T>(table: T[]): Test<[T]>;
572
+ }
573
+ /**
574
+ * Runs a test.
575
+ *
576
+ * @example
577
+ * test("can check if using Bun", () => {
578
+ * expect(Bun).toBeDefined();
579
+ * });
580
+ *
581
+ * test("can make a fetch() request", async () => {
582
+ * const response = await fetch("https://example.com/");
583
+ * expect(response.ok).toBe(true);
584
+ * });
585
+ *
586
+ * @param label the label for the test
587
+ * @param fn the test function
588
+ */
589
+ export const test: Test<[]>;
590
+ export { test as it, xtest as xit };
591
+
592
+ /**
593
+ * Skips a test.
594
+ *
595
+ * This is equivalent to calling `test.skip()`.
596
+ *
597
+ * @param label the label for the test
598
+ * @param fn the test function
599
+ */
600
+ export const xtest: Test<[]>;
601
+
602
+ /**
603
+ * Asserts that a value matches some criteria.
604
+ *
605
+ * @link https://jestjs.io/docs/expect#reference
606
+ * @example
607
+ * expect(1 + 1).toBe(2);
608
+ * expect([1,2,3]).toContain(2);
609
+ * expect(null).toBeNull();
610
+ *
611
+ * @param actual The actual (received) value
612
+ */
613
+ export const expect: Expect;
614
+
615
+ type ExpectNot = Omit<AsymmetricMatchers, keyof AsymmetricMatchersBuiltin> & AsymmetricMatchersBuiltinNegated;
616
+
617
+ export interface Expect extends AsymmetricMatchers {
618
+ // the `expect()` callable signature
619
+ /**
620
+ * @param actual the actual value
621
+ * @param customFailMessage an optional custom message to display if the test fails.
622
+ * */
623
+
624
+ (actual?: never, customFailMessage?: string): Matchers<undefined>;
625
+ <T = unknown>(actual: T, customFailMessage?: string): Matchers<T>;
626
+ <T = unknown>(actual?: T, customFailMessage?: string): Matchers<T | undefined>;
627
+
628
+ /**
629
+ * Access to negated asymmetric matchers.
630
+ *
631
+ * @example
632
+ * expect("abc").toEqual(expect.stringContaining("abc")); // will pass
633
+ * expect("abc").toEqual(expect.not.stringContaining("abc")); // will fail
634
+ */
635
+ not: ExpectNot;
636
+
637
+ /**
638
+ * Create an asymmetric matcher for a promise resolved value.
639
+ *
640
+ * @example
641
+ * expect(Promise.resolve("value")).toEqual(expect.resolvesTo.stringContaining("value")); // will pass
642
+ * expect(Promise.reject("value")).toEqual(expect.resolvesTo.stringContaining("value")); // will fail
643
+ * expect("value").toEqual(expect.resolvesTo.stringContaining("value")); // will fail
644
+ */
645
+ resolvesTo: AsymmetricMatchers;
646
+
647
+ /**
648
+ * Create an asymmetric matcher for a promise rejected value.
649
+ *
650
+ * @example
651
+ * expect(Promise.reject("error")).toEqual(expect.rejectsTo.stringContaining("error")); // will pass
652
+ * expect(Promise.resolve("error")).toEqual(expect.rejectsTo.stringContaining("error")); // will fail
653
+ * expect("error").toEqual(expect.rejectsTo.stringContaining("error")); // will fail
654
+ */
655
+ rejectsTo: AsymmetricMatchers;
656
+
657
+ /**
658
+ * Register new custom matchers.
659
+ * @param matchers An object containing the matchers to register, where each key is the matcher name, and its value the implementation function.
660
+ * The function must satisfy: `(actualValue, ...matcherInstantiationArguments) => { pass: true|false, message: () => string }`
661
+ *
662
+ * @example
663
+ * expect.extend({
664
+ * toBeWithinRange(actual, min, max) {
665
+ * if (typeof actual !== 'number' || typeof min !== 'number' || typeof max !== 'number')
666
+ * throw new Error('Invalid usage');
667
+ * const pass = actual >= min && actual <= max;
668
+ * return {
669
+ * pass: pass,
670
+ * message: () => `expected ${this.utils.printReceived(actual)} ` +
671
+ * (pass ? `not to be`: `to be`) + ` within range ${this.utils.printExpected(`${min} .. ${max}`)}`,
672
+ * };
673
+ * },
674
+ * });
675
+ *
676
+ * test('some test', () => {
677
+ * expect(50).toBeWithinRange(0, 100); // will pass
678
+ * expect(50).toBeWithinRange(100, 200); // will fail
679
+ * expect(50).toBe(expect.toBeWithinRange(0, 100)); // will pass
680
+ * expect(50).toBe(expect.not.toBeWithinRange(100, 200)); // will pass
681
+ * });
682
+ */
683
+ extend<M>(matchers: ExpectExtendMatchers<M>): void;
684
+
685
+ /**
686
+ * Throw an error if this function is called.
687
+ *
688
+ * @param msg Optional message to display if the test fails
689
+ * @returns never
690
+ *
691
+ * @example
692
+ * ```ts
693
+ * import { expect, test } from "bun:test";
694
+ *
695
+ * test("!!abc!! is not a module", () => {
696
+ * try {
697
+ * require("!!abc!!");
698
+ * expect.unreachable();
699
+ * } catch(e) {
700
+ * expect(e.name).not.toBe("UnreachableError");
701
+ * }
702
+ * });
703
+ * ```
704
+ */
705
+ unreachable(msg?: string | Error): never;
706
+
707
+ /**
708
+ * Ensures that an assertion is made
709
+ */
710
+ hasAssertions(): void;
711
+
712
+ /**
713
+ * Ensures that a specific number of assertions are made
714
+ */
715
+ assertions(neededAssertions: number): void;
716
+ }
717
+
718
+ /**
719
+ * You can extend this interface with declaration merging, in order to add type support for custom matchers.
720
+ * @template T Type of the actual value
721
+ *
722
+ * @example
723
+ * // my_modules.d.ts
724
+ * interface MyCustomMatchers {
725
+ * toBeWithinRange(floor: number, ceiling: number): any;
726
+ * }
727
+ * declare module "bun:test" {
728
+ * interface Matchers<T> extends MyCustomMatchers {}
729
+ * interface AsymmetricMatchers extends MyCustomMatchers {}
730
+ * }
731
+ *
732
+ * @example
733
+ * // my_modules.d.ts (alternatively)
734
+ * declare module "bun:test" {
735
+ * interface Matchers<T> {
736
+ * toBeWithinRange(floor: number, ceiling: number): any;
737
+ * }
738
+ * interface AsymmetricMatchers {
739
+ * toBeWithinRange(floor: number, ceiling: number): any;
740
+ * }
741
+ * }
742
+ */
743
+ export interface Matchers<T = unknown> extends MatchersBuiltin<T> {}
744
+
745
+ /**
746
+ * You can extend this interface with declaration merging, in order to add type support for custom asymmetric matchers.
747
+ * @example
748
+ * // my_modules.d.ts
749
+ * interface MyCustomMatchers {
750
+ * toBeWithinRange(floor: number, ceiling: number): any;
751
+ * }
752
+ * declare module "bun:test" {
753
+ * interface Matchers<T> extends MyCustomMatchers {}
754
+ * interface AsymmetricMatchers extends MyCustomMatchers {}
755
+ * }
756
+ *
757
+ * @example
758
+ * // my_modules.d.ts (alternatively)
759
+ * declare module "bun:test" {
760
+ * interface Matchers<T> {
761
+ * toBeWithinRange(floor: number, ceiling: number): any;
762
+ * }
763
+ * interface AsymmetricMatchers {
764
+ * toBeWithinRange(floor: number, ceiling: number): any;
765
+ * }
766
+ * }
767
+ */
768
+ export interface AsymmetricMatchers extends AsymmetricMatchersBuiltin {}
769
+
770
+ export interface AsymmetricMatchersBuiltin {
771
+ /**
772
+ * Matches anything that was created with the given constructor.
773
+ * You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value.
774
+ *
775
+ * @example
776
+ *
777
+ * function randocall(fn) {
778
+ * return fn(Math.floor(Math.random() * 6 + 1));
779
+ * }
780
+ *
781
+ * test('randocall calls its callback with a number', () => {
782
+ * const mock = jest.fn();
783
+ * randocall(mock);
784
+ * expect(mock).toBeCalledWith(expect.any(Number));
785
+ * });
786
+ */
787
+ any(constructor: ((...args: any[]) => any) | { new (...args: any[]): any }): AsymmetricMatcher;
788
+ /**
789
+ * Matches anything but null or undefined. You can use it inside `toEqual` or `toBeCalledWith` instead
790
+ * of a literal value. For example, if you want to check that a mock function is called with a
791
+ * non-null argument:
792
+ *
793
+ * @example
794
+ *
795
+ * test('map calls its argument with a non-null argument', () => {
796
+ * const mock = jest.fn();
797
+ * [1].map(x => mock(x));
798
+ * expect(mock).toBeCalledWith(expect.anything());
799
+ * });
800
+ */
801
+ anything(): AsymmetricMatcher;
802
+ /**
803
+ * Matches any array made up entirely of elements in the provided array.
804
+ * You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value.
805
+ *
806
+ * Optionally, you can provide a type for the elements via a generic.
807
+ */
808
+ arrayContaining<E = any>(arr: readonly E[]): AsymmetricMatcher;
809
+ /**
810
+ * Matches any object that recursively matches the provided keys.
811
+ * This is often handy in conjunction with other asymmetric matchers.
812
+ *
813
+ * Optionally, you can provide a type for the object via a generic.
814
+ * This ensures that the object contains the desired structure.
815
+ */
816
+ objectContaining(obj: object): AsymmetricMatcher;
817
+ /**
818
+ * Matches any received string that contains the exact expected string
819
+ */
820
+ stringContaining(str: string | String): AsymmetricMatcher;
821
+ /**
822
+ * Matches any string that contains the exact provided string
823
+ */
824
+ stringMatching(regex: string | String | RegExp): AsymmetricMatcher;
825
+ /**
826
+ * Useful when comparing floating point numbers in object properties or array item.
827
+ * If you need to compare a number, use `.toBeCloseTo` instead.
828
+ *
829
+ * The optional `numDigits` argument limits the number of digits to check after the decimal point.
830
+ * For the default value 2, the test criterion is `Math.abs(expected - received) < 0.005` (that is, `10 ** -2 / 2`).
831
+ */
832
+ closeTo(num: number, numDigits?: number): AsymmetricMatcher;
833
+ }
834
+
835
+ interface AsymmetricMatchersBuiltinNegated {
836
+ /**
837
+ * Create an asymmetric matcher that will fail on a promise resolved value that matches the chained matcher.
838
+ *
839
+ * @example
840
+ * expect(Promise.resolve("value")).toEqual(expect.not.resolvesTo.stringContaining("value")); // will fail
841
+ * expect(Promise.reject("value")).toEqual(expect.not.resolvesTo.stringContaining("value")); // will pass
842
+ * expect("value").toEqual(expect.not.resolvesTo.stringContaining("value")); // will pass
843
+ */
844
+ resolvesTo: ExpectNot;
845
+
846
+ /**
847
+ * Create an asymmetric matcher that will fail on a promise rejected value that matches the chained matcher.
848
+ *
849
+ * @example
850
+ * expect(Promise.reject("value")).toEqual(expect.not.rejectsTo.stringContaining("value")); // will fail
851
+ * expect(Promise.resolve("value")).toEqual(expect.not.rejectsTo.stringContaining("value")); // will pass
852
+ * expect("value").toEqual(expect.not.rejectsTo.stringContaining("value")); // will pass
853
+ */
854
+ rejectsTo: ExpectNot;
855
+
856
+ /**
857
+ * `expect.not.arrayContaining(array)` matches a received array which
858
+ * does not contain all of the elements in the expected array. That is,
859
+ * the expected array is not a subset of the received array. It is the
860
+ * inverse of `expect.arrayContaining`.
861
+ *
862
+ * Optionally, you can provide a type for the elements via a generic.
863
+ */
864
+ arrayContaining<E = any>(arr: readonly E[]): AsymmetricMatcher;
865
+
866
+ /**
867
+ * `expect.not.objectContaining(object)` matches any received object
868
+ * that does not recursively match the expected properties. That is, the
869
+ * expected object is not a subset of the received object. Therefore,
870
+ * it matches a received object which contains properties that are not
871
+ * in the expected object. It is the inverse of `expect.objectContaining`.
872
+ *
873
+ * Optionally, you can provide a type for the object via a generic.
874
+ * This ensures that the object contains the desired structure.
875
+ */
876
+ objectContaining(obj: object): AsymmetricMatcher;
877
+
878
+ /**
879
+ * `expect.not.stringContaining(string)` matches the received string
880
+ * that does not contain the exact expected string. It is the inverse of
881
+ * `expect.stringContaining`.
882
+ */
883
+ stringContaining(str: string | String): AsymmetricMatcher;
884
+
885
+ /**
886
+ * `expect.not.stringMatching(string | regexp)` matches the received
887
+ * string that does not match the expected regexp. It is the inverse of
888
+ * `expect.stringMatching`.
889
+ */
890
+ stringMatching(str: string | String | RegExp): AsymmetricMatcher;
891
+
892
+ /**
893
+ * `expect.not.closeTo` matches a number not close to the provided value.
894
+ * Useful when comparing floating point numbers in object properties or array item.
895
+ * It is the inverse of `expect.closeTo`.
896
+ */
897
+ closeTo(num: number, numDigits?: number): AsymmetricMatcher;
898
+ }
899
+
900
+ export interface MatchersBuiltin<T = unknown> {
901
+ /**
902
+ * Negates the result of a subsequent assertion.
903
+ * If you know how to test something, `.not` lets you test its opposite.
904
+ *
905
+ * @example
906
+ * expect(1).not.toBe(0);
907
+ * expect(null).not.toBeNull();
908
+ *
909
+ * @example
910
+ * expect(42).toEqual(42); // will pass
911
+ * expect(42).not.toEqual(42); // will fail
912
+ */
913
+ not: Matchers<unknown>;
914
+
915
+ /**
916
+ * Expects the value to be a promise that resolves.
917
+ *
918
+ * @example
919
+ * expect(Promise.resolve(1)).resolves.toBe(1);
920
+ */
921
+ resolves: Matchers<Awaited<T>>;
922
+
923
+ /**
924
+ * Expects the value to be a promise that rejects.
925
+ *
926
+ * @example
927
+ * expect(Promise.reject("error")).rejects.toBe("error");
928
+ */
929
+ rejects: Matchers<unknown>;
930
+
931
+ /**
932
+ * Assertion which passes.
933
+ *
934
+ * @link https://jest-extended.jestcommunity.dev/docs/matchers/pass
935
+ * @example
936
+ * expect().pass();
937
+ * expect().pass("message is optional");
938
+ * expect().not.pass();
939
+ * expect().not.pass("hi");
940
+ *
941
+ * @param message the message to display if the test fails (optional)
942
+ */
943
+ pass: (message?: string) => void;
944
+
945
+ /**
946
+ * Assertion which fails.
947
+ *
948
+ * @link https://jest-extended.jestcommunity.dev/docs/matchers/fail
949
+ * @example
950
+ * expect().fail();
951
+ * expect().fail("message is optional");
952
+ * expect().not.fail();
953
+ * expect().not.fail("hi");
954
+ */
955
+ fail: (message?: string) => void;
956
+
957
+ /**
958
+ * Asserts that a value equals what is expected.
959
+ *
960
+ * - For non-primitive values, like objects and arrays,
961
+ * use `toEqual()` instead.
962
+ * - For floating-point numbers, use `toBeCloseTo()` instead.
963
+ *
964
+ * @example
965
+ * expect(100 + 23).toBe(123);
966
+ * expect("d" + "og").toBe("dog");
967
+ * expect([123]).toBe([123]); // fail, use toEqual()
968
+ * expect(3 + 0.14).toBe(3.14); // fail, use toBeCloseTo()
969
+ *
970
+ * // TypeScript errors:
971
+ * expect("hello").toBe(3.14); // typescript error + fail
972
+ * expect("hello").toBe<number>(3.14); // no typescript error, but still fails
973
+ *
974
+ * @param expected the expected value
975
+ */
976
+ toBe(expected: T): void;
977
+ toBe<X = T>(expected: NoInfer<X>): void;
978
+
979
+ /**
980
+ * Asserts that a number is odd.
981
+ *
982
+ * @link https://jest-extended.jestcommunity.dev/docs/matchers/number/#tobeodd
983
+ * @example
984
+ * expect(1).toBeOdd();
985
+ * expect(2).not.toBeOdd();
986
+ */
987
+ toBeOdd(): void;
988
+
989
+ /**
990
+ * Asserts that a number is even.
991
+ *
992
+ * @link https://jest-extended.jestcommunity.dev/docs/matchers/number/#tobeeven
993
+ * @example
994
+ * expect(2).toBeEven();
995
+ * expect(1).not.toBeEven();
996
+ */
997
+ toBeEven(): void;
998
+
999
+ /**
1000
+ * Asserts that value is close to the expected by floating point precision.
1001
+ *
1002
+ * For example, the following fails because arithmetic on decimal (base 10)
1003
+ * values often have rounding errors in limited precision binary (base 2) representation.
1004
+ *
1005
+ * @example
1006
+ * expect(0.2 + 0.1).toBe(0.3); // fails
1007
+ *
1008
+ * Use `toBeCloseTo` to compare floating point numbers for approximate equality.
1009
+ *
1010
+ * @example
1011
+ * expect(0.2 + 0.1).toBeCloseTo(0.3, 5); // passes
1012
+ *
1013
+ * @param expected the expected value
1014
+ * @param numDigits the number of digits to check after the decimal point. Default is `2`
1015
+ */
1016
+ toBeCloseTo(expected: number, numDigits?: number): void;
1017
+
1018
+ /**
1019
+ * Asserts that a value is deeply equal to what is expected.
1020
+ *
1021
+ * @example
1022
+ * expect(100 + 23).toBe(123);
1023
+ * expect("d" + "og").toBe("dog");
1024
+ * expect([456]).toEqual([456]);
1025
+ * expect({ value: 1 }).toEqual({ value: 1 });
1026
+ *
1027
+ * @param expected the expected value
1028
+ */
1029
+ toEqual(expected: T): void;
1030
+ toEqual<X = T>(expected: NoInfer<X>): void;
1031
+
1032
+ /**
1033
+ * Asserts that a value is deeply and strictly equal to
1034
+ * what is expected.
1035
+ *
1036
+ * There are two key differences from `toEqual()`:
1037
+ * 1. It checks that the class is the same.
1038
+ * 2. It checks that `undefined` values match as well.
1039
+ *
1040
+ * @example
1041
+ * class Dog {
1042
+ * type = "dog";
1043
+ * }
1044
+ * const actual = new Dog();
1045
+ * expect(actual).toStrictEqual(new Dog());
1046
+ * expect(actual).toStrictEqual({ type: "dog" }); // fail
1047
+ *
1048
+ * @example
1049
+ * const actual = { value: 1, name: undefined };
1050
+ * expect(actual).toEqual({ value: 1 });
1051
+ * expect(actual).toStrictEqual({ value: 1 }); // fail
1052
+ *
1053
+ * @param expected the expected value
1054
+ */
1055
+ toStrictEqual(expected: T): void;
1056
+ toStrictEqual<X = T>(expected: NoInfer<X>): void;
1057
+
1058
+ /**
1059
+ * Asserts that the value is deep equal to an element in the expected array.
1060
+ *
1061
+ * The value must be an array or iterable, which includes strings.
1062
+ *
1063
+ * @example
1064
+ * expect(1).toBeOneOf([1,2,3]);
1065
+ * expect("foo").toBeOneOf(["foo", "bar"]);
1066
+ * expect(true).toBeOneOf(new Set([true]));
1067
+ *
1068
+ * @param expected the expected value
1069
+ */
1070
+ toBeOneOf(expected: Iterable<T>): void;
1071
+ toBeOneOf<X = T>(expected: NoInfer<Iterable<X>>): void;
1072
+
1073
+ /**
1074
+ * Asserts that a value contains what is expected.
1075
+ *
1076
+ * The value must be an array or iterable, which
1077
+ * includes strings.
1078
+ *
1079
+ * @example
1080
+ * expect([1, 2, 3]).toContain(1);
1081
+ * expect(new Set([true])).toContain(true);
1082
+ * expect("hello").toContain("o");
1083
+ *
1084
+ * @param expected the expected value
1085
+ */
1086
+ toContain(expected: T extends Iterable<infer U> ? U : T): void;
1087
+ toContain<X = T>(expected: NoInfer<X extends Iterable<infer U> ? U : X>): void;
1088
+
1089
+ /**
1090
+ * Asserts that an `object` contains a key.
1091
+ *
1092
+ * The value must be an object
1093
+ *
1094
+ * @example
1095
+ * expect({ a: 'foo', b: 'bar', c: 'baz' }).toContainKey('a');
1096
+ * expect({ a: 'foo', b: 'bar', c: 'baz' }).toContainKey('b');
1097
+ * expect({ a: 'foo', b: 'bar', c: 'baz' }).toContainKey('c');
1098
+ * expect({ a: 'foo', b: 'bar', c: 'baz' }).not.toContainKey('d');
1099
+ *
1100
+ * @param expected the expected value
1101
+ */
1102
+ toContainKey(expected: __internal.IfNeverThenElse<keyof T, PropertyKey>): void;
1103
+ toContainKey<X = T>(expected: __internal.IfNeverThenElse<NoInfer<keyof X>, PropertyKey>): void;
1104
+
1105
+ /**
1106
+ * Asserts that an `object` contains all the provided keys.
1107
+ *
1108
+ * The value must be an object
1109
+ *
1110
+ * @example
1111
+ * expect({ a: 'hello', b: 'world' }).toContainAllKeys(['a','b']);
1112
+ * expect({ a: 'hello', b: 'world' }).toContainAllKeys(['b','a']);
1113
+ * expect({ 1: 'hello', b: 'world' }).toContainAllKeys([1,'b']);
1114
+ * expect({ a: 'hello', b: 'world' }).not.toContainAllKeys(['c']);
1115
+ * expect({ a: 'hello', b: 'world' }).not.toContainAllKeys(['a']);
1116
+ *
1117
+ * @param expected the expected value
1118
+ */
1119
+ toContainAllKeys(expected: Array<__internal.IfNeverThenElse<keyof T, PropertyKey>>): void;
1120
+ toContainAllKeys<X = T>(expected: Array<__internal.IfNeverThenElse<NoInfer<keyof X>, PropertyKey>>): void;
1121
+
1122
+ /**
1123
+ * Asserts that an `object` contains at least one of the provided keys.
1124
+ * Asserts that an `object` contains all the provided keys.
1125
+ *
1126
+ * The value must be an object
1127
+ *
1128
+ * @example
1129
+ * expect({ a: 'hello', b: 'world' }).toContainAnyKeys(['a']);
1130
+ * expect({ a: 'hello', b: 'world' }).toContainAnyKeys(['b']);
1131
+ * expect({ a: 'hello', b: 'world' }).toContainAnyKeys(['b', 'c']);
1132
+ * expect({ a: 'hello', b: 'world' }).not.toContainAnyKeys(['c']);
1133
+ *
1134
+ * @param expected the expected value
1135
+ */
1136
+ toContainAnyKeys(expected: Array<__internal.IfNeverThenElse<keyof T, PropertyKey>>): void;
1137
+ toContainAnyKeys<X = T>(expected: Array<__internal.IfNeverThenElse<NoInfer<keyof X>, PropertyKey>>): void;
1138
+
1139
+ /**
1140
+ * Asserts that an `object` contain the provided value.
1141
+ *
1142
+ * This method is deep and will look through child properties to find the
1143
+ * expected value.
1144
+ *
1145
+ * The input value must be an object.
1146
+ *
1147
+ * @example
1148
+ * const shallow = { hello: "world" };
1149
+ * const deep = { message: shallow };
1150
+ * const deepArray = { message: [shallow] };
1151
+ * const o = { a: "foo", b: [1, "hello", true], c: "baz" };
1152
+
1153
+ * expect(shallow).toContainValue("world");
1154
+ * expect({ foo: false }).toContainValue(false);
1155
+ * expect(deep).toContainValue({ hello: "world" });
1156
+ * expect(deepArray).toContainValue([{ hello: "world" }]);
1157
+
1158
+ * expect(o).toContainValue("foo", "barr");
1159
+ * expect(o).toContainValue([1, "hello", true]);
1160
+ * expect(o).not.toContainValue("qux");
1161
+
1162
+ // NOT
1163
+ * expect(shallow).not.toContainValue("foo");
1164
+ * expect(deep).not.toContainValue({ foo: "bar" });
1165
+ * expect(deepArray).not.toContainValue([{ foo: "bar" }]);
1166
+ *
1167
+ * @param expected the expected value
1168
+ */
1169
+ // Contributor note: In theory we could type this better but it would be a
1170
+ // slow union to compute...
1171
+ toContainValue(expected: unknown): void;
1172
+
1173
+ /**
1174
+ * Asserts that an `object` contain the provided value.
1175
+ *
1176
+ * This is the same as {@link toContainValue}, but accepts an array of
1177
+ * values instead.
1178
+ *
1179
+ * The value must be an object
1180
+ *
1181
+ * @example
1182
+ * const o = { a: 'foo', b: 'bar', c: 'baz' };
1183
+ * expect(o).toContainValues(['foo']);
1184
+ * expect(o).toContainValues(['baz', 'bar']);
1185
+ * expect(o).not.toContainValues(['qux', 'foo']);
1186
+ * @param expected the expected value
1187
+ */
1188
+ toContainValues(expected: Array<unknown>): void;
1189
+
1190
+ /**
1191
+ * Asserts that an `object` contain all the provided values.
1192
+ *
1193
+ * The value must be an object
1194
+ *
1195
+ * @example
1196
+ * const o = { a: 'foo', b: 'bar', c: 'baz' };
1197
+ * expect(o).toContainAllValues(['foo', 'bar', 'baz']);
1198
+ * expect(o).toContainAllValues(['baz', 'bar', 'foo']);
1199
+ * expect(o).not.toContainAllValues(['bar', 'foo']);
1200
+ * @param expected the expected value
1201
+ */
1202
+ toContainAllValues(expected: Array<unknown>): void;
1203
+
1204
+ /**
1205
+ * Asserts that an `object` contain any provided value.
1206
+ *
1207
+ * The value must be an object
1208
+ *
1209
+ * @example
1210
+ * const o = { a: 'foo', b: 'bar', c: 'baz' };
1211
+ * expect(o).toContainAnyValues(['qux', 'foo']);
1212
+ * expect(o).toContainAnyValues(['qux', 'bar']);
1213
+ * expect(o).toContainAnyValues(['qux', 'baz']);
1214
+ * expect(o).not.toContainAnyValues(['qux']);
1215
+ * @param expected the expected value
1216
+ */
1217
+ toContainAnyValues(expected: Array<unknown>): void;
1218
+
1219
+ /**
1220
+ * Asserts that an `object` contains all the provided keys.
1221
+ *
1222
+ * @example
1223
+ * expect({ a: 'foo', b: 'bar', c: 'baz' }).toContainKeys(['a', 'b']);
1224
+ * expect({ a: 'foo', b: 'bar', c: 'baz' }).toContainKeys(['a', 'b', 'c']);
1225
+ * expect({ a: 'foo', b: 'bar', c: 'baz' }).not.toContainKeys(['a', 'b', 'e']);
1226
+ *
1227
+ * @param expected the expected value
1228
+ */
1229
+ toContainKeys(expected: Array<__internal.IfNeverThenElse<keyof T, PropertyKey>>): void;
1230
+ toContainKeys<X = T>(expected: Array<__internal.IfNeverThenElse<NoInfer<keyof X>, PropertyKey>>): void;
1231
+
1232
+ /**
1233
+ * Asserts that a value contains and equals what is expected.
1234
+ *
1235
+ * This matcher will perform a deep equality check for members
1236
+ * of arrays, rather than checking for object identity.
1237
+ *
1238
+ * @example
1239
+ * expect([{ a: 1 }]).toContainEqual({ a: 1 });
1240
+ * expect([{ a: 1 }]).not.toContainEqual({ a: 2 });
1241
+ *
1242
+ * @param expected the expected value
1243
+ */
1244
+ toContainEqual(expected: T extends Iterable<infer U> ? U : T): void;
1245
+ toContainEqual<X = T>(expected: NoInfer<X extends Iterable<infer U> ? U : X>): void;
1246
+
1247
+ /**
1248
+ * Asserts that a value has a `.length` property
1249
+ * that is equal to the expected length.
1250
+ *
1251
+ * @example
1252
+ * expect([]).toHaveLength(0);
1253
+ * expect("hello").toHaveLength(4);
1254
+ *
1255
+ * @param length the expected length
1256
+ */
1257
+ toHaveLength(length: number): void;
1258
+
1259
+ /**
1260
+ * Asserts that a value has a property with the
1261
+ * expected name, and value if provided.
1262
+ *
1263
+ * @example
1264
+ * expect(new Set()).toHaveProperty("size");
1265
+ * expect(new Uint8Array()).toHaveProperty("byteLength", 0);
1266
+ * expect({ kitchen: { area: 20 }}).toHaveProperty("kitchen.area", 20);
1267
+ * expect({ kitchen: { area: 20 }}).toHaveProperty(["kitchen", "area"], 20);
1268
+ *
1269
+ * @param keyPath the expected property name or path, or an index
1270
+ * @param value the expected property value, if provided
1271
+ */
1272
+ toHaveProperty(keyPath: string | number | Array<string | number>, value?: unknown): void;
1273
+
1274
+ /**
1275
+ * Asserts that a value is "truthy".
1276
+ *
1277
+ * To assert that a value equals `true`, use `toBe(true)` instead.
1278
+ *
1279
+ * @link https://developer.mozilla.org/en-US/docs/Glossary/Truthy
1280
+ * @example
1281
+ * expect(true).toBeTruthy();
1282
+ * expect(1).toBeTruthy();
1283
+ * expect({}).toBeTruthy();
1284
+ */
1285
+ toBeTruthy(): void;
1286
+
1287
+ /**
1288
+ * Asserts that a value is "falsy".
1289
+ *
1290
+ * To assert that a value equals `false`, use `toBe(false)` instead.
1291
+ *
1292
+ * @link https://developer.mozilla.org/en-US/docs/Glossary/Falsy
1293
+ * @example
1294
+ * expect(true).toBeTruthy();
1295
+ * expect(1).toBeTruthy();
1296
+ * expect({}).toBeTruthy();
1297
+ */
1298
+ toBeFalsy(): void;
1299
+
1300
+ /**
1301
+ * Asserts that a value is defined. (e.g. is not `undefined`)
1302
+ *
1303
+ * @example
1304
+ * expect(true).toBeDefined();
1305
+ * expect(undefined).toBeDefined(); // fail
1306
+ */
1307
+ toBeDefined(): void;
1308
+
1309
+ /**
1310
+ * Asserts that the expected value is an instance of value
1311
+ *
1312
+ * @example
1313
+ * expect([]).toBeInstanceOf(Array);
1314
+ * expect(null).toBeInstanceOf(Array); // fail
1315
+ */
1316
+ toBeInstanceOf(value: unknown): void;
1317
+
1318
+ /**
1319
+ * Asserts that a value is `undefined`.
1320
+ *
1321
+ * @example
1322
+ * expect(undefined).toBeUndefined();
1323
+ * expect(null).toBeUndefined(); // fail
1324
+ */
1325
+ toBeUndefined(): void;
1326
+
1327
+ /**
1328
+ * Asserts that a value is `null`.
1329
+ *
1330
+ * @example
1331
+ * expect(null).toBeNull();
1332
+ * expect(undefined).toBeNull(); // fail
1333
+ */
1334
+ toBeNull(): void;
1335
+
1336
+ /**
1337
+ * Asserts that a value is `NaN`.
1338
+ *
1339
+ * Same as using `Number.isNaN()`.
1340
+ *
1341
+ * @example
1342
+ * expect(NaN).toBeNaN();
1343
+ * expect(Infinity).toBeNaN(); // fail
1344
+ * expect("notanumber").toBeNaN(); // fail
1345
+ */
1346
+ toBeNaN(): void;
1347
+
1348
+ /**
1349
+ * Asserts that a value is a `number` and is greater than the expected value.
1350
+ *
1351
+ * @example
1352
+ * expect(1).toBeGreaterThan(0);
1353
+ * expect(3.14).toBeGreaterThan(3);
1354
+ * expect(9).toBeGreaterThan(9); // fail
1355
+ *
1356
+ * @param expected the expected number
1357
+ */
1358
+ toBeGreaterThan(expected: number | bigint): void;
1359
+
1360
+ /**
1361
+ * Asserts that a value is a `number` and is greater than or equal to the expected value.
1362
+ *
1363
+ * @example
1364
+ * expect(1).toBeGreaterThanOrEqual(0);
1365
+ * expect(3.14).toBeGreaterThanOrEqual(3);
1366
+ * expect(9).toBeGreaterThanOrEqual(9);
1367
+ *
1368
+ * @param expected the expected number
1369
+ */
1370
+ toBeGreaterThanOrEqual(expected: number | bigint): void;
1371
+
1372
+ /**
1373
+ * Asserts that a value is a `number` and is less than the expected value.
1374
+ *
1375
+ * @example
1376
+ * expect(-1).toBeLessThan(0);
1377
+ * expect(3).toBeLessThan(3.14);
1378
+ * expect(9).toBeLessThan(9); // fail
1379
+ *
1380
+ * @param expected the expected number
1381
+ */
1382
+ toBeLessThan(expected: number | bigint): void;
1383
+
1384
+ /**
1385
+ * Asserts that a value is a `number` and is less than or equal to the expected value.
1386
+ *
1387
+ * @example
1388
+ * expect(-1).toBeLessThanOrEqual(0);
1389
+ * expect(3).toBeLessThanOrEqual(3.14);
1390
+ * expect(9).toBeLessThanOrEqual(9);
1391
+ *
1392
+ * @param expected the expected number
1393
+ */
1394
+ toBeLessThanOrEqual(expected: number | bigint): void;
1395
+
1396
+ /**
1397
+ * Asserts that a function throws an error.
1398
+ *
1399
+ * - If expected is a `string` or `RegExp`, it will check the `message` property.
1400
+ * - If expected is an `Error` object, it will check the `name` and `message` properties.
1401
+ * - If expected is an `Error` constructor, it will check the class of the `Error`.
1402
+ * - If expected is not provided, it will check if anything has thrown.
1403
+ *
1404
+ * @example
1405
+ * function fail() {
1406
+ * throw new Error("Oops!");
1407
+ * }
1408
+ * expect(fail).toThrow("Oops!");
1409
+ * expect(fail).toThrow(/oops/i);
1410
+ * expect(fail).toThrow(Error);
1411
+ * expect(fail).toThrow();
1412
+ *
1413
+ * @param expected the expected error, error message, or error pattern
1414
+ */
1415
+ toThrow(expected?: unknown): void;
1416
+
1417
+ /**
1418
+ * Asserts that a function throws an error.
1419
+ *
1420
+ * - If expected is a `string` or `RegExp`, it will check the `message` property.
1421
+ * - If expected is an `Error` object, it will check the `name` and `message` properties.
1422
+ * - If expected is an `Error` constructor, it will check the class of the `Error`.
1423
+ * - If expected is not provided, it will check if anything has thrown.
1424
+ *
1425
+ * @example
1426
+ * function fail() {
1427
+ * throw new Error("Oops!");
1428
+ * }
1429
+ * expect(fail).toThrowError("Oops!");
1430
+ * expect(fail).toThrowError(/oops/i);
1431
+ * expect(fail).toThrowError(Error);
1432
+ * expect(fail).toThrowError();
1433
+ *
1434
+ * @param expected the expected error, error message, or error pattern
1435
+ * @alias toThrow
1436
+ */
1437
+ toThrowError(expected?: unknown): void;
1438
+
1439
+ /**
1440
+ * Asserts that a value matches a regular expression or includes a substring.
1441
+ *
1442
+ * @example
1443
+ * expect("dog").toMatch(/dog/);
1444
+ * expect("dog").toMatch("og");
1445
+ *
1446
+ * @param expected the expected substring or pattern.
1447
+ */
1448
+ toMatch(expected: string | RegExp): void;
1449
+
1450
+ /**
1451
+ * Asserts that a value matches the most recent snapshot.
1452
+ *
1453
+ * @example
1454
+ * expect([1, 2, 3]).toMatchSnapshot('hint message');
1455
+ * @param hint Hint used to identify the snapshot in the snapshot file.
1456
+ */
1457
+ toMatchSnapshot(hint?: string): void;
1458
+
1459
+ /**
1460
+ * Asserts that a value matches the most recent snapshot.
1461
+ *
1462
+ * @example
1463
+ * expect([1, 2, 3]).toMatchSnapshot();
1464
+ * expect({ a: 1, b: 2 }).toMatchSnapshot({ a: 1 });
1465
+ * expect({ c: new Date() }).toMatchSnapshot({ c: expect.any(Date) });
1466
+ *
1467
+ * @param propertyMatchers Object containing properties to match against the value.
1468
+ * @param hint Hint used to identify the snapshot in the snapshot file.
1469
+ */
1470
+ toMatchSnapshot(propertyMatchers?: object, hint?: string): void;
1471
+
1472
+ /**
1473
+ * Asserts that a value matches the most recent inline snapshot.
1474
+ *
1475
+ * @example
1476
+ * expect("Hello").toMatchInlineSnapshot();
1477
+ * expect("Hello").toMatchInlineSnapshot(`"Hello"`);
1478
+ *
1479
+ * @param value The latest automatically-updated snapshot value.
1480
+ */
1481
+ toMatchInlineSnapshot(value?: string): void;
1482
+
1483
+ /**
1484
+ * Asserts that a value matches the most recent inline snapshot.
1485
+ *
1486
+ * @example
1487
+ * expect({ c: new Date() }).toMatchInlineSnapshot({ c: expect.any(Date) });
1488
+ * expect({ c: new Date() }).toMatchInlineSnapshot({ c: expect.any(Date) }, `
1489
+ * {
1490
+ * "v": Any<Date>,
1491
+ * }
1492
+ * `);
1493
+ *
1494
+ * @param propertyMatchers Object containing properties to match against the value.
1495
+ * @param value The latest automatically-updated snapshot value.
1496
+ */
1497
+ toMatchInlineSnapshot(propertyMatchers?: object, value?: string): void;
1498
+
1499
+ /**
1500
+ * Asserts that a function throws an error matching the most recent snapshot.
1501
+ *
1502
+ * @example
1503
+ * function fail() {
1504
+ * throw new Error("Oops!");
1505
+ * }
1506
+ * expect(fail).toThrowErrorMatchingSnapshot();
1507
+ * expect(fail).toThrowErrorMatchingSnapshot("This one should say Oops!");
1508
+ *
1509
+ * @param value The latest automatically-updated snapshot value.
1510
+ */
1511
+ toThrowErrorMatchingSnapshot(hint?: string): void;
1512
+
1513
+ /**
1514
+ * Asserts that a function throws an error matching the most recent snapshot.
1515
+ *
1516
+ * @example
1517
+ * function fail() {
1518
+ * throw new Error("Oops!");
1519
+ * }
1520
+ * expect(fail).toThrowErrorMatchingInlineSnapshot();
1521
+ * expect(fail).toThrowErrorMatchingInlineSnapshot(`"Oops!"`);
1522
+ *
1523
+ * @param value The latest automatically-updated snapshot value.
1524
+ */
1525
+ toThrowErrorMatchingInlineSnapshot(value?: string): void;
1526
+
1527
+ /**
1528
+ * Asserts that an object matches a subset of properties.
1529
+ *
1530
+ * @example
1531
+ * expect({ a: 1, b: 2 }).toMatchObject({ b: 2 });
1532
+ * expect({ c: new Date(), d: 2 }).toMatchObject({ d: 2 });
1533
+ *
1534
+ * @param subset Subset of properties to match with.
1535
+ */
1536
+ toMatchObject(subset: object): void;
1537
+
1538
+ /**
1539
+ * Asserts that a value is empty.
1540
+ *
1541
+ * @example
1542
+ * expect("").toBeEmpty();
1543
+ * expect([]).toBeEmpty();
1544
+ * expect({}).toBeEmpty();
1545
+ * expect(new Set()).toBeEmpty();
1546
+ */
1547
+ toBeEmpty(): void;
1548
+
1549
+ /**
1550
+ * Asserts that a value is an empty `object`.
1551
+ *
1552
+ * @example
1553
+ * expect({}).toBeEmptyObject();
1554
+ * expect({ a: 'hello' }).not.toBeEmptyObject();
1555
+ */
1556
+ toBeEmptyObject(): void;
1557
+
1558
+ /**
1559
+ * Asserts that a value is `null` or `undefined`.
1560
+ *
1561
+ * @example
1562
+ * expect(null).toBeNil();
1563
+ * expect(undefined).toBeNil();
1564
+ */
1565
+ toBeNil(): void;
1566
+
1567
+ /**
1568
+ * Asserts that a value is a `array`.
1569
+ *
1570
+ * @link https://jest-extended.jestcommunity.dev/docs/matchers/array/#tobearray
1571
+ * @example
1572
+ * expect([1]).toBeArray();
1573
+ * expect(new Array(1)).toBeArray();
1574
+ * expect({}).not.toBeArray();
1575
+ */
1576
+ toBeArray(): void;
1577
+
1578
+ /**
1579
+ * Asserts that a value is a `array` of a certain length.
1580
+ *
1581
+ * @link https://jest-extended.jestcommunity.dev/docs/matchers/array/#tobearrayofsize
1582
+ * @example
1583
+ * expect([]).toBeArrayOfSize(0);
1584
+ * expect([1]).toBeArrayOfSize(1);
1585
+ * expect(new Array(1)).toBeArrayOfSize(1);
1586
+ * expect({}).not.toBeArrayOfSize(0);
1587
+ */
1588
+ toBeArrayOfSize(size: number): void;
1589
+
1590
+ /**
1591
+ * Asserts that a value is a `boolean`.
1592
+ *
1593
+ * @example
1594
+ * expect(true).toBeBoolean();
1595
+ * expect(false).toBeBoolean();
1596
+ * expect(null).not.toBeBoolean();
1597
+ * expect(0).not.toBeBoolean();
1598
+ */
1599
+ toBeBoolean(): void;
1600
+
1601
+ /**
1602
+ * Asserts that a value is `true`.
1603
+ *
1604
+ * @example
1605
+ * expect(true).toBeTrue();
1606
+ * expect(false).not.toBeTrue();
1607
+ * expect(1).not.toBeTrue();
1608
+ */
1609
+ toBeTrue(): void;
1610
+
1611
+ /**
1612
+ * Asserts that a value matches a specific type.
1613
+ *
1614
+ * @link https://vitest.dev/api/expect.html#tobetypeof
1615
+ * @example
1616
+ * expect(1).toBeTypeOf("number");
1617
+ * expect("hello").toBeTypeOf("string");
1618
+ * expect([]).not.toBeTypeOf("boolean");
1619
+ */
1620
+ toBeTypeOf(type: "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"): void;
1621
+
1622
+ /**
1623
+ * Asserts that a value is `false`.
1624
+ *
1625
+ * @example
1626
+ * expect(false).toBeFalse();
1627
+ * expect(true).not.toBeFalse();
1628
+ * expect(0).not.toBeFalse();
1629
+ */
1630
+ toBeFalse(): void;
1631
+
1632
+ /**
1633
+ * Asserts that a value is a `number`.
1634
+ *
1635
+ * @example
1636
+ * expect(1).toBeNumber();
1637
+ * expect(3.14).toBeNumber();
1638
+ * expect(NaN).toBeNumber();
1639
+ * expect(BigInt(1)).not.toBeNumber();
1640
+ */
1641
+ toBeNumber(): void;
1642
+
1643
+ /**
1644
+ * Asserts that a value is a `number`, and is an integer.
1645
+ *
1646
+ * @example
1647
+ * expect(1).toBeInteger();
1648
+ * expect(3.14).not.toBeInteger();
1649
+ * expect(NaN).not.toBeInteger();
1650
+ */
1651
+ toBeInteger(): void;
1652
+
1653
+ /**
1654
+ * Asserts that a value is an `object`.
1655
+ *
1656
+ * @example
1657
+ * expect({}).toBeObject();
1658
+ * expect("notAnObject").not.toBeObject();
1659
+ * expect(NaN).not.toBeObject();
1660
+ */
1661
+ toBeObject(): void;
1662
+
1663
+ /**
1664
+ * Asserts that a value is a `number`, and is not `NaN` or `Infinity`.
1665
+ *
1666
+ * @example
1667
+ * expect(1).toBeFinite();
1668
+ * expect(3.14).toBeFinite();
1669
+ * expect(NaN).not.toBeFinite();
1670
+ * expect(Infinity).not.toBeFinite();
1671
+ */
1672
+ toBeFinite(): void;
1673
+
1674
+ /**
1675
+ * Asserts that a value is a positive `number`.
1676
+ *
1677
+ * @example
1678
+ * expect(1).toBePositive();
1679
+ * expect(-3.14).not.toBePositive();
1680
+ * expect(NaN).not.toBePositive();
1681
+ */
1682
+ toBePositive(): void;
1683
+
1684
+ /**
1685
+ * Asserts that a value is a negative `number`.
1686
+ *
1687
+ * @example
1688
+ * expect(-3.14).toBeNegative();
1689
+ * expect(1).not.toBeNegative();
1690
+ * expect(NaN).not.toBeNegative();
1691
+ */
1692
+ toBeNegative(): void;
1693
+
1694
+ /**
1695
+ * Asserts that a value is a number between a start and end value.
1696
+ *
1697
+ * @param start the start number (inclusive)
1698
+ * @param end the end number (exclusive)
1699
+ */
1700
+ toBeWithin(start: number, end: number): void;
1701
+
1702
+ /**
1703
+ * Asserts that a value is equal to the expected string, ignoring any whitespace.
1704
+ *
1705
+ * @example
1706
+ * expect(" foo ").toEqualIgnoringWhitespace("foo");
1707
+ * expect("bar").toEqualIgnoringWhitespace(" bar ");
1708
+ *
1709
+ * @param expected the expected string
1710
+ */
1711
+ toEqualIgnoringWhitespace(expected: string): void;
1712
+
1713
+ /**
1714
+ * Asserts that a value is a `symbol`.
1715
+ *
1716
+ * @example
1717
+ * expect(Symbol("foo")).toBeSymbol();
1718
+ * expect("foo").not.toBeSymbol();
1719
+ */
1720
+ toBeSymbol(): void;
1721
+
1722
+ /**
1723
+ * Asserts that a value is a `function`.
1724
+ *
1725
+ * @example
1726
+ * expect(() => {}).toBeFunction();
1727
+ */
1728
+ toBeFunction(): void;
1729
+
1730
+ /**
1731
+ * Asserts that a value is a `Date` object.
1732
+ *
1733
+ * To check if a date is valid, use `toBeValidDate()` instead.
1734
+ *
1735
+ * @example
1736
+ * expect(new Date()).toBeDate();
1737
+ * expect(new Date(null)).toBeDate();
1738
+ * expect("2020-03-01").not.toBeDate();
1739
+ */
1740
+ toBeDate(): void;
1741
+
1742
+ /**
1743
+ * Asserts that a value is a valid `Date` object.
1744
+ *
1745
+ * @example
1746
+ * expect(new Date()).toBeValidDate();
1747
+ * expect(new Date(null)).not.toBeValidDate();
1748
+ * expect("2020-03-01").not.toBeValidDate();
1749
+ */
1750
+ toBeValidDate(): void;
1751
+
1752
+ /**
1753
+ * Asserts that a value is a `string`.
1754
+ *
1755
+ * @example
1756
+ * expect("foo").toBeString();
1757
+ * expect(new String("bar")).toBeString();
1758
+ * expect(123).not.toBeString();
1759
+ */
1760
+ toBeString(): void;
1761
+
1762
+ /**
1763
+ * Asserts that a value includes a `string`.
1764
+ *
1765
+ * For non-string values, use `toContain()` instead.
1766
+ *
1767
+ * @param expected the expected substring
1768
+ */
1769
+ toInclude(expected: string): void;
1770
+
1771
+ /**
1772
+ * Asserts that a value includes a `string` {times} times.
1773
+ * @param expected the expected substring
1774
+ * @param times the number of times the substring should occur
1775
+ */
1776
+ toIncludeRepeated(expected: string, times: number): void;
1777
+
1778
+ /**
1779
+ * Checks whether a value satisfies a custom condition.
1780
+ * @param {Function} predicate - The custom condition to be satisfied. It should be a function that takes a value as an argument (in this case the value from expect) and returns a boolean.
1781
+ * @example
1782
+ * expect(1).toSatisfy((val) => val > 0);
1783
+ * expect("foo").toSatisfy((val) => val === "foo");
1784
+ * expect("bar").not.toSatisfy((val) => val === "bun");
1785
+ * @link https://vitest.dev/api/expect.html#tosatisfy
1786
+ * @link https://jest-extended.jestcommunity.dev/docs/matchers/toSatisfy
1787
+ */
1788
+ toSatisfy(predicate: (value: T) => boolean): void;
1789
+
1790
+ /**
1791
+ * Asserts that a value starts with a `string`.
1792
+ *
1793
+ * @param expected the string to start with
1794
+ */
1795
+ toStartWith(expected: string): void;
1796
+
1797
+ /**
1798
+ * Asserts that a value ends with a `string`.
1799
+ *
1800
+ * @param expected the string to end with
1801
+ */
1802
+ toEndWith(expected: string): void;
1803
+
1804
+ /**
1805
+ * Ensures that a mock function has returned successfully at least once.
1806
+ *
1807
+ * A promise that is unfulfilled will be considered a failure. If the
1808
+ * function threw an error, it will be considered a failure.
1809
+ */
1810
+ toHaveReturned(): void;
1811
+
1812
+ /**
1813
+ * Ensures that a mock function has returned successfully at `times` times.
1814
+ *
1815
+ * A promise that is unfulfilled will be considered a failure. If the
1816
+ * function threw an error, it will be considered a failure.
1817
+ */
1818
+ toHaveReturnedTimes(times: number): void;
1819
+
1820
+ /**
1821
+ * Ensures that a mock function has returned a specific value.
1822
+ * This matcher uses deep equality, like toEqual(), and supports asymmetric matchers.
1823
+ */
1824
+ toHaveReturnedWith(expected: unknown): void;
1825
+
1826
+ /**
1827
+ * Ensures that a mock function has returned a specific value on its last invocation.
1828
+ * This matcher uses deep equality, like toEqual(), and supports asymmetric matchers.
1829
+ */
1830
+ toHaveLastReturnedWith(expected: unknown): void;
1831
+
1832
+ /**
1833
+ * Ensures that a mock function has returned a specific value on the nth invocation.
1834
+ * This matcher uses deep equality, like toEqual(), and supports asymmetric matchers.
1835
+ * @param n The 1-based index of the function call
1836
+ * @param expected The expected return value
1837
+ */
1838
+ toHaveNthReturnedWith(n: number, expected: unknown): void;
1839
+
1840
+ /**
1841
+ * Ensures that a mock function is called.
1842
+ */
1843
+ toHaveBeenCalled(): void;
1844
+
1845
+ /**
1846
+ * Ensures that a mock function is called an exact number of times.
1847
+ * @alias toHaveBeenCalled
1848
+ */
1849
+ toBeCalled(): void;
1850
+
1851
+ /**
1852
+ * Ensures that a mock function is called an exact number of times.
1853
+ */
1854
+ toHaveBeenCalledTimes(expected: number): void;
1855
+
1856
+ /**
1857
+ * Ensure that a mock function is called with specific arguments.
1858
+ * @alias toHaveBeenCalledTimes
1859
+ */
1860
+ toBeCalledTimes(expected: number): void;
1861
+
1862
+ /**
1863
+ * Ensure that a mock function is called with specific arguments.
1864
+ */
1865
+ toHaveBeenCalledWith(...expected: unknown[]): void;
1866
+
1867
+ /**
1868
+ * Ensure that a mock function is called with specific arguments.
1869
+ * @alias toHaveBeenCalledWith
1870
+ */
1871
+ toBeCalledWith(...expected: unknown[]): void;
1872
+
1873
+ /**
1874
+ * Ensure that a mock function is called with specific arguments for the last call.
1875
+ */
1876
+ toHaveBeenLastCalledWith(...expected: unknown[]): void;
1877
+
1878
+ /**
1879
+ * Ensure that a mock function is called with specific arguments for the nth call.
1880
+ * @alias toHaveBeenCalledWith
1881
+ */
1882
+ lastCalledWith(...expected: unknown[]): void;
1883
+
1884
+ /**
1885
+ * Ensure that a mock function is called with specific arguments for the nth call.
1886
+ */
1887
+ toHaveBeenNthCalledWith(n: number, ...expected: unknown[]): void;
1888
+
1889
+ /**
1890
+ * Ensure that a mock function is called with specific arguments for the nth call.
1891
+ * @alias toHaveBeenCalledWith
1892
+ */
1893
+ nthCalledWith(n: number, ...expected: unknown[]): void;
1894
+ }
1895
+
1896
+ /**
1897
+ * Object representing an asymmetric matcher obtained by an static call to expect like `expect.anything()`, `expect.stringContaining("...")`, etc.
1898
+ */
1899
+ // Defined as an alias of `any` so that it does not trigger any type mismatch
1900
+ export type AsymmetricMatcher = any;
1901
+
1902
+ export interface MatcherResult {
1903
+ pass: boolean;
1904
+ message?: string | (() => string);
1905
+ }
1906
+
1907
+ export type CustomMatcher<E, P extends any[]> = (
1908
+ this: MatcherContext,
1909
+ expected: E,
1910
+ ...matcherArguments: P
1911
+ ) => MatcherResult | Promise<MatcherResult>;
1912
+
1913
+ /** All non-builtin matchers and asymmetric matchers that have been type-registered through declaration merging */
1914
+ export type CustomMatchersDetected = Omit<Matchers<unknown>, keyof MatchersBuiltin<unknown>> &
1915
+ Omit<AsymmetricMatchers, keyof AsymmetricMatchersBuiltin>;
1916
+
1917
+ /**
1918
+ * If the types has been defined through declaration merging, enforce it.
1919
+ * Otherwise enforce the generic custom matcher signature.
1920
+ */
1921
+ export type ExpectExtendMatchers<M> = {
1922
+ [k in keyof M]: k extends keyof CustomMatchersDetected
1923
+ ? CustomMatcher<unknown, Parameters<CustomMatchersDetected[k]>>
1924
+ : CustomMatcher<unknown, any[]>;
1925
+ };
1926
+
1927
+ /** Custom equality tester */
1928
+ export type Tester = (this: TesterContext, a: any, b: any, customTesters: Tester[]) => boolean | undefined;
1929
+
1930
+ export type EqualsFunction = (
1931
+ a: unknown,
1932
+ b: unknown,
1933
+ //customTesters?: Array<Tester>,
1934
+ //strictCheck?: boolean,
1935
+ ) => boolean;
1936
+
1937
+ export interface TesterContext {
1938
+ equals: EqualsFunction;
1939
+ }
1940
+
1941
+ interface MatcherState {
1942
+ //assertionCalls: number;
1943
+ //currentConcurrentTestName?: () => string | undefined;
1944
+ //currentTestName?: string;
1945
+ //error?: Error;
1946
+ //expand: boolean;
1947
+ //expectedAssertionsNumber: number | null;
1948
+ //expectedAssertionsNumberError?: Error;
1949
+ //isExpectingAssertions: boolean;
1950
+ //isExpectingAssertionsError?: Error;
1951
+ isNot: boolean;
1952
+ //numPassingAsserts: number;
1953
+ promise: string;
1954
+ //suppressedErrors: Array<Error>;
1955
+ //testPath?: string;
1956
+ }
1957
+
1958
+ type MatcherHintColor = (arg: string) => string; // subset of Chalk type
1959
+
1960
+ interface MatcherUtils {
1961
+ //customTesters: Array<Tester>;
1962
+ //dontThrow(): void; // (internally used by jest snapshot)
1963
+ equals: EqualsFunction;
1964
+ utils: Readonly<{
1965
+ stringify(value: unknown): string;
1966
+ printReceived(value: unknown): string;
1967
+ printExpected(value: unknown): string;
1968
+ matcherHint(
1969
+ matcherName: string,
1970
+ received?: unknown,
1971
+ expected?: unknown,
1972
+ options?: {
1973
+ isNot?: boolean;
1974
+ promise?: string;
1975
+ isDirectExpectCall?: boolean; // (internal)
1976
+ comment?: string;
1977
+ expectedColor?: MatcherHintColor;
1978
+ receivedColor?: MatcherHintColor;
1979
+ secondArgument?: string;
1980
+ secondArgumentColor?: MatcherHintColor;
1981
+ },
1982
+ ): string;
1983
+ //iterableEquality: Tester;
1984
+ //subsetEquality: Tester;
1985
+ // ...
1986
+ }>;
1987
+ }
1988
+
1989
+ type MatcherContext = MatcherUtils & MatcherState;
1990
+
1991
+ namespace JestMock {
1992
+ /**
1993
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1994
+ *
1995
+ * This source code is licensed under the MIT license found in the
1996
+ * LICENSE file in the root directory of this source tree.
1997
+ */
1998
+ export interface ClassLike {
1999
+ new (...args: any): any;
2000
+ }
2001
+
2002
+ export type ConstructorLikeKeys<T> = keyof {
2003
+ [K in keyof T as Required<T>[K] extends ClassLike ? K : never]: T[K];
2004
+ };
2005
+
2006
+ // export const fn: <T extends FunctionLike = UnknownFunction>(
2007
+ // implementation?: T | undefined,
2008
+ // ) => Mock<T>;
2009
+
2010
+ export type FunctionLike = (...args: any) => any;
2011
+
2012
+ export type MethodLikeKeys<T> = keyof {
2013
+ [K in keyof T as Required<T>[K] extends FunctionLike ? K : never]: T[K];
2014
+ };
2015
+
2016
+ export interface Mock<T extends (...args: any[]) => any> extends MockInstance<T> {
2017
+ (...args: Parameters<T>): ReturnType<T>;
2018
+ }
2019
+
2020
+ /**
2021
+ * All what the internal typings need is to be sure that we have any-function.
2022
+ * `FunctionLike` type ensures that and helps to constrain the type as well.
2023
+ * The default of `UnknownFunction` makes sure that `any`s do not leak to the
2024
+ * user side. For instance, calling `fn()` without implementation will return
2025
+ * a mock of `(...args: Array<unknown>) => unknown` type. If implementation
2026
+ * is provided, its typings are inferred correctly.
2027
+ */
2028
+ // export interface Mock<T extends FunctionLike = UnknownFunction>
2029
+ // extends Function,
2030
+ // MockInstance<T> {
2031
+ // new (...args: Parameters<T>): ReturnType<T>;
2032
+ // (...args: Parameters<T>): ReturnType<T>;
2033
+ // }
2034
+
2035
+ // export type Mocked<T> = T extends ClassLike
2036
+ // ? MockedClass<T>
2037
+ // : T extends FunctionLike
2038
+ // ? MockedFunction<T>
2039
+ // : T extends object
2040
+ // ? MockedObject<T>
2041
+ // : T;
2042
+
2043
+ // export const mocked: {
2044
+ // <T extends object>(
2045
+ // source: T,
2046
+ // options?: {
2047
+ // shallow: false;
2048
+ // },
2049
+ // ): Mocked<T>;
2050
+ // <T_1 extends object>(
2051
+ // source: T_1,
2052
+ // options: {
2053
+ // shallow: true;
2054
+ // },
2055
+ // ): MockedShallow<T_1>;
2056
+ // };
2057
+
2058
+ // export type MockedClass<T extends ClassLike> = MockInstance<
2059
+ // (...args: ConstructorParameters<T>) => Mocked<InstanceType<T>>
2060
+ // > &
2061
+ // MockedObject<T>;
2062
+
2063
+ // export type MockedFunction<T extends FunctionLike> = MockInstance<T> &
2064
+ // MockedObject<T>;
2065
+
2066
+ // type MockedFunctionShallow<T extends FunctionLike> = MockInstance<T> & T;
2067
+
2068
+ // export type MockedObject<T extends object> = {
2069
+ // [K in keyof T]: T[K] extends ClassLike
2070
+ // ? MockedClass<T[K]>
2071
+ // : T[K] extends FunctionLike
2072
+ // ? MockedFunction<T[K]>
2073
+ // : T[K] extends object
2074
+ // ? MockedObject<T[K]>
2075
+ // : T[K];
2076
+ // } & T;
2077
+
2078
+ // type MockedObjectShallow<T extends object> = {
2079
+ // [K in keyof T]: T[K] extends ClassLike
2080
+ // ? MockedClass<T[K]>
2081
+ // : T[K] extends FunctionLike
2082
+ // ? MockedFunctionShallow<T[K]>
2083
+ // : T[K];
2084
+ // } & T;
2085
+
2086
+ // export type MockedShallow<T> = T extends ClassLike
2087
+ // ? MockedClass<T>
2088
+ // : T extends FunctionLike
2089
+ // ? MockedFunctionShallow<T>
2090
+ // : T extends object
2091
+ // ? MockedObjectShallow<T>
2092
+ // : T;
2093
+
2094
+ // export type MockFunctionMetadata<
2095
+ // T = unknown,
2096
+ // MetadataType = MockMetadataType,
2097
+ // > = MockMetadata<T, MetadataType>;
2098
+
2099
+ // export type MockFunctionMetadataType = MockMetadataType;
2100
+
2101
+ type MockFunctionResult<T extends FunctionLike = UnknownFunction> =
2102
+ | MockFunctionResultIncomplete
2103
+ | MockFunctionResultReturn<T>
2104
+ | MockFunctionResultThrow;
2105
+
2106
+ interface MockFunctionResultIncomplete {
2107
+ type: "incomplete";
2108
+ /**
2109
+ * Result of a single call to a mock function that has not yet completed.
2110
+ * This occurs if you test the result from within the mock function itself,
2111
+ * or from within a function that was called by the mock.
2112
+ */
2113
+ value: undefined;
2114
+ }
2115
+
2116
+ interface MockFunctionResultReturn<T extends FunctionLike = UnknownFunction> {
2117
+ type: "return";
2118
+ /**
2119
+ * Result of a single call to a mock function that returned.
2120
+ */
2121
+ value: ReturnType<T>;
2122
+ }
2123
+
2124
+ interface MockFunctionResultThrow {
2125
+ type: "throw";
2126
+ /**
2127
+ * Result of a single call to a mock function that threw.
2128
+ */
2129
+ value: unknown;
2130
+ }
2131
+
2132
+ interface MockFunctionState<T extends FunctionLike = FunctionLike> {
2133
+ /**
2134
+ * List of the call arguments of all calls that have been made to the mock.
2135
+ */
2136
+ calls: Array<Parameters<T>>;
2137
+ /**
2138
+ * List of all the object instances that have been instantiated from the mock.
2139
+ */
2140
+ instances: Array<ReturnType<T>>;
2141
+ /**
2142
+ * List of all the function contexts that have been applied to calls to the mock.
2143
+ */
2144
+ contexts: Array<ThisParameterType<T>>;
2145
+ /**
2146
+ * List of the call order indexes of the mock. Jest is indexing the order of
2147
+ * invocations of all mocks in a test file. The index is starting with `1`.
2148
+ */
2149
+ invocationCallOrder: number[];
2150
+ /**
2151
+ * List of the call arguments of the last call that was made to the mock.
2152
+ * If the function was not called, it will return `undefined`.
2153
+ */
2154
+ lastCall?: Parameters<T>;
2155
+ /**
2156
+ * List of the results of all calls that have been made to the mock.
2157
+ */
2158
+ results: Array<MockFunctionResult<T>>;
2159
+ }
2160
+
2161
+ export interface MockInstance<T extends FunctionLike = UnknownFunction> {
2162
+ _isMockFunction: true;
2163
+ _protoImpl: Function;
2164
+ getMockImplementation(): T | undefined;
2165
+ getMockName(): string;
2166
+ mock: MockFunctionState<T>;
2167
+ mockClear(): this;
2168
+ mockReset(): this;
2169
+ mockRestore(): void;
2170
+ mockImplementation(fn: T): this;
2171
+ mockImplementationOnce(fn: T): this;
2172
+ withImplementation(fn: T, callback: () => Promise<unknown>): Promise<void>;
2173
+ withImplementation(fn: T, callback: () => void): void;
2174
+ mockName(name: string): this;
2175
+ mockReturnThis(): this;
2176
+ mockReturnValue(value: ReturnType<T>): this;
2177
+ mockReturnValueOnce(value: ReturnType<T>): this;
2178
+ mockResolvedValue(value: ResolveType<T>): this;
2179
+ mockResolvedValueOnce(value: ResolveType<T>): this;
2180
+ mockRejectedValue(value: RejectType<T>): this;
2181
+ mockRejectedValueOnce(value: RejectType<T>): this;
2182
+ [Symbol.dispose](): void;
2183
+ }
2184
+
2185
+ // export type MockMetadata<T, MetadataType = MockMetadataType> = {
2186
+ // ref?: number;
2187
+ // members?: Record<string, MockMetadata<T>>;
2188
+ // mockImpl?: T;
2189
+ // name?: string;
2190
+ // refID?: number;
2191
+ // type?: MetadataType;
2192
+ // value?: T;
2193
+ // length?: number;
2194
+ // };
2195
+
2196
+ // export type MockMetadataType =
2197
+ // | "object"
2198
+ // | "array"
2199
+ // | "regexp"
2200
+ // | "function"
2201
+ // | "constant"
2202
+ // | "collection"
2203
+ // | "null"
2204
+ // | "undefined";
2205
+
2206
+ // export class ModuleMocker {
2207
+ // private readonly _environmentGlobal;
2208
+ // private _mockState;
2209
+ // private _mockConfigRegistry;
2210
+ // private _spyState;
2211
+ // private _invocationCallCounter;
2212
+ // /**
2213
+ // * @see README.md
2214
+ // * @param global Global object of the test environment, used to create
2215
+ // * mocks
2216
+ // */
2217
+ // constructor(global: typeof globalThis);
2218
+ // private _getSlots;
2219
+ // private _ensureMockConfig;
2220
+ // private _ensureMockState;
2221
+ // private _defaultMockConfig;
2222
+ // private _defaultMockState;
2223
+ // private _makeComponent;
2224
+ // private _createMockFunction;
2225
+ // private _generateMock;
2226
+ // /**
2227
+ // * Check whether the given property of an object has been already replaced.
2228
+ // */
2229
+ // private _findReplacedProperty;
2230
+ // /**
2231
+ // * @see README.md
2232
+ // * @param metadata Metadata for the mock in the schema returned by the
2233
+ // * getMetadata method of this module.
2234
+ // */
2235
+ // generateFromMetadata<T>(metadata: MockMetadata<T>): Mocked<T>;
2236
+ // /**
2237
+ // * @see README.md
2238
+ // * @param component The component for which to retrieve metadata.
2239
+ // */
2240
+ // getMetadata<T = unknown>(
2241
+ // component: T,
2242
+ // _refs?: Map<T, number>,
2243
+ // ): MockMetadata<T> | null;
2244
+ // isMockFunction<T extends FunctionLike = UnknownFunction>(
2245
+ // fn: MockInstance<T>,
2246
+ // ): fn is MockInstance<T>;
2247
+ // isMockFunction<P extends Array<unknown>, R>(
2248
+ // fn: (...args: P) => R,
2249
+ // ): fn is Mock<(...args: P) => R>;
2250
+ // isMockFunction(fn: unknown): fn is Mock<UnknownFunction>;
2251
+ // fn<T extends FunctionLike = UnknownFunction>(implementation?: T): Mock<T>;
2252
+ // private _attachMockImplementation;
2253
+ // spyOn<
2254
+ // T extends object,
2255
+ // K extends PropertyLikeKeys<T>,
2256
+ // A extends "get" | "set",
2257
+ // >(
2258
+ // object: T,
2259
+ // methodKey: K,
2260
+ // accessType: A,
2261
+ // ): A extends "get"
2262
+ // ? SpiedGetter<T[K]>
2263
+ // : A extends "set"
2264
+ // ? SpiedSetter<T[K]>
2265
+ // : never;
2266
+ // spyOn<
2267
+ // T extends object,
2268
+ // K extends ConstructorLikeKeys<T> | MethodLikeKeys<T>,
2269
+ // V extends Required<T>[K],
2270
+ // >(
2271
+ // object: T,
2272
+ // methodKey: K,
2273
+ // ): V extends ClassLike | FunctionLike ? Spied<V> : never;
2274
+ // private _spyOnProperty;
2275
+ // replaceProperty<
2276
+ // T extends object,
2277
+ // K extends PropertyLikeKeys<T>,
2278
+ // V extends T[K],
2279
+ // >(object: T, propertyKey: K, value: V): Replaced<T[K]>;
2280
+ // clearAllMocks(): void;
2281
+ // resetAllMocks(): void;
2282
+ // restoreAllMocks(): void;
2283
+ // private _typeOf;
2284
+ // mocked<T extends object>(
2285
+ // source: T,
2286
+ // options?: {
2287
+ // shallow: false;
2288
+ // },
2289
+ // ): Mocked<T>;
2290
+ // mocked<T extends object>(
2291
+ // source: T,
2292
+ // options: {
2293
+ // shallow: true;
2294
+ // },
2295
+ // ): MockedShallow<T>;
2296
+ // }
2297
+
2298
+ export type PropertyLikeKeys<T> = Exclude<keyof T, ConstructorLikeKeys<T> | MethodLikeKeys<T>>;
2299
+
2300
+ export type RejectType<T extends FunctionLike> = ReturnType<T> extends PromiseLike<any> ? unknown : never;
2301
+
2302
+ export interface Replaced<T = unknown> {
2303
+ /**
2304
+ * Restore property to its original value known at the time of mocking.
2305
+ */
2306
+ restore(): void;
2307
+ /**
2308
+ * Change the value of the property.
2309
+ */
2310
+ replaceValue(value: T): this;
2311
+ }
2312
+
2313
+ export function replaceProperty<
2314
+ T extends object,
2315
+ K_2 extends Exclude<
2316
+ keyof T,
2317
+ | keyof {
2318
+ [K in keyof T as Required<T>[K] extends ClassLike ? K : never]: T[K];
2319
+ }
2320
+ | keyof {
2321
+ [K_1 in keyof T as Required<T>[K_1] extends FunctionLike ? K_1 : never]: T[K_1];
2322
+ }
2323
+ >,
2324
+ V extends T[K_2],
2325
+ >(object: T, propertyKey: K_2, value: V): Replaced<T[K_2]>;
2326
+
2327
+ export type ResolveType<T extends FunctionLike> = ReturnType<T> extends PromiseLike<infer U> ? U : never;
2328
+
2329
+ export type Spied<T extends ClassLike | FunctionLike> = T extends ClassLike
2330
+ ? SpiedClass<T>
2331
+ : T extends FunctionLike
2332
+ ? SpiedFunction<T>
2333
+ : never;
2334
+
2335
+ export type SpiedClass<T extends ClassLike = UnknownClass> = MockInstance<
2336
+ (...args: ConstructorParameters<T>) => InstanceType<T>
2337
+ >;
2338
+
2339
+ export type SpiedFunction<T extends FunctionLike = UnknownFunction> = MockInstance<
2340
+ (...args: Parameters<T>) => ReturnType<T>
2341
+ >;
2342
+
2343
+ export type SpiedGetter<T> = MockInstance<() => T>;
2344
+
2345
+ export type SpiedSetter<T> = MockInstance<(arg: T) => void>;
2346
+
2347
+ export interface SpyInstance<T extends FunctionLike = UnknownFunction> extends MockInstance<T> {}
2348
+
2349
+ export const spyOn: {
2350
+ <
2351
+ T extends object,
2352
+ K_2 extends Exclude<
2353
+ keyof T,
2354
+ | keyof {
2355
+ [K in keyof T as Required<T>[K] extends ClassLike ? K : never]: T[K];
2356
+ }
2357
+ | keyof {
2358
+ [K_1 in keyof T as Required<T>[K_1] extends FunctionLike ? K_1 : never]: T[K_1];
2359
+ }
2360
+ >,
2361
+ V extends Required<T>[K_2],
2362
+ A extends "set" | "get",
2363
+ >(
2364
+ object: T,
2365
+ methodKey: K_2,
2366
+ accessType: A,
2367
+ ): A extends "get" ? SpiedGetter<V> : A extends "set" ? SpiedSetter<V> : never;
2368
+ <
2369
+ T_1 extends object,
2370
+ K_5 extends
2371
+ | keyof {
2372
+ [K_3 in keyof T_1 as Required<T_1>[K_3] extends ClassLike ? K_3 : never]: T_1[K_3];
2373
+ }
2374
+ | keyof {
2375
+ [K_4 in keyof T_1 as Required<T_1>[K_4] extends FunctionLike ? K_4 : never]: T_1[K_4];
2376
+ },
2377
+ V_1 extends Required<T_1>[K_5],
2378
+ >(
2379
+ object: T_1,
2380
+ methodKey: K_5,
2381
+ ): V_1 extends ClassLike | FunctionLike ? Spied<V_1> : never;
2382
+ };
2383
+
2384
+ export interface UnknownClass {
2385
+ new (...args: unknown[]): unknown;
2386
+ }
2387
+
2388
+ export type UnknownFunction = (...args: unknown[]) => unknown;
2389
+ }
2390
+
2391
+ export const expectTypeOf: typeof import("./vendor/expect-type").expectTypeOf;
2392
+ }