commandkit 1.0.0-dev.20250529125116 → 1.0.0-dev.20250530015910

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 (391) hide show
  1. package/dist/ActionRow-CmTHbo2t.js +25 -0
  2. package/dist/ActionRow-CmTHbo2t.js.map +1 -0
  3. package/dist/ActionRow-D0wafJhZ.d.ts +16 -0
  4. package/dist/Button-Bl5nbwTS.d.ts +32 -0
  5. package/dist/ButtonKit-BSI7lCI0.d.ts +68 -0
  6. package/dist/ChannelSelectMenuKit-L15A2jpT.d.ts +51 -0
  7. package/dist/CommandKit-CDlCsGCx.d.ts +926 -0
  8. package/dist/CommandKit-DDrQtQns.js +3281 -0
  9. package/dist/CommandKit-DDrQtQns.js.map +1 -0
  10. package/dist/CommandKit.d.ts +33 -13
  11. package/dist/CommandKit.js +46 -16
  12. package/dist/CommandKitEventsChannel-B6LKgxmv.js +44 -0
  13. package/dist/CommandKitEventsChannel-B6LKgxmv.js.map +1 -0
  14. package/dist/CommandsRouter-BHaPno8o.js +127 -0
  15. package/dist/CommandsRouter-BHaPno8o.js.map +1 -0
  16. package/dist/CommandsRouter-C7X-eXE2.d.ts +67 -0
  17. package/dist/CompilerPlugin-XzuGixkC.js +32 -0
  18. package/dist/CompilerPlugin-XzuGixkC.js.map +1 -0
  19. package/dist/CompilerPluginRuntime-zFCCw1kM.js +70 -0
  20. package/dist/CompilerPluginRuntime-zFCCw1kM.js.map +1 -0
  21. package/dist/DefaultLogger-D3G0rGnV.d.ts +30 -0
  22. package/dist/EventInterceptor-D_oEWSnF.d.ts +84 -0
  23. package/dist/EventInterceptor-DtRINyTP.js +140 -0
  24. package/dist/EventInterceptor-DtRINyTP.js.map +1 -0
  25. package/dist/EventWorkerContext-C0e23GNY.d.ts +19 -0
  26. package/dist/EventWorkerContext-XZGSHn5F.js +45 -0
  27. package/dist/EventWorkerContext-XZGSHn5F.js.map +1 -0
  28. package/dist/EventsRouter-BacqK6z3.d.ts +90 -0
  29. package/dist/EventsRouter-CqnrlbjN.js +133 -0
  30. package/dist/EventsRouter-CqnrlbjN.js.map +1 -0
  31. package/dist/ILogger-BTMQuall.d.ts +11 -0
  32. package/dist/ILogger-DucYb0bG.js +0 -0
  33. package/dist/Logger-A3wjB7L1.d.ts +17 -0
  34. package/dist/MentionableSelectMenuKit-BiUSKUtZ.d.ts +51 -0
  35. package/dist/MessageCommandParser-B13Pkwo9.js +200 -0
  36. package/dist/MessageCommandParser-B13Pkwo9.js.map +1 -0
  37. package/dist/MessageCommandParser-tzroBwij.d.ts +62 -0
  38. package/dist/Modal-Cxm6cs5c.d.ts +58 -0
  39. package/dist/ModalKit-CKtQ8eXW.d.ts +66 -0
  40. package/dist/PluginCommon-DPqnQngK.js +48 -0
  41. package/dist/PluginCommon-DPqnQngK.js.map +1 -0
  42. package/dist/RoleSelectMenuKit-BSMKkru2.d.ts +51 -0
  43. package/dist/RuntimePlugin-CKsd83M3.js +130 -0
  44. package/dist/RuntimePlugin-CKsd83M3.js.map +1 -0
  45. package/dist/SelectMenu-b7jgrkjO.d.ts +36 -0
  46. package/dist/StringSelectMenuKit-B9FHTe48.d.ts +51 -0
  47. package/dist/UserSelectMenuKit-DiP0imyo.d.ts +51 -0
  48. package/dist/app/commands/AppCommandRunner.d.ts +33 -13
  49. package/dist/app/commands/AppCommandRunner.js +38 -3
  50. package/dist/app/commands/Context.d.ts +33 -13
  51. package/dist/app/commands/Context.js +40 -3
  52. package/dist/app/commands/MessageCommandParser.d.ts +2 -60
  53. package/dist/app/commands/MessageCommandParser.js +5 -2
  54. package/dist/app/commands/helpers.d.ts +2 -7
  55. package/dist/app/commands/helpers.js +4 -2
  56. package/dist/app/events/EventWorkerContext.d.ts +34 -28
  57. package/dist/app/events/EventWorkerContext.js +6 -2
  58. package/dist/app/handlers/AppCommandHandler.d.ts +33 -13
  59. package/dist/app/handlers/AppCommandHandler.js +38 -8
  60. package/dist/app/handlers/AppEventsHandler.d.ts +33 -13
  61. package/dist/app/handlers/AppEventsHandler.js +38 -3
  62. package/dist/app/index.d.ts +33 -15
  63. package/dist/app/index.js +51 -8
  64. package/dist/app/middleware/signals.d.ts +2 -18
  65. package/dist/app/middleware/signals.js +6 -2
  66. package/dist/app/register/CommandRegistrar.d.ts +33 -13
  67. package/dist/app/register/CommandRegistrar.js +38 -3
  68. package/dist/app/router/CommandsRouter.d.ts +2 -65
  69. package/dist/app/router/CommandsRouter.js +3 -2
  70. package/dist/app/router/EventsRouter.d.ts +2 -88
  71. package/dist/app/router/EventsRouter.js +3 -2
  72. package/dist/app/router/index.d.ts +4 -3
  73. package/dist/app/router/index.js +6 -2
  74. package/dist/app-CXCbKsPz.js +0 -0
  75. package/dist/app-process-uCX52YaE.js +48 -0
  76. package/dist/app-process-uCX52YaE.js.map +1 -0
  77. package/dist/build-Bkb5t3XA.js +122 -0
  78. package/dist/build-Bkb5t3XA.js.map +1 -0
  79. package/dist/chunk-nOFOJqeH.js +30 -0
  80. package/dist/cli/app-process.d.ts +5 -3
  81. package/dist/cli/app-process.js +8 -3
  82. package/dist/cli/build.d.ts +46 -21
  83. package/dist/cli/build.js +40 -48
  84. package/dist/cli/common.d.ts +39 -19
  85. package/dist/cli/common.js +13 -10
  86. package/dist/cli/development.d.ts +3 -1
  87. package/dist/cli/development.js +185 -50
  88. package/dist/cli/development.js.map +1 -1
  89. package/dist/cli/env.d.ts +7 -5
  90. package/dist/cli/env.js +9 -2
  91. package/dist/cli/generators.d.ts +3 -1
  92. package/dist/cli/generators.js +64 -15
  93. package/dist/cli/generators.js.map +1 -1
  94. package/dist/cli/information.d.ts +3 -1
  95. package/dist/cli/information.js +110 -5
  96. package/dist/cli/information.js.map +1 -1
  97. package/dist/cli/init.d.ts +2 -10
  98. package/dist/cli/init.js +4 -99
  99. package/dist/cli/parse-env.d.ts +3 -1
  100. package/dist/cli/parse-env.js +53 -1
  101. package/dist/cli/parse-env.js.map +1 -1
  102. package/dist/cli/production.d.ts +5 -3
  103. package/dist/cli/production.js +68 -46
  104. package/dist/cli/production.js.map +1 -1
  105. package/dist/cli/type-checker.d.ts +3 -1
  106. package/dist/cli/type-checker.js +7 -5
  107. package/dist/cli/utils.d.ts +4 -2
  108. package/dist/cli/utils.js +3 -2
  109. package/dist/colors-Cd4Oz-r-.js +14 -0
  110. package/dist/colors-Cd4Oz-r-.js.map +1 -0
  111. package/dist/common-CcfjYnPG.js +0 -0
  112. package/dist/common-CeO-vn8Y.js +14 -0
  113. package/dist/common-CeO-vn8Y.js.map +1 -0
  114. package/dist/common-DirpDCa6.js +182 -0
  115. package/dist/common-DirpDCa6.js.map +1 -0
  116. package/dist/common-pvPJVTfe.d.ts +25 -0
  117. package/dist/components/common/EventInterceptor.d.ts +2 -82
  118. package/dist/components/common/EventInterceptor.js +3 -2
  119. package/dist/components/common/element.d.ts +5 -29
  120. package/dist/components/common/element.js +10 -2
  121. package/dist/components/common/types.d.ts +2 -3
  122. package/dist/components/common/types.js +1 -2
  123. package/dist/components/index.d.ts +24 -22
  124. package/dist/components/index.js +72 -16
  125. package/dist/components/v1/action-row/ActionRow.d.ts +6 -18
  126. package/dist/components/v1/action-row/ActionRow.js +3 -2
  127. package/dist/components/v1/button/Button.d.ts +7 -31
  128. package/dist/components/v1/button/Button.js +38 -16
  129. package/dist/components/v1/button/ButtonKit.d.ts +3 -66
  130. package/dist/components/v1/button/ButtonKit.js +38 -16
  131. package/dist/components/v1/modal/Modal.d.ts +7 -57
  132. package/dist/components/v1/modal/Modal.js +41 -16
  133. package/dist/components/v1/modal/ModalKit.d.ts +3 -64
  134. package/dist/components/v1/modal/ModalKit.js +38 -16
  135. package/dist/components/v1/select-menu/ChannelSelectMenuKit.d.ts +4 -49
  136. package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +38 -16
  137. package/dist/components/v1/select-menu/MentionableSelectMenuKit.d.ts +4 -49
  138. package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +38 -16
  139. package/dist/components/v1/select-menu/RoleSelectMenuKit.d.ts +4 -49
  140. package/dist/components/v1/select-menu/RoleSelectMenuKit.js +38 -16
  141. package/dist/components/v1/select-menu/SelectMenu.d.ts +10 -40
  142. package/dist/components/v1/select-menu/SelectMenu.js +43 -16
  143. package/dist/components/v1/select-menu/StringSelectMenuKit.d.ts +4 -49
  144. package/dist/components/v1/select-menu/StringSelectMenuKit.js +38 -16
  145. package/dist/components/v1/select-menu/UserSelectMenuKit.d.ts +4 -49
  146. package/dist/components/v1/select-menu/UserSelectMenuKit.js +38 -16
  147. package/dist/components/v1/select-menu/common.d.ts +3 -23
  148. package/dist/components/v1/select-menu/common.js +1 -2
  149. package/dist/components/v2/common.d.ts +5 -3
  150. package/dist/components/v2/common.js +3 -2
  151. package/dist/components/v2/container.d.ts +2 -8
  152. package/dist/components/v2/container.js +4 -2
  153. package/dist/components/v2/file.d.ts +2 -8
  154. package/dist/components/v2/file.js +3 -2
  155. package/dist/components/v2/index.d.ts +8 -7
  156. package/dist/components/v2/index.js +17 -2
  157. package/dist/components/v2/media-gallery.d.ts +2 -15
  158. package/dist/components/v2/media-gallery.js +5 -2
  159. package/dist/components/v2/section.d.ts +2 -16
  160. package/dist/components/v2/section.js +5 -2
  161. package/dist/components/v2/separator.d.ts +2 -7
  162. package/dist/components/v2/separator.js +3 -2
  163. package/dist/components/v2/text-display.d.ts +2 -10
  164. package/dist/components/v2/text-display.js +3 -2
  165. package/dist/config/config.d.ts +36 -28
  166. package/dist/config/config.js +39 -3
  167. package/dist/config/default.d.ts +37 -17
  168. package/dist/config/default.js +38 -3
  169. package/dist/config/loader.d.ts +37 -17
  170. package/dist/config/loader.js +39 -11
  171. package/dist/config/types.d.ts +34 -83
  172. package/dist/config/types.js +0 -2
  173. package/dist/config/utils.d.ts +35 -26
  174. package/dist/config/utils.js +15 -1
  175. package/dist/config/utils.js.map +1 -1
  176. package/dist/config-Dyb-zl9w.d.ts +17 -0
  177. package/dist/constants-Ce6w4OFe.d.ts +17 -0
  178. package/dist/constants-DOPSzXI0.js +47 -0
  179. package/dist/constants-DOPSzXI0.js.map +1 -0
  180. package/dist/container-CpuiLsZM.js +33 -0
  181. package/dist/container-CpuiLsZM.js.map +1 -0
  182. package/dist/container-CwEATQy2.d.ts +10 -0
  183. package/dist/context/async-context.d.ts +33 -13
  184. package/dist/context/async-context.js +44 -16
  185. package/dist/context/environment.d.ts +33 -13
  186. package/dist/context/environment.js +41 -3
  187. package/dist/element-D_nyVwgB.d.ts +30 -0
  188. package/dist/element-hdSqnIpC.js +62 -0
  189. package/dist/element-hdSqnIpC.js.map +1 -0
  190. package/dist/env-DKFSgEcR.js +68 -0
  191. package/dist/env-DKFSgEcR.js.map +1 -0
  192. package/dist/error-codes-C_UO39jz.js +53 -0
  193. package/dist/error-codes-C_UO39jz.js.map +1 -0
  194. package/dist/events/CommandKitEventsChannel.d.ts +33 -13
  195. package/dist/events/CommandKitEventsChannel.js +3 -2
  196. package/dist/feature-flags-BJp6kYmi.js +85 -0
  197. package/dist/feature-flags-BJp6kYmi.js.map +1 -0
  198. package/dist/file-BdyYwkaI.d.ts +10 -0
  199. package/dist/file-DE69SSOP.js +18 -0
  200. package/dist/file-DE69SSOP.js.map +1 -0
  201. package/dist/flags/feature-flags.d.ts +33 -13
  202. package/dist/flags/feature-flags.js +40 -16
  203. package/dist/flags/store.d.ts +33 -13
  204. package/dist/flags/store.js +3 -2
  205. package/dist/helpers-CswC9gKF.js +25 -0
  206. package/dist/helpers-CswC9gKF.js.map +1 -0
  207. package/dist/helpers-DAmE106r.d.ts +9 -0
  208. package/dist/index-CUPkUUOR.d.ts +1 -0
  209. package/dist/index-Dw5cCt-A.d.ts +1 -0
  210. package/dist/index-E7Wvm5uX.d.ts +1 -0
  211. package/dist/index.d.ts +43 -51
  212. package/dist/index.js +147 -102
  213. package/dist/index.js.map +1 -1
  214. package/dist/init--p1nl1NO.d.ts +13 -0
  215. package/dist/init-D2me-V0n.js +67 -0
  216. package/dist/init-D2me-V0n.js.map +1 -0
  217. package/dist/logger/DefaultLogger.d.ts +3 -28
  218. package/dist/logger/DefaultLogger.js +38 -3
  219. package/dist/logger/ILogger.d.ts +2 -9
  220. package/dist/logger/ILogger.js +1 -2
  221. package/dist/logger/Logger.d.ts +3 -15
  222. package/dist/logger/Logger.js +39 -3
  223. package/dist/media-gallery-DCu02VXc.d.ts +17 -0
  224. package/dist/media-gallery-nUEHqKVF.js +36 -0
  225. package/dist/media-gallery-nUEHqKVF.js.map +1 -0
  226. package/dist/plugins/CompilerPlugin.d.ts +33 -13
  227. package/dist/plugins/CompilerPlugin.js +5 -2
  228. package/dist/plugins/PluginCommon.d.ts +33 -13
  229. package/dist/plugins/PluginCommon.js +5 -2
  230. package/dist/plugins/RuntimePlugin.d.ts +33 -13
  231. package/dist/plugins/RuntimePlugin.js +5 -2
  232. package/dist/plugins/index.d.ts +33 -15
  233. package/dist/plugins/index.js +44 -3
  234. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +33 -13
  235. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +38 -3
  236. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +33 -13
  237. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +3 -3
  238. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +33 -26
  239. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +38 -3
  240. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +40 -19
  241. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +38 -3
  242. package/dist/plugins/plugin-runtime/runtime.d.ts +33 -13
  243. package/dist/plugins/plugin-runtime/runtime.js +1 -2
  244. package/dist/plugins/plugin-runtime/types.d.ts +2 -72
  245. package/dist/plugins/plugin-runtime/types.js +1 -2
  246. package/dist/plugins/types.d.ts +33 -13
  247. package/dist/plugins/types.js +1 -2
  248. package/dist/resolve-file-url-pO9_rLft.js +23 -0
  249. package/dist/resolve-file-url-pO9_rLft.js.map +1 -0
  250. package/dist/router-Dn35v30f.js +0 -0
  251. package/dist/runtime-ByJtSXs_.js +0 -0
  252. package/dist/section-D6t7tyEZ.js +40 -0
  253. package/dist/section-D6t7tyEZ.js.map +1 -0
  254. package/dist/section-fktaECHL.d.ts +18 -0
  255. package/dist/separator-CuesaLrC.d.ts +8 -0
  256. package/dist/separator-DYAFK-Jj.js +17 -0
  257. package/dist/separator-DYAFK-Jj.js.map +1 -0
  258. package/dist/signals-Bp0bzjE6.js +46 -0
  259. package/dist/signals-Bp0bzjE6.js.map +1 -0
  260. package/dist/signals-DUoWkeZ7.d.ts +20 -0
  261. package/dist/store-Ci6ib2C9.js +14 -0
  262. package/dist/store-Ci6ib2C9.js.map +1 -0
  263. package/dist/text-display-DNMwmGHJ.d.ts +12 -0
  264. package/dist/text-display-Dy6JHB5X.js +19 -0
  265. package/dist/text-display-Dy6JHB5X.js.map +1 -0
  266. package/dist/type-checker-FOYNSGX0.js +84 -0
  267. package/dist/type-checker-FOYNSGX0.js.map +1 -0
  268. package/dist/types-0ADL_reY.d.ts +73 -0
  269. package/dist/types-B5VPP9ig.js +0 -0
  270. package/dist/types-BDwNROY2.d.ts +74 -0
  271. package/dist/types-Bq0EWaM3.js +0 -0
  272. package/dist/types-CJ-XvOFN.d.ts +5 -0
  273. package/dist/types-Cdh4uaFR.js +0 -0
  274. package/dist/types-package-DRhFn59I.js +66 -0
  275. package/dist/types-package-DRhFn59I.js.map +1 -0
  276. package/dist/types.d.ts +33 -13
  277. package/dist/types.js +0 -2
  278. package/dist/utilities-5Jw5BdE1.d.ts +42 -0
  279. package/dist/utils/clone.d.ts +3 -1
  280. package/dist/utils/clone.js +8 -1
  281. package/dist/utils/clone.js.map +1 -1
  282. package/dist/utils/colors.d.ts +5 -3
  283. package/dist/utils/colors.js +4 -2
  284. package/dist/utils/constants.d.ts +2 -15
  285. package/dist/utils/constants.js +7 -2
  286. package/dist/utils/dev-hooks.d.ts +33 -13
  287. package/dist/utils/dev-hooks.js +38 -3
  288. package/dist/utils/error-codes.d.ts +9 -7
  289. package/dist/utils/error-codes.js +6 -2
  290. package/dist/utils/get-paths.d.ts +3 -1
  291. package/dist/utils/get-paths.js +33 -1
  292. package/dist/utils/get-paths.js.map +1 -1
  293. package/dist/utils/resolve-file-url.d.ts +3 -1
  294. package/dist/utils/resolve-file-url.js +3 -2
  295. package/dist/utils/types-package.d.ts +3 -1
  296. package/dist/utils/types-package.js +5 -14
  297. package/dist/utils/utilities.d.ts +2 -40
  298. package/dist/utils/utilities.js +44 -3
  299. package/dist/utils/warn-unstable.d.ts +3 -1
  300. package/dist/utils/warn-unstable.js +4 -2
  301. package/dist/utils-C0V7zD7R.d.ts +10 -0
  302. package/dist/utils-IYtoeTur.js +19 -0
  303. package/dist/utils-IYtoeTur.js.map +1 -0
  304. package/dist/v2-DofkPKHs.js +0 -0
  305. package/dist/version-DnRxh8U8.js +15 -0
  306. package/dist/version-DnRxh8U8.js.map +1 -0
  307. package/dist/version-SMsmj3M1.d.ts +8 -0
  308. package/dist/version.d.ts +2 -6
  309. package/dist/version.js +3 -2
  310. package/dist/warn-unstable-V20WCBDd.js +26 -0
  311. package/dist/warn-unstable-V20WCBDd.js.map +1 -0
  312. package/package.json +5 -4
  313. package/dist/CommandKit-jZCy9fZX.d.ts +0 -914
  314. package/dist/CommandKit.js.map +0 -1
  315. package/dist/app/commands/AppCommandRunner.js.map +0 -1
  316. package/dist/app/commands/Context.js.map +0 -1
  317. package/dist/app/commands/MessageCommandParser.js.map +0 -1
  318. package/dist/app/commands/helpers.js.map +0 -1
  319. package/dist/app/events/EventWorkerContext.js.map +0 -1
  320. package/dist/app/handlers/AppCommandHandler.js.map +0 -1
  321. package/dist/app/handlers/AppEventsHandler.js.map +0 -1
  322. package/dist/app/index.js.map +0 -1
  323. package/dist/app/middleware/signals.js.map +0 -1
  324. package/dist/app/register/CommandRegistrar.js.map +0 -1
  325. package/dist/app/router/CommandsRouter.js.map +0 -1
  326. package/dist/app/router/EventsRouter.js.map +0 -1
  327. package/dist/app/router/index.js.map +0 -1
  328. package/dist/cli/app-process.js.map +0 -1
  329. package/dist/cli/build.js.map +0 -1
  330. package/dist/cli/common.js.map +0 -1
  331. package/dist/cli/env.js.map +0 -1
  332. package/dist/cli/init.js.map +0 -1
  333. package/dist/cli/type-checker.js.map +0 -1
  334. package/dist/cli/utils.js.map +0 -1
  335. package/dist/components/common/EventInterceptor.js.map +0 -1
  336. package/dist/components/common/element.js.map +0 -1
  337. package/dist/components/common/types.js.map +0 -1
  338. package/dist/components/index.js.map +0 -1
  339. package/dist/components/v1/action-row/ActionRow.js.map +0 -1
  340. package/dist/components/v1/button/Button.js.map +0 -1
  341. package/dist/components/v1/button/ButtonKit.js.map +0 -1
  342. package/dist/components/v1/modal/Modal.js.map +0 -1
  343. package/dist/components/v1/modal/ModalKit.js.map +0 -1
  344. package/dist/components/v1/select-menu/ChannelSelectMenuKit.js.map +0 -1
  345. package/dist/components/v1/select-menu/MentionableSelectMenuKit.js.map +0 -1
  346. package/dist/components/v1/select-menu/RoleSelectMenuKit.js.map +0 -1
  347. package/dist/components/v1/select-menu/SelectMenu.js.map +0 -1
  348. package/dist/components/v1/select-menu/StringSelectMenuKit.js.map +0 -1
  349. package/dist/components/v1/select-menu/UserSelectMenuKit.js.map +0 -1
  350. package/dist/components/v1/select-menu/common.js.map +0 -1
  351. package/dist/components/v2/common.js.map +0 -1
  352. package/dist/components/v2/container.js.map +0 -1
  353. package/dist/components/v2/file.js.map +0 -1
  354. package/dist/components/v2/index.js.map +0 -1
  355. package/dist/components/v2/media-gallery.js.map +0 -1
  356. package/dist/components/v2/section.js.map +0 -1
  357. package/dist/components/v2/separator.js.map +0 -1
  358. package/dist/components/v2/text-display.js.map +0 -1
  359. package/dist/config/config.js.map +0 -1
  360. package/dist/config/default.js.map +0 -1
  361. package/dist/config/loader.js.map +0 -1
  362. package/dist/config/types.js.map +0 -1
  363. package/dist/context/async-context.js.map +0 -1
  364. package/dist/context/environment.js.map +0 -1
  365. package/dist/events/CommandKitEventsChannel.js.map +0 -1
  366. package/dist/flags/feature-flags.js.map +0 -1
  367. package/dist/flags/store.js.map +0 -1
  368. package/dist/logger/DefaultLogger.js.map +0 -1
  369. package/dist/logger/ILogger.js.map +0 -1
  370. package/dist/logger/Logger.js.map +0 -1
  371. package/dist/plugins/CompilerPlugin.js.map +0 -1
  372. package/dist/plugins/PluginCommon.js.map +0 -1
  373. package/dist/plugins/RuntimePlugin.js.map +0 -1
  374. package/dist/plugins/index.js.map +0 -1
  375. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js.map +0 -1
  376. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js.map +0 -1
  377. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js.map +0 -1
  378. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js.map +0 -1
  379. package/dist/plugins/plugin-runtime/runtime.js.map +0 -1
  380. package/dist/plugins/plugin-runtime/types.js.map +0 -1
  381. package/dist/plugins/types.js.map +0 -1
  382. package/dist/types.js.map +0 -1
  383. package/dist/utils/colors.js.map +0 -1
  384. package/dist/utils/constants.js.map +0 -1
  385. package/dist/utils/dev-hooks.js.map +0 -1
  386. package/dist/utils/error-codes.js.map +0 -1
  387. package/dist/utils/resolve-file-url.js.map +0 -1
  388. package/dist/utils/types-package.js.map +0 -1
  389. package/dist/utils/utilities.js.map +0 -1
  390. package/dist/utils/warn-unstable.js.map +0 -1
  391. package/dist/version.js.map +0 -1
