alicezetion 1.9.7 → 1.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. package/.cache/replit/modules/nodejs-20.res +1 -0
  2. package/.cache/replit/modules/replit.res +1 -0
  3. package/.cache/typescript/5.4/node_modules/.package-lock.json +137 -0
  4. package/.cache/typescript/5.4/node_modules/@types/bluebird/LICENSE +21 -0
  5. package/.cache/typescript/5.4/node_modules/@types/bluebird/README.md +15 -0
  6. package/.cache/typescript/5.4/node_modules/@types/bluebird/index.d.ts +1365 -0
  7. package/.cache/typescript/5.4/node_modules/@types/bluebird/package.json +25 -0
  8. package/.cache/typescript/5.4/node_modules/@types/caseless/LICENSE +21 -0
  9. package/.cache/typescript/5.4/node_modules/@types/caseless/README.md +48 -0
  10. package/.cache/typescript/5.4/node_modules/@types/caseless/index.d.ts +29 -0
  11. package/.cache/typescript/5.4/node_modules/@types/caseless/package.json +35 -0
  12. package/.cache/typescript/5.4/node_modules/@types/cheerio/LICENSE +21 -0
  13. package/.cache/typescript/5.4/node_modules/@types/cheerio/README.md +15 -0
  14. package/.cache/typescript/5.4/node_modules/@types/cheerio/index.d.ts +318 -0
  15. package/.cache/typescript/5.4/node_modules/@types/cheerio/package.json +71 -0
  16. package/.cache/typescript/5.4/node_modules/@types/node/LICENSE +21 -0
  17. package/.cache/typescript/5.4/node_modules/@types/node/README.md +15 -0
  18. package/.cache/typescript/5.4/node_modules/@types/node/assert/strict.d.ts +8 -0
  19. package/.cache/typescript/5.4/node_modules/@types/node/assert.d.ts +1040 -0
  20. package/.cache/typescript/5.4/node_modules/@types/node/async_hooks.d.ts +541 -0
  21. package/.cache/typescript/5.4/node_modules/@types/node/buffer.d.ts +2363 -0
  22. package/.cache/typescript/5.4/node_modules/@types/node/child_process.d.ts +1544 -0
  23. package/.cache/typescript/5.4/node_modules/@types/node/cluster.d.ts +578 -0
  24. package/.cache/typescript/5.4/node_modules/@types/node/console.d.ts +452 -0
  25. package/.cache/typescript/5.4/node_modules/@types/node/constants.d.ts +19 -0
  26. package/.cache/typescript/5.4/node_modules/@types/node/crypto.d.ts +4523 -0
  27. package/.cache/typescript/5.4/node_modules/@types/node/dgram.d.ts +596 -0
  28. package/.cache/typescript/5.4/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
  29. package/.cache/typescript/5.4/node_modules/@types/node/dns/promises.d.ts +476 -0
  30. package/.cache/typescript/5.4/node_modules/@types/node/dns.d.ts +864 -0
  31. package/.cache/typescript/5.4/node_modules/@types/node/dom-events.d.ts +124 -0
  32. package/.cache/typescript/5.4/node_modules/@types/node/domain.d.ts +170 -0
  33. package/.cache/typescript/5.4/node_modules/@types/node/events.d.ts +931 -0
  34. package/.cache/typescript/5.4/node_modules/@types/node/fs/promises.d.ts +1245 -0
  35. package/.cache/typescript/5.4/node_modules/@types/node/fs.d.ts +4317 -0
  36. package/.cache/typescript/5.4/node_modules/@types/node/globals.d.ts +412 -0
  37. package/.cache/typescript/5.4/node_modules/@types/node/globals.global.d.ts +1 -0
  38. package/.cache/typescript/5.4/node_modules/@types/node/http.d.ts +1908 -0
  39. package/.cache/typescript/5.4/node_modules/@types/node/http2.d.ts +2418 -0
  40. package/.cache/typescript/5.4/node_modules/@types/node/https.d.ts +550 -0
  41. package/.cache/typescript/5.4/node_modules/@types/node/index.d.ts +89 -0
  42. package/.cache/typescript/5.4/node_modules/@types/node/inspector.d.ts +2746 -0
  43. package/.cache/typescript/5.4/node_modules/@types/node/module.d.ts +315 -0
  44. package/.cache/typescript/5.4/node_modules/@types/node/net.d.ts +999 -0
  45. package/.cache/typescript/5.4/node_modules/@types/node/os.d.ts +495 -0
  46. package/.cache/typescript/5.4/node_modules/@types/node/package.json +217 -0
  47. package/.cache/typescript/5.4/node_modules/@types/node/path.d.ts +191 -0
  48. package/.cache/typescript/5.4/node_modules/@types/node/perf_hooks.d.ts +905 -0
  49. package/.cache/typescript/5.4/node_modules/@types/node/process.d.ts +1754 -0
  50. package/.cache/typescript/5.4/node_modules/@types/node/punycode.d.ts +117 -0
  51. package/.cache/typescript/5.4/node_modules/@types/node/querystring.d.ts +153 -0
  52. package/.cache/typescript/5.4/node_modules/@types/node/readline/promises.d.ts +150 -0
  53. package/.cache/typescript/5.4/node_modules/@types/node/readline.d.ts +540 -0
  54. package/.cache/typescript/5.4/node_modules/@types/node/repl.d.ts +430 -0
  55. package/.cache/typescript/5.4/node_modules/@types/node/sea.d.ts +153 -0
  56. package/.cache/typescript/5.4/node_modules/@types/node/stream/consumers.d.ts +12 -0
  57. package/.cache/typescript/5.4/node_modules/@types/node/stream/promises.d.ts +83 -0
  58. package/.cache/typescript/5.4/node_modules/@types/node/stream/web.d.ts +367 -0
  59. package/.cache/typescript/5.4/node_modules/@types/node/stream.d.ts +1707 -0
  60. package/.cache/typescript/5.4/node_modules/@types/node/string_decoder.d.ts +67 -0
  61. package/.cache/typescript/5.4/node_modules/@types/node/test.d.ts +1718 -0
  62. package/.cache/typescript/5.4/node_modules/@types/node/timers/promises.d.ts +97 -0
  63. package/.cache/typescript/5.4/node_modules/@types/node/timers.d.ts +240 -0
  64. package/.cache/typescript/5.4/node_modules/@types/node/tls.d.ts +1217 -0
  65. package/.cache/typescript/5.4/node_modules/@types/node/trace_events.d.ts +197 -0
  66. package/.cache/typescript/5.4/node_modules/@types/node/tty.d.ts +208 -0
  67. package/.cache/typescript/5.4/node_modules/@types/node/url.d.ts +952 -0
  68. package/.cache/typescript/5.4/node_modules/@types/node/util.d.ts +2292 -0
  69. package/.cache/typescript/5.4/node_modules/@types/node/v8.d.ts +808 -0
  70. package/.cache/typescript/5.4/node_modules/@types/node/vm.d.ts +924 -0
  71. package/.cache/typescript/5.4/node_modules/@types/node/wasi.d.ts +181 -0
  72. package/.cache/typescript/5.4/node_modules/@types/node/worker_threads.d.ts +694 -0
  73. package/.cache/typescript/5.4/node_modules/@types/node/zlib.d.ts +530 -0
  74. package/.cache/typescript/5.4/node_modules/@types/npmlog/LICENSE +21 -0
  75. package/.cache/typescript/5.4/node_modules/@types/npmlog/README.md +15 -0
  76. package/.cache/typescript/5.4/node_modules/@types/npmlog/index.d.ts +84 -0
  77. package/.cache/typescript/5.4/node_modules/@types/npmlog/package.json +32 -0
  78. package/.cache/typescript/5.4/node_modules/@types/request/LICENSE +21 -0
  79. package/.cache/typescript/5.4/node_modules/@types/request/README.md +15 -0
  80. package/.cache/typescript/5.4/node_modules/@types/request/index.d.ts +395 -0
  81. package/.cache/typescript/5.4/node_modules/@types/request/package.json +70 -0
  82. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/LICENSE +21 -0
  83. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/README.md +15 -0
  84. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/index.d.ts +321 -0
  85. package/.cache/typescript/5.4/node_modules/@types/tough-cookie/package.json +35 -0
  86. package/.cache/typescript/5.4/node_modules/asynckit/LICENSE +21 -0
  87. package/.cache/typescript/5.4/node_modules/asynckit/README.md +233 -0
  88. package/.cache/typescript/5.4/node_modules/asynckit/bench.js +76 -0
  89. package/.cache/typescript/5.4/node_modules/asynckit/index.js +6 -0
  90. package/.cache/typescript/5.4/node_modules/asynckit/lib/abort.js +29 -0
  91. package/.cache/typescript/5.4/node_modules/asynckit/lib/async.js +34 -0
  92. package/.cache/typescript/5.4/node_modules/asynckit/lib/defer.js +26 -0
  93. package/.cache/typescript/5.4/node_modules/asynckit/lib/iterate.js +75 -0
  94. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  95. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_parallel.js +25 -0
  96. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_serial.js +25 -0
  97. package/.cache/typescript/5.4/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  98. package/.cache/typescript/5.4/node_modules/asynckit/lib/state.js +37 -0
  99. package/.cache/typescript/5.4/node_modules/asynckit/lib/streamify.js +141 -0
  100. package/.cache/typescript/5.4/node_modules/asynckit/lib/terminator.js +29 -0
  101. package/.cache/typescript/5.4/node_modules/asynckit/package.json +63 -0
  102. package/.cache/typescript/5.4/node_modules/asynckit/parallel.js +43 -0
  103. package/.cache/typescript/5.4/node_modules/asynckit/serial.js +17 -0
  104. package/.cache/typescript/5.4/node_modules/asynckit/serialOrdered.js +75 -0
  105. package/.cache/typescript/5.4/node_modules/asynckit/stream.js +21 -0
  106. package/.cache/typescript/5.4/node_modules/combined-stream/License +19 -0
  107. package/.cache/typescript/5.4/node_modules/combined-stream/Readme.md +138 -0
  108. package/.cache/typescript/5.4/node_modules/combined-stream/lib/combined_stream.js +208 -0
  109. package/.cache/typescript/5.4/node_modules/combined-stream/package.json +25 -0
  110. package/.cache/typescript/5.4/node_modules/combined-stream/yarn.lock +17 -0
  111. package/.cache/typescript/5.4/node_modules/delayed-stream/License +19 -0
  112. package/.cache/typescript/5.4/node_modules/delayed-stream/Makefile +7 -0
  113. package/.cache/typescript/5.4/node_modules/delayed-stream/Readme.md +141 -0
  114. package/.cache/typescript/5.4/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  115. package/.cache/typescript/5.4/node_modules/delayed-stream/package.json +27 -0
  116. package/.cache/typescript/5.4/node_modules/form-data/License +19 -0
  117. package/.cache/typescript/5.4/node_modules/form-data/README.md +350 -0
  118. package/.cache/typescript/5.4/node_modules/form-data/README.md.bak +350 -0
  119. package/.cache/typescript/5.4/node_modules/form-data/index.d.ts +51 -0
  120. package/.cache/typescript/5.4/node_modules/form-data/lib/browser.js +2 -0
  121. package/.cache/typescript/5.4/node_modules/form-data/lib/form_data.js +483 -0
  122. package/.cache/typescript/5.4/node_modules/form-data/lib/populate.js +10 -0
  123. package/.cache/typescript/5.4/node_modules/form-data/package.json +68 -0
  124. package/.cache/typescript/5.4/node_modules/mime-db/HISTORY.md +507 -0
  125. package/.cache/typescript/5.4/node_modules/mime-db/LICENSE +23 -0
  126. package/.cache/typescript/5.4/node_modules/mime-db/README.md +100 -0
  127. package/.cache/typescript/5.4/node_modules/mime-db/db.json +8519 -0
  128. package/.cache/typescript/5.4/node_modules/mime-db/index.js +12 -0
  129. package/.cache/typescript/5.4/node_modules/mime-db/package.json +60 -0
  130. package/.cache/typescript/5.4/node_modules/mime-types/HISTORY.md +397 -0
  131. package/.cache/typescript/5.4/node_modules/mime-types/LICENSE +23 -0
  132. package/.cache/typescript/5.4/node_modules/mime-types/README.md +113 -0
  133. package/.cache/typescript/5.4/node_modules/mime-types/index.js +188 -0
  134. package/.cache/typescript/5.4/node_modules/mime-types/package.json +44 -0
  135. package/.cache/typescript/5.4/node_modules/types-registry/README.md +2 -0
  136. package/.cache/typescript/5.4/node_modules/types-registry/index.json +1 -0
  137. package/.cache/typescript/5.4/node_modules/types-registry/package.json +20 -0
  138. package/.cache/typescript/5.4/node_modules/undici-types/README.md +6 -0
  139. package/.cache/typescript/5.4/node_modules/undici-types/agent.d.ts +31 -0
  140. package/.cache/typescript/5.4/node_modules/undici-types/api.d.ts +43 -0
  141. package/.cache/typescript/5.4/node_modules/undici-types/balanced-pool.d.ts +18 -0
  142. package/.cache/typescript/5.4/node_modules/undici-types/cache.d.ts +36 -0
  143. package/.cache/typescript/5.4/node_modules/undici-types/client.d.ts +97 -0
  144. package/.cache/typescript/5.4/node_modules/undici-types/connector.d.ts +34 -0
  145. package/.cache/typescript/5.4/node_modules/undici-types/content-type.d.ts +21 -0
  146. package/.cache/typescript/5.4/node_modules/undici-types/cookies.d.ts +28 -0
  147. package/.cache/typescript/5.4/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  148. package/.cache/typescript/5.4/node_modules/undici-types/dispatcher.d.ts +241 -0
  149. package/.cache/typescript/5.4/node_modules/undici-types/errors.d.ts +128 -0
  150. package/.cache/typescript/5.4/node_modules/undici-types/fetch.d.ts +209 -0
  151. package/.cache/typescript/5.4/node_modules/undici-types/file.d.ts +39 -0
  152. package/.cache/typescript/5.4/node_modules/undici-types/filereader.d.ts +54 -0
  153. package/.cache/typescript/5.4/node_modules/undici-types/formdata.d.ts +108 -0
  154. package/.cache/typescript/5.4/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  155. package/.cache/typescript/5.4/node_modules/undici-types/global-origin.d.ts +7 -0
  156. package/.cache/typescript/5.4/node_modules/undici-types/handlers.d.ts +9 -0
  157. package/.cache/typescript/5.4/node_modules/undici-types/header.d.ts +4 -0
  158. package/.cache/typescript/5.4/node_modules/undici-types/index.d.ts +63 -0
  159. package/.cache/typescript/5.4/node_modules/undici-types/interceptors.d.ts +5 -0
  160. package/.cache/typescript/5.4/node_modules/undici-types/mock-agent.d.ts +50 -0
  161. package/.cache/typescript/5.4/node_modules/undici-types/mock-client.d.ts +25 -0
  162. package/.cache/typescript/5.4/node_modules/undici-types/mock-errors.d.ts +12 -0
  163. package/.cache/typescript/5.4/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  164. package/.cache/typescript/5.4/node_modules/undici-types/mock-pool.d.ts +25 -0
  165. package/.cache/typescript/5.4/node_modules/undici-types/package.json +55 -0
  166. package/.cache/typescript/5.4/node_modules/undici-types/patch.d.ts +71 -0
  167. package/.cache/typescript/5.4/node_modules/undici-types/pool-stats.d.ts +19 -0
  168. package/.cache/typescript/5.4/node_modules/undici-types/pool.d.ts +28 -0
  169. package/.cache/typescript/5.4/node_modules/undici-types/proxy-agent.d.ts +30 -0
  170. package/.cache/typescript/5.4/node_modules/undici-types/readable.d.ts +61 -0
  171. package/.cache/typescript/5.4/node_modules/undici-types/webidl.d.ts +220 -0
  172. package/.cache/typescript/5.4/node_modules/undici-types/websocket.d.ts +131 -0
  173. package/.cache/typescript/5.4/package-lock.json +149 -0
  174. package/.cache/typescript/5.4/package.json +1 -0
  175. package/index.js +291 -71
  176. package/leiamnash/addExternalModule.js +15 -0
  177. package/leiamnash/addUserToGroup.js +77 -0
  178. package/leiamnash/changeAdminStatus.js +47 -0
  179. package/leiamnash/changeArchivedStatus.js +41 -0
  180. package/{src → leiamnash}/changeAvatar.js +3 -2
  181. package/leiamnash/changeBio.js +64 -0
  182. package/leiamnash/changeBlockedStatus.js +36 -0
  183. package/leiamnash/changeGroupImage.js +105 -0
  184. package/leiamnash/changeNickname.js +43 -0
  185. package/leiamnash/changeThreadColor.js +61 -0
  186. package/leiamnash/changeThreadEmoji.js +41 -0
  187. package/{src → leiamnash}/chat.js +4 -29
  188. package/leiamnash/createNewGroup.js +70 -0
  189. package/leiamnash/createPoll.js +59 -0
  190. package/leiamnash/deleteMessage.js +44 -0
  191. package/leiamnash/deleteThread.js +42 -0
  192. package/leiamnash/editMessage.js +62 -0
  193. package/leiamnash/forwardAttachment.js +47 -0
  194. package/leiamnash/forwardMessage.js +0 -0
  195. package/leiamnash/getCurrentUserID.js +7 -0
  196. package/leiamnash/getEmojiUrl.js +27 -0
  197. package/leiamnash/getFriendsList.js +73 -0
  198. package/leiamnash/getInfoVideo.js +134 -0
  199. package/leiamnash/getThreadHistory.js +537 -0
  200. package/leiamnash/getThreadHistoryDeprecated.js +71 -0
  201. package/leiamnash/getThreadInfo.js +171 -0
  202. package/leiamnash/getThreadInfoDeprecated.js +56 -0
  203. package/leiamnash/getThreadList.js +213 -0
  204. package/leiamnash/getThreadListDeprecated.js +46 -0
  205. package/leiamnash/getThreadPictures.js +59 -0
  206. package/leiamnash/getUserID.js +61 -0
  207. package/leiamnash/getUserInfo.js +66 -0
  208. package/leiamnash/handleFriendRequest.js +46 -0
  209. package/leiamnash/handleMessageRequest.js +47 -0
  210. package/leiamnash/httpGet.js +47 -0
  211. package/leiamnash/httpPost.js +47 -0
  212. package/leiamnash/httpPostFormData.js +42 -0
  213. package/leiamnash/listenMqtt.js +843 -0
  214. package/leiamnash/logout.js +68 -0
  215. package/leiamnash/markAsDelivered.js +47 -0
  216. package/leiamnash/markAsRead.js +70 -0
  217. package/leiamnash/markAsReadAll.js +40 -0
  218. package/leiamnash/markAsSeen.js +48 -0
  219. package/leiamnash/muteThread.js +45 -0
  220. package/leiamnash/pinMessage.js +58 -0
  221. package/leiamnash/react.js +109 -0
  222. package/{src → leiamnash}/refreshFb_dtsg.js +1 -1
  223. package/leiamnash/removeUserFromGroup.js +45 -0
  224. package/leiamnash/resolvePhotoUrl.js +36 -0
  225. package/leiamnash/searchForThread.js +42 -0
  226. package/leiamnash/seen.js +40 -0
  227. package/leiamnash/sendMessage.js +315 -0
  228. package/leiamnash/sendTypingIndicator.js +70 -0
  229. package/leiamnash/setMessageReaction.js +103 -0
  230. package/leiamnash/setPostReaction.js +63 -0
  231. package/leiamnash/setTitle.js +70 -0
  232. package/leiamnash/threadColors.js +41 -0
  233. package/leiamnash/token.js +112 -0
  234. package/leiamnash/unfriend.js +42 -0
  235. package/leiamnash/unsendMessage.js +39 -0
  236. package/{src → leiamnash}/uploadAttachment.js +2 -1
  237. package/package.json +3 -2
  238. package/utils.js +1345 -1382
  239. package/.cache/replit/modules/nodejs-20:v32-20240401-269b323.res +0 -1
  240. package/.cache/replit/modules/replit:v8-20240329-787bc7d.res +0 -1
  241. package/.replit +0 -1
  242. package/src/addExternalModule.js +0 -19
  243. package/src/addUserToGroup.js +0 -113
  244. package/src/changeAdminStatus.js +0 -79
  245. package/src/changeArchivedStatus.js +0 -55
  246. package/src/changeBio.js +0 -77
  247. package/src/changeBlockedStatus.js +0 -47
  248. package/src/changeGroupImage.js +0 -132
  249. package/src/changeNickname.js +0 -59
  250. package/src/changeThreadColor.js +0 -65
  251. package/src/changeThreadEmoji.js +0 -55
  252. package/src/createNewGroup.js +0 -86
  253. package/src/createPoll.js +0 -71
  254. package/src/deleteMessage.js +0 -56
  255. package/src/deleteThread.js +0 -56
  256. package/src/edit.js +0 -66
  257. package/src/forwardAttachment.js +0 -60
  258. package/src/getCurrentUserID.js +0 -7
  259. package/src/getEmojiUrl.js +0 -29
  260. package/src/getFriendsList.js +0 -83
  261. package/src/getThreadHistory.js +0 -666
  262. package/src/getThreadInfo.js +0 -232
  263. package/src/getThreadList.js +0 -241
  264. package/src/getThreadPictures.js +0 -79
  265. package/src/getUserID.js +0 -66
  266. package/src/getUserInfo.js +0 -74
  267. package/src/handleFriendRequest.js +0 -61
  268. package/src/handleMessageRequest.js +0 -65
  269. package/src/httpGet.js +0 -57
  270. package/src/httpPost.js +0 -57
  271. package/src/httpPostFormData.js +0 -63
  272. package/src/listenMqtt.js +0 -854
  273. package/src/logout.js +0 -75
  274. package/src/markAsDelivered.js +0 -58
  275. package/src/markAsRead.js +0 -80
  276. package/src/markAsReadAll.js +0 -50
  277. package/src/markAsSeen.js +0 -59
  278. package/src/muteThread.js +0 -52
  279. package/src/react.js +0 -121
  280. package/src/removeUserFromGroup.js +0 -79
  281. package/src/resolvePhotoUrl.js +0 -45
  282. package/src/searchForThread.js +0 -53
  283. package/src/seen.js +0 -50
  284. package/src/sendMessage.js +0 -477
  285. package/src/sendTypingIndicator.js +0 -103
  286. package/src/setMessageReaction.js +0 -121
  287. package/src/setPostReaction.js +0 -109
  288. package/src/setTitle.js +0 -86
  289. package/src/threadColors.js +0 -131
  290. package/src/unfriend.js +0 -52
  291. package/src/unsendMessage.js +0 -49
  292. /package/{src → leiamnash}/getMessage.js +0 -0
