commandkit 1.2.0-dev.20251125125452 → 1.2.0-dev.20260114150514

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 (320) hide show
  1. package/{COPYING.md → LICENSE.md} +3 -3
  2. package/README.md +3 -3
  3. package/dist/{ActionRow-BtKd-ZRS.d.ts → ActionRow-B-CGmjDp.d.ts} +2 -3
  4. package/dist/{ActionRow-D6knpVd6.js → ActionRow-CSN_UKmM.js} +2 -2
  5. package/dist/{ActionRow-D6knpVd6.js.map → ActionRow-CSN_UKmM.js.map} +1 -1
  6. package/dist/{Button-DiXeKdXO.d.ts → Button-C-GPeFA3.d.ts} +5 -6
  7. package/dist/{ButtonKit-B_HCmb3D.d.ts → ButtonKit-DKu0VAe4.d.ts} +35 -36
  8. package/dist/{ChannelSelectMenuKit-DrsqXWiO.d.ts → ChannelSelectMenuKit-HQZ4hH5s.d.ts} +33 -34
  9. package/dist/{CommandKitEventsChannel-2l9Za-le.js → CommandKitEventsChannel-CnT5ymYe.js} +2 -2
  10. package/dist/{CommandKitEventsChannel-2l9Za-le.js.map → CommandKitEventsChannel-CnT5ymYe.js.map} +1 -1
  11. package/dist/{CommandsRouter-Bdkx7SZS.d.ts → CommandsRouter-C7dZEepB.d.ts} +48 -49
  12. package/dist/{CommandsRouter-NAgpWzTJ.js → CommandsRouter-C_HLsrGX.js} +2 -2
  13. package/dist/{CommandsRouter-NAgpWzTJ.js.map → CommandsRouter-C_HLsrGX.js.map} +1 -1
  14. package/dist/{CompilerPlugin-DbN5-ls3.js → CompilerPlugin-CUsGAfgl.js} +2 -2
  15. package/dist/{CompilerPlugin-DbN5-ls3.js.map → CompilerPlugin-CUsGAfgl.js.map} +1 -1
  16. package/dist/EventInterceptor-BWoEJMHZ.js.map +1 -1
  17. package/dist/{EventInterceptor-Dk5Fwu-7.d.ts → EventInterceptor-CZmWpS08.d.ts} +39 -39
  18. package/dist/{EventWorkerContext-yTm5vI3b.js → EventWorkerContext-Dfhgv329.js} +2 -2
  19. package/dist/{EventWorkerContext-yTm5vI3b.js.map → EventWorkerContext-Dfhgv329.js.map} +1 -1
  20. package/dist/{EventsRouter-bILsV3Lh.d.ts → EventsRouter-DZ37r54v.d.ts} +34 -34
  21. package/dist/{EventsRouter-D4_vBMhl.js → EventsRouter-DZYIha6m.js} +2 -2
  22. package/dist/{EventsRouter-D4_vBMhl.js.map → EventsRouter-DZYIha6m.js.map} +1 -1
  23. package/dist/{MentionableSelectMenuKit-DNan_JWk.d.ts → MentionableSelectMenuKit-7URDUM3-.d.ts} +33 -34
  24. package/dist/{MessageCommandParser-CD7ynlBO.js → MessageCommandParser-Bs9fimmd.js} +2 -2
  25. package/dist/{MessageCommandParser-CD7ynlBO.js.map → MessageCommandParser-Bs9fimmd.js.map} +1 -1
  26. package/dist/MessageCommandParser-q3dQcE5N.d.ts +194 -0
  27. package/dist/{Modal-Dd5plFpo.d.ts → Modal-CZT9MZsy.d.ts} +7 -8
  28. package/dist/{ModalKit-C8WkeoDl.d.ts → ModalKit-BWXI3Z26.d.ts} +32 -33
  29. package/dist/{PluginCommon-Bp5T3ubs.js → PluginCommon-BLxWww5u.js} +6 -6
  30. package/dist/{PluginCommon-Bp5T3ubs.js.map → PluginCommon-BLxWww5u.js.map} +1 -1
  31. package/dist/{RoleSelectMenuKit-FfGw3CSa.d.ts → RoleSelectMenuKit-BY-JJ18w.d.ts} +33 -34
  32. package/dist/{RuntimePlugin-Bq6z-Upz.js → RuntimePlugin-CtobluSU.js} +2 -2
  33. package/dist/{RuntimePlugin-Bq6z-Upz.js.map → RuntimePlugin-CtobluSU.js.map} +1 -1
  34. package/dist/{SelectMenu-DTWKY-JJ.d.ts → SelectMenu-q_b3Mjv9.d.ts} +8 -9
  35. package/dist/{StringSelectMenuKit-BMA0rjhA.d.ts → StringSelectMenuKit-lVhUMc3g.d.ts} +33 -34
  36. package/dist/{UserSelectMenuKit-CRpFbwA9.d.ts → UserSelectMenuKit-CCj4Fpkr.d.ts} +33 -34
  37. package/dist/analytics/analytics-engine.d.ts +1 -33
  38. package/dist/analytics/analytics-engine.js +21 -36
  39. package/dist/analytics/analytics-provider.d.ts +1 -33
  40. package/dist/analytics/constants.js +1 -1
  41. package/dist/analytics/utils.js +21 -36
  42. package/dist/{analytics-engine-DHmLGxFA.d.ts → analytics-engine-WQhXmx3H.d.ts} +840 -840
  43. package/dist/app/commands/AppCommandRunner.d.ts +1 -33
  44. package/dist/app/commands/AppCommandRunner.js +21 -36
  45. package/dist/app/commands/Context.d.ts +1 -33
  46. package/dist/app/commands/Context.js +21 -36
  47. package/dist/app/commands/MessageCommandParser.d.ts +1 -1
  48. package/dist/app/commands/MessageCommandParser.js +1 -2
  49. package/dist/app/commands/helpers.d.ts +1 -1
  50. package/dist/app/commands/helpers.js +1 -1
  51. package/dist/app/events/EventWorkerContext.d.ts +42 -35
  52. package/dist/app/events/EventWorkerContext.js +1 -1
  53. package/dist/app/handlers/AppCommandHandler.d.ts +1 -33
  54. package/dist/app/handlers/AppCommandHandler.js +21 -36
  55. package/dist/app/handlers/AppEventsHandler.d.ts +1 -33
  56. package/dist/app/handlers/AppEventsHandler.js +21 -36
  57. package/dist/app/index.d.ts +4 -33
  58. package/dist/app/index.js +21 -37
  59. package/dist/app/interrupt/signals.d.ts +1 -1
  60. package/dist/app/interrupt/signals.js +2 -3
  61. package/dist/app/middlewares/permissions.d.ts +1 -33
  62. package/dist/app/middlewares/permissions.js +21 -36
  63. package/dist/app/register/CommandRegistrar.d.ts +1 -33
  64. package/dist/app/register/CommandRegistrar.js +21 -36
  65. package/dist/app/router/CommandsRouter.d.ts +1 -1
  66. package/dist/app/router/CommandsRouter.js +1 -1
  67. package/dist/app/router/EventsRouter.d.ts +1 -1
  68. package/dist/app/router/EventsRouter.js +1 -1
  69. package/dist/app/router/index.d.ts +2 -3
  70. package/dist/app/router/index.js +2 -2
  71. package/dist/{chunk-nOFOJqeH.js → chunk-kSYXY2_d.js} +10 -6
  72. package/dist/cli/app-process.d.ts +0 -1
  73. package/dist/cli/app-process.js +61 -6
  74. package/dist/cli/app-process.js.map +1 -0
  75. package/dist/cli/build.d.ts +2 -33
  76. package/dist/cli/build.js +189 -42
  77. package/dist/cli/build.js.map +1 -0
  78. package/dist/cli/common.d.ts +1 -33
  79. package/dist/cli/common.js +3 -3
  80. package/dist/cli/development.d.ts +1 -2
  81. package/dist/cli/development.js +30 -44
  82. package/dist/cli/development.js.map +1 -1
  83. package/dist/cli/env.js +1 -1
  84. package/dist/cli/generators.js +4 -4
  85. package/dist/cli/generators.js.map +1 -1
  86. package/dist/cli/information.js +2 -2
  87. package/dist/cli/information.js.map +1 -1
  88. package/dist/cli/init.d.ts +0 -1
  89. package/dist/cli/init.js +27 -41
  90. package/dist/cli/init.js.map +1 -1
  91. package/dist/cli/production.d.ts +0 -1
  92. package/dist/cli/production.js +33 -47
  93. package/dist/cli/production.js.map +1 -1
  94. package/dist/cli/type-checker.js +4 -4
  95. package/dist/cli/utils.d.ts +0 -1
  96. package/dist/cli/utils.js +17 -2
  97. package/dist/cli/utils.js.map +1 -0
  98. package/dist/{colors-CLmBiP9I.js → colors-Csc0X4QJ.js} +2 -2
  99. package/dist/{colors-CLmBiP9I.js.map → colors-Csc0X4QJ.js.map} +1 -1
  100. package/dist/{commandkit-B0wT0Mxx.js → commandkit-SIjTLD2R.js} +31 -31
  101. package/dist/{commandkit-B0wT0Mxx.js.map → commandkit-SIjTLD2R.js.map} +1 -1
  102. package/dist/commandkit.d.ts +1 -33
  103. package/dist/commandkit.js +21 -36
  104. package/dist/{common-B2-sF49Q.js → common-DSRs_mfw.js} +6 -6
  105. package/dist/{common-B2-sF49Q.js.map → common-DSRs_mfw.js.map} +1 -1
  106. package/dist/{common-DAxu7-kG.d.ts → common-DnwCYit8.d.ts} +2 -3
  107. package/dist/components/common/EventInterceptor.d.ts +1 -1
  108. package/dist/components/common/element.d.ts +1 -4
  109. package/dist/components/common/types.d.ts +1 -1
  110. package/dist/components/common/types.js +0 -1
  111. package/dist/components/display/common.d.ts +0 -1
  112. package/dist/components/display/container.d.ts +1 -1
  113. package/dist/components/display/container.js +1 -2
  114. package/dist/components/display/file.d.ts +1 -1
  115. package/dist/components/display/file.js +1 -1
  116. package/dist/components/display/index.d.ts +8 -9
  117. package/dist/components/display/index.js +8 -9
  118. package/dist/components/display/label.d.ts +1 -1
  119. package/dist/components/display/label.js +1 -2
  120. package/dist/components/display/media-gallery.d.ts +1 -1
  121. package/dist/components/display/media-gallery.js +1 -2
  122. package/dist/components/display/poll.d.ts +1 -1
  123. package/dist/components/display/poll.js +1 -1
  124. package/dist/components/display/section.d.ts +1 -1
  125. package/dist/components/display/section.js +1 -2
  126. package/dist/components/display/separator.d.ts +1 -1
  127. package/dist/components/display/separator.js +1 -1
  128. package/dist/components/display/text-display.d.ts +1 -1
  129. package/dist/components/display/text-display.js +1 -1
  130. package/dist/components/index.d.ts +22 -25
  131. package/dist/components/index.js +21 -35
  132. package/dist/components/interactive/action-row/ActionRow.d.ts +1 -5
  133. package/dist/components/interactive/action-row/ActionRow.js +1 -1
  134. package/dist/components/interactive/button/Button.d.ts +1 -6
  135. package/dist/components/interactive/button/Button.js +21 -36
  136. package/dist/components/interactive/button/ButtonKit.d.ts +1 -2
  137. package/dist/components/interactive/button/ButtonKit.js +21 -36
  138. package/dist/components/interactive/modal/Modal.d.ts +1 -6
  139. package/dist/components/interactive/modal/Modal.js +21 -36
  140. package/dist/components/interactive/modal/ModalKit.d.ts +1 -2
  141. package/dist/components/interactive/modal/ModalKit.js +21 -36
  142. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +1 -3
  143. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +21 -36
  144. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +1 -3
  145. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +21 -36
  146. package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +1 -3
  147. package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +21 -36
  148. package/dist/components/interactive/select-menu/SelectMenu.d.ts +1 -9
  149. package/dist/components/interactive/select-menu/SelectMenu.js +21 -36
  150. package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +1 -3
  151. package/dist/components/interactive/select-menu/StringSelectMenuKit.js +21 -36
  152. package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +1 -3
  153. package/dist/components/interactive/select-menu/UserSelectMenuKit.js +21 -36
  154. package/dist/components/interactive/select-menu/common.d.ts +1 -2
  155. package/dist/components/interactive/select-menu/common.js +0 -1
  156. package/dist/config/config.d.ts +15 -35
  157. package/dist/config/config.js +21 -36
  158. package/dist/config/default.d.ts +1 -33
  159. package/dist/config/default.js +21 -36
  160. package/dist/config/loader.d.ts +1 -33
  161. package/dist/config/loader.js +21 -36
  162. package/dist/config/types.d.ts +1 -33
  163. package/dist/config/utils.d.ts +1 -33
  164. package/dist/constants-BFFK-hfP.js +27 -0
  165. package/dist/{constants-Dy6P2veX.js.map → constants-BFFK-hfP.js.map} +1 -1
  166. package/dist/{constants-CAMgxUyw.d.ts → constants-CuYW0K10.d.ts} +7 -7
  167. package/dist/{constants-BqrEmoih.js → constants-Cw8VjCVz.js} +2 -2
  168. package/dist/{constants-BqrEmoih.js.map → constants-Cw8VjCVz.js.map} +1 -1
  169. package/dist/{constants-D95ayHBM.d.ts → constants-EpKcj0dH.d.ts} +1 -1
  170. package/dist/{container-C319x4cG.js → container-DCPljKVH.js} +2 -2
  171. package/dist/{container-C319x4cG.js.map → container-DCPljKVH.js.map} +1 -1
  172. package/dist/{container-0C3ZMb_f.d.ts → container-DYcb7zGw.d.ts} +1 -2
  173. package/dist/context/async-context.d.ts +1 -33
  174. package/dist/context/async-context.js +21 -36
  175. package/dist/context/environment.d.ts +1 -33
  176. package/dist/context/environment.js +21 -36
  177. package/dist/element-DibzzA5L.js.map +1 -1
  178. package/dist/{element-CGY5MlNe.d.ts → element-wQo0heGj.d.ts} +3 -4
  179. package/dist/{env-CQJgOkQD.js → env-CmspDhHy.js} +1 -1
  180. package/dist/{env-CQJgOkQD.js.map → env-CmspDhHy.js.map} +1 -1
  181. package/dist/error-codes-Ds0bnPvT.js.map +1 -1
  182. package/dist/events/CommandKitEventsChannel.d.ts +1 -33
  183. package/dist/events/CommandKitEventsChannel.js +1 -1
  184. package/dist/{file-DgEXJx3x.js → file-Ca1kpEtE.js} +2 -2
  185. package/dist/{file-DgEXJx3x.js.map → file-Ca1kpEtE.js.map} +1 -1
  186. package/dist/{file-CfUTZjJh.d.ts → file-CrV4lSnl.d.ts} +1 -2
  187. package/dist/flags/FlagProvider.d.ts +1 -33
  188. package/dist/flags/feature-flags.d.ts +1 -33
  189. package/dist/flags/feature-flags.js +162 -40
  190. package/dist/flags/feature-flags.js.map +1 -0
  191. package/dist/flags/store.d.ts +1 -33
  192. package/dist/flags/store.js +1 -1
  193. package/dist/{helpers-t6PiYdMb.d.ts → helpers-AQPLVY35.d.ts} +1 -2
  194. package/dist/{helpers-0FUA42u8.js → helpers-Btx1FSZx.js} +2 -2
  195. package/dist/{helpers-0FUA42u8.js.map → helpers-Btx1FSZx.js.map} +1 -1
  196. package/dist/index.d.ts +40 -43
  197. package/dist/index.js +32 -40
  198. package/dist/index.js.map +1 -1
  199. package/dist/kv/constants.d.ts +1 -1
  200. package/dist/kv/constants.js +1 -1
  201. package/dist/kv/dotprops.js +25 -3
  202. package/dist/kv/dotprops.js.map +1 -0
  203. package/dist/kv/kv.d.ts +289 -290
  204. package/dist/kv/kv.js +14 -15
  205. package/dist/kv/kv.js.map +1 -1
  206. package/dist/kv/serde.d.ts +12 -3
  207. package/dist/kv/serde.js +86 -4
  208. package/dist/kv/serde.js.map +1 -0
  209. package/dist/{label-CQD5hBwB.d.ts → label-37kaNWMH.d.ts} +3 -4
  210. package/dist/{label-CCHbfQW8.js → label-B6vXvwLM.js} +3 -3
  211. package/dist/{label-CCHbfQW8.js.map → label-B6vXvwLM.js.map} +1 -1
  212. package/dist/logger/DefaultLogger.d.ts +66 -3
  213. package/dist/logger/DefaultLogger.js +21 -36
  214. package/dist/logger/ILogger.d.ts +64 -2
  215. package/dist/logger/ILogger.js +0 -1
  216. package/dist/logger/Logger.d.ts +36 -3
  217. package/dist/logger/Logger.js +21 -36
  218. package/dist/logger/NoopLogger.d.ts +36 -37
  219. package/dist/{media-gallery-DalbYf1v.d.ts → media-gallery-Ci3I4ElH.d.ts} +1 -2
  220. package/dist/{media-gallery-DdU7o9Cf.js → media-gallery-u3gjX7yD.js} +2 -2
  221. package/dist/{media-gallery-DdU7o9Cf.js.map → media-gallery-u3gjX7yD.js.map} +1 -1
  222. package/dist/plugins/CompilerPlugin.d.ts +1 -33
  223. package/dist/plugins/CompilerPlugin.js +1 -2
  224. package/dist/plugins/PluginCommon.d.ts +1 -33
  225. package/dist/plugins/PluginCommon.js +1 -1
  226. package/dist/plugins/RuntimePlugin.d.ts +1 -33
  227. package/dist/plugins/RuntimePlugin.js +1 -2
  228. package/dist/plugins/index.d.ts +1 -33
  229. package/dist/plugins/index.js +23 -36
  230. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -33
  231. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +21 -36
  232. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -33
  233. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +21 -36
  234. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -33
  235. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +21 -36
  236. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -33
  237. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +21 -36
  238. package/dist/plugins/plugin-runtime/runtime.d.ts +1 -33
  239. package/dist/plugins/plugin-runtime/runtime.js +0 -1
  240. package/dist/plugins/types.d.ts +1 -33
  241. package/dist/plugins/types.js +0 -1
  242. package/dist/{poll-6lSMoohv.js → poll-CFe8yvoJ.js} +12 -12
  243. package/dist/{poll-6lSMoohv.js.map → poll-CFe8yvoJ.js.map} +1 -1
  244. package/dist/{poll-Bo-skHvn.d.ts → poll-Ddtapd6n.d.ts} +7 -8
  245. package/dist/{resolve-file-url-CJoD0FAn.js → resolve-file-url-CdHqwWs3.js} +2 -2
  246. package/dist/{resolve-file-url-CJoD0FAn.js.map → resolve-file-url-CdHqwWs3.js.map} +1 -1
  247. package/dist/{section-C4qfgzOQ.js → section-BC8LF-B2.js} +2 -2
  248. package/dist/{section-C4qfgzOQ.js.map → section-BC8LF-B2.js.map} +1 -1
  249. package/dist/{section-CszS2hd5.d.ts → section-DkUKULnB.d.ts} +1 -2
  250. package/dist/{separator-CsoRs1aX.js → separator-BUTiW7uz.js} +2 -2
  251. package/dist/{separator-CsoRs1aX.js.map → separator-BUTiW7uz.js.map} +1 -1
  252. package/dist/{separator-DfRlVHne.d.ts → separator-CbXsIFCa.d.ts} +1 -2
  253. package/dist/{signals-C2Ly0wDt.js → signals-B8z1wJ6W.js} +2 -2
  254. package/dist/{signals-C2Ly0wDt.js.map → signals-B8z1wJ6W.js.map} +1 -1
  255. package/dist/{signals-DeafthGG.d.ts → signals-BbTgTc0i.d.ts} +1 -1
  256. package/dist/{store-GrsErvli.js → store-D8r_hryO.js} +2 -2
  257. package/dist/{store-GrsErvli.js.map → store-D8r_hryO.js.map} +1 -1
  258. package/dist/{text-display-DvydvE0D.d.ts → text-display-D7j39VC-.d.ts} +1 -2
  259. package/dist/{text-display-C0oSz5y0.js → text-display-DANahMN3.js} +2 -2
  260. package/dist/{text-display-C0oSz5y0.js.map → text-display-DANahMN3.js.map} +1 -1
  261. package/dist/{type-checker-CEt5Inbw.js → type-checker-cVd3Hpnh.js} +4 -4
  262. package/dist/{type-checker-CEt5Inbw.js.map → type-checker-cVd3Hpnh.js.map} +1 -1
  263. package/dist/{types-CQwntdAo.d.ts → types-BywA9d2Z.d.ts} +1 -1
  264. package/dist/{types-package-BxIhhZgZ.js → types-package-CsTNfvv2.js} +2 -2
  265. package/dist/{types-package-BxIhhZgZ.js.map → types-package-CsTNfvv2.js.map} +1 -1
  266. package/dist/types.d.ts +1 -33
  267. package/dist/utils/colors.js +1 -1
  268. package/dist/utils/constants.d.ts +1 -1
  269. package/dist/utils/dev-hooks.d.ts +1 -33
  270. package/dist/utils/dev-hooks.js +21 -36
  271. package/dist/utils/error-codes.d.ts +54 -2
  272. package/dist/utils/resolve-file-url.d.ts +11 -2
  273. package/dist/utils/resolve-file-url.js +1 -1
  274. package/dist/utils/types-package.js +1 -1
  275. package/dist/utils/useful-stuff/async-queue.d.ts +21 -21
  276. package/dist/utils/useful-stuff/mutex.d.ts +62 -62
  277. package/dist/utils/useful-stuff/ratelimiter.d.ts +56 -56
  278. package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
  279. package/dist/utils/useful-stuff/semaphore.d.ts +82 -82
  280. package/dist/utils/utilities.d.ts +113 -2
  281. package/dist/utils/utilities.js +21 -36
  282. package/dist/utils/warning.d.ts +25 -2
  283. package/dist/utils-Br3eenD1.js.map +1 -1
  284. package/dist/version.d.ts +8 -2
  285. package/dist/version.js +12 -2
  286. package/dist/version.js.map +1 -0
  287. package/dist/warning-CszH8HeS.js.map +1 -1
  288. package/package.json +5 -5
  289. package/dist/DefaultLogger-CgCFHJ4J.d.ts +0 -67
  290. package/dist/EventWorkerContext-CNPnDdUZ.d.ts +0 -43
  291. package/dist/ILogger-B-vsuZ1C.d.ts +0 -64
  292. package/dist/ILogger-B0q7p7L1.js +0 -0
  293. package/dist/Logger-BmHeS1Qd.d.ts +0 -37
  294. package/dist/MessageCommandParser-JmJWga4L.d.ts +0 -195
  295. package/dist/app-CrjK9yWX.js +0 -0
  296. package/dist/app-process-DCkz7RlU.js +0 -65
  297. package/dist/app-process-DCkz7RlU.js.map +0 -1
  298. package/dist/build-CaoHQPvm.js +0 -169
  299. package/dist/build-CaoHQPvm.js.map +0 -1
  300. package/dist/config-2prRz7_7.d.ts +0 -16
  301. package/dist/constants-Dy6P2veX.js +0 -27
  302. package/dist/dotprops-Dp98nRuu.js +0 -36
  303. package/dist/dotprops-Dp98nRuu.js.map +0 -1
  304. package/dist/error-codes-BuWUNGpX.d.ts +0 -54
  305. package/dist/feature-flags-BRF8OH7U.js +0 -160
  306. package/dist/feature-flags-BRF8OH7U.js.map +0 -1
  307. package/dist/resolve-file-url-B63_4Wm3.d.ts +0 -11
  308. package/dist/serde-CqUxaQUh.js +0 -97
  309. package/dist/serde-CqUxaQUh.js.map +0 -1
  310. package/dist/serde-DR1JEtRZ.d.ts +0 -12
  311. package/dist/utilities-BV9Osg71.d.ts +0 -113
  312. package/dist/utils-DGovVwyA.js +0 -23
  313. package/dist/utils-DGovVwyA.js.map +0 -1
  314. package/dist/version-BKZNlkbA.d.ts +0 -8
  315. package/dist/version-DGfGT6Tx.js +0 -18
  316. package/dist/version-DGfGT6Tx.js.map +0 -1
  317. package/dist/warning-BucG024D.d.ts +0 -25
  318. /package/dist/{index-B5F3AfVc.d.ts → index-BJfko-dP.d.ts} +0 -0
  319. /package/dist/{index-BLwMeReG.d.ts → index-CCggO_hw.d.ts} +0 -0
  320. /package/dist/{index-h64gcVNJ.d.ts → index-CLjpoGi1.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- const require_chunk = require('./chunk-nOFOJqeH.js');
1
+ const require_chunk = require('./chunk-kSYXY2_d.js');
2
2
  let discord_js = require("discord.js");
3
3
 
4
4
  //#region src/flags/store.ts
@@ -15,4 +15,4 @@ Object.defineProperty(exports, 'FlagStore', {
15
15
  return FlagStore;
16
16
  }
17
17
  });
