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,34 +1,2 @@
1
- import { At as makeContextAwareFunction, Dt as getCommandKit, Et as exitContext, Mt as useEnvironment, Nt as useStore, Ot as getContext, Tt as GenericFunction, jt as provideContext, kt as isCommandWorkerContext, wt as AsyncFunction } 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 { At as makeContextAwareFunction, Dt as getCommandKit, Et as exitContext, Mt as useEnvironment, Nt as useStore, Ot as getContext, Tt as GenericFunction, jt as provideContext, kt as isCommandWorkerContext, wt as AsyncFunction } from "../analytics-engine-WQhXmx3H.js";
34
2
  export { AsyncFunction, GenericFunction, exitContext, getCommandKit, getContext, isCommandWorkerContext, makeContextAwareFunction, provideContext, useEnvironment, useStore };
@@ -1,42 +1,27 @@
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.exitContext = require_commandkit.exitContext;
42
27
  exports.getCommandKit = require_commandkit.getCommandKit;
@@ -1,34 +1,2 @@
1
- import { Ft as CommandKitEnvironmentInternalData, It as CommandKitEnvironmentType, Lt as after, Pt as CommandKitEnvironment, Rt as cancelAfter } 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 { Ft as CommandKitEnvironmentInternalData, It as CommandKitEnvironmentType, Lt as after, Pt as CommandKitEnvironment, Rt as cancelAfter } from "../analytics-engine-WQhXmx3H.js";
34
2
  export { CommandKitEnvironment, CommandKitEnvironmentInternalData, CommandKitEnvironmentType, after, cancelAfter };
@@ -1,42 +1,27 @@
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.CommandKitEnvironment = require_commandkit.CommandKitEnvironment;
42
27
  exports.CommandKitEnvironmentType = require_commandkit.CommandKitEnvironmentType;
