@anthropic-ai/claude-code 0.2.29 → 0.2.31

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 (415) hide show
  1. package/cli.mjs +443 -692
  2. package/package.json +1 -5
  3. package/vendor/sdk/CHANGELOG.md +0 -1421
  4. package/vendor/sdk/LICENSE +0 -8
  5. package/vendor/sdk/README.md +0 -536
  6. package/vendor/sdk/_shims/MultipartBody.d.ts +0 -9
  7. package/vendor/sdk/_shims/MultipartBody.d.ts.map +0 -1
  8. package/vendor/sdk/_shims/MultipartBody.js +0 -16
  9. package/vendor/sdk/_shims/MultipartBody.js.map +0 -1
  10. package/vendor/sdk/_shims/MultipartBody.mjs +0 -12
  11. package/vendor/sdk/_shims/MultipartBody.mjs.map +0 -1
  12. package/vendor/sdk/_shims/README.md +0 -46
  13. package/vendor/sdk/_shims/auto/runtime-bun.d.ts +0 -5
  14. package/vendor/sdk/_shims/auto/runtime-bun.d.ts.map +0 -1
  15. package/vendor/sdk/_shims/auto/runtime-bun.js +0 -21
  16. package/vendor/sdk/_shims/auto/runtime-bun.js.map +0 -1
  17. package/vendor/sdk/_shims/auto/runtime-bun.mjs +0 -2
  18. package/vendor/sdk/_shims/auto/runtime-bun.mjs.map +0 -1
  19. package/vendor/sdk/_shims/auto/runtime-node.d.ts +0 -5
  20. package/vendor/sdk/_shims/auto/runtime-node.d.ts.map +0 -1
  21. package/vendor/sdk/_shims/auto/runtime-node.js +0 -21
  22. package/vendor/sdk/_shims/auto/runtime-node.js.map +0 -1
  23. package/vendor/sdk/_shims/auto/runtime-node.mjs +0 -2
  24. package/vendor/sdk/_shims/auto/runtime-node.mjs.map +0 -1
  25. package/vendor/sdk/_shims/auto/runtime.d.ts +0 -5
  26. package/vendor/sdk/_shims/auto/runtime.d.ts.map +0 -1
  27. package/vendor/sdk/_shims/auto/runtime.js +0 -21
  28. package/vendor/sdk/_shims/auto/runtime.js.map +0 -1
  29. package/vendor/sdk/_shims/auto/runtime.mjs +0 -2
  30. package/vendor/sdk/_shims/auto/runtime.mjs.map +0 -1
  31. package/vendor/sdk/_shims/auto/types-node.d.ts +0 -5
  32. package/vendor/sdk/_shims/auto/types-node.d.ts.map +0 -1
  33. package/vendor/sdk/_shims/auto/types-node.js +0 -21
  34. package/vendor/sdk/_shims/auto/types-node.js.map +0 -1
  35. package/vendor/sdk/_shims/auto/types-node.mjs +0 -2
  36. package/vendor/sdk/_shims/auto/types-node.mjs.map +0 -1
  37. package/vendor/sdk/_shims/auto/types.d.ts +0 -101
  38. package/vendor/sdk/_shims/auto/types.js +0 -3
  39. package/vendor/sdk/_shims/auto/types.mjs +0 -3
  40. package/vendor/sdk/_shims/bun-runtime.d.ts +0 -6
  41. package/vendor/sdk/_shims/bun-runtime.d.ts.map +0 -1
  42. package/vendor/sdk/_shims/bun-runtime.js +0 -14
  43. package/vendor/sdk/_shims/bun-runtime.js.map +0 -1
  44. package/vendor/sdk/_shims/bun-runtime.mjs +0 -10
  45. package/vendor/sdk/_shims/bun-runtime.mjs.map +0 -1
  46. package/vendor/sdk/_shims/index.d.ts +0 -81
  47. package/vendor/sdk/_shims/index.js +0 -13
  48. package/vendor/sdk/_shims/index.mjs +0 -7
  49. package/vendor/sdk/_shims/manual-types.d.ts +0 -12
  50. package/vendor/sdk/_shims/manual-types.js +0 -3
  51. package/vendor/sdk/_shims/manual-types.mjs +0 -3
  52. package/vendor/sdk/_shims/node-runtime.d.ts +0 -3
  53. package/vendor/sdk/_shims/node-runtime.d.ts.map +0 -1
  54. package/vendor/sdk/_shims/node-runtime.js +0 -89
  55. package/vendor/sdk/_shims/node-runtime.js.map +0 -1
  56. package/vendor/sdk/_shims/node-runtime.mjs +0 -56
  57. package/vendor/sdk/_shims/node-runtime.mjs.map +0 -1
  58. package/vendor/sdk/_shims/node-types.d.ts +0 -42
  59. package/vendor/sdk/_shims/node-types.js +0 -3
  60. package/vendor/sdk/_shims/node-types.mjs +0 -3
  61. package/vendor/sdk/_shims/registry.d.ts +0 -37
  62. package/vendor/sdk/_shims/registry.d.ts.map +0 -1
  63. package/vendor/sdk/_shims/registry.js +0 -41
  64. package/vendor/sdk/_shims/registry.js.map +0 -1
  65. package/vendor/sdk/_shims/registry.mjs +0 -37
  66. package/vendor/sdk/_shims/registry.mjs.map +0 -1
  67. package/vendor/sdk/_shims/web-runtime.d.ts +0 -5
  68. package/vendor/sdk/_shims/web-runtime.d.ts.map +0 -1
  69. package/vendor/sdk/_shims/web-runtime.js +0 -78
  70. package/vendor/sdk/_shims/web-runtime.js.map +0 -1
  71. package/vendor/sdk/_shims/web-runtime.mjs +0 -71
  72. package/vendor/sdk/_shims/web-runtime.mjs.map +0 -1
  73. package/vendor/sdk/_shims/web-types.d.ts +0 -83
  74. package/vendor/sdk/_shims/web-types.js +0 -3
  75. package/vendor/sdk/_shims/web-types.mjs +0 -3
  76. package/vendor/sdk/_vendor/partial-json-parser/parser.d.ts +0 -3
  77. package/vendor/sdk/_vendor/partial-json-parser/parser.d.ts.map +0 -1
  78. package/vendor/sdk/_vendor/partial-json-parser/parser.js +0 -226
  79. package/vendor/sdk/_vendor/partial-json-parser/parser.js.map +0 -1
  80. package/vendor/sdk/_vendor/partial-json-parser/parser.mjs +0 -223
  81. package/vendor/sdk/_vendor/partial-json-parser/parser.mjs.map +0 -1
  82. package/vendor/sdk/core.d.ts +0 -248
  83. package/vendor/sdk/core.d.ts.map +0 -1
  84. package/vendor/sdk/core.js +0 -935
  85. package/vendor/sdk/core.js.map +0 -1
  86. package/vendor/sdk/core.mjs +0 -903
  87. package/vendor/sdk/core.mjs.map +0 -1
  88. package/vendor/sdk/error.d.ts +0 -48
  89. package/vendor/sdk/error.d.ts.map +0 -1
  90. package/vendor/sdk/error.js +0 -114
  91. package/vendor/sdk/error.js.map +0 -1
  92. package/vendor/sdk/error.mjs +0 -98
  93. package/vendor/sdk/error.mjs.map +0 -1
  94. package/vendor/sdk/index.d.mts +0 -152
  95. package/vendor/sdk/index.d.ts +0 -152
  96. package/vendor/sdk/index.d.ts.map +0 -1
  97. package/vendor/sdk/index.js +0 -179
  98. package/vendor/sdk/index.js.map +0 -1
  99. package/vendor/sdk/index.mjs +0 -136
  100. package/vendor/sdk/index.mjs.map +0 -1
  101. package/vendor/sdk/internal/decoders/jsonl.d.ts +0 -12
  102. package/vendor/sdk/internal/decoders/jsonl.d.ts.map +0 -1
  103. package/vendor/sdk/internal/decoders/jsonl.js +0 -35
  104. package/vendor/sdk/internal/decoders/jsonl.js.map +0 -1
  105. package/vendor/sdk/internal/decoders/jsonl.mjs +0 -31
  106. package/vendor/sdk/internal/decoders/jsonl.mjs.map +0 -1
  107. package/vendor/sdk/internal/decoders/line.d.ts +0 -20
  108. package/vendor/sdk/internal/decoders/line.d.ts.map +0 -1
  109. package/vendor/sdk/internal/decoders/line.js +0 -123
  110. package/vendor/sdk/internal/decoders/line.js.map +0 -1
  111. package/vendor/sdk/internal/decoders/line.mjs +0 -119
  112. package/vendor/sdk/internal/decoders/line.mjs.map +0 -1
  113. package/vendor/sdk/internal/stream-utils.d.ts +0 -8
  114. package/vendor/sdk/internal/stream-utils.d.ts.map +0 -1
  115. package/vendor/sdk/internal/stream-utils.js +0 -39
  116. package/vendor/sdk/internal/stream-utils.js.map +0 -1
  117. package/vendor/sdk/internal/stream-utils.mjs +0 -35
  118. package/vendor/sdk/internal/stream-utils.mjs.map +0 -1
  119. package/vendor/sdk/lib/BetaMessageStream.d.ts +0 -114
  120. package/vendor/sdk/lib/BetaMessageStream.d.ts.map +0 -1
  121. package/vendor/sdk/lib/BetaMessageStream.js +0 -547
  122. package/vendor/sdk/lib/BetaMessageStream.js.map +0 -1
  123. package/vendor/sdk/lib/BetaMessageStream.mjs +0 -543
  124. package/vendor/sdk/lib/BetaMessageStream.mjs.map +0 -1
  125. package/vendor/sdk/lib/MessageStream.d.ts +0 -114
  126. package/vendor/sdk/lib/MessageStream.d.ts.map +0 -1
  127. package/vendor/sdk/lib/MessageStream.js +0 -547
  128. package/vendor/sdk/lib/MessageStream.js.map +0 -1
  129. package/vendor/sdk/lib/MessageStream.mjs +0 -543
  130. package/vendor/sdk/lib/MessageStream.mjs.map +0 -1
  131. package/vendor/sdk/node_modules/@types/node/LICENSE +0 -21
  132. package/vendor/sdk/node_modules/@types/node/README.md +0 -15
  133. package/vendor/sdk/node_modules/@types/node/assert/strict.d.ts +0 -8
  134. package/vendor/sdk/node_modules/@types/node/assert.d.ts +0 -985
  135. package/vendor/sdk/node_modules/@types/node/async_hooks.d.ts +0 -522
  136. package/vendor/sdk/node_modules/@types/node/buffer.buffer.d.ts +0 -385
  137. package/vendor/sdk/node_modules/@types/node/buffer.d.ts +0 -1903
  138. package/vendor/sdk/node_modules/@types/node/child_process.d.ts +0 -1549
  139. package/vendor/sdk/node_modules/@types/node/cluster.d.ts +0 -578
  140. package/vendor/sdk/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  141. package/vendor/sdk/node_modules/@types/node/compatibility/index.d.ts +0 -9
  142. package/vendor/sdk/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  143. package/vendor/sdk/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
  144. package/vendor/sdk/node_modules/@types/node/console.d.ts +0 -452
  145. package/vendor/sdk/node_modules/@types/node/constants.d.ts +0 -19
  146. package/vendor/sdk/node_modules/@types/node/crypto.d.ts +0 -4453
  147. package/vendor/sdk/node_modules/@types/node/dgram.d.ts +0 -596
  148. package/vendor/sdk/node_modules/@types/node/diagnostics_channel.d.ts +0 -546
  149. package/vendor/sdk/node_modules/@types/node/dns/promises.d.ts +0 -475
  150. package/vendor/sdk/node_modules/@types/node/dns.d.ts +0 -853
  151. package/vendor/sdk/node_modules/@types/node/dom-events.d.ts +0 -124
  152. package/vendor/sdk/node_modules/@types/node/domain.d.ts +0 -170
  153. package/vendor/sdk/node_modules/@types/node/events.d.ts +0 -819
  154. package/vendor/sdk/node_modules/@types/node/fs/promises.d.ts +0 -1205
  155. package/vendor/sdk/node_modules/@types/node/fs.d.ts +0 -4237
  156. package/vendor/sdk/node_modules/@types/node/globals.d.ts +0 -442
  157. package/vendor/sdk/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  158. package/vendor/sdk/node_modules/@types/node/http.d.ts +0 -1839
  159. package/vendor/sdk/node_modules/@types/node/http2.d.ts +0 -2517
  160. package/vendor/sdk/node_modules/@types/node/https.d.ts +0 -544
  161. package/vendor/sdk/node_modules/@types/node/index.d.ts +0 -90
  162. package/vendor/sdk/node_modules/@types/node/inspector.d.ts +0 -2775
  163. package/vendor/sdk/node_modules/@types/node/module.d.ts +0 -291
  164. package/vendor/sdk/node_modules/@types/node/net.d.ts +0 -924
  165. package/vendor/sdk/node_modules/@types/node/os.d.ts +0 -473
  166. package/vendor/sdk/node_modules/@types/node/package.json +0 -225
  167. package/vendor/sdk/node_modules/@types/node/path.d.ts +0 -191
  168. package/vendor/sdk/node_modules/@types/node/perf_hooks.d.ts +0 -753
  169. package/vendor/sdk/node_modules/@types/node/process.d.ts +0 -1553
  170. package/vendor/sdk/node_modules/@types/node/punycode.d.ts +0 -117
  171. package/vendor/sdk/node_modules/@types/node/querystring.d.ts +0 -141
  172. package/vendor/sdk/node_modules/@types/node/readline/promises.d.ts +0 -154
  173. package/vendor/sdk/node_modules/@types/node/readline.d.ts +0 -715
  174. package/vendor/sdk/node_modules/@types/node/repl.d.ts +0 -430
  175. package/vendor/sdk/node_modules/@types/node/stream/consumers.d.ts +0 -12
  176. package/vendor/sdk/node_modules/@types/node/stream/promises.d.ts +0 -90
  177. package/vendor/sdk/node_modules/@types/node/stream/web.d.ts +0 -523
  178. package/vendor/sdk/node_modules/@types/node/stream.d.ts +0 -1731
  179. package/vendor/sdk/node_modules/@types/node/string_decoder.d.ts +0 -67
  180. package/vendor/sdk/node_modules/@types/node/test.d.ts +0 -1245
  181. package/vendor/sdk/node_modules/@types/node/timers/promises.d.ts +0 -93
  182. package/vendor/sdk/node_modules/@types/node/timers.d.ts +0 -126
  183. package/vendor/sdk/node_modules/@types/node/tls.d.ts +0 -1203
  184. package/vendor/sdk/node_modules/@types/node/trace_events.d.ts +0 -171
  185. package/vendor/sdk/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -385
  186. package/vendor/sdk/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  187. package/vendor/sdk/node_modules/@types/node/ts5.6/index.d.ts +0 -90
  188. package/vendor/sdk/node_modules/@types/node/tty.d.ts +0 -206
  189. package/vendor/sdk/node_modules/@types/node/url.d.ts +0 -957
  190. package/vendor/sdk/node_modules/@types/node/util.d.ts +0 -2083
  191. package/vendor/sdk/node_modules/@types/node/v8.d.ts +0 -753
  192. package/vendor/sdk/node_modules/@types/node/vm.d.ts +0 -666
  193. package/vendor/sdk/node_modules/@types/node/wasi.d.ts +0 -160
  194. package/vendor/sdk/node_modules/@types/node/worker_threads.d.ts +0 -695
  195. package/vendor/sdk/node_modules/@types/node/zlib.d.ts +0 -517
  196. package/vendor/sdk/node_modules/undici-types/README.md +0 -6
  197. package/vendor/sdk/node_modules/undici-types/agent.d.ts +0 -31
  198. package/vendor/sdk/node_modules/undici-types/api.d.ts +0 -43
  199. package/vendor/sdk/node_modules/undici-types/balanced-pool.d.ts +0 -18
  200. package/vendor/sdk/node_modules/undici-types/cache.d.ts +0 -36
  201. package/vendor/sdk/node_modules/undici-types/client.d.ts +0 -97
  202. package/vendor/sdk/node_modules/undici-types/connector.d.ts +0 -34
  203. package/vendor/sdk/node_modules/undici-types/content-type.d.ts +0 -21
  204. package/vendor/sdk/node_modules/undici-types/cookies.d.ts +0 -28
  205. package/vendor/sdk/node_modules/undici-types/diagnostics-channel.d.ts +0 -67
  206. package/vendor/sdk/node_modules/undici-types/dispatcher.d.ts +0 -241
  207. package/vendor/sdk/node_modules/undici-types/errors.d.ts +0 -128
  208. package/vendor/sdk/node_modules/undici-types/fetch.d.ts +0 -209
  209. package/vendor/sdk/node_modules/undici-types/file.d.ts +0 -39
  210. package/vendor/sdk/node_modules/undici-types/filereader.d.ts +0 -54
  211. package/vendor/sdk/node_modules/undici-types/formdata.d.ts +0 -108
  212. package/vendor/sdk/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  213. package/vendor/sdk/node_modules/undici-types/global-origin.d.ts +0 -7
  214. package/vendor/sdk/node_modules/undici-types/handlers.d.ts +0 -9
  215. package/vendor/sdk/node_modules/undici-types/header.d.ts +0 -4
  216. package/vendor/sdk/node_modules/undici-types/index.d.ts +0 -63
  217. package/vendor/sdk/node_modules/undici-types/interceptors.d.ts +0 -5
  218. package/vendor/sdk/node_modules/undici-types/mock-agent.d.ts +0 -50
  219. package/vendor/sdk/node_modules/undici-types/mock-client.d.ts +0 -25
  220. package/vendor/sdk/node_modules/undici-types/mock-errors.d.ts +0 -12
  221. package/vendor/sdk/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  222. package/vendor/sdk/node_modules/undici-types/mock-pool.d.ts +0 -25
  223. package/vendor/sdk/node_modules/undici-types/package.json +0 -55
  224. package/vendor/sdk/node_modules/undici-types/patch.d.ts +0 -71
  225. package/vendor/sdk/node_modules/undici-types/pool-stats.d.ts +0 -19
  226. package/vendor/sdk/node_modules/undici-types/pool.d.ts +0 -28
  227. package/vendor/sdk/node_modules/undici-types/proxy-agent.d.ts +0 -30
  228. package/vendor/sdk/node_modules/undici-types/readable.d.ts +0 -61
  229. package/vendor/sdk/node_modules/undici-types/webidl.d.ts +0 -220
  230. package/vendor/sdk/node_modules/undici-types/websocket.d.ts +0 -131
  231. package/vendor/sdk/package.json +0 -124
  232. package/vendor/sdk/pagination.d.ts +0 -27
  233. package/vendor/sdk/pagination.d.ts.map +0 -1
  234. package/vendor/sdk/pagination.js +0 -60
  235. package/vendor/sdk/pagination.js.map +0 -1
  236. package/vendor/sdk/pagination.mjs +0 -56
  237. package/vendor/sdk/pagination.mjs.map +0 -1
  238. package/vendor/sdk/resource.d.ts +0 -6
  239. package/vendor/sdk/resource.d.ts.map +0 -1
  240. package/vendor/sdk/resource.js +0 -11
  241. package/vendor/sdk/resource.js.map +0 -1
  242. package/vendor/sdk/resource.mjs +0 -7
  243. package/vendor/sdk/resource.mjs.map +0 -1
  244. package/vendor/sdk/resources/beta/beta.d.ts +0 -57
  245. package/vendor/sdk/resources/beta/beta.d.ts.map +0 -1
  246. package/vendor/sdk/resources/beta/beta.js +0 -44
  247. package/vendor/sdk/resources/beta/beta.js.map +0 -1
  248. package/vendor/sdk/resources/beta/beta.mjs +0 -17
  249. package/vendor/sdk/resources/beta/beta.mjs.map +0 -1
  250. package/vendor/sdk/resources/beta/index.d.ts +0 -4
  251. package/vendor/sdk/resources/beta/index.d.ts.map +0 -1
  252. package/vendor/sdk/resources/beta/index.js +0 -12
  253. package/vendor/sdk/resources/beta/index.js.map +0 -1
  254. package/vendor/sdk/resources/beta/index.mjs +0 -5
  255. package/vendor/sdk/resources/beta/index.mjs.map +0 -1
  256. package/vendor/sdk/resources/beta/messages/batches.d.ts +0 -289
  257. package/vendor/sdk/resources/beta/messages/batches.d.ts.map +0 -1
  258. package/vendor/sdk/resources/beta/messages/batches.js +0 -112
  259. package/vendor/sdk/resources/beta/messages/batches.js.map +0 -1
  260. package/vendor/sdk/resources/beta/messages/batches.mjs +0 -107
  261. package/vendor/sdk/resources/beta/messages/batches.mjs.map +0 -1
  262. package/vendor/sdk/resources/beta/messages/index.d.ts +0 -3
  263. package/vendor/sdk/resources/beta/messages/index.d.ts.map +0 -1
  264. package/vendor/sdk/resources/beta/messages/index.js +0 -10
  265. package/vendor/sdk/resources/beta/messages/index.js.map +0 -1
  266. package/vendor/sdk/resources/beta/messages/index.mjs +0 -4
  267. package/vendor/sdk/resources/beta/messages/index.mjs.map +0 -1
  268. package/vendor/sdk/resources/beta/messages/messages.d.ts +0 -1038
  269. package/vendor/sdk/resources/beta/messages/messages.d.ts.map +0 -1
  270. package/vendor/sdk/resources/beta/messages/messages.js +0 -93
  271. package/vendor/sdk/resources/beta/messages/messages.js.map +0 -1
  272. package/vendor/sdk/resources/beta/messages/messages.mjs +0 -66
  273. package/vendor/sdk/resources/beta/messages/messages.mjs.map +0 -1
  274. package/vendor/sdk/resources/beta/models.d.ts +0 -49
  275. package/vendor/sdk/resources/beta/models.d.ts.map +0 -1
  276. package/vendor/sdk/resources/beta/models.js +0 -30
  277. package/vendor/sdk/resources/beta/models.js.map +0 -1
  278. package/vendor/sdk/resources/beta/models.mjs +0 -25
  279. package/vendor/sdk/resources/beta/models.mjs.map +0 -1
  280. package/vendor/sdk/resources/completions.d.ts +0 -166
  281. package/vendor/sdk/resources/completions.d.ts.map +0 -1
  282. package/vendor/sdk/resources/completions.js +0 -17
  283. package/vendor/sdk/resources/completions.js.map +0 -1
  284. package/vendor/sdk/resources/completions.mjs +0 -13
  285. package/vendor/sdk/resources/completions.mjs.map +0 -1
  286. package/vendor/sdk/resources/index.d.ts +0 -6
  287. package/vendor/sdk/resources/index.d.ts.map +0 -1
  288. package/vendor/sdk/resources/index.js +0 -29
  289. package/vendor/sdk/resources/index.js.map +0 -1
  290. package/vendor/sdk/resources/index.mjs +0 -7
  291. package/vendor/sdk/resources/index.mjs.map +0 -1
  292. package/vendor/sdk/resources/messages/batches.d.ts +0 -253
  293. package/vendor/sdk/resources/messages/batches.d.ts.map +0 -1
  294. package/vendor/sdk/resources/messages/batches.js +0 -102
  295. package/vendor/sdk/resources/messages/batches.js.map +0 -1
  296. package/vendor/sdk/resources/messages/batches.mjs +0 -97
  297. package/vendor/sdk/resources/messages/batches.mjs.map +0 -1
  298. package/vendor/sdk/resources/messages/index.d.ts +0 -3
  299. package/vendor/sdk/resources/messages/index.d.ts.map +0 -1
  300. package/vendor/sdk/resources/messages/index.js +0 -10
  301. package/vendor/sdk/resources/messages/index.js.map +0 -1
  302. package/vendor/sdk/resources/messages/index.mjs +0 -4
  303. package/vendor/sdk/resources/messages/index.mjs.map +0 -1
  304. package/vendor/sdk/resources/messages/messages.d.ts +0 -1028
  305. package/vendor/sdk/resources/messages/messages.d.ts.map +0 -1
  306. package/vendor/sdk/resources/messages/messages.js +0 -82
  307. package/vendor/sdk/resources/messages/messages.js.map +0 -1
  308. package/vendor/sdk/resources/messages/messages.mjs +0 -54
  309. package/vendor/sdk/resources/messages/messages.mjs.map +0 -1
  310. package/vendor/sdk/resources/models.d.ts +0 -49
  311. package/vendor/sdk/resources/models.d.ts.map +0 -1
  312. package/vendor/sdk/resources/models.js +0 -30
  313. package/vendor/sdk/resources/models.js.map +0 -1
  314. package/vendor/sdk/resources/models.mjs +0 -25
  315. package/vendor/sdk/resources/models.mjs.map +0 -1
  316. package/vendor/sdk/resources/shared.d.ts +0 -42
  317. package/vendor/sdk/resources/shared.d.ts.map +0 -1
  318. package/vendor/sdk/resources/shared.js +0 -4
  319. package/vendor/sdk/resources/shared.js.map +0 -1
  320. package/vendor/sdk/resources/shared.mjs +0 -3
  321. package/vendor/sdk/resources/shared.mjs.map +0 -1
  322. package/vendor/sdk/resources/top-level.d.ts +0 -2
  323. package/vendor/sdk/resources/top-level.d.ts.map +0 -1
  324. package/vendor/sdk/resources/top-level.js +0 -4
  325. package/vendor/sdk/resources/top-level.js.map +0 -1
  326. package/vendor/sdk/resources/top-level.mjs +0 -3
  327. package/vendor/sdk/resources/top-level.mjs.map +0 -1
  328. package/vendor/sdk/shims/node.d.ts +0 -30
  329. package/vendor/sdk/shims/node.d.ts.map +0 -1
  330. package/vendor/sdk/shims/node.js +0 -31
  331. package/vendor/sdk/shims/node.js.map +0 -1
  332. package/vendor/sdk/shims/node.mjs +0 -5
  333. package/vendor/sdk/shims/node.mjs.map +0 -1
  334. package/vendor/sdk/shims/web.d.ts +0 -26
  335. package/vendor/sdk/shims/web.d.ts.map +0 -1
  336. package/vendor/sdk/shims/web.js +0 -31
  337. package/vendor/sdk/shims/web.js.map +0 -1
  338. package/vendor/sdk/shims/web.mjs +0 -5
  339. package/vendor/sdk/shims/web.mjs.map +0 -1
  340. package/vendor/sdk/src/_shims/MultipartBody.ts +0 -9
  341. package/vendor/sdk/src/_shims/README.md +0 -46
  342. package/vendor/sdk/src/_shims/auto/runtime-bun.ts +0 -4
  343. package/vendor/sdk/src/_shims/auto/runtime-node.ts +0 -4
  344. package/vendor/sdk/src/_shims/auto/runtime.ts +0 -4
  345. package/vendor/sdk/src/_shims/auto/types-node.ts +0 -4
  346. package/vendor/sdk/src/_shims/auto/types.d.ts +0 -101
  347. package/vendor/sdk/src/_shims/auto/types.js +0 -3
  348. package/vendor/sdk/src/_shims/auto/types.mjs +0 -3
  349. package/vendor/sdk/src/_shims/bun-runtime.ts +0 -14
  350. package/vendor/sdk/src/_shims/index.d.ts +0 -81
  351. package/vendor/sdk/src/_shims/index.js +0 -13
  352. package/vendor/sdk/src/_shims/index.mjs +0 -7
  353. package/vendor/sdk/src/_shims/manual-types.d.ts +0 -12
  354. package/vendor/sdk/src/_shims/manual-types.js +0 -3
  355. package/vendor/sdk/src/_shims/manual-types.mjs +0 -3
  356. package/vendor/sdk/src/_shims/node-runtime.ts +0 -81
  357. package/vendor/sdk/src/_shims/node-types.d.ts +0 -42
  358. package/vendor/sdk/src/_shims/node-types.js +0 -3
  359. package/vendor/sdk/src/_shims/node-types.mjs +0 -3
  360. package/vendor/sdk/src/_shims/registry.ts +0 -67
  361. package/vendor/sdk/src/_shims/web-runtime.ts +0 -103
  362. package/vendor/sdk/src/_shims/web-types.d.ts +0 -83
  363. package/vendor/sdk/src/_shims/web-types.js +0 -3
  364. package/vendor/sdk/src/_shims/web-types.mjs +0 -3
  365. package/vendor/sdk/src/_vendor/partial-json-parser/README.md +0 -3
  366. package/vendor/sdk/src/_vendor/partial-json-parser/parser.ts +0 -264
  367. package/vendor/sdk/src/core.ts +0 -1250
  368. package/vendor/sdk/src/error.ts +0 -133
  369. package/vendor/sdk/src/index.ts +0 -465
  370. package/vendor/sdk/src/internal/decoders/jsonl.ts +0 -41
  371. package/vendor/sdk/src/internal/decoders/line.ts +0 -145
  372. package/vendor/sdk/src/internal/stream-utils.ts +0 -32
  373. package/vendor/sdk/src/lib/.keep +0 -4
  374. package/vendor/sdk/src/lib/BetaMessageStream.ts +0 -661
  375. package/vendor/sdk/src/lib/MessageStream.ts +0 -662
  376. package/vendor/sdk/src/pagination.ts +0 -92
  377. package/vendor/sdk/src/resource.ts +0 -11
  378. package/vendor/sdk/src/resources/beta/beta.ts +0 -249
  379. package/vendor/sdk/src/resources/beta/index.ts +0 -83
  380. package/vendor/sdk/src/resources/beta/messages/batches.ts +0 -486
  381. package/vendor/sdk/src/resources/beta/messages/index.ts +0 -87
  382. package/vendor/sdk/src/resources/beta/messages/messages.ts +0 -1444
  383. package/vendor/sdk/src/resources/beta/models.ts +0 -78
  384. package/vendor/sdk/src/resources/completions.ts +0 -210
  385. package/vendor/sdk/src/resources/index.ts +0 -95
  386. package/vendor/sdk/src/resources/messages/batches.ts +0 -352
  387. package/vendor/sdk/src/resources/messages/index.ts +0 -85
  388. package/vendor/sdk/src/resources/messages/messages.ts +0 -1412
  389. package/vendor/sdk/src/resources/models.ts +0 -75
  390. package/vendor/sdk/src/resources/shared.ts +0 -72
  391. package/vendor/sdk/src/resources/top-level.ts +0 -3
  392. package/vendor/sdk/src/shims/node.ts +0 -50
  393. package/vendor/sdk/src/shims/web.ts +0 -50
  394. package/vendor/sdk/src/streaming.ts +0 -372
  395. package/vendor/sdk/src/tsconfig.json +0 -11
  396. package/vendor/sdk/src/uploads.ts +0 -255
  397. package/vendor/sdk/src/version.ts +0 -1
  398. package/vendor/sdk/streaming.d.ts +0 -36
  399. package/vendor/sdk/streaming.d.ts.map +0 -1
  400. package/vendor/sdk/streaming.js +0 -316
  401. package/vendor/sdk/streaming.js.map +0 -1
  402. package/vendor/sdk/streaming.mjs +0 -310
  403. package/vendor/sdk/streaming.mjs.map +0 -1
  404. package/vendor/sdk/uploads.d.ts +0 -75
  405. package/vendor/sdk/uploads.d.ts.map +0 -1
  406. package/vendor/sdk/uploads.js +0 -171
  407. package/vendor/sdk/uploads.js.map +0 -1
  408. package/vendor/sdk/uploads.mjs +0 -158
  409. package/vendor/sdk/uploads.mjs.map +0 -1
  410. package/vendor/sdk/version.d.ts +0 -2
  411. package/vendor/sdk/version.d.ts.map +0 -1
  412. package/vendor/sdk/version.js +0 -5
  413. package/vendor/sdk/version.js.map +0 -1
  414. package/vendor/sdk/version.mjs +0 -2
  415. package/vendor/sdk/version.mjs.map +0 -1