18
- //# sourceMappingURL=store-GrsErvli.js.map
18
+ //# sourceMappingURL=store-D8r_hryO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store-GrsErvli.js","names":[],"sources":["../src/flags/store.ts"],"sourcesContent":["import type { FeatureFlag } from './feature-flags';\nimport { Collection } from 'discord.js';\n\n/**\n * Represents a store for feature flags.\n * This store extends the Collection class to manage feature flags by their keys.\n */\nexport class FlagStore extends Collection<string, FeatureFlag<any, any>> {}\n"],"mappings":";;;;;;;;AAOA,IAAa,YAAb,cAA+B,sBAA0C"}
1
+ {"version":3,"file":"store-D8r_hryO.js","names":[],"sources":["../src/flags/store.ts"],"sourcesContent":["import type { FeatureFlag } from './feature-flags';\nimport { Collection } from 'discord.js';\n\n/**\n * Represents a store for feature flags.\n * This store extends the Collection class to manage feature flags by their keys.\n */\nexport class FlagStore extends Collection<string, FeatureFlag<any, any>> {}\n"],"mappings":";;;;;;;;AAOA,IAAa,YAAb,cAA+B,sBAA0C"}
@@ -1,7 +1,6 @@
1
1
  import { TextDisplayBuilder, TextDisplayComponentData } from "discord.js";