@@ -1 +1 @@
1
- {"version":3,"file":"element-DibzzA5L.js","names":[],"sources":["../src/components/common/element.ts"],"sourcesContent":["import type { ActionRowBuilder, TextInputBuilder } from 'discord.js';\nimport type { ButtonKit } from '../interactive/button/ButtonKit';\nimport type { ModalKit } from '../interactive/modal/ModalKit';\n\n/**\n * Represents the types of elements that can be used in CommandKit.\n */\nexport const ElementType = {\n ActionRow: 'action-row',\n Button: 'button-kit',\n Modal: 'modal',\n TextInput: 'text-input',\n} as const;\n\n/**\n * The type of element that can be used in CommandKit.\n * This is a union of the keys of the ElementType object.\n */\nexport type ElementType = (typeof ElementType)[keyof typeof ElementType];\n\n/**\n * The data structure that maps each ElementType to its corresponding CommandKit element.\n */\nexport interface CommandKitElementData {\n [ElementType.ActionRow]: ActionRowBuilder;\n [ElementType.Button]: ButtonKit;\n [ElementType.Modal]: ModalKit;\n [ElementType.TextInput]: TextInputBuilder;\n}\n\n/**\n * Represents a CommandKit element with a specific type and data.\n */\nexport type CommandKitElement<Type extends ElementType> =\n CommandKitElementData[Type];\n\n/**\n * Represents any CommandKit element, which can be of any type defined in CommandKitElementData.\n */\nexport type AnyCommandKitElement = CommandKitElement<ElementType>;\n\n/**\n * Checks if the given element is a CommandKit element.\n * @param element The element to check.\n * @returns True if the element is a CommandKit element, false otherwise.\n */\nexport function isCommandKitElement(\n element: unknown,\n): element is CommandKitElement<ElementType> {\n if (typeof element !== 'object' || element === null) return false;\n if (!Reflect.has(element, 'type')) return false;\n if (!Reflect.has(element, 'data')) return false;\n\n return true;\n}\n\n/**\n * Gets the element data for a specific CommandKit element.\n * @param element The CommandKit element to get the data for.\n * @returns The element data for the specified CommandKit element.\n */\nexport function getElement<\n T extends ElementType,\n E extends CommandKitElement<T>,\n>(element: E): CommandKitElementData[T] {\n return element.data as CommandKitElementData[T];\n}\n\n/**\n * Represents the properties for a fragment element in CommandKit.\n */\nexport interface FragmentElementProps {\n children: [];\n}\n\n/**\n * Represents a fragment of CommandKit elements.\n * @param props The properties for the fragment.\n * @returns The fragment element.\n */\nexport function Fragment(\n props: FragmentElementProps,\n): CommandKitElementData[ElementType][] {\n return Array.isArray(props.children)\n ? props.children.flat()\n : [props.children];\n}\n\n/**\n * The createElement function is used to create CommandKit elements.\n * @param type The type of the element to create.\n * @param props The properties for the element.\n * @param children The children of the element.\n * @returns The created CommandKit element.\n */\nexport function createElement(\n type: Function,\n props: Record<string, unknown>,\n ...children: any[]\n): CommandKitElement<ElementType> {\n return type({ ...props, children: props.children ?? children });\n}\n\nexport { createElement as jsx, createElement as jsxs };\n"],"mappings":";;;;;AAOA,MAAa,cAAc;CACzB,WAAW;CACX,QAAQ;CACR,OAAO;CACP,WAAW;CACZ;;;;;;AAkCD,SAAgB,oBAChB,SAC4C;AAC1C,KAAI,OAAO,YAAY,YAAY,YAAY,KAAM,QAAO;AAC5D,KAAI,CAAC,QAAQ,IAAI,SAAS,OAAO,CAAE,QAAO;AAC1C,KAAI,CAAC,QAAQ,IAAI,SAAS,OAAO,CAAE,QAAO;AAE1C,QAAO;;;;;;;AAQT,SAAgB,WAGhB,SAAsC;AACpC,QAAO,QAAQ;;;;;;;AAejB,SAAgB,SAChB,OACuC;AACrC,QAAO,MAAM,QAAQ,MAAM,SAAQ,GACnC,MAAM,SAAS,MAAM,GACrB,CAAC,MAAM,SAAS;;;;;;;;;AAUlB,SAAgB,cAChB,MACA,OACA,GAAG,UAC8B;AAC/B,QAAO,KAAK;EAAE,GAAG;EAAO,UAAU,MAAM,YAAY;EAAU,CAAC"}
1
+ {"version":3,"file":"element-DibzzA5L.js","names":[],"sources":["../src/components/common/element.ts"],"sourcesContent":["import type { ActionRowBuilder, TextInputBuilder } from 'discord.js';\nimport type { ButtonKit } from '../interactive/button/ButtonKit';\nimport type { ModalKit } from '../interactive/modal/ModalKit';\n\n/**\n * Represents the types of elements that can be used in CommandKit.\n */\nexport const ElementType = {\n ActionRow: 'action-row',\n Button: 'button-kit',\n Modal: 'modal',\n TextInput: 'text-input',\n} as const;\n\n/**\n * The type of element that can be used in CommandKit.\n * This is a union of the keys of the ElementType object.\n */\nexport type ElementType = (typeof ElementType)[keyof typeof ElementType];\n\n/**\n * The data structure that maps each ElementType to its corresponding CommandKit element.\n */\nexport interface CommandKitElementData {\n [ElementType.ActionRow]: ActionRowBuilder;\n [ElementType.Button]: ButtonKit;\n [ElementType.Modal]: ModalKit;\n [ElementType.TextInput]: TextInputBuilder;\n}\n\n/**\n * Represents a CommandKit element with a specific type and data.\n */\nexport type CommandKitElement<Type extends ElementType> =\n CommandKitElementData[Type];\n\n/**\n * Represents any CommandKit element, which can be of any type defined in CommandKitElementData.\n */\nexport type AnyCommandKitElement = CommandKitElement<ElementType>;\n\n/**\n * Checks if the given element is a CommandKit element.\n * @param element The element to check.\n * @returns True if the element is a CommandKit element, false otherwise.\n */\nexport function isCommandKitElement(\n element: unknown,\n): element is CommandKitElement<ElementType> {\n if (typeof element !== 'object' || element === null) return false;\n if (!Reflect.has(element, 'type')) return false;\n if (!Reflect.has(element, 'data')) return false;\n\n return true;\n}\n\n/**\n * Gets the element data for a specific CommandKit element.\n * @param element The CommandKit element to get the data for.\n * @returns The element data for the specified CommandKit element.\n */\nexport function getElement<\n T extends ElementType,\n E extends CommandKitElement<T>,\n>(element: E): CommandKitElementData[T] {\n return element.data as CommandKitElementData[T];\n}\n\n/**\n * Represents the properties for a fragment element in CommandKit.\n */\nexport interface FragmentElementProps {\n children: [];\n}\n\n/**\n * Represents a fragment of CommandKit elements.\n * @param props The properties for the fragment.\n * @returns The fragment element.\n */\nexport function Fragment(\n props: FragmentElementProps,\n): CommandKitElementData[ElementType][] {\n return Array.isArray(props.children)\n ? props.children.flat()\n : [props.children];\n}\n\n/**\n * The createElement function is used to create CommandKit elements.\n * @param type The type of the element to create.\n * @param props The properties for the element.\n * @param children The children of the element.\n * @returns The created CommandKit element.\n */\nexport function createElement(\n type: Function,\n props: Record<string, unknown>,\n ...children: any[]\n): CommandKitElement<ElementType> {\n return type({ ...props, children: props.children ?? children });\n}\n\nexport { createElement as jsx, createElement as jsxs };\n"],"mappings":";;;;;AAOA,MAAa,cAAc;CACzB,WAAW;CACX,QAAQ;CACR,OAAO;CACP,WAAW;CACZ;;;;;;AAkCD,SAAgB,oBAChB,SAC4C;AAC1C,KAAI,OAAO,YAAY,YAAY,YAAY,KAAM,QAAO;AAC5D,KAAI,CAAC,QAAQ,IAAI,SAAS,OAAO,CAAE,QAAO;AAC1C,KAAI,CAAC,QAAQ,IAAI,SAAS,OAAO,CAAE,QAAO;AAE1C,QAAO;;;;;;;AAQT,SAAgB,WAGhB,SAAsC;AACpC,QAAO,QAAQ;;;;;;;AAejB,SAAgB,SAChB,OACuC;AACrC,QAAO,MAAM,QAAQ,MAAM,SAAQ,GACnC,MAAI,SAAM,MAAS,GACnB,CAAC,MAAI,SAAM;;;;;;;;;AAUb,SAAgB,cAChB,MACA,OACA,GAAG,UAC8B;AAC/B,QAAO,KAAK;EAAE,GAAG;EAAO,UAAU,MAAM,YAAY;EAAU,CAAC"}
@@ -1,9 +1,8 @@
1
- import { t as ButtonKit } from "./ButtonKit-B_HCmb3D.js";
2
- import { i as ModalKit } from "./ModalKit-C8WkeoDl.js";
1
+ import { t as ButtonKit } from "./ButtonKit-DKu0VAe4.js";
2
+ import { i as ModalKit } from "./ModalKit-BWXI3Z26.js";
3
3
  import { ActionRowBuilder, TextInputBuilder } from "discord.js";