@@ -1,72 +1,2 @@
1
- interface OnLoadArgs {
2
- path: string;
3
- namespace: string;
4
- suffix: string;
5
- pluginData: any;
6
- with: Record<string, string>;
7
- }
8
- interface OnLoadOptions {
9
- filter: RegExp;
10
- namespace?: string;
11
- }
12
- type Loader = `${'j' | 't'}s` | (string & {});
13
- interface OnLoadResult {
14
- contents?: string | Uint8Array;
15
- errors?: Message[];
16
- loader?: Loader;
17
- pluginData?: any;
18
- pluginName?: string;
19
- resolveDir?: string;
20
- warnings?: Message[];
21
- watchDirs?: string[];
22
- watchFiles?: string[];
23
- }
24
- interface Message {
25
- text: string;
26
- location: Location | null;
27
- detail: any;
28
- }
29
- interface Location {
30
- file: string;
31
- namespace: string;
32
- line: number;
33
- column: number;
34
- length: number;
35
- lineText: string;
36
- }
37
- interface OnResolveOptions {
38
- filter: RegExp;
39
- namespace?: string;
40
- }
41
- interface OnResolveArgs {
42
- path: string;
43
- importer: string;
44
- namespace: string;
45
- resolveDir: string;
46
- kind: ResolveKind;
47
- pluginData: any;
48
- with: Record<string, string>;
49
- }
50
- type ResolveKind = 'entry-point' | 'import-statement' | 'require-call' | 'dynamic-import' | 'require-resolve' | 'import-rule' | 'composes-from' | 'url-token';
51
- interface OnResolveResult {
52
- errors?: Message[];
53
- external?: boolean;
54
- namespace?: string;
55
- path?: string;
56
- pluginData?: any;
57
- pluginName?: string;
58
- sideEffects?: boolean;
59
- suffix?: string;
60
- warnings?: Message[];
61
- watchDirs?: string[];
62
- watchFiles?: string[];
63
- }
64
- interface Setup {
65
- onStart(fn: () => Promise<void>): void;
66
- onEnd(fn: () => Promise<void>): void;
67
- onDispose(fn: () => Promise<void>): void;
68
- onLoad(options: OnLoadOptions, cb: (args: OnLoadArgs) => Promise<OnLoadResult>): Promise<any>;
69
- onResolve(options: OnResolveOptions, cb: (args: OnResolveArgs) => Promise<OnResolveResult>): Promise<any>;
70
- }
71
-
72
- export type { Loader, Location, Message, OnLoadArgs, OnLoadOptions, OnLoadResult, OnResolveArgs, OnResolveOptions, OnResolveResult, ResolveKind, Setup };
1
+ import { Loader, Location, Message, OnLoadArgs, OnLoadOptions, OnLoadResult, OnResolveArgs, OnResolveOptions, OnResolveResult, ResolveKind, Setup } from "../../types-BDwNROY2.js";
2
+ export { Loader, Location, Message, OnLoadArgs, OnLoadOptions, OnLoadResult, OnResolveArgs, OnResolveOptions, OnResolveResult, ResolveKind, Setup };
@@ -1,2 +1 @@
1
- "use strict";var s=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var p=(n,e,i,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of a(e))!g.call(n,r)&&r!==i&&s(n,r,{get:()=>e[r],enumerable:!(t=o(e,r))||t.enumerable});return n};var l=n=>p(s({},"__esModule",{value:!0}),n);var c={};module.exports=l(c);
2
- //# sourceMappingURL=types.js.map
1
+ require('../../types-Cdh4uaFR.js');
@@ -1,13 +1,33 @@
1
- import '../app/router/EventsRouter.js';
2
- export { ac as CommandKitEventDispatch, aa as CommandKitPlugin, ab as MaybeFalsey } from '../CommandKit-jZCy9fZX.js';
3
- import 'discord.js';
4
- import 'node:events';
5
- import '../components/common/element.js';
6
- import '../components/v1/button/ButtonKit.js';
7
- import '../components/common/EventInterceptor.js';
8
- import '../components/v1/modal/ModalKit.js';
9
- import '../app/commands/MessageCommandParser.js';
10
- import 'diagnostics_channel';
11
- import '../app/router/CommandsRouter.js';
12
- import './plugin-runtime/types.js';
13
- import '../utils/constants.js';
1
+ import { CommandKitEventDispatch, CommandKitPlugin, MaybeFalsey } from "../CommandKit-CDlCsGCx.js";
2
+ import "../EventInterceptor-D_oEWSnF.js";
3
+ import "../ButtonKit-BSI7lCI0.js";
4
+ import "../ModalKit-CKtQ8eXW.js";
5
+ import "../element-D_nyVwgB.js";
6
+ import "../ActionRow-D0wafJhZ.js";
7
+ import "../types-CJ-XvOFN.js";
8
+ import "../Button-Bl5nbwTS.js";
9
+ import "../Modal-Cxm6cs5c.js";
10
+ import "../common-pvPJVTfe.js";
11
+ import "../StringSelectMenuKit-B9FHTe48.js";
12
+ import "../ChannelSelectMenuKit-L15A2jpT.js";
13
+ import "../MentionableSelectMenuKit-BiUSKUtZ.js";
14
+ import "../UserSelectMenuKit-DiP0imyo.js";
15
+ import "../RoleSelectMenuKit-BSMKkru2.js";
16
+ import "../SelectMenu-b7jgrkjO.js";
17
+ import "../container-CwEATQy2.js";
18
+ import "../file-BdyYwkaI.js";
19
+ import "../media-gallery-DCu02VXc.js";
20
+ import "../section-fktaECHL.js";
21
+ import "../separator-CuesaLrC.js";
22
+ import "../text-display-DNMwmGHJ.js";
23
+ import "../index-Dw5cCt-A.js";
24
+ import "../index-E7Wvm5uX.js";
25
+ import "../MessageCommandParser-tzroBwij.js";
26
+ import "../signals-DUoWkeZ7.js";
27
+ import "../helpers-DAmE106r.js";
28
+ import "../CommandsRouter-C7X-eXE2.js";
29
+ import "../EventsRouter-BacqK6z3.js";
30
+ import "../index-CUPkUUOR.js";
31
+ import "../constants-Ce6w4OFe.js";
32
+ import "../types-BDwNROY2.js";
33
+ export { CommandKitEventDispatch, CommandKitPlugin, MaybeFalsey };
@@ -1,2 +1 @@
1
- "use strict";var m=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var p=(n,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of r(e))!l.call(n,t)&&t!==o&&m(n,t,{get:()=>e[t],enumerable:!(i=a(e,t))||i.enumerable});return n};var u=n=>p(m({},"__esModule",{value:!0}),n);var g={};module.exports=u(g);
2
- //# sourceMappingURL=types.js.map
1
+ require('../types-Bq0EWaM3.js');
@@ -0,0 +1,23 @@
1
+ const require_chunk = require('./chunk-nOFOJqeH.js');
2
+ const path = require_chunk.__toESM(require("path"));
3
+
4
+ //#region src/utils/resolve-file-url.ts
5
+ /**
6
+ * Convert a local file path to a file URL.
7
+ * @param filePath - The local file's path.
8
+ * @param withTs - Whether to append a timestamp to the URL.
9
+ * @returns - The converted file URL.
10
+ */
11
+ function toFileURL(filePath, withTs = false) {
12
+ const resolvedPath = path.default.resolve(filePath);
13
+ return `${"file://" + resolvedPath.replace(/\\\\|\\/g, "/")}${withTs ? `?ts=${Date.now()}` : ""}`;
14
+ }
15
+
16
+ //#endregion
17
+ Object.defineProperty(exports, 'toFileURL', {
18
+ enumerable: true,
19
+ get: function () {
20
+ return toFileURL;
21
+ }
22
+ });
23
+ //# sourceMappingURL=resolve-file-url-pO9_rLft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-file-url-pO9_rLft.js","names":[],"sources":["../src/utils/resolve-file-url.ts"],"sourcesContent":["import path from 'path';\n\n/**\n * Convert a local file path to a file URL.\n * @param filePath - The local file's path.\n * @param withTs - Whether to append a timestamp to the URL.\n * @returns - The converted file URL.\n */\nexport function toFileURL(filePath: string, withTs = false) {\n const resolvedPath = path.resolve(filePath);\n return `${'file://' + resolvedPath.replace(/\\\\\\\\|\\\\/g, '/')}${withTs ? `?ts=${Date.now()}` : ''}`;\n}\n"],"mappings":";;;;;;;;;;AAQA,SAAgB,UAAU,UAAkB,SAAS,OAAO;CAC1D,MAAM,eAAe,aAAK,QAAQ,SAAS;AAC3C,SAAQ,EAAE,YAAY,aAAa,QAAQ,YAAY,IAAI,CAAC,EAAE,UAAU,MAAM,KAAK,KAAK,CAAC,IAAI,GAAG;AAClG"}
File without changes
File without changes
@@ -0,0 +1,40 @@
1
+ const require_chunk = require('./chunk-nOFOJqeH.js');
2
+ const require_common = require('./common-CeO-vn8Y.js');
3
+ const discord_js = require_chunk.__toESM(require("discord.js"));
4
+
5
+ //#region src/components/v2/section.ts
6
+ function Section(props) {
7
+ const section = new discord_js.SectionBuilder();
8
+ require_common.applyId(props, section);
9
+ if (props.children != null) {
10
+ if (!Array.isArray(props.children)) props.children = [props.children];
11
+ for (const accessory of props.children.flat()) if (accessory instanceof discord_js.ThumbnailBuilder) section.setThumbnailAccessory(accessory);
12
+ else if (accessory instanceof discord_js.ButtonBuilder) section.setButtonAccessory(accessory);
13
+ else if (accessory instanceof discord_js.TextDisplayBuilder) section.addTextDisplayComponents(accessory);
14
+ }
15
+ return section;
16
+ }
17
+ function Thumbnail(props) {
18
+ const thumbnail = new discord_js.ThumbnailBuilder({
19
+ description: props.description,
20
+ spoiler: props.spoiler,
21
+ id: props.id,
22
+ media: { url: props.url }
23
+ });
24
+ return thumbnail;
25
+ }
26
+
27
+ //#endregion
28
+ Object.defineProperty(exports, 'Section', {
29
+ enumerable: true,
30
+ get: function () {
31
+ return Section;
32
+ }
33
+ });
34
+ Object.defineProperty(exports, 'Thumbnail', {
35
+ enumerable: true,
36
+ get: function () {
37
+ return Thumbnail;
38
+ }
39
+ });
40
+ //# sourceMappingURL=section-D6t7tyEZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-D6t7tyEZ.js","names":[],"sources":["../src/components/v2/section.ts"],"sourcesContent":["import {\n ButtonBuilder,\n SectionBuilder,\n TextDisplayBuilder,\n ThumbnailBuilder,\n} from 'discord.js';\nimport { applyId } from './common';\n\nexport interface SectionProps {\n children?: (ThumbnailBuilder | ButtonBuilder | TextDisplayBuilder)[];\n id?: number;\n}\n\nexport function Section(props: SectionProps): SectionBuilder {\n const section = new SectionBuilder();\n\n applyId(props, section);\n\n if (props.children != null) {\n if (!Array.isArray(props.children)) props.children = [props.children];\n for (const accessory of props.children.flat()) {\n if (accessory instanceof ThumbnailBuilder) {\n section.setThumbnailAccessory(accessory);\n } else if (accessory instanceof ButtonBuilder) {\n section.setButtonAccessory(accessory);\n } else if (accessory instanceof TextDisplayBuilder) {\n section.addTextDisplayComponents(accessory);\n }\n }\n }\n\n return section;\n}\n\nexport interface ThumbnailProps {\n id?: number;\n description?: string;\n spoiler?: boolean;\n url: string;\n}\n\nexport function Thumbnail(props: ThumbnailProps) {\n const thumbnail = new ThumbnailBuilder({\n description: props.description,\n spoiler: props.spoiler,\n id: props.id,\n media: { url: props.url },\n });\n\n return thumbnail;\n}\n"],"mappings":";;;;;AAaA,SAAgB,QAAQ,OAAqC;CAC3D,MAAM,UAAU,IAAI;AAEpB,wBAAQ,OAAO,QAAQ;AAEvB,KAAI,MAAM,YAAY,MAAM;AAC1B,OAAK,MAAM,QAAQ,MAAM,SAAS,CAAE,OAAM,WAAW,CAAC,MAAM,QAAS;AACrE,OAAK,MAAM,aAAa,MAAM,SAAS,MAAM,CAC3C,KAAI,qBAAqB,4BACvB,SAAQ,sBAAsB,UAAU;WAC/B,qBAAqB,yBAC9B,SAAQ,mBAAmB,UAAU;WAC5B,qBAAqB,8BAC9B,SAAQ,yBAAyB,UAAU;CAGjD;AAEA,QAAO;AACT;AASA,SAAgB,UAAU,OAAuB;CAC/C,MAAM,YAAY,IAAI,4BAAiB;EACrC,aAAa,MAAM;EACnB,SAAS,MAAM;EACf,IAAI,MAAM;EACV,OAAO,EAAE,KAAK,MAAM,IAAK;CAC1B;AAED,QAAO;AACT"}
@@ -0,0 +1,18 @@
1
+ import { ButtonBuilder, SectionBuilder, TextDisplayBuilder, ThumbnailBuilder } from "discord.js";
2
+
3
+ //#region src/components/v2/section.d.ts
4
+ interface SectionProps {
5
+ children?: (ThumbnailBuilder | ButtonBuilder | TextDisplayBuilder)[];
6
+ id?: number;
7
+ }
8
+ declare function Section(props: SectionProps): SectionBuilder;
9
+ interface ThumbnailProps {
10
+ id?: number;
11
+ description?: string;
12
+ spoiler?: boolean;
13
+ url: string;
14
+ }
15
+ declare function Thumbnail(props: ThumbnailProps): ThumbnailBuilder;
16
+ //#endregion
17
+ export { Section, SectionProps, Thumbnail, ThumbnailProps };
18
+ //# sourceMappingURL=section-fktaECHL.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { SeparatorBuilder, SeparatorComponentData } from "discord.js";
2
+
3
+ //#region src/components/v2/separator.d.ts
4
+ interface SeparatorProps extends Omit<SeparatorComponentData, 'type'> {}
5
+ declare function Separator(props: SeparatorProps): SeparatorBuilder;
6
+ //#endregion
7
+ export { Separator, SeparatorProps };
8
+ //# sourceMappingURL=separator-CuesaLrC.d.ts.map
@@ -0,0 +1,17 @@
1
+ const require_chunk = require('./chunk-nOFOJqeH.js');
2
+ const discord_js = require_chunk.__toESM(require("discord.js"));
3
+
4
+ //#region src/components/v2/separator.ts
5
+ function Separator(props) {
6
+ const separator = new discord_js.SeparatorBuilder(props);
7
+ return separator;
8
+ }
9
+
10
+ //#endregion
11
+ Object.defineProperty(exports, 'Separator', {
12
+ enumerable: true,
13
+ get: function () {
14
+ return Separator;
15
+ }
16
+ });
17
+ //# sourceMappingURL=separator-DYAFK-Jj.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator-DYAFK-Jj.js","names":[],"sources":["../src/components/v2/separator.ts"],"sourcesContent":["import { SeparatorBuilder, SeparatorComponentData } from 'discord.js';\n\nexport interface SeparatorProps extends Omit<SeparatorComponentData, 'type'> {}\n\nexport function Separator(props: SeparatorProps) {\n const separator = new SeparatorBuilder(props);\n return separator;\n}\n"],"mappings":";;;;AAIA,SAAgB,UAAU,OAAuB;CAC/C,MAAM,YAAY,IAAI,4BAAiB;AACvC,QAAO;AACT"}
@@ -0,0 +1,46 @@
1
+ const require_error_codes = require('./error-codes-C_UO39jz.js');
2
+
3
+ //#region src/app/middleware/signals.ts
4
+ /**
5
+ * Cancel upcoming middleware execution.
6
+ * If this is called inside pre-stage middleware, the next run will be the actual command, skipping all other pre-stage middlewares.
7
+ * If this is called inside a command itself, it will skip all post-stage middlewares.
8
+ * If this is called inside post-stage middleware, it will skip all other post-stage middlewares.
9
+ */
10
+ function exitMiddleware() {
11
+ throw require_error_codes.createCommandKitError(require_error_codes.CommandKitErrorCodes.ExitMiddleware);
12
+ }
13
+ /**
14
+ * Rethrow the error if it is a CommandKit error.
15
+ * @param error The error to rethrow.
16
+ */
17
+ function rethrow(error) {
18
+ if (require_error_codes.isCommandKitError(error)) throw error;
19
+ }
20
+ /**
21
+ * Stops current command assuming it has been redirected to another command.
22
+ */
23
+ function redirect() {
24
+ throw require_error_codes.createCommandKitError(require_error_codes.CommandKitErrorCodes.ForwardedCommand);
25
+ }
26
+
27
+ //#endregion
28
+ Object.defineProperty(exports, 'exitMiddleware', {
29
+ enumerable: true,
30
+ get: function () {
31
+ return exitMiddleware;
32
+ }
33
+ });
34
+ Object.defineProperty(exports, 'redirect', {
35
+ enumerable: true,
36
+ get: function () {
37
+ return redirect;
38
+ }
39
+ });
40
+ Object.defineProperty(exports, 'rethrow', {
41
+ enumerable: true,
42
+ get: function () {
43
+ return rethrow;
44
+ }
45
+ });
46
+ //# sourceMappingURL=signals-Bp0bzjE6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signals-Bp0bzjE6.js","names":[],"sources":["../src/app/middleware/signals.ts"],"sourcesContent":["import {\n CommandKitErrorCodes,\n createCommandKitError,\n isCommandKitError,\n} from '../../utils/error-codes';\n\n/**\n * Cancel upcoming middleware execution.\n * If this is called inside pre-stage middleware, the next run will be the actual command, skipping all other pre-stage middlewares.\n * If this is called inside a command itself, it will skip all post-stage middlewares.\n * If this is called inside post-stage middleware, it will skip all other post-stage middlewares.\n */\nexport function exitMiddleware(): never {\n throw createCommandKitError(CommandKitErrorCodes.ExitMiddleware);\n}\n\n/**\n * Rethrow the error if it is a CommandKit error.\n * @param error The error to rethrow.\n */\nexport function rethrow(error: unknown): void {\n if (isCommandKitError(error)) throw error;\n}\n\n/**\n * Stops current command assuming it has been redirected to another command.\n */\nexport function redirect(): never {\n throw createCommandKitError(CommandKitErrorCodes.ForwardedCommand);\n}\n"],"mappings":";;;;;;;;;AAYA,SAAgB,iBAAwB;AACtC,OAAM,0CAAsB,yCAAqB,eAAe;AAClE;;;;;AAMA,SAAgB,QAAQ,OAAsB;AAC5C,KAAI,sCAAkB,MAAM,CAAE,OAAM;AACtC;;;;AAKA,SAAgB,WAAkB;AAChC,OAAM,0CAAsB,yCAAqB,iBAAiB;AACpE"}
@@ -0,0 +1,20 @@
1
+ //#region src/app/middleware/signals.d.ts
2
+ /**
3
+ * Cancel upcoming middleware execution.
4
+ * If this is called inside pre-stage middleware, the next run will be the actual command, skipping all other pre-stage middlewares.
5
+ * If this is called inside a command itself, it will skip all post-stage middlewares.
6
+ * If this is called inside post-stage middleware, it will skip all other post-stage middlewares.
7
+ */
8
+ declare function exitMiddleware(): never;
9
+ /**
10
+ * Rethrow the error if it is a CommandKit error.
11
+ * @param error The error to rethrow.
12
+ */
13
+ declare function rethrow(error: unknown): void;
14
+ /**
15
+ * Stops current command assuming it has been redirected to another command.
16
+ */
17
+ declare function redirect(): never;
18
+ //#endregion
19
+ export { exitMiddleware, redirect, rethrow };
20
+ //# sourceMappingURL=signals-DUoWkeZ7.d.ts.map
@@ -0,0 +1,14 @@
1
+ const require_chunk = require('./chunk-nOFOJqeH.js');
2
+ const discord_js = require_chunk.__toESM(require("discord.js"));
3
+
4
+ //#region src/flags/store.ts
5
+ var FlagStore = class extends discord_js.Collection {};
6
+
7
+ //#endregion
8
+ Object.defineProperty(exports, 'FlagStore', {
9
+ enumerable: true,
10
+ get: function () {
11
+ return FlagStore;
12
+ }
13
+ });
14
+ //# sourceMappingURL=store-Ci6ib2C9.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-Ci6ib2C9.js","names":[],"sources":["../src/flags/store.ts"],"sourcesContent":["import type { FeatureFlag } from './feature-flags';\nimport { Collection } from 'discord.js';\n\nexport class FlagStore extends Collection<string, FeatureFlag<any, any>> {}\n"],"mappings":";;;;AAGA,IAAa,YAAb,cAA+B,sBAA0C,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { TextDisplayBuilder, TextDisplayComponentData } from "discord.js";
2
+
3
+ //#region src/components/v2/text-display.d.ts
4
+ type StringEncodable = string | number | boolean;
5
+ interface TextDisplayProps extends Omit<TextDisplayComponentData, 'type' | 'content'> {
6
+ children?: StringEncodable | StringEncodable[];
7
+ content?: string;
8
+ }
9
+ declare function TextDisplay(props: TextDisplayProps): TextDisplayBuilder;
10
+ //#endregion
11
+ export { StringEncodable, TextDisplay, TextDisplayProps };
12
+ //# sourceMappingURL=text-display-DNMwmGHJ.d.ts.map
@@ -0,0 +1,19 @@
1
+ const require_chunk = require('./chunk-nOFOJqeH.js');
2
+ const discord_js = require_chunk.__toESM(require("discord.js"));
3
+
4
+ //#region src/components/v2/text-display.ts
5
+ function TextDisplay(props) {
6
+ const textDisplay = new discord_js.TextDisplayBuilder(props);
7
+ if (!props.content && props.children) if (Array.isArray(props.children)) textDisplay.setContent(props.children.join(" "));
8
+ else textDisplay.setContent(typeof props.children === "string" ? props.children : String(props.children));
9
+ return textDisplay;
10
+ }
11
+
12
+ //#endregion
13
+ Object.defineProperty(exports, 'TextDisplay', {
14
+ enumerable: true,
15
+ get: function () {
16
+ return TextDisplay;
17
+ }
18
+ });
19
+ //# sourceMappingURL=text-display-Dy6JHB5X.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-display-Dy6JHB5X.js","names":[],"sources":["../src/components/v2/text-display.ts"],"sourcesContent":["import { TextDisplayBuilder, TextDisplayComponentData } from 'discord.js';\n\nexport type StringEncodable = string | number | boolean;\n\nexport interface TextDisplayProps\n extends Omit<TextDisplayComponentData, 'type' | 'content'> {\n children?: StringEncodable | StringEncodable[];\n content?: string;\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":";;;;AAUA,SAAgB,YAAY,OAAyB;CACnD,MAAM,cAAc,IAAI,8BAAmB;AAE3C,MAAK,MAAM,WAAW,MAAM,SAC1B,KAAI,MAAM,QAAQ,MAAM,SAAS,CAC/B,aAAY,WAAW,MAAM,SAAS,KAAK,IAAI,CAAC;KAEhD,aAAY,kBACH,MAAM,aAAa,WAC1B,MAAM,WACN,OAAO,MAAM,SAAS,CACvB;AAIL,QAAO;AACT"}
@@ -0,0 +1,84 @@
1
+ const require_chunk = require('./chunk-nOFOJqeH.js');
2
+ const require_colors = require('./colors-Cd4Oz-r-.js');
3
+ const require_common = require('./common-DirpDCa6.js');
4
+ const node_fs = require_chunk.__toESM(require("node:fs"));
5
+ const node_path = require_chunk.__toESM(require("node:path"));
6
+
7
+ //#region src/cli/type-checker.ts
8
+ const 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\``;
9
+ /**
10
+ * Formats a TypeScript diagnostic message in a pretty, readable format
11
+ */
12
+ function formatDiagnostic(ts, diagnostic, cwd) {
13
+ const messageText = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
14
+ if (!diagnostic.file) return `${require_colors.colors_default.red("error")}: ${messageText}`;
15
+ const { line, character } = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
16
+ const fileName = (0, node_path.relative)(cwd, diagnostic.file.fileName);
17
+ const position = `${line + 1}:${character + 1}`;
18
+ const errorCode = diagnostic.code ? `TS${diagnostic.code}` : "";
19
+ return [`${require_colors.colors_default.bold(require_colors.colors_default.cyan(fileName))}:${require_colors.colors_default.bold(require_colors.colors_default.yellow(position))} - ${require_colors.colors_default.red("error")} ${require_colors.colors_default.gray(errorCode)}`, `${messageText}`].join("\n");
20
+ }
21
+ /**
22
+ * Performs a type check on the project using TypeScript.
23
+ * @param path The project root or cwd
24
+ */
25
+ async function performTypeCheck(path) {
26
+ const tsconfigPath = (0, node_path.join)(path, "tsconfig.json");
27
+ if (!(0, node_fs.existsSync)(tsconfigPath)) return;
28
+ const ts = await require_common.loadTypeScript(TS_NOT_FOUND_ERR);
29
+ const formatHost = {
30
+ getCanonicalFileName: (path$1) => path$1,
31
+ getCurrentDirectory: ts.sys.getCurrentDirectory,
32
+ getNewLine: () => ts.sys.newLine
33
+ };
34
+ const configFile = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
35
+ if (configFile.error) {
36
+ console.error(require_colors.colors_default.red(`Error reading tsconfig.json: ${ts.formatDiagnostic(configFile.error, formatHost)}`));
37
+ process.exit(1);
38
+ }
39
+ const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, path);
40
+ parsedConfig.options.noEmit = true;
41
+ const program = ts.createProgram({
42
+ rootNames: parsedConfig.fileNames,
43
+ options: parsedConfig.options,
44
+ projectReferences: parsedConfig.projectReferences
45
+ });
46
+ const diagnostics = [
47
+ ...program.getOptionsDiagnostics(),
48
+ ...program.getGlobalDiagnostics(),
49
+ ...program.getSyntacticDiagnostics(),
50
+ ...program.getSemanticDiagnostics()
51
+ ];
52
+ if (diagnostics.length > 0) {
53
+ console.log("");
54
+ console.error(require_colors.colors_default.bold(require_colors.colors_default.red("Type checking failed with the following errors:")));
55
+ console.log("");
56
+ const byFile = new Map();
57
+ for (const diagnostic of diagnostics) {
58
+ const fileName = diagnostic.file ? diagnostic.file.fileName : "Global";
59
+ if (!byFile.has(fileName)) byFile.set(fileName, []);
60
+ byFile.get(fileName).push(diagnostic);
61
+ }
62
+ const totalErrors = diagnostics.length;
63
+ let counter = 0;
64
+ for (const [_, fileDiags] of byFile) for (const diagnostic of fileDiags) {
65
+ counter++;
66
+ console.log(formatDiagnostic(ts, diagnostic, path));
67
+ if (counter < totalErrors) console.log("");
68
+ }
69
+ console.log("");
70
+ console.error(require_colors.colors_default.bold(require_colors.colors_default.red(`Found ${totalErrors} error${totalErrors > 1 ? "s" : ""}`)));
71
+ console.log("");
72
+ process.exit(1);
73
+ }
74
+ console.log(require_colors.colors_default.green("✓ Type checking completed successfully."));
75
+ }
76
+
77
+ //#endregion
78
+ Object.defineProperty(exports, 'performTypeCheck', {
79
+ enumerable: true,
80
+ get: function () {
81
+ return performTypeCheck;
82
+ }
83
+ });
84
+ //# sourceMappingURL=type-checker-FOYNSGX0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-checker-FOYNSGX0.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 */\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 */\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,oBAAoB;;;;AAK1B,SAAS,iBACT,IACA,YACA,KACS;CACP,MAAM,cAAc,GAAG,6BACrB,WAAW,aACX,KACD;AAED,MAAK,WAAW,KACd,SAAQ,EAAE,8BAAO,IAAI,QAAQ,CAAC,IAAI,YAAY;CAGhD,MAAM,EAAE,MAAM,WAAW,GAAG,GAAG,8BAC7B,WAAW,MACX,WAAW,MACZ;CACD,MAAM,WAAW,wBAAS,KAAK,WAAW,KAAK,SAAS;CACxD,MAAM,YAAY,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE;CAC9C,MAAM,YAAY,WAAW,QAAQ,IAAI,WAAW,KAAK,IAAI;AAG7D,QAAO,EACN,EAAE,8BAAO,KAAK,8BAAO,KAAK,SAAS,CAAC,CAAC,GAAG,8BAAO,KAAK,8BAAO,OAAO,SAAS,CAAC,CAAC,KAAK,8BAAO,IAAI,QAAQ,CAAC,GAAG,8BAAO,KAAK,UAAU,CAAC,IAChI,EAAE,YAAY,CAAE,EACjB,KAAK,KAAK;AACZ;;;;;AAMA,eAAsB,iBAAiB,MAAc;CACnD,MAAM,eAAe,oBAAK,MAAM,gBAAgB;AAEhD,MAAK,wBAAW,aAAa,CAAE;CAE/B,MAAM,KAAK,MAAM,8BAAe,iBAAiB;CAGjD,MAAM,aAAa;EACjB,sBAAsB,CAAC,WAAiB;EACxC,qBAAqB,GAAG,IAAI;EAC5B,YAAY,MAAM,GAAG,IAAI;CAC1B;CAGD,MAAM,aAAa,GAAG,eAAe,cAAc,GAAG,IAAI,SAAS;AAEnE,KAAI,WAAW,OAAO;AACpB,UAAQ,MACN,8BAAO,KACJ,+BAA+B,GAAG,iBAAiB,WAAW,OAAO,WAAW,CAAC,EACnF,CACF;AACD,UAAQ,KAAK,EAAE;CACjB;CAGA,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;CACjC,EAAC;CAGF,MAAM,cAAc;EACpB,GAAG,QAAQ,uBAAuB;EAClC,GAAG,QAAQ,sBAAsB;EACjC,GAAG,QAAQ,yBAAyB;EACpC,GAAG,QAAQ,wBAAwB;CAAC;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,SAAS,IAAI;AAEnB,OAAK,MAAM,cAAc,aAAa;GACpC,MAAM,WAAW,WAAW,OAAO,WAAW,KAAK,WAAW;AAC9D,QAAK,OAAO,IAAI,SAAS,CACvB,QAAO,IAAI,UAAU,CAAE,EAAC;AAE1B,UAAO,IAAI,SAAS,CAAE,KAAK,WAAW;EACxC;EAGA,MAAM,cAAc,YAAY;EAChC,IAAI,UAAU;AAEd,OAAK,MAAM,CAAC,GAAG,UAAU,IAAI,OAC3B,MAAK,MAAM,cAAc,WAAW;AAClC;AACA,WAAQ,IAAI,iBAAiB,IAAI,YAAY,KAAK,CAAC;AAEnD,OAAI,UAAU,YACZ,SAAQ,IAAI,GAAG;EAEnB;AAGF,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,KAAK,QAAQ,YAAY,QAAQ,cAAc,IAAI,MAAM,GAAG,EAAE,CACtE,CACF;AACD,UAAQ,IAAI,GAAG;AAEf,UAAQ,KAAK,EAAE;CACjB;AAEA,SAAQ,IAAI,8BAAO,MAAM,0CAA0C,CAAC;AACtE"}
@@ -0,0 +1,73 @@
1
+ import { CommandKitPlugin } from "./CommandKit-CDlCsGCx.js";
2
+ import { MaybeArray } from "./types-CJ-XvOFN.js";
3
+
4
+ //#region src/config/types.d.ts
5
+ interface CommandKitConfig {
6
+ /**
7
+ * The plugins to use with CommandKit.
8
+ * Can be a single plugin, an array of plugins, or a nested array of plugins.
9
+ */
10
+ plugins?: MaybeArray<CommandKitPlugin>[] | Array<CommandKitPlugin>;
11
+ /**
12
+ * The rolldown plugins to use with CommandKit.
13
+ */
14
+ rolldownPlugins?: any[];
15
+ /**
16
+ * The compiler options to use with CommandKit.
17
+ */
18
+ compilerOptions?: {
19
+ /**
20
+ * Macro compiler configuration.
21
+ */
22
+ macro?: {
23
+ /**
24
+ * Whether to enable macro function compilation in development mode.
25
+ * @default false
26
+ */
27
+ development?: boolean;
28
+ };
29
+ };
30
+ /**
31
+ * The typescript configuration to use with CommandKit.
32
+ */
33
+ typescript?: {
34
+ /**
35
+ * Whether to ignore type checking during builds.
36
+ */
37
+ ignoreBuildErrors?: boolean;
38
+ };
39
+ /**
40
+ * Whether to generate static command handler data in production builds.
41
+ */
42
+ static?: boolean;
43
+ /**
44
+ * Statically define the environment variables to use.
45
+ */
46
+ env?: Record<string, string>;
47
+ /**
48
+ * The custom build directory name to use.
49
+ * @default `dist`
50
+ */
51
+ distDir?: string;
52
+ /**
53
+ * Whether or not to enable the source map generation.
54
+ */
55
+ sourceMap?: {
56
+ /**
57
+ * Whether to enable source map generation in development mode.
58
+ */
59
+ development?: boolean;
60
+ /**
61
+ * Whether to enable source map generation in production mode.
62
+ */
63
+ production?: boolean;
64
+ };
65
+ /**
66
+ * Whether or not to enable the typed commands.
67
+ * @default true
68
+ */
69
+ typedCommands?: boolean;
70
+ }
71
+ //#endregion
72
+ export { CommandKitConfig };
73
+ //# sourceMappingURL=types-0ADL_reY.d.ts.map
File without changes
@@ -0,0 +1,74 @@
1
+ //#region src/plugins/plugin-runtime/types.d.ts
2
+ interface OnLoadArgs {
3
+ path: string;
4
+ namespace: string;
5
+ suffix: string;
6
+ pluginData: any;
7
+ with: Record<string, string>;
8
+ }
9
+ interface OnLoadOptions {
10
+ filter: RegExp;
11
+ namespace?: string;
12
+ }
13
+ type Loader = `${'j' | 't'}s` | (string & {});
14
+ interface OnLoadResult {
15
+ contents?: string | Uint8Array;
16
+ errors?: Message[];
17
+ loader?: Loader;
18
+ pluginData?: any;
19
+ pluginName?: string;
20
+ resolveDir?: string;
21
+ warnings?: Message[];
22
+ watchDirs?: string[];
23
+ watchFiles?: string[];
24
+ }
25
+ interface Message {
26
+ text: string;
27
+ location: Location | null;
28
+ detail: any;
29
+ }
30
+ interface Location {
31
+ file: string;
32
+ namespace: string;
33
+ line: number;
34
+ column: number;
35
+ length: number;
36
+ lineText: string;
37
+ }
38
+ interface OnResolveOptions {
39
+ filter: RegExp;
40
+ namespace?: string;
41
+ }
42
+ interface OnResolveArgs {
43
+ path: string;
44
+ importer: string;
45
+ namespace: string;
46
+ resolveDir: string;
47
+ kind: ResolveKind;
48
+ pluginData: any;
49
+ with: Record<string, string>;
50
+ }
51
+ type ResolveKind = 'entry-point' | 'import-statement' | 'require-call' | 'dynamic-import' | 'require-resolve' | 'import-rule' | 'composes-from' | 'url-token';
52
+ interface OnResolveResult {
53
+ errors?: Message[];
54
+ external?: boolean;
55
+ namespace?: string;
56
+ path?: string;
57
+ pluginData?: any;
58
+ pluginName?: string;
59
+ sideEffects?: boolean;
60
+ suffix?: string;
61
+ warnings?: Message[];
62
+ watchDirs?: string[];
63
+ watchFiles?: string[];
64
+ }
65
+ interface Setup {
66
+ onStart(fn: () => Promise<void>): void;
67
+ onEnd(fn: () => Promise<void>): void;
68
+ onDispose(fn: () => Promise<void>): void;
69
+ onLoad(options: OnLoadOptions, cb: (args: OnLoadArgs) => Promise<OnLoadResult>): Promise<any>;
70
+ onResolve(options: OnResolveOptions, cb: (args: OnResolveArgs) => Promise<OnResolveResult>): Promise<any>;
71
+ }
72
+ //#endregion
73
+ export { Loader, Location, Message, OnLoadArgs, OnLoadOptions, OnLoadResult, OnResolveArgs, OnResolveOptions, OnResolveResult, ResolveKind, Setup };
74
+ //# sourceMappingURL=types-BDwNROY2.d.ts.map
File without changes