2
2
 
3
3
  //#region src/components/display/text-display.d.ts
4
-
5
4
  /**
6
5
  * Represents a type that can be encoded as a string.
7
6
  */
@@ -30,4 +29,4 @@ interface TextDisplayProps extends Omit<TextDisplayComponentData, 'type' | 'cont
30
29
  declare function TextDisplay(props: TextDisplayProps): TextDisplayBuilder;
31
30
  //#endregion
32
31
  export { TextDisplay as n, TextDisplayProps as r, StringEncodable as t };
33
- //# sourceMappingURL=text-display-DvydvE0D.d.ts.map
32
+ //# sourceMappingURL=text-display-D7j39VC-.d.ts.map
@@ -1,4 +1,4 @@
1
- const require_chunk = require('./chunk-nOFOJqeH.js');
1
+ const require_chunk = require('./chunk-kSYXY2_d.js');
2
2
  let discord_js = require("discord.js");
3
3
 
4
4
  //#region src/components/display/text-display.ts
@@ -28,4 +28,4 @@ Object.defineProperty(exports, 'TextDisplay', {
28
28
  return TextDisplay;
29
29
  }
30
30
  });
31
- //# sourceMappingURL=text-display-C0oSz5y0.js.map
31
+ //# sourceMappingURL=text-display-DANahMN3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-display-C0oSz5y0.js","names":[],"sources":["../src/components/display/text-display.ts"],"sourcesContent":["import { TextDisplayBuilder, TextDisplayComponentData } from 'discord.js';\n\n/**\n * Represents a type that can be encoded as a string.\n */\nexport type StringEncodable = string | number | boolean;\n\n/**\n * Represents the properties for a text display component.\n * This interface extends the TextDisplayComponentData type from discord.js,\n * excluding the 'type' and 'content' properties.\n */\nexport interface TextDisplayProps\n extends Omit<TextDisplayComponentData, 'type' | 'content'> {\n children?: StringEncodable | StringEncodable[];\n content?: string;\n}\n\n/**\n * The components v2 text display component\n * @param props The properties for the text display component.\n * @returns The text display builder instance.\n * @example ```tsx\n * import { TextDisplay } from 'commandkit';\n *\n * const textDisplay = <TextDisplay content=\"Hello, world!\" />;\n * // or\n * const textDisplay = <TextDisplay>Some text content</TextDisplay>;\n * ```\n */\nexport function TextDisplay(props: TextDisplayProps) {\n const textDisplay = new TextDisplayBuilder(props);\n\n if (!props.content && props.children) {\n if (Array.isArray(props.children)) {\n textDisplay.setContent(props.children.join(' '));\n } else {\n textDisplay.setContent(\n typeof props.children === 'string'\n ? props.children\n : String(props.children),\n );\n }\n }\n\n return textDisplay;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,SAAgB,YAAY,OAAyB;CACnD,MAAM,cAAc,IAAI,8BAAmB,MAAM;AAEjD,KAAI,CAAC,MAAM,WAAW,MAAM,SAC1B,KAAI,MAAM,QAAQ,MAAM,SAAS,CAC/B,aAAY,WAAW,MAAM,SAAS,KAAK,IAAI,CAAC;KAEhD,aAAY,WACV,OAAO,MAAM,aAAa,WAC1B,MAAM,WACN,OAAO,MAAM,SAAS,CACvB;AAIL,QAAO"}
1
+ {"version":3,"file":"text-display-DANahMN3.js","names":[],"sources":["../src/components/display/text-display.ts"],"sourcesContent":["import { TextDisplayBuilder, TextDisplayComponentData } from 'discord.js';\n\n/**\n * Represents a type that can be encoded as a string.\n */\nexport type StringEncodable = string | number | boolean;\n\n/**\n * Represents the properties for a text display component.\n * This interface extends the TextDisplayComponentData type from discord.js,\n * excluding the 'type' and 'content' properties.\n */\nexport interface TextDisplayProps\n extends Omit<TextDisplayComponentData, 'type' | 'content'> {\n children?: StringEncodable | StringEncodable[];\n content?: string;\n}\n\n/**\n * The components v2 text display component\n * @param props The properties for the text display component.\n * @returns The text display builder instance.\n * @example ```tsx\n * import { TextDisplay } from 'commandkit';\n *\n * const textDisplay = <TextDisplay content=\"Hello, world!\" />;\n * // or\n * const textDisplay = <TextDisplay>Some text content</TextDisplay>;\n * ```\n */\nexport function TextDisplay(props: TextDisplayProps) {\n const textDisplay = new TextDisplayBuilder(props);\n\n if (!props.content && props.children) {\n if (Array.isArray(props.children)) {\n textDisplay.setContent(props.children.join(' '));\n } else {\n textDisplay.setContent(\n typeof props.children === 'string'\n ? props.children\n : String(props.children),\n );\n }\n }\n\n return textDisplay;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,SAAgB,YAAY,OAAyB;CACnD,MAAM,cAAc,IAAI,8BAAmB,MAAM;AAEjD,KAAI,CAAC,MAAM,WAAW,MAAM,SAC1B,KAAI,MAAM,QAAQ,MAAM,SAAS,CAC/B,aAAY,WAAW,MAAM,SAAS,KAAK,IAAI,CAAC;KAEhD,aAAY,WACV,OAAO,MAAM,aAAa,WAC1B,MAAI,WACJ,OAAI,MAAO,SAAM,CAClB;AAIL,QAAO"}
@@ -1,6 +1,6 @@
1
- const require_chunk = require('./chunk-nOFOJqeH.js');
2
- const require_colors = require('./colors-CLmBiP9I.js');
3
- const require_common = require('./common-B2-sF49Q.js');
1
+ const require_chunk = require('./chunk-kSYXY2_d.js');
2
+ const require_colors = require('./colors-Csc0X4QJ.js');
3
+ const require_common = require('./common-DSRs_mfw.js');
4
4
  let node_fs = require("node:fs");
5
5
  let node_path = require("node:path");
6
6
 
@@ -85,4 +85,4 @@ Object.defineProperty(exports, 'performTypeCheck', {
85
85
  return performTypeCheck;
86
86
  }
87
87
  });