4
4
 
5
5
  //#region src/components/common/element.d.ts
6
-
7
6
  /**
8
7
  * Represents the types of elements that can be used in CommandKit.
9
8
  */
@@ -69,4 +68,4 @@ declare function Fragment(props: FragmentElementProps): CommandKitElementData[El
69
68
  declare function createElement(type: Function, props: Record<string, unknown>, ...children: any[]): CommandKitElement<ElementType>;
70
69
  //#endregion
71
70
  export { Fragment as a, getElement as c, ElementType as i, isCommandKitElement as l, CommandKitElement as n, FragmentElementProps as o, CommandKitElementData as r, createElement as s, AnyCommandKitElement as t };
72
- //# sourceMappingURL=element-CGY5MlNe.d.ts.map
71
+ //# sourceMappingURL=element-wQo0heGj.d.ts.map
@@ -110,4 +110,4 @@ Object.defineProperty(exports, 'setCLIEnv', {
110
110
  return setCLIEnv;
111
111
  }
112
112
  });
113
- //# sourceMappingURL=env-CQJgOkQD.js.map
113
+ //# sourceMappingURL=env-CmspDhHy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"env-CQJgOkQD.js","names":[],"sources":["../src/cli/env.ts"],"sourcesContent":["/**\n * @private\n * @internal\n */\nexport function DevEnv(_static = false) {\n const common = {\n NODE_ENV: 'development',\n COMMANDKIT_IS_DEV: 'true',\n COMMANDKIT_INTERNAL_IS_CLI_PROCESS: 'false',\n COMMANDKIT_IS_BUILD: 'false',\n };\n\n if (_static) return Object.assign({}, common);\n\n return Object.assign({}, process.env, common);\n}\n\n/**\n * @private\n * @internal\n */\nexport function ProdEnv(_static = false) {\n const common = {\n NODE_ENV: 'production',\n COMMANDKIT_IS_DEV: 'false',\n COMMANDKIT_INTERNAL_IS_CLI_PROCESS: 'false',\n COMMANDKIT_IS_BUILD: 'false',\n };\n\n if (_static) return Object.assign({}, common);\n\n return Object.assign({}, process.env, common);\n}\n\n/**\n * @private\n * @internal\n */\nexport const CommonEnvFiles = ['.env', '.env.local'];\n/**\n * @private\n * @internal\n */\nexport const DevEnvFiles = ['.env.development', '.env.development.local'];\n/**\n * @private\n * @internal\n */\nexport const ProdEnvFiles = ['.env.production', '.env.production.local'];\n/**\n * @private\n * @internal\n */\nexport const devEnvFileArgs = [...CommonEnvFiles, ...DevEnvFiles];\n/**\n * @private\n * @internal\n */\nexport const prodEnvFileArgs = [...CommonEnvFiles, ...ProdEnvFiles];\n/**\n * @private\n * @internal\n */\nexport function setCLIEnv() {\n process.env.COMMANDKIT_IS_CLI = 'true';\n}\n"],"mappings":";;;;;;AAIA,SAAgB,OAAO,UAAU,OAAO;CACtC,MAAM,SAAS;EACb,UAAU;EACV,mBAAmB;EACnB,oCAAoC;EACpC,qBAAqB;EACtB;AAED,KAAI,QAAS,QAAO,OAAO,OAAO,EAAE,EAAE,OAAO;AAE7C,QAAO,OAAO,OAAO,EAAE,EAAE,QAAQ,KAAK,OAAO;;;;;;AAO/C,SAAgB,QAAQ,UAAU,OAAO;CACvC,MAAM,SAAS;EACb,UAAU;EACV,mBAAmB;EACnB,oCAAoC;EACpC,qBAAqB;EACtB;AAED,KAAI,QAAS,QAAO,OAAO,OAAO,EAAE,EAAE,OAAO;AAE7C,QAAO,OAAO,OAAO,EAAE,EAAE,QAAQ,KAAK,OAAO;;;;;;AAO/C,MAAa,iBAAiB,CAAC,QAAQ,aAAa;;;;;AAKpD,MAAa,cAAc,CAAC,oBAAoB,yBAAyB;;;;;AAKzE,MAAa,eAAe,CAAC,mBAAmB,wBAAwB;;;;;AAKxE,MAAa,iBAAiB,CAAC,GAAG,gBAAgB,GAAG,YAAY;;;;;AAKjE,MAAa,kBAAkB,CAAC,GAAG,gBAAgB,GAAG,aAAa;;;;;AAKnE,SAAgB,YAAY;AAC1B,SAAQ,IAAI,oBAAoB"}
1
+ {"version":3,"file":"env-CmspDhHy.js","names":[],"sources":["../src/cli/env.ts"],"sourcesContent":["/**\n * @private\n * @internal\n */\nexport function DevEnv(_static = false) {\n const common = {\n NODE_ENV: 'development',\n COMMANDKIT_IS_DEV: 'true',\n COMMANDKIT_INTERNAL_IS_CLI_PROCESS: 'false',\n COMMANDKIT_IS_BUILD: 'false',\n };\n\n if (_static) return Object.assign({}, common);\n\n return Object.assign({}, process.env, common);\n}\n\n/**\n * @private\n * @internal\n */\nexport function ProdEnv(_static = false) {\n const common = {\n NODE_ENV: 'production',\n COMMANDKIT_IS_DEV: 'false',\n COMMANDKIT_INTERNAL_IS_CLI_PROCESS: 'false',\n COMMANDKIT_IS_BUILD: 'false',\n };\n\n if (_static) return Object.assign({}, common);\n\n return Object.assign({}, process.env, common);\n}\n\n/**\n * @private\n * @internal\n */\nexport const CommonEnvFiles = ['.env', '.env.local'];\n/**\n * @private\n * @internal\n */\nexport const DevEnvFiles = ['.env.development', '.env.development.local'];\n/**\n * @private\n * @internal\n */\nexport const ProdEnvFiles = ['.env.production', '.env.production.local'];\n/**\n * @private\n * @internal\n */\nexport const devEnvFileArgs = [...CommonEnvFiles, ...DevEnvFiles];\n/**\n * @private\n * @internal\n */\nexport const prodEnvFileArgs = [...CommonEnvFiles, ...ProdEnvFiles];\n/**\n * @private\n * @internal\n */\nexport function setCLIEnv() {\n process.env.COMMANDKIT_IS_CLI = 'true';\n}\n"],"mappings":";;;;;;AAIA,SAAgB,OAAO,UAAU,OAAO;CACtC,MAAM,SAAS;EACb,UAAU;EACV,mBAAmB;EACnB,oCAAoC;EACpC,qBAAqB;EACtB;AAED,KAAI,QAAS,QAAO,OAAO,OAAO,EAAE,EAAE,OAAO;AAE7C,QAAO,OAAO,OAAO,EAAE,EAAE,QAAQ,KAAK,OAAO;;;;;;AAO/C,SAAgB,QAAQ,UAAU,OAAO;CACvC,MAAM,SAAS;EACb,UAAU;EACV,mBAAmB;EACnB,oCAAoC;EACpC,qBAAqB;EACtB;AAED,KAAI,QAAS,QAAO,OAAO,OAAO,EAAE,EAAE,OAAO;AAE7C,QAAO,OAAO,OAAO,EAAE,EAAE,QAAQ,KAAK,OAAO;;;;;;AAO/C,MAAa,iBAAiB,CAAC,QAAQ,aAAa;;;;;AAKpD,MAAa,cAAc,CAAC,oBAAoB,yBAAyB;;;;;AAKzE,MAAa,eAAe,CAAC,mBAAmB,wBAAwB;;;;;AAKxE,MAAa,iBAAiB,CAAC,GAAG,gBAAgB,GAAG,YAAY;;;;;AAKjE,MAAa,kBAAkB,CAAC,GAAG,gBAAgB,GAAG,aAAa;;;;;AAKnE,SAAgB,YAAY;AAC1B,SAAQ,IAAI,oBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"error-codes-Ds0bnPvT.js","names":[],"sources":["../src/utils/error-codes.ts"],"sourcesContent":["/**\n * The error codes used by CommandKit.\n */\nexport const CommandKitErrorCodes = {\n /**\n * Error code for exiting middleware.\n */\n StopMiddlewares: Symbol('kStopMiddlewares'),\n /**\n * Error code for forwarded commands.\n */\n ForwardedCommand: Symbol('kForwardedCommand'),\n /**\n * Error code for invalid command prefix.\n */\n InvalidCommandPrefix: Symbol('kInvalidCommandPrefix'),\n /**\n * Error code for plugin capture handle.\n */\n PluginCaptureHandle: Symbol('kPluginCaptureHandle'),\n /**\n * Error code for event interruption signal\n */\n StopEvents: Symbol('kStopEvents'),\n} as const;\n\n/**\n * The type for CommandKit errors.\n */\nexport type CommandKitError = Error & { code: symbol };\n\n/**\n * Creates a new CommandKit error with the specified code.\n * @param code The error code to assign to the error.\n * @returns A new CommandKit error instance.\n */\nexport function createCommandKitError(code: symbol): CommandKitError {\n const error = new Error() as CommandKitError;\n\n Reflect.set(error, 'code', code);\n\n return error;\n}\n\n/**\n * Checks if the given error is a CommandKit error.\n * @param error The error to check.\n * @returns True if the error is a CommandKit error, false otherwise.\n */\nexport function isCommandKitError(error: unknown): error is CommandKitError {\n if (!(error instanceof Error)) return false;\n const code = Reflect.get(error, 'code');\n\n for (const key in CommandKitErrorCodes) {\n if (CommandKitErrorCodes[key as keyof typeof CommandKitErrorCodes] === code)\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if the given error is of a specific CommandKit error type.\n * @param error The error to check.\n * @param code The error code or an array of error codes to check against.\n * @returns True if the error matches the specified code(s), false otherwise.\n */\nexport function isErrorType(error: unknown, code: symbol | symbol[]): boolean {\n if (!isCommandKitError(error)) return false;\n const errorCode = Reflect.get(error, 'code');\n\n if (!errorCode) return false;\n\n if (Array.isArray(code)) return code.includes(errorCode);\n\n return errorCode === code;\n}\n"],"mappings":";;;;;AAGA,MAAa,uBAAuB;CAIlC,iBAAiB,OAAO,mBAAmB;CAI3C,kBAAkB,OAAO,oBAAoB;CAI7C,sBAAsB,OAAO,wBAAwB;CAIrD,qBAAqB,OAAO,uBAAuB;CAInD,YAAY,OAAO,cAAc;CAClC;;;;;;AAYD,SAAgB,sBAAsB,MAA+B;CACnE,MAAM,wBAAQ,IAAI,OAAO;AAEzB,SAAQ,IAAI,OAAO,QAAQ,KAAK;AAEhC,QAAO;;;;;;;AAQT,SAAgB,kBAAkB,OAA0C;AAC1E,KAAI,EAAE,iBAAiB,OAAQ,QAAO;CACtC,MAAM,OAAO,QAAQ,IAAI,OAAO,OAAO;AAEvC,MAAK,MAAM,OAAO,qBAChB,KAAI,qBAAqB,SAA8C,KACvE,QAAO;AAGT,QAAO;;;;;;;;AAST,SAAgB,YAAY,OAAgB,MAAkC;AAC5E,KAAI,CAAC,kBAAkB,MAAM,CAAE,QAAO;CACtC,MAAM,YAAY,QAAQ,IAAI,OAAO,OAAO;AAE5C,KAAI,CAAC,UAAW,QAAO;AAEvB,KAAI,MAAM,QAAQ,KAAK,CAAE,QAAO,KAAK,SAAS,UAAU;AAExD,QAAO,cAAc"}
1
+ {"version":3,"file":"error-codes-Ds0bnPvT.js","names":[],"sources":["../src/utils/error-codes.ts"],"sourcesContent":["/**\n * The error codes used by CommandKit.\n */\nexport const CommandKitErrorCodes = {\n /**\n * Error code for exiting middleware.\n */\n StopMiddlewares: Symbol('kStopMiddlewares'),\n /**\n * Error code for forwarded commands.\n */\n ForwardedCommand: Symbol('kForwardedCommand'),\n /**\n * Error code for invalid command prefix.\n */\n InvalidCommandPrefix: Symbol('kInvalidCommandPrefix'),\n /**\n * Error code for plugin capture handle.\n */\n PluginCaptureHandle: Symbol('kPluginCaptureHandle'),\n /**\n * Error code for event interruption signal\n */\n StopEvents: Symbol('kStopEvents'),\n} as const;\n\n/**\n * The type for CommandKit errors.\n */\nexport type CommandKitError = Error & { code: symbol };\n\n/**\n * Creates a new CommandKit error with the specified code.\n * @param code The error code to assign to the error.\n * @returns A new CommandKit error instance.\n */\nexport function createCommandKitError(code: symbol): CommandKitError {\n const error = new Error() as CommandKitError;\n\n Reflect.set(error, 'code', code);\n\n return error;\n}\n\n/**\n * Checks if the given error is a CommandKit error.\n * @param error The error to check.\n * @returns True if the error is a CommandKit error, false otherwise.\n */\nexport function isCommandKitError(error: unknown): error is CommandKitError {\n if (!(error instanceof Error)) return false;\n const code = Reflect.get(error, 'code');\n\n for (const key in CommandKitErrorCodes) {\n if (CommandKitErrorCodes[key as keyof typeof CommandKitErrorCodes] === code)\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if the given error is of a specific CommandKit error type.\n * @param error The error to check.\n * @param code The error code or an array of error codes to check against.\n * @returns True if the error matches the specified code(s), false otherwise.\n */\nexport function isErrorType(error: unknown, code: symbol | symbol[]): boolean {\n if (!isCommandKitError(error)) return false;\n const errorCode = Reflect.get(error, 'code');\n\n if (!errorCode) return false;\n\n if (Array.isArray(code)) return code.includes(errorCode);\n\n return errorCode === code;\n}\n"],"mappings":";;;;;AAGA,MAAa,uBAAuB;CAIlC,iBAAiB,OAAO,mBAAmB;CAI3C,kBAAkB,OAAO,oBAAoB;CAI7C,sBAAsB,OAAO,wBAAwB;CAIrD,qBAAqB,OAAO,uBAAuB;CAInD,YAAY,OAAO,cAAc;CAClC;;;;;;AAYD,SAAgB,sBAAsB,MAA+B;CACnE,MAAM,wBAAQ,IAAI,OAAO;AAEzB,SAAQ,IAAI,OAAO,QAAQ,KAAK;AAEhC,QAAO;;;;;;;AAQT,SAAgB,kBAAkB,OAA0C;AAC1E,KAAI,EAAE,iBAAiB,OAAQ,QAAO;CACtC,MAAM,OAAO,QAAQ,IAAI,OAAO,OAAO;AAEvC,MAAK,MAAM,OAAO,qBAChB,KAAI,qBAAqB,SAA8C,KACvE,QAAE;AAGJ,QAAO;;;;;;;;AAST,SAAgB,YAAY,OAAgB,MAAkC;AAC5E,KAAI,CAAC,kBAAkB,MAAM,CAAE,QAAO;CACtC,MAAM,YAAY,QAAQ,IAAI,OAAO,OAAO;AAE5C,KAAI,CAAC,UAAW,QAAO;AAEvB,KAAI,MAAM,QAAQ,KAAK,CAAE,QAAO,KAAK,SAAS,UAAU;AAExD,QAAO,cAAc"}
@@ -1,34 +1,2 @@
1
- import { ct as ListenerFunction, st as CommandKitEventsChannel } 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 { ct as ListenerFunction, st as CommandKitEventsChannel } from "../analytics-engine-WQhXmx3H.js";
34
2
  export { CommandKitEventsChannel, ListenerFunction };
@@ -1,3 +1,3 @@
1
- const require_CommandKitEventsChannel = require('../CommandKitEventsChannel-2l9Za-le.js');
1
+ const require_CommandKitEventsChannel = require('../CommandKitEventsChannel-CnT5ymYe.js');
2
2
 
3
3
  exports.CommandKitEventsChannel = require_CommandKitEventsChannel.CommandKitEventsChannel;
@@ -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/file.ts
@@ -25,4 +25,4 @@ Object.defineProperty(exports, 'File', {
25
25
  return File;
26
26
  }
27
27
  });
28
- //# sourceMappingURL=file-DgEXJx3x.js.map
28
+ //# sourceMappingURL=file-Ca1kpEtE.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-DgEXJx3x.js","names":[],"sources":["../src/components/display/file.ts"],"sourcesContent":["import { FileBuilder, FileComponentData } from 'discord.js';\n\n/**\n * Represents the properties for a file component.\n */\nexport interface FileProps extends Omit<FileComponentData, 'type' | 'file'> {\n url: string;\n}\n\n/**\n * The file component\n * @param props - The properties for the file component.\n * @returns The file builder instance.\n * @example ```tsx\n * import { File } from 'commandkit';\n *\n * const file = <File url=\"https://example.com/file.png\" />;\n * ```\n */\nexport function File(props: FileProps) {\n const file = new FileBuilder(props);\n\n if (props.url != null) {\n file.setURL(props.url);\n }\n\n return file;\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,SAAgB,KAAK,OAAkB;CACrC,MAAM,OAAO,IAAI,uBAAY,MAAM;AAEnC,KAAI,MAAM,OAAO,KACf,MAAK,OAAO,MAAM,IAAI;AAGxB,QAAO"}
1
+ {"version":3,"file":"file-Ca1kpEtE.js","names":[],"sources":["../src/components/display/file.ts"],"sourcesContent":["import { FileBuilder, FileComponentData } from 'discord.js';\n\n/**\n * Represents the properties for a file component.\n */\nexport interface FileProps extends Omit<FileComponentData, 'type' | 'file'> {\n url: string;\n}\n\n/**\n * The file component\n * @param props - The properties for the file component.\n * @returns The file builder instance.\n * @example ```tsx\n * import { File } from 'commandkit';\n *\n * const file = <File url=\"https://example.com/file.png\" />;\n * ```\n */\nexport function File(props: FileProps) {\n const file = new FileBuilder(props);\n\n if (props.url != null) {\n file.setURL(props.url);\n }\n\n return file;\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,SAAgB,KAAK,OAAkB;CACrC,MAAM,OAAO,IAAI,uBAAY,MAAM;AAEnC,KAAI,MAAM,OAAO,KACf,MAAK,OAAO,MAAM,IAAI;AAGxB,QAAO"}
@@ -1,7 +1,6 @@
1
1
  import { FileBuilder, FileComponentData } from "discord.js";
2
2
 
3
3
  //#region src/components/display/file.d.ts
4
-
5
4
  /**
6
5
  * Represents the properties for a file component.
7
6
  */
@@ -21,4 +20,4 @@ interface FileProps extends Omit<FileComponentData, 'type' | 'file'> {
21
20
  declare function File(props: FileProps): FileBuilder;
22
21
  //#endregion
23
22
  export { FileProps as n, File as t };
24
- //# sourceMappingURL=file-CfUTZjJh.d.ts.map
23
+ //# sourceMappingURL=file-CrV4lSnl.d.ts.map
@@ -1,34 +1,2 @@
1
- import { M as FlagConfiguration, N as FlagProvider, P as JsonFlagProvider } 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 { M as FlagConfiguration, N as FlagProvider, P as JsonFlagProvider } from "../analytics-engine-WQhXmx3H.js";
34
2
  export { FlagConfiguration, FlagProvider, JsonFlagProvider };
@@ -1,34 +1,2 @@
1
- import { A as flag, C as EvaluationContext, D as FlagRunner, E as FeatureFlagDefinition, O as IdentifyFunction, S as DecideFunction, T as FeatureFlag, b as CustomEvaluationContext, j as setFlagProvider, k as MaybePromise, w as EventFlagContext, x as CustomEvaluationFunction, y as CommandFlagContext } 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 { A as flag, C as EvaluationContext, D as FlagRunner, E as FeatureFlagDefinition, O as IdentifyFunction, S as DecideFunction, T as FeatureFlag, b as CustomEvaluationContext, j as setFlagProvider, k as MaybePromise, w as EventFlagContext, x as CustomEvaluationFunction, y as CommandFlagContext } from "../analytics-engine-WQhXmx3H.js";
34
2
  export { CommandFlagContext, CustomEvaluationContext, CustomEvaluationFunction, DecideFunction, EvaluationContext, EventFlagContext, FeatureFlag, FeatureFlagDefinition, FlagRunner, IdentifyFunction, MaybePromise, flag, setFlagProvider };
@@ -1,44 +1,166 @@
1
- require('../colors-CLmBiP9I.js');
2
- require('../ActionRow-D6knpVd6.js');
3
- require('../error-codes-Ds0bnPvT.js');
4
- 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
+ const require_constants$1 = require('../constants-Cw8VjCVz.js');
16
+ const require_EventWorkerContext = 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');
40
- const require_feature_flags = require('../feature-flags-BRF8OH7U.js');
23
+ require('../common-DSRs_mfw.js');
24
+ require('../store-D8r_hryO.js');
41
25
 
42
- exports.FeatureFlag = require_feature_flags.FeatureFlag;
43
- exports.flag = require_feature_flags.flag;
44
- exports.setFlagProvider = require_feature_flags.setFlagProvider;
26
+ //#region src/flags/feature-flags.ts
27
+ let flagProvider = null;
28
+ /**
29
+ * Set the global flag provider for all feature flags
30
+ */
31
+ function setFlagProvider(provider) {
32
+ flagProvider = provider;
33
+ }
34
+ /**
35
+ * Class representing a feature flag in CommandKit.
36
+ */
37
+ var FeatureFlag = class {
38
+ commandkit;
39
+ /**
40
+ * Create a new feature flag.
41
+ * @param options - The options for the feature flag.
42
+ */
43
+ constructor(options) {
44
+ this.options = options;
45
+ this.commandkit = require_commandkit.getCommandKit(true);
46
+ const FlagStore = this.commandkit.flags;
47
+ if (FlagStore.has(options.key)) throw new Error(`Feature flag with key "${options.key}" already exists.`);
48
+ FlagStore.set(options.key, this);
49
+ }
50
+ getContext() {
51
+ const env = require_commandkit.getContext();
52
+ if (env === null || env === void 0 ? void 0 : env.context) {
53
+ const { client, commandkit, interaction, message, guild, channel, command } = env.context;
54
+ return {
55
+ client,
56
+ commandkit,
57
+ command: {
58
+ interaction,
59
+ message,
60
+ guild,
61
+ channel,
62
+ command
63
+ },
64
+ event: null
65
+ };
66
+ }
67
+ const eventCtx = require_EventWorkerContext.eventWorkerContext.getStore();
68
+ if (eventCtx) {
69
+ const { commandkit, data, event, namespace } = eventCtx;
70
+ return {
71
+ client: commandkit.client,
72
+ commandkit,
73
+ event: {
74
+ data,
75
+ event,
76
+ namespace,
77
+ arguments: eventCtx.arguments,
78
+ argumentsAs: (eventName) => {
79
+ return eventCtx.arguments;
80
+ }
81
+ },
82
+ command: null
83
+ };
84
+ }
85
+ throw new Error("Could not determine the execution context. Feature flags may only be used inside a command or event.");
86
+ }
87
+ /**
88
+ * Execute the feature flag evaluation.
89
+ * @param res - Optional entities to use for evaluation. If not provided, it will call the identify function.
90
+ * @returns A promise that resolves to the result of the feature flag evaluation.
91
+ */
92
+ async execute(res) {
93
+ const { decide, identify, disableAnalytics } = this.options;
94
+ const identificationStart = performance.now();
95
+ const entities = res ?? await (async () => {
96
+ const ctx = this.getContext();
97
+ return await (identify === null || identify === void 0 ? void 0 : identify(ctx)) ?? {};
98
+ })();
99
+ const identificationTime = performance.now() - identificationStart;
100
+ let providerConfig = null;
101
+ if (flagProvider) try {
102
+ providerConfig = await flagProvider.getFlag(this.options.key, entities);
103
+ if (providerConfig && !providerConfig.enabled) {
104
+ if (typeof decide === "function") return await decide({
105
+ entities,
106
+ provider: providerConfig
107
+ });
108
+ }
109
+ } catch (error) {
110
+ require_commandkit.Logger.error`Error fetching flag provider configuration for "${this.options.key}": ${error}`;
111
+ }
112
+ const decisionStart = performance.now();
113
+ const decisionResult = await decide({
114
+ entities,
115
+ provider: providerConfig
116
+ });
117
+ const decisionTime = performance.now() - decisionStart;
118
+ if (!disableAnalytics) {
119
+ require_commandkit.defer(async () => {
120
+ await this.commandkit.analytics.track({
121
+ name: require_constants$1.AnalyticsEvents.FEATURE_FLAG_METRICS,
122
+ data: {
123
+ flag: this.options.key,
124
+ identificationTime: identificationTime.toFixed(2),
125
+ decisionTime: decisionTime.toFixed(2),
126
+ usedProvider: flagProvider !== null,
127
+ providerEnabled: (providerConfig === null || providerConfig === void 0 ? void 0 : providerConfig.enabled) ?? null
128
+ }
129
+ });
130
+ });
131
+ require_commandkit.defer(async () => {
132
+ await this.commandkit.analytics.track({
133
+ name: require_constants$1.AnalyticsEvents.FEATURE_FLAG_DECISION,
134
+ id: entities && typeof entities === "object" && "id" in entities && typeof entities.id === "string" ? entities.id : void 0,
135
+ data: {
136
+ flag: this.options.key,
137
+ decision: require_commandkit.JsonSerialize(decisionResult, "unknown"),
138
+ providerUsed: flagProvider !== null
139
+ }
140
+ });
141
+ });
142
+ }
143
+ return decisionResult;
144
+ }
145
+ };
146
+ /**
147
+ * Create a new feature flag.
148
+ * @param options - The options for the feature flag.
149
+ * @returns A new instance of the FeatureFlag class.
150
+ */
151
+ function flag(options) {
152
+ const flag = new FeatureFlag(options);
153
+ const runner = flag.execute.bind(flag, void 0);
154
+ runner.run = async function(ctx) {
155
+ if (!(ctx === null || ctx === void 0 ? void 0 : ctx.identify)) throw new Error("Custom evaluation context must have an identify function or object.");
156
+ const context = typeof ctx === "function" ? await ctx() : ctx;
157
+ return await flag.execute(context);
158
+ };
159
+ return runner;
160
+ }
161
+
162
+ //#endregion
163
+ exports.FeatureFlag = FeatureFlag;
164
+ exports.flag = flag;
165
+ exports.setFlagProvider = setFlagProvider;
166
+ //# sourceMappingURL=feature-flags.js.map