@@ -0,0 +1,452 @@
1
+ /**
2
+ * The `node:console` module provides a simple debugging console that is similar to
3
+ * the JavaScript console mechanism provided by web browsers.
4
+ *
5
+ * The module exports two specific components:
6
+ *
7
+ * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
8
+ * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and
9
+ * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without calling `require('node:console')`.
10
+ *
11
+ * _**Warning**_: The global console object's methods are neither consistently
12
+ * synchronous like the browser APIs they resemble, nor are they consistently
13
+ * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for
14
+ * more information.
15
+ *
16
+ * Example using the global `console`:
17
+ *
18
+ * ```js
19
+ * console.log('hello world');
20
+ * // Prints: hello world, to stdout
21
+ * console.log('hello %s', 'world');
22
+ * // Prints: hello world, to stdout
23
+ * console.error(new Error('Whoops, something bad happened'));
24
+ * // Prints error message and stack trace to stderr:
25
+ * // Error: Whoops, something bad happened
26
+ * // at [eval]:5:15
27
+ * // at Script.runInThisContext (node:vm:132:18)
28
+ * // at Object.runInThisContext (node:vm:309:38)
29
+ * // at node:internal/process/execution:77:19
30
+ * // at [eval]-wrapper:6:22
31
+ * // at evalScript (node:internal/process/execution:76:60)
32
+ * // at node:internal/main/eval_string:23:3
33
+ *
34
+ * const name = 'Will Robinson';
35
+ * console.warn(`Danger ${name}! Danger!`);
36
+ * // Prints: Danger Will Robinson! Danger!, to stderr
37
+ * ```
38
+ *
39
+ * Example using the `Console` class:
40
+ *
41
+ * ```js
42
+ * const out = getStreamSomehow();
43
+ * const err = getStreamSomehow();
44
+ * const myConsole = new console.Console(out, err);
45
+ *
46
+ * myConsole.log('hello world');
47
+ * // Prints: hello world, to out
48
+ * myConsole.log('hello %s', 'world');
49
+ * // Prints: hello world, to out
50
+ * myConsole.error(new Error('Whoops, something bad happened'));
51
+ * // Prints: [Error: Whoops, something bad happened], to err
52
+ *
53
+ * const name = 'Will Robinson';
54
+ * myConsole.warn(`Danger ${name}! Danger!`);
55
+ * // Prints: Danger Will Robinson! Danger!, to err
56
+ * ```
57
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/console.js)
58
+ */
59
+ declare module "console" {
60
+ import console = require("node:console");
61
+ export = console;
62
+ }
63
+ declare module "node:console" {
64
+ import { InspectOptions } from "node:util";
65
+ global {
66
+ // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
67
+ interface Console {
68
+ Console: console.ConsoleConstructor;
69
+ /**
70
+ * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
71
+ * writes a message and does not otherwise affect execution. The output always
72
+ * starts with `"Assertion failed"`. If provided, `message` is formatted using
73
+ * [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args).
74
+ *
75
+ * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
76
+ *
77
+ * ```js
78
+ * console.assert(true, 'does nothing');
79
+ *
80
+ * console.assert(false, 'Whoops %s work', 'didn\'t');
81
+ * // Assertion failed: Whoops didn't work
82
+ *
83
+ * console.assert();
84
+ * // Assertion failed
85
+ * ```
86
+ * @since v0.1.101
87
+ * @param value The value tested for being truthy.
88
+ * @param message All arguments besides `value` are used as error message.
89
+ */
90
+ assert(value: any, message?: string, ...optionalParams: any[]): void;
91
+ /**
92
+ * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
93
+ * TTY. When `stdout` is not a TTY, this method does nothing.
94
+ *
95
+ * The specific operation of `console.clear()` can vary across operating systems
96
+ * and terminal types. For most Linux operating systems, `console.clear()` operates similarly to the `clear` shell command. On Windows, `console.clear()` will clear only the output in the
97
+ * current terminal viewport for the Node.js
98
+ * binary.
99
+ * @since v8.3.0
100
+ */
101
+ clear(): void;
102
+ /**
103
+ * Maintains an internal counter specific to `label` and outputs to `stdout` the
104
+ * number of times `console.count()` has been called with the given `label`.
105
+ *
106
+ * ```js
107
+ * > console.count()
108
+ * default: 1
109
+ * undefined
110
+ * > console.count('default')
111
+ * default: 2
112
+ * undefined
113
+ * > console.count('abc')
114
+ * abc: 1
115
+ * undefined
116
+ * > console.count('xyz')
117
+ * xyz: 1
118
+ * undefined
119
+ * > console.count('abc')
120
+ * abc: 2
121
+ * undefined
122
+ * > console.count()
123
+ * default: 3
124
+ * undefined
125
+ * >
126
+ * ```
127
+ * @since v8.3.0
128
+ * @param [label='default'] The display label for the counter.
129
+ */
130
+ count(label?: string): void;
131
+ /**
132
+ * Resets the internal counter specific to `label`.
133
+ *
134
+ * ```js
135
+ * > console.count('abc');
136
+ * abc: 1
137
+ * undefined
138
+ * > console.countReset('abc');
139
+ * undefined
140
+ * > console.count('abc');
141
+ * abc: 1
142
+ * undefined
143
+ * >
144
+ * ```
145
+ * @since v8.3.0
146
+ * @param [label='default'] The display label for the counter.
147
+ */
148
+ countReset(label?: string): void;
149
+ /**
150
+ * The `console.debug()` function is an alias for {@link log}.
151
+ * @since v8.0.0
152
+ */
153
+ debug(message?: any, ...optionalParams: any[]): void;
154
+ /**
155
+ * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
156
+ * This function bypasses any custom `inspect()` function defined on `obj`.
157
+ * @since v0.1.101
158
+ */
159
+ dir(obj: any, options?: InspectOptions): void;
160
+ /**
161
+ * This method calls `console.log()` passing it the arguments received.
162
+ * This method does not produce any XML formatting.
163
+ * @since v8.0.0
164
+ */
165
+ dirxml(...data: any[]): void;
166
+ /**
167
+ * Prints to `stderr` with newline. Multiple arguments can be passed, with the
168
+ * first used as the primary message and all additional used as substitution
169
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
170
+ * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)).
171
+ *
172
+ * ```js
173
+ * const code = 5;
174
+ * console.error('error #%d', code);
175
+ * // Prints: error #5, to stderr
176
+ * console.error('error', code);
177
+ * // Prints: error 5, to stderr
178
+ * ```
179
+ *
180
+ * If formatting elements (e.g. `%d`) are not found in the first string then
181
+ * [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) is called on each argument and the
182
+ * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)
183
+ * for more information.
184
+ * @since v0.1.100
185
+ */
186
+ error(message?: any, ...optionalParams: any[]): void;
187
+ /**
188
+ * Increases indentation of subsequent lines by spaces for `groupIndentation` length.
189
+ *
190
+ * If one or more `label`s are provided, those are printed first without the
191
+ * additional indentation.
192
+ * @since v8.5.0
193
+ */
194
+ group(...label: any[]): void;
195
+ /**
196
+ * An alias for {@link group}.
197
+ * @since v8.5.0
198
+ */
199
+ groupCollapsed(...label: any[]): void;
200
+ /**
201
+ * Decreases indentation of subsequent lines by spaces for `groupIndentation` length.
202
+ * @since v8.5.0
203
+ */
204
+ groupEnd(): void;
205
+ /**
206
+ * The `console.info()` function is an alias for {@link log}.
207
+ * @since v0.1.100
208
+ */
209
+ info(message?: any, ...optionalParams: any[]): void;
210
+ /**
211
+ * Prints to `stdout` with newline. Multiple arguments can be passed, with the
212
+ * first used as the primary message and all additional used as substitution
213
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
214
+ * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)).
215
+ *
216
+ * ```js
217
+ * const count = 5;
218
+ * console.log('count: %d', count);
219
+ * // Prints: count: 5, to stdout
220
+ * console.log('count:', count);
221
+ * // Prints: count: 5, to stdout
222
+ * ```
223
+ *
224
+ * See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) for more information.
225
+ * @since v0.1.100
226
+ */
227
+ log(message?: any, ...optionalParams: any[]): void;
228
+ /**
229
+ * Try to construct a table with the columns of the properties of `tabularData` (or use `properties`) and rows of `tabularData` and log it. Falls back to just
230
+ * logging the argument if it can't be parsed as tabular.
231
+ *
232
+ * ```js
233
+ * // These can't be parsed as tabular data
234
+ * console.table(Symbol());
235
+ * // Symbol()
236
+ *
237
+ * console.table(undefined);
238
+ * // undefined
239
+ *
240
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
241
+ * // ┌─────────┬─────┬─────┐
242
+ * // │ (index) │ a │ b │
243
+ * // ├─────────┼─────┼─────┤
244
+ * // │ 0 │ 1 │ 'Y' │
245
+ * // │ 1 │ 'Z' │ 2 │
246
+ * // └─────────┴─────┴─────┘
247
+ *
248
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
249
+ * // ┌─────────┬─────┐
250
+ * // │ (index) │ a │
251
+ * // ├─────────┼─────┤
252
+ * // │ 0 │ 1 │
253
+ * // │ 1 │ 'Z' │
254
+ * // └─────────┴─────┘
255
+ * ```
256
+ * @since v10.0.0
257
+ * @param properties Alternate properties for constructing the table.
258
+ */
259
+ table(tabularData: any, properties?: readonly string[]): void;
260
+ /**
261
+ * Starts a timer that can be used to compute the duration of an operation. Timers
262
+ * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
263
+ * suitable time units to `stdout`. For example, if the elapsed
264
+ * time is 3869ms, `console.timeEnd()` displays "3.869s".
265
+ * @since v0.1.104
266
+ * @param [label='default']
267
+ */
268
+ time(label?: string): void;
269
+ /**
270
+ * Stops a timer that was previously started by calling {@link time} and
271
+ * prints the result to `stdout`:
272
+ *
273
+ * ```js
274
+ * console.time('bunch-of-stuff');
275
+ * // Do a bunch of stuff.
276
+ * console.timeEnd('bunch-of-stuff');
277
+ * // Prints: bunch-of-stuff: 225.438ms
278
+ * ```
279
+ * @since v0.1.104
280
+ * @param [label='default']
281
+ */
282
+ timeEnd(label?: string): void;
283
+ /**
284
+ * For a timer that was previously started by calling {@link time}, prints
285
+ * the elapsed time and other `data` arguments to `stdout`:
286
+ *
287
+ * ```js
288
+ * console.time('process');
289
+ * const value = expensiveProcess1(); // Returns 42
290
+ * console.timeLog('process', value);
291
+ * // Prints "process: 365.227ms 42".
292
+ * doExpensiveProcess2(value);
293
+ * console.timeEnd('process');
294
+ * ```
295
+ * @since v10.7.0
296
+ * @param [label='default']
297
+ */
298
+ timeLog(label?: string, ...data: any[]): void;
299
+ /**
300
+ * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)
301
+ * formatted message and stack trace to the current position in the code.
302
+ *
303
+ * ```js
304
+ * console.trace('Show me');
305
+ * // Prints: (stack trace will vary based on where trace is called)
306
+ * // Trace: Show me
307
+ * // at repl:2:9
308
+ * // at REPLServer.defaultEval (repl.js:248:27)
309
+ * // at bound (domain.js:287:14)
310
+ * // at REPLServer.runBound [as eval] (domain.js:300:12)
311
+ * // at REPLServer.<anonymous> (repl.js:412:12)
312
+ * // at emitOne (events.js:82:20)
313
+ * // at REPLServer.emit (events.js:169:7)
314
+ * // at REPLServer.Interface._onLine (readline.js:210:10)
315
+ * // at REPLServer.Interface._line (readline.js:549:8)
316
+ * // at REPLServer.Interface._ttyWrite (readline.js:826:14)
317
+ * ```
318
+ * @since v0.1.104
319
+ */
320
+ trace(message?: any, ...optionalParams: any[]): void;
321
+ /**
322
+ * The `console.warn()` function is an alias for {@link error}.
323
+ * @since v0.1.100
324
+ */
325
+ warn(message?: any, ...optionalParams: any[]): void;
326
+ // --- Inspector mode only ---
327
+ /**
328
+ * This method does not display anything unless used in the inspector. The `console.profile()`
329
+ * method starts a JavaScript CPU profile with an optional label until {@link profileEnd}
330
+ * is called. The profile is then added to the Profile panel of the inspector.
331
+ *
332
+ * ```js
333
+ * console.profile('MyLabel');
334
+ * // Some code
335
+ * console.profileEnd('MyLabel');
336
+ * // Adds the profile 'MyLabel' to the Profiles panel of the inspector.
337
+ * ```
338
+ * @since v8.0.0
339
+ */
340
+ profile(label?: string): void;
341
+ /**
342
+ * This method does not display anything unless used in the inspector. Stops the current
343
+ * JavaScript CPU profiling session if one has been started and prints the report to the
344
+ * Profiles panel of the inspector. See {@link profile} for an example.
345
+ *
346
+ * If this method is called without a label, the most recently started profile is stopped.
347
+ * @since v8.0.0
348
+ */
349
+ profileEnd(label?: string): void;
350
+ /**
351
+ * This method does not display anything unless used in the inspector. The `console.timeStamp()`
352
+ * method adds an event with the label `'label'` to the Timeline panel of the inspector.
353
+ * @since v8.0.0
354
+ */
355
+ timeStamp(label?: string): void;
356
+ }
357
+ /**
358
+ * The `console` module provides a simple debugging console that is similar to the
359
+ * JavaScript console mechanism provided by web browsers.
360
+ *
361
+ * The module exports two specific components:
362
+ *
363
+ * * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream.
364
+ * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and
365
+ * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without calling `require('console')`.
366
+ *
367
+ * _**Warning**_: The global console object's methods are neither consistently
368
+ * synchronous like the browser APIs they resemble, nor are they consistently
369
+ * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for
370
+ * more information.
371
+ *
372
+ * Example using the global `console`:
373
+ *
374
+ * ```js
375
+ * console.log('hello world');
376
+ * // Prints: hello world, to stdout
377
+ * console.log('hello %s', 'world');
378
+ * // Prints: hello world, to stdout
379
+ * console.error(new Error('Whoops, something bad happened'));
380
+ * // Prints error message and stack trace to stderr:
381
+ * // Error: Whoops, something bad happened
382
+ * // at [eval]:5:15
383
+ * // at Script.runInThisContext (node:vm:132:18)
384
+ * // at Object.runInThisContext (node:vm:309:38)
385
+ * // at node:internal/process/execution:77:19
386
+ * // at [eval]-wrapper:6:22
387
+ * // at evalScript (node:internal/process/execution:76:60)
388
+ * // at node:internal/main/eval_string:23:3
389
+ *
390
+ * const name = 'Will Robinson';
391
+ * console.warn(`Danger ${name}! Danger!`);
392
+ * // Prints: Danger Will Robinson! Danger!, to stderr
393
+ * ```
394
+ *
395
+ * Example using the `Console` class:
396
+ *
397
+ * ```js
398
+ * const out = getStreamSomehow();
399
+ * const err = getStreamSomehow();
400
+ * const myConsole = new console.Console(out, err);
401
+ *
402
+ * myConsole.log('hello world');
403
+ * // Prints: hello world, to out
404
+ * myConsole.log('hello %s', 'world');
405
+ * // Prints: hello world, to out
406
+ * myConsole.error(new Error('Whoops, something bad happened'));
407
+ * // Prints: [Error: Whoops, something bad happened], to err
408
+ *
409
+ * const name = 'Will Robinson';
410
+ * myConsole.warn(`Danger ${name}! Danger!`);
411
+ * // Prints: Danger Will Robinson! Danger!, to err
412
+ * ```
413
+ * @see [source](https://github.com/nodejs/node/blob/v20.11.1/lib/console.js)
414
+ */
415
+ namespace console {
416
+ interface ConsoleConstructorOptions {
417
+ stdout: NodeJS.WritableStream;
418
+ stderr?: NodeJS.WritableStream | undefined;
419
+ /**
420
+ * Ignore errors when writing to the underlying streams.
421
+ * @default true
422
+ */
423
+ ignoreErrors?: boolean | undefined;
424
+ /**
425
+ * Set color support for this `Console` instance. Setting to true enables coloring while inspecting
426
+ * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
427
+ * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
428
+ * respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
429
+ * @default auto
430
+ */
431
+ colorMode?: boolean | "auto" | undefined;
432
+ /**
433
+ * Specifies options that are passed along to
434
+ * [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options).
435
+ */
436
+ inspectOptions?: InspectOptions | undefined;
437
+ /**
438
+ * Set group indentation.
439
+ * @default 2
440
+ */
441
+ groupIndentation?: number | undefined;
442
+ }
443
+ interface ConsoleConstructor {
444
+ prototype: Console;
445
+ new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
446
+ new(options: ConsoleConstructorOptions): Console;
447
+ }
448
+ }
449
+ var console: Console;
450
+ }
451
+ export = globalThis.console;
452
+ }
@@ -0,0 +1,19 @@
1
+ /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
2
+ declare module "constants" {
3
+ import { constants as osConstants, SignalConstants } from "node:os";
4
+ import { constants as cryptoConstants } from "node:crypto";
5
+ import { constants as fsConstants } from "node:fs";
6
+
7
+ const exp:
8
+ & typeof osConstants.errno
9
+ & typeof osConstants.priority
10
+ & SignalConstants
11
+ & typeof cryptoConstants
12
+ & typeof fsConstants;
13
+ export = exp;
14
+ }
15
+
16
+ declare module "node:constants" {
17
+ import constants = require("constants");
18
+ export = constants;
19
+ }