88
- //# sourceMappingURL=type-checker-CEt5Inbw.js.map
88
+ //# sourceMappingURL=type-checker-cVd3Hpnh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"type-checker-CEt5Inbw.js","names":[],"sources":["../src/cli/type-checker.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { loadTypeScript } from './common';\nimport { join, relative } from 'node:path';\nimport colors from '../utils/colors';\n\nconst TS_NOT_FOUND_ERR = `TypeScript must be installed in order to use the type checker. Please install it using \\`npm install typescript\\` or \\`yarn add typescript\\``;\n\n/**\n * Formats a TypeScript diagnostic message in a pretty, readable format\n * @private\n * @internal\n */\nfunction formatDiagnostic(\n ts: typeof import('typescript'),\n diagnostic: import('typescript').Diagnostic,\n cwd: string,\n): string {\n const messageText = ts.flattenDiagnosticMessageText(\n diagnostic.messageText,\n '\\n',\n );\n\n if (!diagnostic.file) {\n return `${colors.red('error')}: ${messageText}`;\n }\n\n const { line, character } = ts.getLineAndCharacterOfPosition(\n diagnostic.file,\n diagnostic.start!,\n );\n const fileName = relative(cwd, diagnostic.file.fileName);\n const position = `${line + 1}:${character + 1}`;\n const errorCode = diagnostic.code ? `TS${diagnostic.code}` : '';\n\n // Format the error message nicely\n return [\n `${colors.bold(colors.cyan(fileName))}:${colors.bold(colors.yellow(position))} - ${colors.red('error')} ${colors.gray(errorCode)}`,\n `${messageText}`,\n ].join('\\n');\n}\n\n/**\n * Performs a type check on the project using TypeScript.\n * @param path The project root or cwd\n * @private\n * @internal\n */\nexport async function performTypeCheck(path: string) {\n const tsconfigPath = join(path, 'tsconfig.json');\n\n if (!existsSync(tsconfigPath)) return;\n\n const ts = await loadTypeScript(TS_NOT_FOUND_ERR);\n\n // Format host for error reporting\n const formatHost = {\n getCanonicalFileName: (path: string) => path,\n getCurrentDirectory: ts.sys.getCurrentDirectory,\n getNewLine: () => ts.sys.newLine,\n };\n\n // Read tsconfig.json\n const configFile = ts.readConfigFile(tsconfigPath, ts.sys.readFile);\n\n if (configFile.error) {\n console.error(\n colors.red(\n `Error reading tsconfig.json: ${ts.formatDiagnostic(configFile.error, formatHost)}`,\n ),\n );\n process.exit(1);\n }\n\n // Parse the config file\n const parsedConfig = ts.parseJsonConfigFileContent(\n configFile.config,\n ts.sys,\n path,\n );\n\n // Force noEmit to true as we only want type checking\n parsedConfig.options.noEmit = true;\n\n // Create a program\n const program = ts.createProgram({\n rootNames: parsedConfig.fileNames,\n options: parsedConfig.options,\n projectReferences: parsedConfig.projectReferences,\n });\n\n // Get the diagnostics\n const diagnostics = [\n ...program.getOptionsDiagnostics(),\n ...program.getGlobalDiagnostics(),\n ...program.getSyntacticDiagnostics(),\n ...program.getSemanticDiagnostics(),\n ];\n\n // Report any errors\n if (diagnostics.length > 0) {\n console.log('');\n console.error(\n colors.bold(\n colors.red('Type checking failed with the following errors:'),\n ),\n );\n console.log('');\n\n // Group diagnostics by file for better readability\n const byFile = new Map<string, import('typescript').Diagnostic[]>();\n\n for (const diagnostic of diagnostics) {\n const fileName = diagnostic.file ? diagnostic.file.fileName : 'Global';\n if (!byFile.has(fileName)) {\n byFile.set(fileName, []);\n }\n byFile.get(fileName)!.push(diagnostic);\n }\n\n // Pretty-print each diagnostic\n const totalErrors = diagnostics.length;\n let counter = 0;\n\n for (const [_, fileDiags] of byFile) {\n for (const diagnostic of fileDiags) {\n counter++;\n console.log(formatDiagnostic(ts, diagnostic, path));\n // Add separator between errors for better readability, except for the last one\n if (counter < totalErrors) {\n console.log('');\n }\n }\n }\n\n console.log('');\n console.error(\n colors.bold(\n colors.red(`Found ${totalErrors} error${totalErrors > 1 ? 's' : ''}`),\n ),\n );\n console.log('');\n\n process.exit(1);\n }\n\n console.log(colors.green('✓ Type checking completed successfully.'));\n}\n"],"mappings":";;;;;;;AAKA,MAAM,mBAAmB;;;;;;AAOzB,SAAS,iBACT,IACA,YACA,KACS;CACP,MAAM,cAAc,GAAG,6BACrB,WAAW,aACX,KACD;AAED,KAAI,CAAC,WAAW,KACd,QAAO,GAAG,8BAAO,IAAI,QAAQ,CAAC,IAAI;CAGpC,MAAM,EAAE,MAAM,cAAc,GAAG,8BAC7B,WAAW,MACX,WAAW,MACZ;CACD,MAAM,mCAAoB,KAAK,WAAW,KAAK,SAAS;CACxD,MAAM,WAAW,GAAG,OAAO,EAAE,GAAG,YAAY;CAC5C,MAAM,YAAY,WAAW,OAAO,KAAK,WAAW,SAAS;AAG7D,QAAO,CACP,GAAG,8BAAO,KAAK,8BAAO,KAAK,SAAS,CAAC,CAAC,GAAG,8BAAO,KAAK,8BAAO,OAAO,SAAS,CAAC,CAAC,KAAK,8BAAO,IAAI,QAAQ,CAAC,GAAG,8BAAO,KAAK,UAAU,IAChI,GAAG,cAAc,CACjB,KAAK,KAAK;;;;;;;;AASZ,eAAsB,iBAAiB,MAAc;CACnD,MAAM,mCAAoB,MAAM,gBAAgB;AAEhD,KAAI,yBAAY,aAAa,CAAE;CAE/B,MAAM,KAAK,MAAM,8BAAe,iBAAiB;CAGjD,MAAM,aAAa;EACjB,uBAAuB,WAAiB;EACxC,qBAAqB,GAAG,IAAI;EAC5B,kBAAkB,GAAG,IAAI;EAC1B;CAGD,MAAM,aAAa,GAAG,eAAe,cAAc,GAAG,IAAI,SAAS;AAEnE,KAAI,WAAW,OAAO;AACpB,UAAQ,MACN,8BAAO,IACL,gCAAgC,GAAG,iBAAiB,WAAW,OAAO,WAAW,GAClF,CACF;AACD,UAAQ,KAAK,EAAE;;CAIjB,MAAM,eAAe,GAAG,2BACtB,WAAW,QACX,GAAG,KACH,KACD;AAGD,cAAa,QAAQ,SAAS;CAG9B,MAAM,UAAU,GAAG,cAAc;EAC/B,WAAW,aAAa;EACxB,SAAS,aAAa;EACtB,mBAAmB,aAAa;EACjC,CAAC;CAGF,MAAM,cAAc;EACpB,GAAG,QAAQ,uBAAuB;EAClC,GAAG,QAAQ,sBAAsB;EACjC,GAAG,QAAQ,yBAAyB;EACpC,GAAG,QAAQ,wBAAwB;EAAC;AAIpC,KAAI,YAAY,SAAS,GAAG;AAC1B,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI,kDAAkD,CAC9D,CACF;AACD,UAAQ,IAAI,GAAG;EAGf,MAAM,yBAAS,IAAI,KAAgD;AAEnE,OAAK,MAAM,cAAc,aAAa;GACpC,MAAM,WAAW,WAAW,OAAO,WAAW,KAAK,WAAW;AAC9D,OAAI,CAAC,OAAO,IAAI,SAAS,CACvB,QAAO,IAAI,UAAU,EAAE,CAAC;AAE1B,UAAO,IAAI,SAAS,CAAE,KAAK,WAAW;;EAIxC,MAAM,cAAc,YAAY;EAChC,IAAI,UAAU;AAEd,OAAK,MAAM,CAAC,GAAG,cAAc,OAC3B,MAAK,MAAM,cAAc,WAAW;AAClC;AACA,WAAQ,IAAI,iBAAiB,IAAI,YAAY,KAAK,CAAC;AAEnD,OAAI,UAAU,YACZ,SAAQ,IAAI,GAAG;;AAKrB,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI,SAAS,YAAY,QAAQ,cAAc,IAAI,MAAM,KAAK,CACtE,CACF;AACD,UAAQ,IAAI,GAAG;AAEf,UAAQ,KAAK,EAAE;;AAGjB,SAAQ,IAAI,8BAAO,MAAM,0CAA0C,CAAC"}
1
+ {"version":3,"file":"type-checker-cVd3Hpnh.js","names":[],"sources":["../src/cli/type-checker.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { loadTypeScript } from './common';\nimport { join, relative } from 'node:path';\nimport colors from '../utils/colors';\n\nconst TS_NOT_FOUND_ERR = `TypeScript must be installed in order to use the type checker. Please install it using \\`npm install typescript\\` or \\`yarn add typescript\\``;\n\n/**\n * Formats a TypeScript diagnostic message in a pretty, readable format\n * @private\n * @internal\n */\nfunction formatDiagnostic(\n ts: typeof import('typescript'),\n diagnostic: import('typescript').Diagnostic,\n cwd: string,\n): string {\n const messageText = ts.flattenDiagnosticMessageText(\n diagnostic.messageText,\n '\\n',\n );\n\n if (!diagnostic.file) {\n return `${colors.red('error')}: ${messageText}`;\n }\n\n const { line, character } = ts.getLineAndCharacterOfPosition(\n diagnostic.file,\n diagnostic.start!,\n );\n const fileName = relative(cwd, diagnostic.file.fileName);\n const position = `${line + 1}:${character + 1}`;\n const errorCode = diagnostic.code ? `TS${diagnostic.code}` : '';\n\n // Format the error message nicely\n return [\n `${colors.bold(colors.cyan(fileName))}:${colors.bold(colors.yellow(position))} - ${colors.red('error')} ${colors.gray(errorCode)}`,\n `${messageText}`,\n ].join('\\n');\n}\n\n/**\n * Performs a type check on the project using TypeScript.\n * @param path The project root or cwd\n * @private\n * @internal\n */\nexport async function performTypeCheck(path: string) {\n const tsconfigPath = join(path, 'tsconfig.json');\n\n if (!existsSync(tsconfigPath)) return;\n\n const ts = await loadTypeScript(TS_NOT_FOUND_ERR);\n\n // Format host for error reporting\n const formatHost = {\n getCanonicalFileName: (path: string) => path,\n getCurrentDirectory: ts.sys.getCurrentDirectory,\n getNewLine: () => ts.sys.newLine,\n };\n\n // Read tsconfig.json\n const configFile = ts.readConfigFile(tsconfigPath, ts.sys.readFile);\n\n if (configFile.error) {\n console.error(\n colors.red(\n `Error reading tsconfig.json: ${ts.formatDiagnostic(configFile.error, formatHost)}`,\n ),\n );\n process.exit(1);\n }\n\n // Parse the config file\n const parsedConfig = ts.parseJsonConfigFileContent(\n configFile.config,\n ts.sys,\n path,\n );\n\n // Force noEmit to true as we only want type checking\n parsedConfig.options.noEmit = true;\n\n // Create a program\n const program = ts.createProgram({\n rootNames: parsedConfig.fileNames,\n options: parsedConfig.options,\n projectReferences: parsedConfig.projectReferences,\n });\n\n // Get the diagnostics\n const diagnostics = [\n ...program.getOptionsDiagnostics(),\n ...program.getGlobalDiagnostics(),\n ...program.getSyntacticDiagnostics(),\n ...program.getSemanticDiagnostics(),\n ];\n\n // Report any errors\n if (diagnostics.length > 0) {\n console.log('');\n console.error(\n colors.bold(\n colors.red('Type checking failed with the following errors:'),\n ),\n );\n console.log('');\n\n // Group diagnostics by file for better readability\n const byFile = new Map<string, import('typescript').Diagnostic[]>();\n\n for (const diagnostic of diagnostics) {\n const fileName = diagnostic.file ? diagnostic.file.fileName : 'Global';\n if (!byFile.has(fileName)) {\n byFile.set(fileName, []);\n }\n byFile.get(fileName)!.push(diagnostic);\n }\n\n // Pretty-print each diagnostic\n const totalErrors = diagnostics.length;\n let counter = 0;\n\n for (const [_, fileDiags] of byFile) {\n for (const diagnostic of fileDiags) {\n counter++;\n console.log(formatDiagnostic(ts, diagnostic, path));\n // Add separator between errors for better readability, except for the last one\n if (counter < totalErrors) {\n console.log('');\n }\n }\n }\n\n console.log('');\n console.error(\n colors.bold(\n colors.red(`Found ${totalErrors} error${totalErrors > 1 ? 's' : ''}`),\n ),\n );\n console.log('');\n\n process.exit(1);\n }\n\n console.log(colors.green('✓ Type checking completed successfully.'));\n}\n"],"mappings":";;;;;;;AAKA,MAAM,mBAAmB;;;;;;AAOzB,SAAS,iBACT,IACA,YACA,KACS;CACP,MAAM,cAAc,GAAG,6BACrB,WAAW,aACX,KACD;AAED,KAAI,CAAC,WAAW,KACd,QAAO,GAAG,8BAAO,IAAI,QAAQ,CAAC,IAAI;CAGpC,MAAM,EAAE,MAAM,cAAc,GAAG,8BAC7B,WAAW,MACX,WAAW,MACZ;CACD,MAAM,mCAAoB,KAAK,WAAW,KAAK,SAAS;CACxD,MAAM,WAAW,GAAG,OAAO,EAAE,GAAG,YAAY;CAC5C,MAAM,YAAY,WAAW,OAAO,KAAK,WAAW,SAAS;AAG7D,QAAO,CACP,GAAG,8BAAE,KAAO,8BAAK,KAAO,SAAK,CAAQ,CAAC,GAAG,8BAAE,KAAO,8BAAK,OAAO,SAAO,CAAQ,CAAC,KAAK,8BAAE,IAAO,QAAU,CAAC,GAAG,8BAAE,KAAO,UAAK,IACxH,GAAG,cAAc,CACjB,KAAE,KAAQ;;;;;;;;AASZ,eAAsB,iBAAiB,MAAc;CACnD,MAAM,mCAAoB,MAAM,gBAAgB;AAEhD,KAAI,yBAAY,aAAa,CAAE;CAE/B,MAAM,KAAK,MAAM,8BAAe,iBAAiB;CAGjD,MAAM,aAAa;EACjB,uBAAuB,WAAiB;EACxC,qBAAqB,GAAG,IAAI;EAC5B,kBAAkB,GAAG,IAAI;EAC1B;CAGD,MAAM,aAAa,GAAG,eAAe,cAAc,GAAG,IAAI,SAAS;AAEnE,KAAI,WAAW,OAAO;AACpB,UAAQ,MACN,8BAAO,IACL,gCAAgC,GAAG,iBAAiB,WAAW,OAAO,WAAW,GAClF,CACF;AACD,UAAQ,KAAK,EAAE;;CAIjB,MAAM,eAAe,GAAG,2BACtB,WAAW,QACX,GAAG,KACH,KACD;AAGD,cAAa,QAAQ,SAAS;CAG9B,MAAM,UAAU,GAAG,cAAc;EAC/B,WAAW,aAAa;EACxB,SAAS,aAAa;EACtB,mBAAmB,aAAa;EACjC,CAAC;CAGF,MAAM,cAAc;EACpB,GAAG,QAAE,uBAA6B;EAClC,GAAG,QAAE,sBAA4B;EACjC,GAAG,QAAE,yBAA+B;EACpC,GAAG,QAAE,wBAA8B;EAAC;AAIpC,KAAI,YAAY,SAAS,GAAG;AAC1B,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI,kDAAkD,CAC9D,CACF;AACD,UAAQ,IAAI,GAAG;EAGf,MAAM,yBAAS,IAAI,KAAgD;AAEnE,OAAK,MAAM,cAAc,aAAa;GACpC,MAAM,WAAW,WAAW,OAAO,WAAW,KAAK,WAAW;AAC9D,OAAI,CAAC,OAAO,IAAI,SAAS,CACvB,QAAO,IAAI,UAAU,EAAE,CAAC;AAE1B,UAAO,IAAI,SAAS,CAAE,KAAK,WAAW;;EAIxC,MAAM,cAAc,YAAY;EAChC,IAAI,UAAU;AAEd,OAAK,MAAM,CAAC,GAAG,cAAc,OAC3B,MAAK,MAAM,cAAc,WAAW;AAClC;AACA,WAAQ,IAAI,iBAAiB,IAAI,YAAY,KAAK,CAAC;AAEnD,OAAI,UAAU,YACZ,SAAQ,IAAI,GAAG;;AAKrB,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI,SAAS,YAAY,QAAQ,cAAc,IAAI,MAAM,KAAK,CACtE,CACF;AACD,UAAQ,IAAI,GAAG;AAEf,UAAQ,KAAK,EAAE;;AAGjB,SAAQ,IAAI,8BAAO,MAAM,0CAA0C,CAAC"}
@@ -2,4 +2,4 @@
2
2
  type MaybeArray<T> = T | T[];