@@ -1,715 +0,0 @@
1
- /**
2
- * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
3
- *
4
- * To use the promise-based APIs:
5
- *
6
- * ```js
7
- * import * as readline from 'node:readline/promises';
8
- * ```
9
- *
10
- * To use the callback and sync APIs:
11
- *
12
- * ```js
13
- * import * as readline from 'node:readline';
14
- * ```
15
- *
16
- * The following simple example illustrates the basic use of the `readline` module.
17
- *
18
- * ```js
19
- * import * as readline from 'node:readline/promises';
20
- * import { stdin as input, stdout as output } from 'node:process';
21
- *
22
- * const rl = readline.createInterface({ input, output });
23
- *
24
- * const answer = await rl.question('What do you think of Node.js? ');
25
- *
26
- * console.log(`Thank you for your valuable feedback: ${answer}`);
27
- *
28
- * rl.close();
29
- * ```
30
- *
31
- * Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
32
- * received on the `input` stream.
33
- * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline.js)
34
- */
35
- declare module "readline" {
36
- import { Abortable, EventEmitter } from "node:events";
37
- import * as promises from "node:readline/promises";
38
-
39
- export { promises };
40
- export interface Key {
41
- sequence?: string | undefined;
42
- name?: string | undefined;
43
- ctrl?: boolean | undefined;
44
- meta?: boolean | undefined;
45
- shift?: boolean | undefined;
46
- }
47
- /**
48
- * Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a
49
- * single `input` `Readable` stream and a single `output` `Writable` stream.
50
- * The `output` stream is used to print prompts for user input that arrives on,
51
- * and is read from, the `input` stream.
52
- * @since v0.1.104
53
- */
54
- export class Interface extends EventEmitter {
55
- readonly terminal: boolean;
56
- /**
57
- * The current input data being processed by node.
58
- *
59
- * This can be used when collecting input from a TTY stream to retrieve the
60
- * current value that has been processed thus far, prior to the `line` event
61
- * being emitted. Once the `line` event has been emitted, this property will
62
- * be an empty string.
63
- *
64
- * Be aware that modifying the value during the instance runtime may have
65
- * unintended consequences if `rl.cursor` is not also controlled.
66
- *
67
- * **If not using a TTY stream for input, use the `'line'` event.**
68
- *
69
- * One possible use case would be as follows:
70
- *
71
- * ```js
72
- * const values = ['lorem ipsum', 'dolor sit amet'];
73
- * const rl = readline.createInterface(process.stdin);
74
- * const showResults = debounce(() => {
75
- * console.log(
76
- * '\n',
77
- * values.filter((val) => val.startsWith(rl.line)).join(' ')
78
- * );
79
- * }, 300);
80
- * process.stdin.on('keypress', (c, k) => {
81
- * showResults();
82
- * });
83
- * ```
84
- * @since v0.1.98
85
- */
86
- readonly line: string;
87
- /**
88
- * The cursor position relative to `rl.line`.
89
- *
90
- * This will track where the current cursor lands in the input string, when
91
- * reading input from a TTY stream. The position of cursor determines the
92
- * portion of the input string that will be modified as input is processed,
93
- * as well as the column where the terminal caret will be rendered.
94
- * @since v0.1.98
95
- */
96
- readonly cursor: number;
97
- /**
98
- * NOTE: According to the documentation:
99
- *
100
- * > Instances of the `readline.Interface` class are constructed using the
101
- * > `readline.createInterface()` method.
102
- *
103
- * @see https://nodejs.org/docs/latest-v18.x/api/readline.html#readline_class_interface
104
- */
105
- protected constructor(
106
- input: NodeJS.ReadableStream,
107
- output?: NodeJS.WritableStream,
108
- completer?: Completer | AsyncCompleter,
109
- terminal?: boolean,
110
- );
111
- /**
112
- * NOTE: According to the documentation:
113
- *
114
- * > Instances of the `readline.Interface` class are constructed using the
115
- * > `readline.createInterface()` method.
116
- *
117
- * @see https://nodejs.org/docs/latest-v18.x/api/readline.html#readline_class_interface
118
- */
119
- protected constructor(options: ReadLineOptions);
120
- /**
121
- * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
122
- * @since v15.3.0
123
- * @return the current prompt string
124
- */
125
- getPrompt(): string;
126
- /**
127
- * The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called.
128
- * @since v0.1.98
129
- */
130
- setPrompt(prompt: string): void;
131
- /**
132
- * The `rl.prompt()` method writes the `readline.Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new
133
- * location at which to provide input.
134
- *
135
- * When called, `rl.prompt()` will resume the `input` stream if it has been
136
- * paused.
137
- *
138
- * If the `readline.Interface` was created with `output` set to `null` or`undefined` the prompt is not written.
139
- * @since v0.1.98
140
- * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
141
- */
142
- prompt(preserveCursor?: boolean): void;
143
- /**
144
- * The `rl.question()` method displays the `query` by writing it to the `output`,
145
- * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
146
- *
147
- * When called, `rl.question()` will resume the `input` stream if it has been
148
- * paused.
149
- *
150
- * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
151
- *
152
- * The `callback` function passed to `rl.question()` does not follow the typical
153
- * pattern of accepting an `Error` object or `null` as the first argument.
154
- * The `callback` is called with the provided answer as the only argument.
155
- *
156
- * Example usage:
157
- *
158
- * ```js
159
- * rl.question('What is your favorite food? ', (answer) => {
160
- * console.log(`Oh, so your favorite food is ${answer}`);
161
- * });
162
- * ```
163
- *
164
- * Using an `AbortController` to cancel a question.
165
- *
166
- * ```js
167
- * const ac = new AbortController();
168
- * const signal = ac.signal;
169
- *
170
- * rl.question('What is your favorite food? ', { signal }, (answer) => {
171
- * console.log(`Oh, so your favorite food is ${answer}`);
172
- * });
173
- *
174
- * signal.addEventListener('abort', () => {
175
- * console.log('The food question timed out');
176
- * }, { once: true });
177
- *
178
- * setTimeout(() => ac.abort(), 10000);
179
- * ```
180
- *
181
- * If this method is invoked as it's util.promisify()ed version, it returns a
182
- * Promise that fulfills with the answer. If the question is canceled using
183
- * an `AbortController` it will reject with an `AbortError`.
184
- *
185
- * ```js
186
- * import util from 'node:util';
187
- * const question = util.promisify(rl.question).bind(rl);
188
- *
189
- * async function questionExample() {
190
- * try {
191
- * const answer = await question('What is you favorite food? ');
192
- * console.log(`Oh, so your favorite food is ${answer}`);
193
- * } catch (err) {
194
- * console.error('Question rejected', err);
195
- * }
196
- * }
197
- * questionExample();
198
- * ```
199
- * @since v0.3.3
200
- * @param query A statement or query to write to `output`, prepended to the prompt.
201
- * @param callback A callback function that is invoked with the user's input in response to the `query`.
202
- */
203
- question(query: string, callback: (answer: string) => void): void;
204
- question(query: string, options: Abortable, callback: (answer: string) => void): void;
205
- /**
206
- * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
207
- * later if necessary.
208
- *
209
- * Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `readline.Interface` instance.
210
- * @since v0.3.4
211
- */
212
- pause(): this;
213
- /**
214
- * The `rl.resume()` method resumes the `input` stream if it has been paused.
215
- * @since v0.3.4
216
- */
217
- resume(): this;
218
- /**
219
- * The `rl.close()` method closes the `readline.Interface` instance and
220
- * relinquishes control over the `input` and `output` streams. When called,
221
- * the `'close'` event will be emitted.
222
- *
223
- * Calling `rl.close()` does not immediately stop other events (including `'line'`)
224
- * from being emitted by the `readline.Interface` instance.
225
- * @since v0.1.98
226
- */
227
- close(): void;
228
- /**
229
- * The `rl.write()` method will write either `data` or a key sequence identified
230
- * by `key` to the `output`. The `key` argument is supported only if `output` is
231
- * a `TTY` text terminal. See `TTY keybindings` for a list of key
232
- * combinations.
233
- *
234
- * If `key` is specified, `data` is ignored.
235
- *
236
- * When called, `rl.write()` will resume the `input` stream if it has been
237
- * paused.
238
- *
239
- * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written.
240
- *
241
- * ```js
242
- * rl.write('Delete this!');
243
- * // Simulate Ctrl+U to delete the line written previously
244
- * rl.write(null, { ctrl: true, name: 'u' });
245
- * ```
246
- *
247
- * The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_.
248
- * @since v0.1.98
249
- */
250
- write(data: string | Buffer, key?: Key): void;
251
- write(data: undefined | null | string | Buffer, key: Key): void;
252
- /**
253
- * Returns the real position of the cursor in relation to the input
254
- * prompt + string. Long input (wrapping) strings, as well as multiple
255
- * line prompts are included in the calculations.
256
- * @since v13.5.0, v12.16.0
257
- */
258
- getCursorPos(): CursorPos;
259
- /**
260
- * events.EventEmitter
261
- * 1. close
262
- * 2. line
263
- * 3. pause
264
- * 4. resume
265
- * 5. SIGCONT
266
- * 6. SIGINT
267
- * 7. SIGTSTP
268
- * 8. history
269
- */
270
- addListener(event: string, listener: (...args: any[]) => void): this;
271
- addListener(event: "close", listener: () => void): this;
272
- addListener(event: "line", listener: (input: string) => void): this;
273
- addListener(event: "pause", listener: () => void): this;
274
- addListener(event: "resume", listener: () => void): this;
275
- addListener(event: "SIGCONT", listener: () => void): this;
276
- addListener(event: "SIGINT", listener: () => void): this;
277
- addListener(event: "SIGTSTP", listener: () => void): this;
278
- addListener(event: "history", listener: (history: string[]) => void): this;
279
- emit(event: string | symbol, ...args: any[]): boolean;
280
- emit(event: "close"): boolean;
281
- emit(event: "line", input: string): boolean;
282
- emit(event: "pause"): boolean;
283
- emit(event: "resume"): boolean;
284
- emit(event: "SIGCONT"): boolean;
285
- emit(event: "SIGINT"): boolean;
286
- emit(event: "SIGTSTP"): boolean;
287
- emit(event: "history", history: string[]): boolean;
288
- on(event: string, listener: (...args: any[]) => void): this;
289
- on(event: "close", listener: () => void): this;
290
- on(event: "line", listener: (input: string) => void): this;
291
- on(event: "pause", listener: () => void): this;
292
- on(event: "resume", listener: () => void): this;
293
- on(event: "SIGCONT", listener: () => void): this;
294
- on(event: "SIGINT", listener: () => void): this;
295
- on(event: "SIGTSTP", listener: () => void): this;
296
- on(event: "history", listener: (history: string[]) => void): this;
297
- once(event: string, listener: (...args: any[]) => void): this;
298
- once(event: "close", listener: () => void): this;
299
- once(event: "line", listener: (input: string) => void): this;
300
- once(event: "pause", listener: () => void): this;
301
- once(event: "resume", listener: () => void): this;
302
- once(event: "SIGCONT", listener: () => void): this;
303
- once(event: "SIGINT", listener: () => void): this;
304
- once(event: "SIGTSTP", listener: () => void): this;
305
- once(event: "history", listener: (history: string[]) => void): this;
306
- prependListener(event: string, listener: (...args: any[]) => void): this;
307
- prependListener(event: "close", listener: () => void): this;
308
- prependListener(event: "line", listener: (input: string) => void): this;
309
- prependListener(event: "pause", listener: () => void): this;
310
- prependListener(event: "resume", listener: () => void): this;
311
- prependListener(event: "SIGCONT", listener: () => void): this;
312
- prependListener(event: "SIGINT", listener: () => void): this;
313
- prependListener(event: "SIGTSTP", listener: () => void): this;
314
- prependListener(event: "history", listener: (history: string[]) => void): this;
315
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
316
- prependOnceListener(event: "close", listener: () => void): this;
317
- prependOnceListener(event: "line", listener: (input: string) => void): this;
318
- prependOnceListener(event: "pause", listener: () => void): this;
319
- prependOnceListener(event: "resume", listener: () => void): this;
320
- prependOnceListener(event: "SIGCONT", listener: () => void): this;
321
- prependOnceListener(event: "SIGINT", listener: () => void): this;
322
- prependOnceListener(event: "SIGTSTP", listener: () => void): this;
323
- prependOnceListener(event: "history", listener: (history: string[]) => void): this;
324
- [Symbol.asyncIterator](): NodeJS.AsyncIterator<string>;
325
- }
326
- export type ReadLine = Interface; // type forwarded for backwards compatibility
327
- export type Completer = (line: string) => CompleterResult;
328
- export type AsyncCompleter = (
329
- line: string,
330
- callback: (err?: null | Error, result?: CompleterResult) => void,
331
- ) => void;
332
- export type CompleterResult = [string[], string];
333
- export interface ReadLineOptions {
334
- /**
335
- * The [`Readable`](https://nodejs.org/docs/latest-v18.x/api/stream.html#readable-streams) stream to listen to
336
- */
337
- input: NodeJS.ReadableStream;
338
- /**
339
- * The [`Writable`](https://nodejs.org/docs/latest-v18.x/api/stream.html#writable-streams) stream to write readline data to.
340
- */
341
- output?: NodeJS.WritableStream | undefined;
342
- /**
343
- * An optional function used for Tab autocompletion.
344
- */
345
- completer?: Completer | AsyncCompleter | undefined;
346
- /**
347
- * `true` if the `input` and `output` streams should be treated like a TTY,
348
- * and have ANSI/VT100 escape codes written to it.
349
- * Default: checking `isTTY` on the `output` stream upon instantiation.
350
- */
351
- terminal?: boolean | undefined;
352
- /**
353
- * Initial list of history lines.
354
- * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
355
- * otherwise the history caching mechanism is not initialized at all.
356
- * @default []
357
- */
358
- history?: string[] | undefined;
359
- /**
360
- * Maximum number of history lines retained.
361
- * To disable the history set this value to `0`.
362
- * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
363
- * otherwise the history caching mechanism is not initialized at all.
364
- * @default 30
365
- */
366
- historySize?: number | undefined;
367
- /**
368
- * If `true`, when a new input line added to the history list duplicates an older one,
369
- * this removes the older line from the list.
370
- * @default false
371
- */
372
- removeHistoryDuplicates?: boolean | undefined;
373
- /**
374
- * The prompt string to use.
375
- * @default "> "
376
- */
377
- prompt?: string | undefined;
378
- /**
379
- * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds,
380
- * both `\r` and `\n` will be treated as separate end-of-line input.
381
- * `crlfDelay` will be coerced to a number no less than `100`.
382
- * It can be set to `Infinity`, in which case
383
- * `\r` followed by `\n` will always be considered a single newline
384
- * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v18.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
385
- * @default 100
386
- */
387
- crlfDelay?: number | undefined;
388
- /**
389
- * The duration `readline` will wait for a character
390
- * (when reading an ambiguous key sequence in milliseconds
391
- * one that can both form a complete key sequence using the input read so far
392
- * and can take additional input to complete a longer key sequence).
393
- * @default 500
394
- */
395
- escapeCodeTimeout?: number | undefined;
396
- /**
397
- * The number of spaces a tab is equal to (minimum 1).
398
- * @default 8
399
- */
400
- tabSize?: number | undefined;
401
- /**
402
- * Allows closing the interface using an AbortSignal.
403
- * Aborting the signal will internally call `close` on the interface.
404
- */
405
- signal?: AbortSignal | undefined;
406
- }
407
- /**
408
- * The `readline.createInterface()` method creates a new `readline.Interface`instance.
409
- *
410
- * ```js
411
- * import readline from 'node:readline';
412
- * const rl = readline.createInterface({
413
- * input: process.stdin,
414
- * output: process.stdout
415
- * });
416
- * ```
417
- *
418
- * Once the `readline.Interface` instance is created, the most common case is to
419
- * listen for the `'line'` event:
420
- *
421
- * ```js
422
- * rl.on('line', (line) => {
423
- * console.log(`Received: ${line}`);
424
- * });
425
- * ```
426
- *
427
- * If `terminal` is `true` for this instance then the `output` stream will get
428
- * the best compatibility if it defines an `output.columns` property and emits
429
- * a `'resize'` event on the `output` if or when the columns ever change
430
- * (`process.stdout` does this automatically when it is a TTY).
431
- *
432
- * When creating a `readline.Interface` using `stdin` as input, the program
433
- * will not terminate until it receives `EOF` (Ctrl+D on
434
- * Linux/macOS, Ctrl+Z followed by Return on
435
- * Windows).
436
- * If you want your application to exit without waiting for user input, you can `unref()` the standard input stream:
437
- *
438
- * ```js
439
- * process.stdin.unref();
440
- * ```
441
- * @since v0.1.98
442
- */
443
- export function createInterface(
444
- input: NodeJS.ReadableStream,
445
- output?: NodeJS.WritableStream,
446
- completer?: Completer | AsyncCompleter,
447
- terminal?: boolean,
448
- ): Interface;
449
- export function createInterface(options: ReadLineOptions): Interface;
450
- /**
451
- * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
452
- *
453
- * Optionally, `interface` specifies a `readline.Interface` instance for which
454
- * autocompletion is disabled when copy-pasted input is detected.
455
- *
456
- * If the `stream` is a `TTY`, then it must be in raw mode.
457
- *
458
- * This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop
459
- * the `input` from emitting `'keypress'` events.
460
- *
461
- * ```js
462
- * readline.emitKeypressEvents(process.stdin);
463
- * if (process.stdin.isTTY)
464
- * process.stdin.setRawMode(true);
465
- * ```
466
- *
467
- * ## Example: Tiny CLI
468
- *
469
- * The following example illustrates the use of `readline.Interface` class to
470
- * implement a small command-line interface:
471
- *
472
- * ```js
473
- * import readline from 'node:readline';
474
- * const rl = readline.createInterface({
475
- * input: process.stdin,
476
- * output: process.stdout,
477
- * prompt: 'OHAI> '
478
- * });
479
- *
480
- * rl.prompt();
481
- *
482
- * rl.on('line', (line) => {
483
- * switch (line.trim()) {
484
- * case 'hello':
485
- * console.log('world!');
486
- * break;
487
- * default:
488
- * console.log(`Say what? I might have heard '${line.trim()}'`);
489
- * break;
490
- * }
491
- * rl.prompt();
492
- * }).on('close', () => {
493
- * console.log('Have a great day!');
494
- * process.exit(0);
495
- * });
496
- * ```
497
- *
498
- * ## Example: Read file stream line-by-Line
499
- *
500
- * A common use case for `readline` is to consume an input file one line at a
501
- * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
502
- * well as a `for await...of` loop:
503
- *
504
- * ```js
505
- * import fs from 'node:fs';
506
- * import readline from 'node:readline';
507
- *
508
- * async function processLineByLine() {
509
- * const fileStream = fs.createReadStream('input.txt');
510
- *
511
- * const rl = readline.createInterface({
512
- * input: fileStream,
513
- * crlfDelay: Infinity
514
- * });
515
- * // Note: we use the crlfDelay option to recognize all instances of CR LF
516
- * // ('\r\n') in input.txt as a single line break.
517
- *
518
- * for await (const line of rl) {
519
- * // Each line in input.txt will be successively available here as `line`.
520
- * console.log(`Line from file: ${line}`);
521
- * }
522
- * }
523
- *
524
- * processLineByLine();
525
- * ```
526
- *
527
- * Alternatively, one could use the `'line'` event:
528
- *
529
- * ```js
530
- * import fs from 'node:fs';
531
- * import readline from 'node:readline';
532
- *
533
- * const rl = readline.createInterface({
534
- * input: fs.createReadStream('sample.txt'),
535
- * crlfDelay: Infinity
536
- * });
537
- *
538
- * rl.on('line', (line) => {
539
- * console.log(`Line from file: ${line}`);
540
- * });
541
- * ```
542
- *
543
- * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
544
- *
545
- * ```js
546
- * import { once } from 'node:events';
547
- * import { createReadStream } from 'node:fs';
548
- * import { createInterface } from 'node:readline';
549
- *
550
- * (async function processLineByLine() {
551
- * try {
552
- * const rl = createInterface({
553
- * input: createReadStream('big-file.txt'),
554
- * crlfDelay: Infinity
555
- * });
556
- *
557
- * rl.on('line', (line) => {
558
- * // Process the line.
559
- * });
560
- *
561
- * await once(rl, 'close');
562
- *
563
- * console.log('File processed.');
564
- * } catch (err) {
565
- * console.error(err);
566
- * }
567
- * })();
568
- * ```
569
- * @since v0.7.7
570
- */
571
- export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
572
- export type Direction = -1 | 0 | 1;
573
- export interface CursorPos {
574
- rows: number;
575
- cols: number;
576
- }
577
- /**
578
- * The `readline.clearLine()` method clears current line of given `TTY` stream
579
- * in a specified direction identified by `dir`.
580
- * @since v0.7.7
581
- * @param callback Invoked once the operation completes.
582
- * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
583
- */
584
- export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
585
- /**
586
- * The `readline.clearScreenDown()` method clears the given `TTY` stream from
587
- * the current position of the cursor down.
588
- * @since v0.7.7
589
- * @param callback Invoked once the operation completes.
590
- * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
591
- */
592
- export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
593
- /**
594
- * The `readline.cursorTo()` method moves cursor to the specified position in a
595
- * given `TTY` `stream`.
596
- * @since v0.7.7
597
- * @param callback Invoked once the operation completes.
598
- * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
599
- */
600
- export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
601
- /**
602
- * The `readline.moveCursor()` method moves the cursor _relative_ to its current
603
- * position in a given `TTY` `stream`.
604
- *
605
- * ## Example: Tiny CLI
606
- *
607
- * The following example illustrates the use of `readline.Interface` class to
608
- * implement a small command-line interface:
609
- *
610
- * ```js
611
- * import readline from 'node:readline';
612
- * const rl = readline.createInterface({
613
- * input: process.stdin,
614
- * output: process.stdout,
615
- * prompt: 'OHAI> '
616
- * });
617
- *
618
- * rl.prompt();
619
- *
620
- * rl.on('line', (line) => {
621
- * switch (line.trim()) {
622
- * case 'hello':
623
- * console.log('world!');
624
- * break;
625
- * default:
626
- * console.log(`Say what? I might have heard '${line.trim()}'`);
627
- * break;
628
- * }
629
- * rl.prompt();
630
- * }).on('close', () => {
631
- * console.log('Have a great day!');
632
- * process.exit(0);
633
- * });
634
- * ```
635
- *
636
- * ## Example: Read file stream line-by-Line
637
- *
638
- * A common use case for `readline` is to consume an input file one line at a
639
- * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
640
- * well as a `for await...of` loop:
641
- *
642
- * ```js
643
- * import fs from 'node:fs';
644
- * import readline from 'node:readline';
645
- *
646
- * async function processLineByLine() {
647
- * const fileStream = fs.createReadStream('input.txt');
648
- *
649
- * const rl = readline.createInterface({
650
- * input: fileStream,
651
- * crlfDelay: Infinity
652
- * });
653
- * // Note: we use the crlfDelay option to recognize all instances of CR LF
654
- * // ('\r\n') in input.txt as a single line break.
655
- *
656
- * for await (const line of rl) {
657
- * // Each line in input.txt will be successively available here as `line`.
658
- * console.log(`Line from file: ${line}`);
659
- * }
660
- * }
661
- *
662
- * processLineByLine();
663
- * ```
664
- *
665
- * Alternatively, one could use the `'line'` event:
666
- *
667
- * ```js
668
- * import fs from 'node:fs';
669
- * import readline from 'node:readline';
670
- *
671
- * const rl = readline.createInterface({
672
- * input: fs.createReadStream('sample.txt'),
673
- * crlfDelay: Infinity
674
- * });
675
- *
676
- * rl.on('line', (line) => {
677
- * console.log(`Line from file: ${line}`);
678
- * });
679
- * ```
680
- *
681
- * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
682
- *
683
- * ```js
684
- * import { once } from 'node:events';
685
- * import { createReadStream } from 'node:fs';
686
- * import { createInterface } from 'node:readline';
687
- *
688
- * (async function processLineByLine() {
689
- * try {
690
- * const rl = createInterface({
691
- * input: createReadStream('big-file.txt'),
692
- * crlfDelay: Infinity
693
- * });
694
- *
695
- * rl.on('line', (line) => {
696
- * // Process the line.
697
- * });
698
- *
699
- * await once(rl, 'close');
700
- *
701
- * console.log('File processed.');
702
- * } catch (err) {
703
- * console.error(err);
704
- * }
705
- * })();
706
- * ```
707
- * @since v0.7.7
708
- * @param callback Invoked once the operation completes.
709
- * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
710
- */
711
- export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
712
- }
713
- declare module "node:readline" {
714
- export * from "readline";
715
- }