@buape/carbon 0.13.0 → 0.15.0

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 (304) hide show
  1. package/LICENSE +1 -1
  2. package/dist/package.json +12 -8
  3. package/dist/src/abstracts/BaseCommand.d.ts +19 -3
  4. package/dist/src/abstracts/BaseCommand.d.ts.map +1 -1
  5. package/dist/src/abstracts/BaseCommand.js +55 -3
  6. package/dist/src/abstracts/BaseCommand.js.map +1 -1
  7. package/dist/src/abstracts/BaseComponent.d.ts +2 -2
  8. package/dist/src/abstracts/BaseComponent.d.ts.map +1 -1
  9. package/dist/src/abstracts/BaseInteraction.d.ts +52 -0
  10. package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -1
  11. package/dist/src/abstracts/BaseInteraction.js +43 -5
  12. package/dist/src/abstracts/BaseInteraction.js.map +1 -1
  13. package/dist/src/abstracts/BaseListener.d.ts +7 -4
  14. package/dist/src/abstracts/BaseListener.d.ts.map +1 -1
  15. package/dist/src/abstracts/BaseListener.js.map +1 -1
  16. package/dist/src/abstracts/BaseModalComponent.d.ts +3 -10
  17. package/dist/src/abstracts/BaseModalComponent.d.ts.map +1 -1
  18. package/dist/src/abstracts/BaseModalComponent.js.map +1 -1
  19. package/dist/src/abstracts/Plugin.d.ts +6 -0
  20. package/dist/src/abstracts/Plugin.d.ts.map +1 -1
  21. package/dist/src/abstracts/Plugin.js.map +1 -1
  22. package/dist/src/adapters/bun/index.d.ts +2 -2
  23. package/dist/src/adapters/bun/index.d.ts.map +1 -1
  24. package/dist/src/adapters/bun/index.js +6 -0
  25. package/dist/src/adapters/bun/index.js.map +1 -1
  26. package/dist/src/adapters/fetch/index.d.ts.map +1 -1
  27. package/dist/src/adapters/fetch/index.js +6 -0
  28. package/dist/src/adapters/fetch/index.js.map +1 -1
  29. package/dist/src/classes/Client.d.ts +111 -9
  30. package/dist/src/classes/Client.d.ts.map +1 -1
  31. package/dist/src/classes/Client.js +237 -23
  32. package/dist/src/classes/Client.js.map +1 -1
  33. package/dist/src/classes/EntryPointCommand.d.ts +11 -0
  34. package/dist/src/classes/EntryPointCommand.d.ts.map +1 -0
  35. package/dist/src/classes/EntryPointCommand.js +13 -0
  36. package/dist/src/classes/EntryPointCommand.js.map +1 -0
  37. package/dist/src/classes/Listener.d.ts +85 -83
  38. package/dist/src/classes/Listener.d.ts.map +1 -1
  39. package/dist/src/classes/Listener.js +14 -0
  40. package/dist/src/classes/Listener.js.map +1 -1
  41. package/dist/src/classes/Modal.d.ts +2 -3
  42. package/dist/src/classes/Modal.d.ts.map +1 -1
  43. package/dist/src/classes/Modal.js.map +1 -1
  44. package/dist/src/classes/RequestClient.d.ts +99 -8
  45. package/dist/src/classes/RequestClient.d.ts.map +1 -1
  46. package/dist/src/classes/RequestClient.js +406 -137
  47. package/dist/src/classes/RequestClient.js.map +1 -1
  48. package/dist/src/classes/components/Checkbox.d.ts +12 -0
  49. package/dist/src/classes/components/Checkbox.d.ts.map +1 -0
  50. package/dist/src/classes/components/Checkbox.js +20 -0
  51. package/dist/src/classes/components/Checkbox.js.map +1 -0
  52. package/dist/src/classes/components/CheckboxGroup.d.ts +24 -0
  53. package/dist/src/classes/components/CheckboxGroup.d.ts.map +1 -0
  54. package/dist/src/classes/components/CheckboxGroup.js +37 -0
  55. package/dist/src/classes/components/CheckboxGroup.js.map +1 -0
  56. package/dist/src/classes/components/Container.d.ts +6 -2
  57. package/dist/src/classes/components/Container.d.ts.map +1 -1
  58. package/dist/src/classes/components/Container.js +11 -0
  59. package/dist/src/classes/components/Container.js.map +1 -1
  60. package/dist/src/classes/components/File.d.ts +2 -2
  61. package/dist/src/classes/components/File.d.ts.map +1 -1
  62. package/dist/src/classes/components/File.js +4 -1
  63. package/dist/src/classes/components/File.js.map +1 -1
  64. package/dist/src/classes/components/FileUpload.d.ts +3 -2
  65. package/dist/src/classes/components/FileUpload.d.ts.map +1 -1
  66. package/dist/src/classes/components/FileUpload.js +2 -2
  67. package/dist/src/classes/components/FileUpload.js.map +1 -1
  68. package/dist/src/classes/components/Label.d.ts +9 -5
  69. package/dist/src/classes/components/Label.d.ts.map +1 -1
  70. package/dist/src/classes/components/Label.js +1 -2
  71. package/dist/src/classes/components/Label.js.map +1 -1
  72. package/dist/src/classes/components/MediaGallery.d.ts +8 -13
  73. package/dist/src/classes/components/MediaGallery.d.ts.map +1 -1
  74. package/dist/src/classes/components/MediaGallery.js +5 -0
  75. package/dist/src/classes/components/MediaGallery.js.map +1 -1
  76. package/dist/src/classes/components/RadioGroup.d.ts +24 -0
  77. package/dist/src/classes/components/RadioGroup.d.ts.map +1 -0
  78. package/dist/src/classes/components/RadioGroup.js +33 -0
  79. package/dist/src/classes/components/RadioGroup.js.map +1 -0
  80. package/dist/src/classes/components/Row.d.ts.map +1 -1
  81. package/dist/src/classes/components/Row.js +2 -3
  82. package/dist/src/classes/components/Row.js.map +1 -1
  83. package/dist/src/classes/components/Section.d.ts +4 -3
  84. package/dist/src/classes/components/Section.d.ts.map +1 -1
  85. package/dist/src/classes/components/Section.js +22 -0
  86. package/dist/src/classes/components/Section.js.map +1 -1
  87. package/dist/src/classes/components/TextDisplay.d.ts +2 -2
  88. package/dist/src/classes/components/TextDisplay.d.ts.map +1 -1
  89. package/dist/src/classes/components/TextDisplay.js +3 -0
  90. package/dist/src/classes/components/TextDisplay.js.map +1 -1
  91. package/dist/src/classes/components/Thumbnail.d.ts +3 -2
  92. package/dist/src/classes/components/Thumbnail.d.ts.map +1 -1
  93. package/dist/src/classes/components/Thumbnail.js +11 -0
  94. package/dist/src/classes/components/Thumbnail.js.map +1 -1
  95. package/dist/src/errors/RatelimitError.d.ts +4 -1
  96. package/dist/src/errors/RatelimitError.d.ts.map +1 -1
  97. package/dist/src/errors/RatelimitError.js +7 -1
  98. package/dist/src/errors/RatelimitError.js.map +1 -1
  99. package/dist/src/index.d.ts +4 -0
  100. package/dist/src/index.d.ts.map +1 -1
  101. package/dist/src/index.js +4 -0
  102. package/dist/src/index.js.map +1 -1
  103. package/dist/src/internals/AutocompleteInteraction.d.ts +1 -1
  104. package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -1
  105. package/dist/src/internals/BoundedExecutor.d.ts +12 -0
  106. package/dist/src/internals/BoundedExecutor.d.ts.map +1 -0
  107. package/dist/src/internals/BoundedExecutor.js +60 -0
  108. package/dist/src/internals/BoundedExecutor.js.map +1 -0
  109. package/dist/src/internals/CommandHandler.d.ts.map +1 -1
  110. package/dist/src/internals/CommandHandler.js +53 -6
  111. package/dist/src/internals/CommandHandler.js.map +1 -1
  112. package/dist/src/internals/CommandInteraction.d.ts +4 -0
  113. package/dist/src/internals/CommandInteraction.d.ts.map +1 -1
  114. package/dist/src/internals/CommandInteraction.js +30 -0
  115. package/dist/src/internals/CommandInteraction.js.map +1 -1
  116. package/dist/src/internals/ComponentHandler.d.ts +5 -10
  117. package/dist/src/internals/ComponentHandler.d.ts.map +1 -1
  118. package/dist/src/internals/ComponentHandler.js +53 -38
  119. package/dist/src/internals/ComponentHandler.js.map +1 -1
  120. package/dist/src/internals/EmojiHandler.d.ts.map +1 -1
  121. package/dist/src/internals/EmojiHandler.js +0 -1
  122. package/dist/src/internals/EmojiHandler.js.map +1 -1
  123. package/dist/src/internals/EventHandler.d.ts +28 -2
  124. package/dist/src/internals/EventHandler.d.ts.map +1 -1
  125. package/dist/src/internals/EventHandler.js +14 -11
  126. package/dist/src/internals/EventHandler.js.map +1 -1
  127. package/dist/src/internals/EventQueue.d.ts +90 -0
  128. package/dist/src/internals/EventQueue.d.ts.map +1 -0
  129. package/dist/src/internals/EventQueue.js +363 -0
  130. package/dist/src/internals/EventQueue.js.map +1 -0
  131. package/dist/src/internals/FieldsHandler.d.ts.map +1 -1
  132. package/dist/src/internals/FieldsHandler.js +10 -1
  133. package/dist/src/internals/FieldsHandler.js.map +1 -1
  134. package/dist/src/internals/OptionsHandler.d.ts +9 -1
  135. package/dist/src/internals/OptionsHandler.d.ts.map +1 -1
  136. package/dist/src/internals/OptionsHandler.js +20 -1
  137. package/dist/src/internals/OptionsHandler.js.map +1 -1
  138. package/dist/src/internals/RequestBody.d.ts +6 -0
  139. package/dist/src/internals/RequestBody.d.ts.map +1 -0
  140. package/dist/src/internals/RequestBody.js +74 -0
  141. package/dist/src/internals/RequestBody.js.map +1 -0
  142. package/dist/src/internals/RequestScheduler.d.ts +131 -0
  143. package/dist/src/internals/RequestScheduler.d.ts.map +1 -0
  144. package/dist/src/internals/RequestScheduler.js +245 -0
  145. package/dist/src/internals/RequestScheduler.js.map +1 -0
  146. package/dist/src/internals/TemporaryListenerManager.d.ts +20 -0
  147. package/dist/src/internals/TemporaryListenerManager.d.ts.map +1 -0
  148. package/dist/src/internals/TemporaryListenerManager.js +59 -0
  149. package/dist/src/internals/TemporaryListenerManager.js.map +1 -0
  150. package/dist/src/permissions.d.ts +1 -0
  151. package/dist/src/permissions.d.ts.map +1 -1
  152. package/dist/src/plugins/client-manager/ClientManager.d.ts +30 -2
  153. package/dist/src/plugins/client-manager/ClientManager.d.ts.map +1 -1
  154. package/dist/src/plugins/client-manager/ClientManager.js +93 -16
  155. package/dist/src/plugins/client-manager/ClientManager.js.map +1 -1
  156. package/dist/src/plugins/cloudflare-gateway/CloudflareGatewayDurableObject.d.ts +43 -0
  157. package/dist/src/plugins/cloudflare-gateway/CloudflareGatewayDurableObject.d.ts.map +1 -0
  158. package/dist/src/plugins/cloudflare-gateway/CloudflareGatewayDurableObject.js +210 -0
  159. package/dist/src/plugins/cloudflare-gateway/CloudflareGatewayDurableObject.js.map +1 -0
  160. package/dist/src/plugins/cloudflare-gateway/CloudflareGatewayPlugin.d.ts +16 -0
  161. package/dist/src/plugins/cloudflare-gateway/CloudflareGatewayPlugin.d.ts.map +1 -0
  162. package/dist/src/plugins/cloudflare-gateway/CloudflareGatewayPlugin.js +129 -0
  163. package/dist/src/plugins/cloudflare-gateway/CloudflareGatewayPlugin.js.map +1 -0
  164. package/dist/src/plugins/cloudflare-gateway/index.d.ts +4 -0
  165. package/dist/src/plugins/cloudflare-gateway/index.d.ts.map +1 -0
  166. package/dist/src/plugins/cloudflare-gateway/index.js +4 -0
  167. package/dist/src/plugins/cloudflare-gateway/index.js.map +1 -0
  168. package/dist/src/plugins/cloudflare-gateway/types.d.ts +63 -0
  169. package/dist/src/plugins/cloudflare-gateway/types.d.ts.map +1 -0
  170. package/dist/src/plugins/cloudflare-gateway/types.js +2 -0
  171. package/dist/src/plugins/cloudflare-gateway/types.js.map +1 -0
  172. package/dist/src/plugins/gateway/BabyCache.d.ts +13 -4
  173. package/dist/src/plugins/gateway/BabyCache.d.ts.map +1 -1
  174. package/dist/src/plugins/gateway/BabyCache.js +47 -0
  175. package/dist/src/plugins/gateway/BabyCache.js.map +1 -1
  176. package/dist/src/plugins/gateway/GatewayPlugin.d.ts +111 -19
  177. package/dist/src/plugins/gateway/GatewayPlugin.d.ts.map +1 -1
  178. package/dist/src/plugins/gateway/GatewayPlugin.js +605 -234
  179. package/dist/src/plugins/gateway/GatewayPlugin.js.map +1 -1
  180. package/dist/src/plugins/gateway/types.d.ts +33 -1
  181. package/dist/src/plugins/gateway/types.d.ts.map +1 -1
  182. package/dist/src/plugins/gateway/types.js +21 -0
  183. package/dist/src/plugins/gateway/types.js.map +1 -1
  184. package/dist/src/plugins/gateway/utils/heartbeat.d.ts +1 -0
  185. package/dist/src/plugins/gateway/utils/heartbeat.d.ts.map +1 -1
  186. package/dist/src/plugins/gateway/utils/heartbeat.js +23 -12
  187. package/dist/src/plugins/gateway/utils/heartbeat.js.map +1 -1
  188. package/dist/src/plugins/gateway/utils/payload.d.ts.map +1 -1
  189. package/dist/src/plugins/gateway/utils/payload.js +0 -4
  190. package/dist/src/plugins/gateway/utils/payload.js.map +1 -1
  191. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.d.ts +56 -3
  192. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.d.ts.map +1 -1
  193. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.js +224 -17
  194. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.js.map +1 -1
  195. package/dist/src/plugins/paginator/index.d.ts +1 -1
  196. package/dist/src/plugins/paginator/index.d.ts.map +1 -1
  197. package/dist/src/plugins/paginator/index.js +1 -1
  198. package/dist/src/plugins/paginator/index.js.map +1 -1
  199. package/dist/src/plugins/voice/GuildDeleteListener.d.ts +7 -0
  200. package/dist/src/plugins/voice/GuildDeleteListener.d.ts.map +1 -0
  201. package/dist/src/plugins/voice/GuildDeleteListener.js +11 -0
  202. package/dist/src/plugins/voice/GuildDeleteListener.js.map +1 -0
  203. package/dist/src/plugins/voice/VoicePlugin.d.ts +15 -0
  204. package/dist/src/plugins/voice/VoicePlugin.d.ts.map +1 -0
  205. package/dist/src/plugins/voice/VoicePlugin.js +58 -0
  206. package/dist/src/plugins/voice/VoicePlugin.js.map +1 -0
  207. package/dist/src/plugins/voice/VoiceServerUpdateListener.d.ts +10 -0
  208. package/dist/src/plugins/voice/VoiceServerUpdateListener.d.ts.map +1 -0
  209. package/dist/src/plugins/voice/VoiceServerUpdateListener.js +16 -0
  210. package/dist/src/plugins/voice/VoiceServerUpdateListener.js.map +1 -0
  211. package/dist/src/plugins/voice/VoiceStateUpdateListener.d.ts +10 -0
  212. package/dist/src/plugins/voice/VoiceStateUpdateListener.d.ts.map +1 -0
  213. package/dist/src/plugins/voice/VoiceStateUpdateListener.js +21 -0
  214. package/dist/src/plugins/voice/VoiceStateUpdateListener.js.map +1 -0
  215. package/dist/src/plugins/voice/index.d.ts +2 -0
  216. package/dist/src/plugins/voice/index.d.ts.map +1 -0
  217. package/dist/src/plugins/voice/index.js +2 -0
  218. package/dist/src/plugins/voice/index.js.map +1 -0
  219. package/dist/src/structures/DmChannel.d.ts +4 -0
  220. package/dist/src/structures/DmChannel.d.ts.map +1 -1
  221. package/dist/src/structures/DmChannel.js +6 -0
  222. package/dist/src/structures/DmChannel.js.map +1 -1
  223. package/dist/src/structures/GroupDmChannel.d.ts +4 -0
  224. package/dist/src/structures/GroupDmChannel.d.ts.map +1 -1
  225. package/dist/src/structures/GroupDmChannel.js +6 -0
  226. package/dist/src/structures/GroupDmChannel.js.map +1 -1
  227. package/dist/src/structures/Guild.js +1 -1
  228. package/dist/src/structures/Guild.js.map +1 -1
  229. package/dist/src/structures/GuildMember.d.ts +10 -5
  230. package/dist/src/structures/GuildMember.d.ts.map +1 -1
  231. package/dist/src/structures/GuildMember.js.map +1 -1
  232. package/dist/src/structures/Poll.d.ts +1 -1
  233. package/dist/src/structures/Poll.d.ts.map +1 -1
  234. package/dist/src/structures/User.d.ts +1 -1
  235. package/dist/src/structures/User.d.ts.map +1 -1
  236. package/dist/src/structures/User.js +3 -3
  237. package/dist/src/structures/User.js.map +1 -1
  238. package/dist/src/structures/Webhook.d.ts +4 -2
  239. package/dist/src/structures/Webhook.d.ts.map +1 -1
  240. package/dist/src/structures/Webhook.js +42 -29
  241. package/dist/src/structures/Webhook.js.map +1 -1
  242. package/dist/src/types/commandMiddleware.d.ts +64 -0
  243. package/dist/src/types/commandMiddleware.d.ts.map +1 -0
  244. package/dist/src/types/commandMiddleware.js +2 -0
  245. package/dist/src/types/commandMiddleware.js.map +1 -0
  246. package/dist/src/types/index.d.ts +58 -1
  247. package/dist/src/types/index.d.ts.map +1 -1
  248. package/dist/src/types/index.js +1 -0
  249. package/dist/src/types/index.js.map +1 -1
  250. package/dist/src/types/listeners.d.ts +15 -4
  251. package/dist/src/types/listeners.d.ts.map +1 -1
  252. package/dist/src/types/listeners.js.map +1 -1
  253. package/dist/src/utils/LRUCache.d.ts +46 -0
  254. package/dist/src/utils/LRUCache.d.ts.map +1 -0
  255. package/dist/src/utils/LRUCache.js +78 -0
  256. package/dist/src/utils/LRUCache.js.map +1 -0
  257. package/dist/src/utils/customIdParser.d.ts.map +1 -1
  258. package/dist/src/utils/customIdParser.js +6 -2
  259. package/dist/src/utils/customIdParser.js.map +1 -1
  260. package/dist/src/utils/payload.d.ts.map +1 -1
  261. package/dist/src/utils/payload.js +18 -1
  262. package/dist/src/utils/payload.js.map +1 -1
  263. package/dist/tsconfig.tsbuildinfo +1 -1
  264. package/package.json +12 -8
  265. package/dist/src/classes/ApplicationManager.d.ts +0 -88
  266. package/dist/src/classes/ApplicationManager.d.ts.map +0 -1
  267. package/dist/src/classes/ApplicationManager.js +0 -179
  268. package/dist/src/classes/ApplicationManager.js.map +0 -1
  269. package/dist/src/classes/ClientWithCaching.d.ts +0 -51
  270. package/dist/src/classes/ClientWithCaching.d.ts.map +0 -1
  271. package/dist/src/classes/ClientWithCaching.js +0 -108
  272. package/dist/src/classes/ClientWithCaching.js.map +0 -1
  273. package/dist/src/classes/components/ModalChannelSelectMenu.d.ts +0 -62
  274. package/dist/src/classes/components/ModalChannelSelectMenu.d.ts.map +0 -1
  275. package/dist/src/classes/components/ModalChannelSelectMenu.js +0 -73
  276. package/dist/src/classes/components/ModalChannelSelectMenu.js.map +0 -1
  277. package/dist/src/classes/components/ModalMentionableSelectMenu.d.ts +0 -58
  278. package/dist/src/classes/components/ModalMentionableSelectMenu.d.ts.map +0 -1
  279. package/dist/src/classes/components/ModalMentionableSelectMenu.js +0 -68
  280. package/dist/src/classes/components/ModalMentionableSelectMenu.js.map +0 -1
  281. package/dist/src/classes/components/ModalRoleSelectMenu.d.ts +0 -58
  282. package/dist/src/classes/components/ModalRoleSelectMenu.d.ts.map +0 -1
  283. package/dist/src/classes/components/ModalRoleSelectMenu.js +0 -68
  284. package/dist/src/classes/components/ModalRoleSelectMenu.js.map +0 -1
  285. package/dist/src/classes/components/ModalStringSelectMenu.d.ts +0 -58
  286. package/dist/src/classes/components/ModalStringSelectMenu.d.ts.map +0 -1
  287. package/dist/src/classes/components/ModalStringSelectMenu.js +0 -64
  288. package/dist/src/classes/components/ModalStringSelectMenu.js.map +0 -1
  289. package/dist/src/classes/components/ModalUserSelectMenu.d.ts +0 -58
  290. package/dist/src/classes/components/ModalUserSelectMenu.d.ts.map +0 -1
  291. package/dist/src/classes/components/ModalUserSelectMenu.js +0 -68
  292. package/dist/src/classes/components/ModalUserSelectMenu.js.map +0 -1
  293. package/dist/src/internals/Cache.d.ts +0 -76
  294. package/dist/src/internals/Cache.d.ts.map +0 -1
  295. package/dist/src/internals/Cache.js +0 -122
  296. package/dist/src/internals/Cache.js.map +0 -1
  297. package/dist/src/plugins/multi-app/ApplicationManager.d.ts +0 -120
  298. package/dist/src/plugins/multi-app/ApplicationManager.d.ts.map +0 -1
  299. package/dist/src/plugins/multi-app/ApplicationManager.js +0 -207
  300. package/dist/src/plugins/multi-app/ApplicationManager.js.map +0 -1
  301. package/dist/src/plugins/multi-app/index.d.ts +0 -2
  302. package/dist/src/plugins/multi-app/index.d.ts.map +0 -1
  303. package/dist/src/plugins/multi-app/index.js +0 -2
  304. package/dist/src/plugins/multi-app/index.js.map +0 -1