3
3
  //#endregion
4
4
  export { MaybeArray as t };
5
- //# sourceMappingURL=types-CQwntdAo.d.ts.map
5
+ //# sourceMappingURL=types-BywA9d2Z.d.ts.map
@@ -1,4 +1,4 @@
1
- const require_chunk = require('./chunk-nOFOJqeH.js');
1
+ const require_chunk = require('./chunk-kSYXY2_d.js');
2
2
  const require_constants = require('./constants-CxkFFZ7p.js');
3
3
  let node_fs = require("node:fs");
4
4
  let node_path = require("node:path");
@@ -68,4 +68,4 @@ Object.defineProperty(exports, 'rewriteCommandDeclaration', {
68
68
  return rewriteCommandDeclaration;
69
69
  }
70
70
  });
71
- //# sourceMappingURL=types-package-BxIhhZgZ.js.map
71
+ //# sourceMappingURL=types-package-CsTNfvv2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-package-BxIhhZgZ.js","names":[],"sources":["../src/utils/types-package.ts"],"sourcesContent":["import { mkdir, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { COMMANDKIT_CWD, COMMANDKIT_IS_DEV } from './constants';\nimport { existsSync } from 'node:fs';\n\n/**\n * @private\n */\nexport async function generateTypesPackage(force = false) {\n const location = join(COMMANDKIT_CWD, 'node_modules', 'commandkit-types');\n if (!COMMANDKIT_IS_DEV && !force) return location;\n const packageJSON = join(location, 'package.json');\n const index = join(location, 'index.js');\n const types = join(location, 'index.d.ts');\n const command = join(location, 'command.d.ts');\n\n const packageJSONContent = {\n name: 'commandkit-types',\n version: '1.0.0',\n description: 'CommandKit types package',\n type: 'commonjs',\n main: 'index.js',\n types: 'index.d.ts',\n };\n\n const indexContent = `module.exports = {};`;\n\n // Restructuring the type declarations to properly extend rather than replace types\n const typesContent = `// Main types index file - imports all type declarations\nimport './command';\nexport {};\n`;\n\n // Properly set up command types to extend the CommandTypeData interface\n const commandTypesContent = `// Auto-generated command types\n export {};\ndeclare module 'commandkit' {\n type CommandTypeData = string\n}`;\n\n await mkdir(location, { recursive: true }).catch(() => {});\n await writeFile(packageJSON, JSON.stringify(packageJSONContent, null, 2));\n await writeFile(index, indexContent);\n await writeFile(types, typesContent);\n await writeFile(command, commandTypesContent);\n\n return location;\n}\n\n/**\n * @private\n */\nexport async function rewriteCommandDeclaration(data: string) {\n const commandTypesContent = `// Auto-generated command types\n declare module 'commandkit' {\n ${data}\n}\n export {};\n`;\n\n const location = join(COMMANDKIT_CWD, 'node_modules', 'commandkit-types');\n\n if (!existsSync(location)) return;\n\n const type = join(location, 'command.d.ts');\n\n await writeFile(type, commandTypesContent, { encoding: 'utf-8' });\n}\n"],"mappings":";;;;;;;;;;AAQA,eAAsB,qBAAqB,QAAQ,OAAO;CACxD,MAAM,+BAAgB,kCAAgB,gBAAgB,mBAAmB;AACzE,KAAI,CAAC,uCAAqB,CAAC,MAAO,QAAO;CACzC,MAAM,kCAAmB,UAAU,eAAe;CAClD,MAAM,4BAAa,UAAU,WAAW;CACxC,MAAM,4BAAa,UAAU,aAAa;CAC1C,MAAM,8BAAe,UAAU,eAAe;CAE9C,MAAM,qBAAqB;EACzB,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,MAAM;EACN,OAAO;EACR;CAED,MAAM,eAAe;CAGrB,MAAM,eAAe;;;;CAMrB,MAAM,sBAAsB;;;;;AAM5B,mCAAY,UAAU,EAAE,WAAW,MAAM,CAAC,CAAC,YAAY,GAAG;AAC1D,uCAAgB,aAAa,KAAK,UAAU,oBAAoB,MAAM,EAAE,CAAC;AACzE,uCAAgB,OAAO,aAAa;AACpC,uCAAgB,OAAO,aAAa;AACpC,uCAAgB,SAAS,oBAAoB;AAE7C,QAAO;;;;;AAMT,eAAsB,0BAA0B,MAAc;CAC5D,MAAM,sBAAsB;;MAExB,KAAI;;;;CAKR,MAAM,+BAAgB,kCAAgB,gBAAgB,mBAAmB;AAEzE,KAAI,yBAAY,SAAS,CAAE;AAI3B,2DAFkB,UAAU,eAAe,EAErB,qBAAqB,EAAE,UAAU,SAAS,CAAC"}
1
+ {"version":3,"file":"types-package-CsTNfvv2.js","names":[],"sources":["../src/utils/types-package.ts"],"sourcesContent":["import { mkdir, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { COMMANDKIT_CWD, COMMANDKIT_IS_DEV } from './constants';\nimport { existsSync } from 'node:fs';\n\n/**\n * @private\n */\nexport async function generateTypesPackage(force = false) {\n const location = join(COMMANDKIT_CWD, 'node_modules', 'commandkit-types');\n if (!COMMANDKIT_IS_DEV && !force) return location;\n const packageJSON = join(location, 'package.json');\n const index = join(location, 'index.js');\n const types = join(location, 'index.d.ts');\n const command = join(location, 'command.d.ts');\n\n const packageJSONContent = {\n name: 'commandkit-types',\n version: '1.0.0',\n description: 'CommandKit types package',\n type: 'commonjs',\n main: 'index.js',\n types: 'index.d.ts',\n };\n\n const indexContent = `module.exports = {};`;\n\n // Restructuring the type declarations to properly extend rather than replace types\n const typesContent = `// Main types index file - imports all type declarations\nimport './command';\nexport {};\n`;\n\n // Properly set up command types to extend the CommandTypeData interface\n const commandTypesContent = `// Auto-generated command types\n export {};\ndeclare module 'commandkit' {\n type CommandTypeData = string\n}`;\n\n await mkdir(location, { recursive: true }).catch(() => {});\n await writeFile(packageJSON, JSON.stringify(packageJSONContent, null, 2));\n await writeFile(index, indexContent);\n await writeFile(types, typesContent);\n await writeFile(command, commandTypesContent);\n\n return location;\n}\n\n/**\n * @private\n */\nexport async function rewriteCommandDeclaration(data: string) {\n const commandTypesContent = `// Auto-generated command types\n declare module 'commandkit' {\n ${data}\n}\n export {};\n`;\n\n const location = join(COMMANDKIT_CWD, 'node_modules', 'commandkit-types');\n\n if (!existsSync(location)) return;\n\n const type = join(location, 'command.d.ts');\n\n await writeFile(type, commandTypesContent, { encoding: 'utf-8' });\n}\n"],"mappings":";;;;;;;;;;AAQA,eAAsB,qBAAqB,QAAQ,OAAO;CACxD,MAAM,+BAAgB,kCAAgB,gBAAgB,mBAAmB;AACzE,KAAI,CAAC,uCAAqB,CAAC,MAAO,QAAO;CACzC,MAAM,kCAAmB,UAAU,eAAe;CAClD,MAAM,4BAAa,UAAU,WAAW;CACxC,MAAM,4BAAa,UAAU,aAAa;CAC1C,MAAM,8BAAe,UAAU,eAAe;CAE9C,MAAM,qBAAqB;EACzB,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,MAAM;EACN,OAAO;EACR;CAED,MAAM,eAAe;CAGrB,MAAM,eAAe;;;;CAMrB,MAAM,sBAAsB;;;;;AAM5B,mCAAY,UAAU,EAAE,WAAW,MAAM,CAAC,CAAC,YAAY,GAAG;AAC1D,uCAAgB,aAAa,KAAK,UAAU,oBAAoB,MAAM,EAAE,CAAC;AACzE,uCAAgB,OAAO,aAAa;AACpC,uCAAgB,OAAO,aAAa;AACpC,uCAAgB,SAAS,oBAAoB;AAE7C,QAAO;;;;;AAMT,eAAsB,0BAA0B,MAAc;CAC5D,MAAM,sBAAsB;;MAExB,KAAI;;;;CAKR,MAAM,+BAAgB,kCAAgB,gBAAgB,mBAAmB;AAEzE,KAAI,yBAAY,SAAS,CAAE;AAI3B,2DAFkB,UAAU,eAAe,EAErB,qBAAqB,EAAE,UAAU,SAAS,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,34 +1,2 @@
1
- import { dn as CommandContext, fn as CommandData, gn as EventHandler, hn as CommandMetadataFunction, mn as CommandMetadata, pn as CommandKitOptions } from "./analytics-engine-DHmLGxFA.js";
2
- import "./EventInterceptor-Dk5Fwu-7.js";
3
- import "./ButtonKit-B_HCmb3D.js";
4
- import "./ModalKit-C8WkeoDl.js";
5
- import "./element-CGY5MlNe.js";
6
- import "./ActionRow-BtKd-ZRS.js";
7
- import "./types-CQwntdAo.js";
8
- import "./Button-DiXeKdXO.js";
9
- import "./Modal-Dd5plFpo.js";
10
- import "./common-DAxu7-kG.js";
11
- import "./StringSelectMenuKit-BMA0rjhA.js";
12
- import "./ChannelSelectMenuKit-DrsqXWiO.js";
13
- import "./MentionableSelectMenuKit-DNan_JWk.js";
14
- import "./UserSelectMenuKit-CRpFbwA9.js";
15
- import "./RoleSelectMenuKit-FfGw3CSa.js";
16
- import "./SelectMenu-DTWKY-JJ.js";
17
- import "./container-0C3ZMb_f.js";
18
- import "./file-CfUTZjJh.js";
19
- import "./media-gallery-DalbYf1v.js";
20
- import "./section-CszS2hd5.js";
21
- import "./separator-DfRlVHne.js";
22
- import "./text-display-DvydvE0D.js";
23
- import "./label-CQD5hBwB.js";
24
- import "./poll-Bo-skHvn.js";
25
- import "./index-h64gcVNJ.js";
26
- import "./index-BLwMeReG.js";
27
- import "./MessageCommandParser-JmJWga4L.js";
28
- import "./signals-DeafthGG.js";
29
- import "./helpers-t6PiYdMb.js";
30
- import "./CommandsRouter-Bdkx7SZS.js";
31
- import "./EventsRouter-bILsV3Lh.js";
32
- import "./index-B5F3AfVc.js";
33
- import "./constants-CAMgxUyw.js";
1
+ import { dn as CommandContext, fn as CommandData, gn as EventHandler, hn as CommandMetadataFunction, mn as CommandMetadata, pn as CommandKitOptions } from "./analytics-engine-WQhXmx3H.js";
34
2
  export { CommandContext, CommandData, CommandKitOptions, CommandMetadata, CommandMetadataFunction, EventHandler };
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_colors = require('../colors-CLmBiP9I.js');
2
+ const require_colors = require('../colors-Csc0X4QJ.js');
3
3
 
4
4
  exports.default = require_colors.colors_default;
@@ -1,2 +1,2 @@
1
- import { a as COMMANDKIT_IS_TEST, i as COMMANDKIT_IS_DEV, n as COMMANDKIT_CWD, o as HMREventType, r as COMMANDKIT_IS_CLI, s as isBuildLikeEnvironment, t as COMMANDKIT_BOOTSTRAP_MODE } from "../constants-CAMgxUyw.js";
1
+ import { a as COMMANDKIT_IS_TEST, i as COMMANDKIT_IS_DEV, n as COMMANDKIT_CWD, o as HMREventType, r as COMMANDKIT_IS_CLI, s as isBuildLikeEnvironment, t as COMMANDKIT_BOOTSTRAP_MODE } from "../constants-CuYW0K10.js";
2
2
  export { COMMANDKIT_BOOTSTRAP_MODE, COMMANDKIT_CWD, COMMANDKIT_IS_CLI, COMMANDKIT_IS_DEV, COMMANDKIT_IS_TEST, HMREventType, isBuildLikeEnvironment };
@@ -1,34 +1,2 @@
1
- import { et as CommandKitHMREvent, nt as registerDevHooks, tt as IpcMessageCommand } from "../analytics-engine-DHmLGxFA.js";
2
- import "../EventInterceptor-Dk5Fwu-7.js";
3
- import "../ButtonKit-B_HCmb3D.js";
4
- import "../ModalKit-C8WkeoDl.js";
5
- import "../element-CGY5MlNe.js";
6
- import "../ActionRow-BtKd-ZRS.js";
7
- import "../types-CQwntdAo.js";
8
- import "../Button-DiXeKdXO.js";
9
- import "../Modal-Dd5plFpo.js";
10
- import "../common-DAxu7-kG.js";
11
- import "../StringSelectMenuKit-BMA0rjhA.js";
12
- import "../ChannelSelectMenuKit-DrsqXWiO.js";
13
- import "../MentionableSelectMenuKit-DNan_JWk.js";
14
- import "../UserSelectMenuKit-CRpFbwA9.js";
15
- import "../RoleSelectMenuKit-FfGw3CSa.js";
16
- import "../SelectMenu-DTWKY-JJ.js";
17
- import "../container-0C3ZMb_f.js";
18
- import "../file-CfUTZjJh.js";
19
- import "../media-gallery-DalbYf1v.js";
20
- import "../section-CszS2hd5.js";
21
- import "../separator-DfRlVHne.js";
22
- import "../text-display-DvydvE0D.js";
23
- import "../label-CQD5hBwB.js";
24
- import "../poll-Bo-skHvn.js";
25
- import "../index-h64gcVNJ.js";
26
- import "../index-BLwMeReG.js";
27
- import "../MessageCommandParser-JmJWga4L.js";
28
- import "../signals-DeafthGG.js";
29
- import "../helpers-t6PiYdMb.js";
30
- import "../CommandsRouter-Bdkx7SZS.js";
31
- import "../EventsRouter-bILsV3Lh.js";
32
- import "../index-B5F3AfVc.js";
33
- import "../constants-CAMgxUyw.js";
1
+ import { et as CommandKitHMREvent, nt as registerDevHooks, tt as IpcMessageCommand } from "../analytics-engine-WQhXmx3H.js";
34
2
  export { CommandKitHMREvent, IpcMessageCommand, registerDevHooks };
@@ -1,41 +1,26 @@
1
- require('../colors-CLmBiP9I.js');
2
- require('../ActionRow-D6knpVd6.js');
3
- require('../error-codes-Ds0bnPvT.js');
4
- const require_commandkit = require('../commandkit-B0wT0Mxx.js');
5
- require('../warning-CszH8HeS.js');
6
- require('../common-CEordwf3.js');
7
- require('../common-C2jAjX4U.js');
8
- require('../container-C319x4cG.js');
9
- require('../file-DgEXJx3x.js');
10
- require('../media-gallery-DdU7o9Cf.js');
11
- require('../section-C4qfgzOQ.js');
12
- require('../separator-CsoRs1aX.js');
13
- require('../text-display-C0oSz5y0.js');
14
- require('../label-CCHbfQW8.js');
15
- require('../poll-6lSMoohv.js');
1
+ require('../colors-Csc0X4QJ.js');
2
+ require('../ActionRow-CSN_UKmM.js');
3
+ const require_commandkit = require('../commandkit-SIjTLD2R.js');
4
+ require('../container-DCPljKVH.js');
5
+ require('../file-Ca1kpEtE.js');
6
+ require('../media-gallery-u3gjX7yD.js');
7
+ require('../section-BC8LF-B2.js');
8
+ require('../separator-BUTiW7uz.js');
9
+ require('../text-display-DANahMN3.js');
10
+ require('../label-B6vXvwLM.js');
11
+ require('../poll-CFe8yvoJ.js');
16
12
  require('../display-WDb9wMCv.js');
17
- require('../element-DibzzA5L.js');
18
- require('../types-TC4g3w91.js');
19
- require('../EventInterceptor-BWoEJMHZ.js');
20
13
  require('../constants-CxkFFZ7p.js');
21
- require('../PluginCommon-Bp5T3ubs.js');
22
- require('../CompilerPlugin-DbN5-ls3.js');
23
- require('../RuntimePlugin-Bq6z-Upz.js');
24
- require('../types-Cdh4uaFR.js');
25
- require('../resolve-file-url-CJoD0FAn.js');
26
- require('../runtime-Skt5NiOc.js');
27
- require('../utils-Br3eenD1.js');
28
- require('../types-package-BxIhhZgZ.js');
29
- require('../constants-BqrEmoih.js');
30
- require('../EventWorkerContext-yTm5vI3b.js');
31
- require('../signals-C2Ly0wDt.js');
32
- require('../helpers-0FUA42u8.js');
33
- require('../MessageCommandParser-CD7ynlBO.js');
34
- require('../CommandsRouter-NAgpWzTJ.js');
35
- require('../EventsRouter-D4_vBMhl.js');
14
+ require('../types-package-CsTNfvv2.js');
15
+ require('../constants-Cw8VjCVz.js');
16
+ require('../EventWorkerContext-Dfhgv329.js');
17
+ require('../signals-B8z1wJ6W.js');
18
+ require('../helpers-Btx1FSZx.js');
19
+ require('../MessageCommandParser-Bs9fimmd.js');
20
+ require('../CommandsRouter-C_HLsrGX.js');
21
+ require('../EventsRouter-DZYIha6m.js');
36
22
  require('../router-BvamdzoF.js');
37
- require('../common-B2-sF49Q.js');
38
- require('../CommandKitEventsChannel-2l9Za-le.js');
39
- require('../store-GrsErvli.js');
23
+ require('../common-DSRs_mfw.js');
24
+ require('../store-D8r_hryO.js');
40
25
 
41
26
  exports.registerDevHooks = require_commandkit.registerDevHooks;
@@ -1,2 +1,54 @@
1
- import { a as isErrorType, i as isCommandKitError, n as CommandKitErrorCodes, r as createCommandKitError, t as CommandKitError } from "../error-codes-BuWUNGpX.js";
2
- export { CommandKitError, CommandKitErrorCodes, createCommandKitError, isCommandKitError, isErrorType };
1
+ //#region src/utils/error-codes.d.ts
2
+ /**
3
+ * The error codes used by CommandKit.
4
+ */
5
+ declare const CommandKitErrorCodes: {
6
+ /**
7
+ * Error code for exiting middleware.
8
+ */
9
+ readonly StopMiddlewares: symbol;
10
+ /**
11
+ * Error code for forwarded commands.
12
+ */
13
+ readonly ForwardedCommand: symbol;
14
+ /**
15
+ * Error code for invalid command prefix.
16
+ */
17
+ readonly InvalidCommandPrefix: symbol;
18
+ /**
19
+ * Error code for plugin capture handle.
20
+ */
21
+ readonly PluginCaptureHandle: symbol;
22
+ /**
23
+ * Error code for event interruption signal
24
+ */
25
+ readonly StopEvents: symbol;
26
+ };
27
+ /**
28
+ * The type for CommandKit errors.
29
+ */
30
+ type CommandKitError = Error & {
31
+ code: symbol;
32
+ };
33
+ /**
34
+ * Creates a new CommandKit error with the specified code.
35
+ * @param code The error code to assign to the error.
36
+ * @returns A new CommandKit error instance.
37
+ */
38
+ declare function createCommandKitError(code: symbol): CommandKitError;
39
+ /**
40
+ * Checks if the given error is a CommandKit error.
41
+ * @param error The error to check.
42
+ * @returns True if the error is a CommandKit error, false otherwise.
43
+ */
44
+ declare function isCommandKitError(error: unknown): error is CommandKitError;
45
+ /**
46
+ * Checks if the given error is of a specific CommandKit error type.
47
+ * @param error The error to check.
48
+ * @param code The error code or an array of error codes to check against.
49
+ * @returns True if the error matches the specified code(s), false otherwise.
50
+ */
51
+ declare function isErrorType(error: unknown, code: symbol | symbol[]): boolean;
52
+ //#endregion
53
+ export { CommandKitError, CommandKitErrorCodes, createCommandKitError, isCommandKitError, isErrorType };
54
+ //# sourceMappingURL=error-codes.d.ts.map
@@ -1,2 +1,11 @@
1
- import { t as toFileURL } from "../resolve-file-url-B63_4Wm3.js";
2
- export { toFileURL };
1
+ //#region src/utils/resolve-file-url.d.ts
2
+ /**
3
+ * Convert a local file path to a file URL.
4
+ * @param filePath - The local file's path.
5
+ * @param withTs - Whether to append a timestamp to the URL.
6
+ * @returns - The converted file URL.
7
+ */
8
+ declare function toFileURL(filePath: string, withTs?: boolean): string;
9
+ //#endregion
10
+ export { toFileURL };
11
+ //# sourceMappingURL=resolve-file-url.d.ts.map
@@ -1,3 +1,3 @@
1
- const require_resolve_file_url = require('../resolve-file-url-CJoD0FAn.js');
1
+ const require_resolve_file_url = require('../resolve-file-url-CdHqwWs3.js');
2
2
 
3
3
  exports.toFileURL = require_resolve_file_url.toFileURL;
@@ -1,5 +1,5 @@
1
1
  require('../constants-CxkFFZ7p.js');
2
- const require_types_package = require('../types-package-BxIhhZgZ.js');
2
+ const require_types_package = require('../types-package-CsTNfvv2.js');
3
3
 
4
4
  exports.generateTypesPackage = require_types_package.generateTypesPackage;
5
5
  exports.rewriteCommandDeclaration = require_types_package.rewriteCommandDeclaration;
@@ -22,43 +22,43 @@ declare class AsyncQueue {
22
22
  private queue;
23
23
  constructor(options?: AsyncQueueOptions);
24
24
  /**
25
- * Adds a task to the queue.
26
- * @param task - The async function to execute.
27
- * @param signal - Optional AbortSignal for cancelling this specific task.
28
- * @returns Promise resolving to the result of the task.
29
- */
25
+ * Adds a task to the queue.
26
+ * @param task - The async function to execute.
27
+ * @param signal - Optional AbortSignal for cancelling this specific task.
28
+ * @returns Promise resolving to the result of the task.
29
+ */
30
30
  add<T>(task: AsyncQueueTask<T>, signal?: AbortSignal): Promise<T>;
31
31
  /**
32
- * Pauses the queue. No new tasks will be started until resumed.
33
- */
32
+ * Pauses the queue. No new tasks will be started until resumed.
33
+ */
34
34
  pause(): void;
35
35
  /**
36
- * Resumes the queue and processes pending tasks.
37
- */
36
+ * Resumes the queue and processes pending tasks.
37
+ */
38
38
  resume(): void;
39
39
  /**
40
- * Aborts the queue, rejecting all pending tasks.
41
- */
40
+ * Aborts the queue, rejecting all pending tasks.
41
+ */
42
42
  abort(): void;
43
43
  /**
44
- * Clears all pending tasks from the queue.
45
- */
44
+ * Clears all pending tasks from the queue.
45
+ */
46
46
  clear(): void;
47
47
  /**
48
- * Returns the number of running tasks.
49
- */
48
+ * Returns the number of running tasks.
49
+ */
50
50
  getRunning(): number;
51
51
  /**
52
- * Returns the number of pending tasks in the queue.
53
- */
52
+ * Returns the number of pending tasks in the queue.
53
+ */
54
54
  getPending(): number;
55
55
  /**
56
- * Returns true if the queue is currently paused.
57
- */
56
+ * Returns true if the queue is currently paused.
57
+ */
58
58
  isPaused(): boolean;
59
59
  /**
60
- * Returns true if the queue has been aborted.
61
- */
60
+ * Returns true if the queue has been aborted.
61
+ */
62
62
  isAborted(): boolean;
63
63
  private next;
64
64
  }
@@ -9,24 +9,24 @@
9
9
  */
10
10
  interface MutexStorage {
11
11
  /**
12
- * Attempts to acquire a lock for a given key
13
- * @param key - The unique identifier for the mutex lock
14
- * @param timeout - Optional timeout in milliseconds for the lock
15
- * @param signal - Optional AbortSignal for cancelling the acquisition
16
- * @returns Promise resolving to true if lock was acquired, false if timeout or already locked
17
- */
12
+ * Attempts to acquire a lock for a given key
13
+ * @param key - The unique identifier for the mutex lock
14
+ * @param timeout - Optional timeout in milliseconds for the lock
15
+ * @param signal - Optional AbortSignal for cancelling the acquisition
16
+ * @returns Promise resolving to true if lock was acquired, false if timeout or already locked
17
+ */
18
18
  acquire(key: string, timeout?: number, signal?: AbortSignal): Promise<boolean>;
19
19
  /**
20
- * Releases the lock for a given key
21
- * @param key - The unique identifier for the mutex lock
22
- * @returns Promise that resolves when the lock is released
23
- */
20
+ * Releases the lock for a given key
21
+ * @param key - The unique identifier for the mutex lock
22
+ * @returns Promise that resolves when the lock is released
23
+ */
24
24
  release(key: string): Promise<void>;
25
25
  /**
26
- * Checks if a lock is currently held for a given key
27
- * @param key - The unique identifier for the mutex lock
28
- * @returns Promise resolving to true if the lock is held, false otherwise
29
- */
26
+ * Checks if a lock is currently held for a given key
27
+ * @param key - The unique identifier for the mutex lock
28
+ * @returns Promise resolving to true if the lock is held, false otherwise
29
+ */
30
30
  isLocked(key: string): Promise<boolean>;
31
31
  }
32
32
  /**
@@ -45,24 +45,24 @@ interface MutexOptions {
45
45
  declare class MemoryMutexStorage implements MutexStorage {
46
46
  private readonly locks;
47
47
  /**
48
- * Attempts to acquire a lock for a given key
49
- * @param key - The unique identifier for the mutex lock
50
- * @param timeout - Optional timeout in milliseconds for the lock
51
- * @param signal - Optional AbortSignal for cancelling the acquisition
52
- * @returns Promise resolving to true if lock was acquired, false if timeout or already locked
53
- */
48
+ * Attempts to acquire a lock for a given key
49
+ * @param key - The unique identifier for the mutex lock
50
+ * @param timeout - Optional timeout in milliseconds for the lock
51
+ * @param signal - Optional AbortSignal for cancelling the acquisition
52
+ * @returns Promise resolving to true if lock was acquired, false if timeout or already locked
53
+ */
54
54
  acquire(key: string, timeout?: number, signal?: AbortSignal): Promise<boolean>;
55
55
  /**
56
- * Releases the lock for a given key
57
- * @param key - The unique identifier for the mutex lock
58
- * @returns Promise that resolves when the lock is released
59
- */
56
+ * Releases the lock for a given key
57
+ * @param key - The unique identifier for the mutex lock
58
+ * @returns Promise that resolves when the lock is released
59
+ */
60
60
  release(key: string): Promise<void>;
61
61
  /**
62
- * Checks if a lock is currently held for a given key
63
- * @param key - The unique identifier for the mutex lock
64
- * @returns Promise resolving to true if the lock is held, false otherwise
65
- */
62
+ * Checks if a lock is currently held for a given key
63
+ * @param key - The unique identifier for the mutex lock
64
+ * @returns Promise resolving to true if the lock is held, false otherwise
65
+ */
66
66
  isLocked(key: string): Promise<boolean>;
67
67
  private generateHolderId;
68
68
  private delay;
@@ -75,54 +75,54 @@ declare class Mutex {
75
75
  private storage;
76
76
  private readonly defaultTimeout;
77
77
  /**
78
- * Creates a new mutex instance
79
- * @param options - Configuration options for the mutex
80
- */
78
+ * Creates a new mutex instance
79
+ * @param options - Configuration options for the mutex
80
+ */
81
81
  constructor(options?: MutexOptions);
82
82
  /**
83
- * Sets the storage implementation for the mutex
84
- * @param storage - The storage implementation to use
85
- */
83
+ * Sets the storage implementation for the mutex
84
+ * @param storage - The storage implementation to use
85
+ */
86
86
  setStorage(storage: MutexStorage): void;
87
87
  /**
88
- * Gets the storage implementation for the mutex
89
- * @returns The storage implementation
90
- */
88
+ * Gets the storage implementation for the mutex
89
+ * @returns The storage implementation
90
+ */
91
91
  getStorage(): MutexStorage;
92
92
  /**
93
- * Acquires a lock for the given key
94
- * @param key - The unique identifier for the mutex lock
95
- * @param timeout - Optional timeout in milliseconds for lock acquisition
96
- * @param signal - Optional AbortSignal for cancelling the acquisition
97
- * @returns Promise resolving to true if lock was acquired, false if timeout
98
- */
93
+ * Acquires a lock for the given key
94
+ * @param key - The unique identifier for the mutex lock
95
+ * @param timeout - Optional timeout in milliseconds for lock acquisition
96
+ * @param signal - Optional AbortSignal for cancelling the acquisition
97
+ * @returns Promise resolving to true if lock was acquired, false if timeout
98
+ */
99
99
  acquire(key: string, timeout?: number, signal?: AbortSignal): Promise<boolean>;
100
100
  /**
101
- * Releases the lock for the given key
102
- * @param key - The unique identifier for the mutex lock
103
- * @returns Promise that resolves when the lock is released
104
- */
101
+ * Releases the lock for the given key
102
+ * @param key - The unique identifier for the mutex lock
103
+ * @returns Promise that resolves when the lock is released
104
+ */
105
105
  release(key: string): Promise<void>;
106
106
  /**
107
- * Checks if a lock is currently held for the given key
108
- * @param key - The unique identifier for the mutex lock
109
- * @returns Promise resolving to true if the lock is held, false otherwise
110
- */
107
+ * Checks if a lock is currently held for the given key
108
+ * @param key - The unique identifier for the mutex lock
109
+ * @returns Promise resolving to true if the lock is held, false otherwise
110
+ */
111
111
  isLocked(key: string): Promise<boolean>;
112
112
  /**
113
- * Executes a function with exclusive access to the resource
114
- * @param key - The unique identifier for the mutex lock
115
- * @param fn - The function to execute with exclusive access
116
- * @param timeout - Optional timeout in milliseconds for lock acquisition
117
- * @param signal - Optional AbortSignal for cancelling the lock acquisition
118
- * @returns Promise resolving to the result of the function execution
119
- * @throws Error if lock acquisition fails or function execution fails
120
- */
113
+ * Executes a function with exclusive access to the resource
114
+ * @param key - The unique identifier for the mutex lock
115
+ * @param fn - The function to execute with exclusive access
116
+ * @param timeout - Optional timeout in milliseconds for lock acquisition
117
+ * @param signal - Optional AbortSignal for cancelling the lock acquisition
118
+ * @returns Promise resolving to the result of the function execution
119
+ * @throws Error if lock acquisition fails or function execution fails
120
+ */
121
121
  withLock<T>(key: string, fn: () => Promise<T> | T, timeout?: number, signal?: AbortSignal): Promise<T>;
122
122
  /**
123
- * Gets the current configuration of the mutex
124
- * @returns Object containing the current timeout value
125
- */
123
+ * Gets the current configuration of the mutex
124
+ * @returns Object containing the current timeout value
125
+ */
126
126
  getConfig(): Omit<MutexOptions, 'storage'>;
127
127
  }
128
128
  /**