@@ -1,122 +0,0 @@
1
- export class Cache {
2
- cache = new Map();
3
- defaultExpiry = 1000 * 60 * 60 * 24; // 1 day
4
- constructor(options = {}) {
5
- if (options.defaultExpiry) {
6
- this.defaultExpiry = options.defaultExpiry;
7
- }
8
- }
9
- /**
10
- * Get a value from the cache
11
- * @param key The key to get
12
- * @returns The value if it exists and hasn't expired, undefined otherwise
13
- */
14
- get(key) {
15
- const entry = this.cache.get(key);
16
- if (!entry)
17
- return undefined;
18
- if (entry.expiresAt && entry.expiresAt < Date.now()) {
19
- this.delete(key);
20
- return undefined;
21
- }
22
- return entry.value;
23
- }
24
- /**
25
- * Set a value in the cache
26
- * @param key The key to set
27
- * @param value The value to set
28
- * @param expiresIn Optional time in milliseconds until the entry expires
29
- */
30
- set(key, value, expiresIn) {
31
- const expiresAt = expiresIn ? Date.now() + expiresIn : this.defaultExpiry;
32
- this.cache.set(key, { value, expiresAt });
33
- }
34
- /**
35
- * Delete a value from the cache
36
- * @param key The key to delete
37
- * @returns Whether the key was deleted
38
- */
39
- delete(key) {
40
- return this.cache.delete(key);
41
- }
42
- /**
43
- * Clear all values of a specific type from the cache
44
- * @param type The type to clear
45
- */
46
- clearType(type) {
47
- for (const [key] of this.cache) {
48
- if (key === type) {
49
- this.delete(key);
50
- }
51
- }
52
- }
53
- /**
54
- * Clear all values from the cache
55
- */
56
- clear() {
57
- this.cache.clear();
58
- }
59
- /**
60
- * Get the size of the cache
61
- */
62
- get size() {
63
- return this.cache.size;
64
- }
65
- /**
66
- * Check if a key exists in the cache and hasn't expired
67
- * @param key The key to check
68
- */
69
- has(key) {
70
- const entry = this.cache.get(key);
71
- if (!entry)
72
- return false;
73
- if (entry.expiresAt && entry.expiresAt < Date.now()) {
74
- this.delete(key);
75
- return false;
76
- }
77
- return true;
78
- }
79
- /**
80
- * Get all keys in the cache that haven't expired
81
- */
82
- keys() {
83
- const keys = [];
84
- for (const [key, entry] of this.cache) {
85
- if (entry.expiresAt && entry.expiresAt < Date.now()) {
86
- this.delete(key);
87
- continue;
88
- }
89
- keys.push(key);
90
- }
91
- return keys;
92
- }
93
- /**
94
- * Get all values in the cache that haven't expired
95
- */
96
- values() {
97
- const values = [];
98
- for (const [key, entry] of this.cache) {
99
- if (entry.expiresAt && entry.expiresAt < Date.now()) {
100
- this.delete(key);
101
- continue;
102
- }
103
- values.push(entry.value);
104
- }
105
- return values;
106
- }
107
- /**
108
- * Get all entries in the cache that haven't expired
109
- */
110
- entries() {
111
- const entries = [];
112
- for (const [key, entry] of this.cache) {
113
- if (entry.expiresAt && entry.expiresAt < Date.now()) {
114
- this.delete(key);
115
- continue;
116
- }
117
- entries.push([key, entry.value]);
118
- }
119
- return entries;
120
- }
121
- }
122
- //# sourceMappingURL=Cache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../src/internals/Cache.ts"],"names":[],"mappings":"AAyBA,MAAM,OAAO,KAAK;IAIT,KAAK,GAA0B,IAAI,GAAG,EAAE,CAAA;IACxC,aAAa,GAAW,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA,CAAC,QAAQ;IAE5D,YAAY,UAAw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,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACzB,CAAC;QACD,OAAO,MAAM,CAAA;IACd,CAAC;IAED;;OAEG;IACI,OAAO;QACb,MAAM,OAAO,GAAa,EAAE,CAAA;QAC5B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACvC,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;gBACrD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;gBAChB,SAAQ;YACT,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;QACjC,CAAC;QACD,OAAO,OAAO,CAAA;IACf,CAAC;CACD"}
@@ -1,120 +0,0 @@
1
- import type { Context, Route } from "../../abstracts/Plugin.js";
2
- import { Client, type ClientOptions } from "../../classes/Client.js";
3
- /**
4
- * Credentials for a single application in the ApplicationManager
5
- */
6
- export interface ApplicationCredentials {
7
- /**
8
- * The client ID of the application - must be a valid Discord snowflake
9
- */
10
- clientId: string;
11
- /**
12
- * The public key of the app, used for interaction verification
13
- * Can be a single key or an array of keys
14
- */
15
- publicKey: string | string[];
16
- /**
17
- * The token of the bot
18
- */
19
- token: string;
20
- }
21
- /**
22
- * Options for the ApplicationManager
23
- */
24
- export interface ApplicationManagerOptions {
25
- /**
26
- * Shared options that apply to all applications
27
- */
28
- sharedOptions: Omit<ClientOptions, "clientId" | "publicKey" | "token">;
29
- /**
30
- * Array of application credentials.
31
- * If you need dynamic application loading (e.g., from a database),
32
- * extend ApplicationManager and override getClient/getAllClients/getClientIds instead.
33
- */
34
- applications?: ApplicationCredentials[];
35
- }
36
- /**
37
- * Manages multiple Discord applications, routing requests to the appropriate client
38
- * based on the client ID in the URL path (/:clientId/*)
39
- *
40
- * To use with a database, extend this class and override:
41
- * - getClient(clientId) - Return the client for a specific ID (or create it)
42
- * - getAllClients() - Return all available clients
43
- * - getClientIds() - Return all available client IDs
44
- *
45
- * Then call setupClient(credentials) to create clients on-demand.
46
- */
47
- export declare class ApplicationManager {
48
- /**
49
- * The routes that the application manager will handle
50
- */
51
- routes: Route[];
52
- /**
53
- * The shared deploy secret used for all applications
54
- */
55
- protected deploySecret?: string;
56
- /**
57
- * Shared options that apply to all applications
58
- * Protected to allow subclasses to use it when creating clients
59
- */
60
- protected sharedOptions: Omit<ClientOptions, "clientId" | "publicKey" | "token">;
61
- private clients;
62
- private staticApplications;
63
- private initialHandlers;
64
- private initialPlugins;
65
- /**
66
- * Creates a new ApplicationManager
67
- * @param options Configuration options including shared settings and per-app credentials
68
- */
69
- constructor(options: ApplicationManagerOptions, handlers: ConstructorParameters<typeof Client>[1], plugins: ConstructorParameters<typeof Client>[2]);
70
- /**
71
- * Setup a client from credentials.
72
- *
73
- * @param credentials The application credentials
74
- * @returns A configured Client instance
75
- */
76
- setupClient(credentials: ApplicationCredentials, recreate?: boolean): Client;
77
- /**
78
- * Set up the routing for the application manager
79
- */
80
- private setupRoutes;
81
- /**
82
- * Deploy all applications
83
- */
84
- private handleGlobalDeploy;
85
- /**
86
- * Handle a request and route it to the appropriate client
87
- * @param req The incoming request
88
- * @param ctx Optional context (for Cloudflare Workers, etc.)
89
- */
90
- handleRequest(req: Request, ctx?: Context): Promise<Response>;
91
- private handleProxyRequest;
92
- /**
93
- * Get a client by its client ID
94
- * @param clientId The client ID to look up
95
- */
96
- getClient(clientId: string): Client | undefined;
97
- /**
98
- * Get all clients that the manager is managing
99
- */
100
- getAllClients(): Client[];
101
- /**
102
- * Get all client IDs that the manager is managing
103
- */
104
- getClientIds(): string[];
105
- /**
106
- * Get all applications
107
- * You can override this in an extended class to return dynamic applications
108
- */
109
- getApplications(): Promise<ApplicationCredentials[]>;
110
- /**
111
- * Get an application by its client ID
112
- * You can override this in an extended class to return dynamic applications
113
- */
114
- getApplication(clientId: string): Promise<ApplicationCredentials | undefined>;
115
- /**
116
- * Validate if a string is a valid Discord snowflake
117
- */
118
- protected isValidClientId(id: string): boolean;
119
- }
120
- //# sourceMappingURL=ApplicationManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApplicationManager.d.ts","sourceRoot":"","sources":["../../../../src/plugins/multi-app/ApplicationManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEpE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC;;OAEG;IACH,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,CAAA;IACtE;;;;OAIG;IACH,YAAY,CAAC,EAAE,sBAAsB,EAAE,CAAA;CACvC;AAED;;;;;;;;;;GAUG;AACH,qBAAa,kBAAkB;IAC9B;;OAEG;IACH,MAAM,EAAE,KAAK,EAAE,CAAK;IAEpB;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAE/B;;;OAGG;IACH,SAAS,CAAC,aAAa,EAAE,IAAI,CAC5B,aAAa,EACb,UAAU,GAAG,WAAW,GAAG,OAAO,CAClC,CAAA;IAED,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,kBAAkB,CAA0B;IACpD,OAAO,CAAC,eAAe,CAAyC;IAChE,OAAO,CAAC,cAAc,CAAyC;IAE/D;;;OAGG;gBAEF,OAAO,EAAE,yBAAyB,EAClC,QAAQ,EAAE,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,EACjD,OAAO,EAAE,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IAejD;;;;;OAKG;IACI,WAAW,CACjB,WAAW,EAAE,sBAAsB,EACnC,QAAQ,UAAQ,GACd,MAAM;IAkCT;;OAEG;IACH,OAAO,CAAC,WAAW;IAsBnB;;OAEG;YACW,kBAAkB;IA8BhC;;;;OAIG;IACG,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;YAqDrD,kBAAkB;IAOhC;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI/C;;OAEG;IACH,aAAa,IAAI,MAAM,EAAE;IAIzB;;OAEG;IACH,YAAY,IAAI,MAAM,EAAE;IAIxB;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,sBAAsB,EAAE,CAAC;IAI1D;;;OAGG;IACG,cAAc,CACnB,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAI9C;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;CAG9C"}
@@ -1,207 +0,0 @@
1
- import { Client } from "../../classes/Client.js";
2
- /**
3
- * Manages multiple Discord applications, routing requests to the appropriate client
4
- * based on the client ID in the URL path (/:clientId/*)
5
- *
6
- * To use with a database, extend this class and override:
7
- * - getClient(clientId) - Return the client for a specific ID (or create it)
8
- * - getAllClients() - Return all available clients
9
- * - getClientIds() - Return all available client IDs
10
- *
11
- * Then call setupClient(credentials) to create clients on-demand.
12
- */
13
- export class ApplicationManager {
14
- /**
15
- * The routes that the application manager will handle
16
- */
17
- routes = [];
18
- /**
19
- * The shared deploy secret used for all applications
20
- */
21
- deploySecret;
22
- /**
23
- * Shared options that apply to all applications
24
- * Protected to allow subclasses to use it when creating clients
25
- */
26
- sharedOptions;
27
- clients = new Map();
28
- staticApplications;
29
- initialHandlers;
30
- initialPlugins;
31
- /**
32
- * Creates a new ApplicationManager
33
- * @param options Configuration options including shared settings and per-app credentials
34
- */
35
- constructor(options, handlers, plugins) {
36
- this.sharedOptions = options.sharedOptions;
37
- this.deploySecret = options.sharedOptions.deploySecret;
38
- this.staticApplications = options.applications ?? [];
39
- this.initialHandlers = handlers;
40
- this.initialPlugins = plugins;
41
- this.setupRoutes();
42
- for (const app of this.staticApplications) {
43
- this.setupClient(app);
44
- }
45
- }
46
- /**
47
- * Setup a client from credentials.
48
- *
49
- * @param credentials The application credentials
50
- * @returns A configured Client instance
51
- */
52
- setupClient(credentials, recreate = false) {
53
- const existing = this.getClient(credentials.clientId);
54
- if (existing && !recreate) {
55
- throw new Error(`Client ${credentials.clientId} already exists. If you want to recreate it, pass true to the recreate parameter.`);
56
- }
57
- if (existing && recreate) {
58
- this.clients.delete(credentials.clientId);
59
- }
60
- if (!this.isValidClientId(credentials.clientId)) {
61
- throw new Error(`Invalid client ID: ${credentials.clientId}. Client ID must be a valid Discord snowflake (17-19 digits).`);
62
- }
63
- const clientOptions = {
64
- ...this.sharedOptions,
65
- clientId: credentials.clientId,
66
- publicKey: credentials.publicKey,
67
- token: credentials.token
68
- };
69
- const client = new Client(clientOptions, this.initialHandlers, this.initialPlugins);
70
- this.clients.set(credentials.clientId, client);
71
- return client;
72
- }
73
- /**
74
- * Set up the routing for the application manager
75
- */
76
- setupRoutes() {
77
- this.routes.push({
78
- method: "GET",
79
- path: "/deploy",
80
- handler: this.handleGlobalDeploy.bind(this),
81
- protected: true,
82
- disabled: !this.deploySecret
83
- });
84
- this.routes.push({
85
- method: "POST",
86
- path: "/:clientId/*",
87
- handler: this.handleProxyRequest.bind(this)
88
- });
89
- this.routes.push({
90
- method: "GET",
91
- path: "/:clientId/*",
92
- handler: this.handleProxyRequest.bind(this)
93
- });
94
- }
95
- /**
96
- * Deploy all applications
97
- */
98
- async handleGlobalDeploy(req) {
99
- if (this.deploySecret) {
100
- const url = new URL(req.url);
101
- const secret = url.searchParams.get("secret");
102
- if (secret !== this.deploySecret) {
103
- return new Response("Unauthorized", { status: 401 });
104
- }
105
- }
106
- const results = [];
107
- const clientIds = this.getClientIds();
108
- for (const clientId of clientIds) {
109
- const client = this.getClient(clientId);
110
- if (!client)
111
- continue;
112
- try {
113
- await client.handleDeployRequest();
114
- results.push({ clientId, status: "success" });
115
- }
116
- catch (error) {
117
- results.push({
118
- clientId,
119
- status: `error: ${error instanceof Error ? error.message : String(error)}`
120
- });
121
- }
122
- }
123
- return Response.json(results, { status: 200 });
124
- }
125
- /**
126
- * Handle a request and route it to the appropriate client
127
- * @param req The incoming request
128
- * @param ctx Optional context (for Cloudflare Workers, etc.)
129
- */
130
- async handleRequest(req, ctx) {
131
- const url = new URL(req.url);
132
- if (url.pathname === "/deploy" && req.method === "GET") {
133
- return this.handleGlobalDeploy(req);
134
- }
135
- const pathParts = url.pathname.split("/").filter(Boolean);
136
- if (pathParts.length < 2) {
137
- return new Response("Bad Request: Invalid path format", { status: 400 });
138
- }
139
- const clientId = pathParts[0];
140
- if (!clientId) {
141
- return new Response("Bad Request: Missing client ID", { status: 400 });
142
- }
143
- const client = this.getClient(clientId);
144
- if (!client) {
145
- return new Response(`Not Found: No application with client ID ${clientId}`, {
146
- status: 404
147
- });
148
- }
149
- const remainingPath = `/${pathParts.slice(1).join("/")}`;
150
- const route = client.routes.find((r) => r.path === remainingPath && r.method === req.method && !r.disabled);
151
- if (!route) {
152
- return new Response(`Not Found: No route ${req.method} ${remainingPath}`, {
153
- status: 404
154
- });
155
- }
156
- if (route.protected) {
157
- const secret = url.searchParams.get("secret");
158
- if (secret !== client.options.deploySecret) {
159
- return new Response("Unauthorized", { status: 401 });
160
- }
161
- }
162
- return route.handler(req, ctx);
163
- }
164
- async handleProxyRequest(req, ctx) {
165
- return this.handleRequest(req, ctx);
166
- }
167
- /**
168
- * Get a client by its client ID
169
- * @param clientId The client ID to look up
170
- */
171
- getClient(clientId) {
172
- return this.clients.get(clientId);
173
- }
174
- /**
175
- * Get all clients that the manager is managing
176
- */
177
- getAllClients() {
178
- return Array.from(this.clients.values());
179
- }
180
- /**
181
- * Get all client IDs that the manager is managing
182
- */
183
- getClientIds() {
184
- return Array.from(this.clients.keys());
185
- }
186
- /**
187
- * Get all applications
188
- * You can override this in an extended class to return dynamic applications
189
- */
190
- async getApplications() {
191
- return this.staticApplications;
192
- }
193
- /**
194
- * Get an application by its client ID
195
- * You can override this in an extended class to return dynamic applications
196
- */
197
- async getApplication(clientId) {
198
- return this.staticApplications.find((app) => app.clientId === clientId);
199
- }
200
- /**
201
- * Validate if a string is a valid Discord snowflake
202
- */
203
- isValidClientId(id) {
204
- return /^\d{17,19}$/.test(id);
205
- }
206
- }
207
- //# sourceMappingURL=ApplicationManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApplicationManager.js","sourceRoot":"","sources":["../../../../src/plugins/multi-app/ApplicationManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAsB,MAAM,yBAAyB,CAAA;AAqCpE;;;;;;;;;;GAUG;AACH,MAAM,OAAO,kBAAkB;IAC9B;;OAEG;IACH,MAAM,GAAY,EAAE,CAAA;IAEpB;;OAEG;IACO,YAAY,CAAS;IAE/B;;;OAGG;IACO,aAAa,CAGtB;IAEO,OAAO,GAAwB,IAAI,GAAG,EAAE,CAAA;IACxC,kBAAkB,CAA0B;IAC5C,eAAe,CAAyC;IACxD,cAAc,CAAyC;IAE/D;;;OAGG;IACH,YACC,OAAkC,EAClC,QAAiD,EACjD,OAAgD;QAEhD,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAA;QAC1C,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,YAAY,CAAA;QACtD,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,YAAY,IAAI,EAAE,CAAA;QACpD,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAA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AAG,CAAC,CAAA;IACpC,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,QAAgB;QACzB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAClC,CAAC;IAED;;OAEG;IACH,aAAa;QACZ,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IACzC,CAAC;IAED;;OAEG;IACH,YAAY;QACX,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;IACvC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,eAAe;QACpB,OAAO,IAAI,CAAC,kBAAkB,CAAA;IAC/B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,cAAc,CACnB,QAAgB;QAEhB,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAA;IACxE,CAAC;IAED;;OAEG;IACO,eAAe,CAAC,EAAU;QACnC,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC9B,CAAC;CACD"}
@@ -1,2 +0,0 @@
1
- export { type ApplicationCredentials, ApplicationManager, type ApplicationManagerOptions } from "./ApplicationManager.js";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/multi-app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,sBAAsB,EAC3B,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,MAAM,yBAAyB,CAAA"}
@@ -1,2 +0,0 @@
1
- export { ApplicationManager } from "./ApplicationManager.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/multi-app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,kBAAkB,EAElB,MAAM,yBAAyB,CAAA"}