commandkit 1.2.0-rc.12 → 1.2.0-rc.14

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 (354) hide show
  1. package/{COPYING.md → LICENSE.md} +3 -3
  2. package/README.md +3 -3
  3. package/bin/index.mjs +1 -1
  4. package/cli.d.ts +19 -0
  5. package/config.cjs +3 -0
  6. package/config.d.ts +1 -0
  7. package/dist/{ActionRow-uJxU4UGo.js → ActionRow-CSN_UKmM.js} +2 -3
  8. package/dist/{ActionRow-uJxU4UGo.js.map → ActionRow-CSN_UKmM.js.map} +1 -1
  9. package/dist/{ActionRow-B-7n9MMr.d.ts → ActionRow-CT-uyxW0.d.ts} +3 -4
  10. package/dist/{Button-RMp-w8HV.d.ts → Button-oMnlpF6W.d.ts} +6 -7
  11. package/dist/{ButtonKit-9k4yfhYD.d.ts → ButtonKit-DKu0VAe4.d.ts} +36 -37
  12. package/dist/ChannelSelectMenuKit-HQZ4hH5s.d.ts +66 -0
  13. package/dist/{CommandKitEventsChannel-2l9Za-le.js → CommandKitEventsChannel-DDI0UVh9.js} +2 -2
  14. package/dist/{CommandKitEventsChannel-2l9Za-le.js.map → CommandKitEventsChannel-DDI0UVh9.js.map} +1 -1
  15. package/dist/{CommandsRouter-CBdsqaWK.d.ts → CommandsRouter-C7dZEepB.d.ts} +49 -50
  16. package/dist/{CommandsRouter-CWMipIis.js → CommandsRouter-D5mGRFEr.js} +2 -6
  17. package/dist/{CommandsRouter-CWMipIis.js.map → CommandsRouter-D5mGRFEr.js.map} +1 -1
  18. package/dist/{CompilerPlugin-CZ4412Zm.js → CompilerPlugin-DZidFuHJ.js} +2 -2
  19. package/dist/{CompilerPlugin-CZ4412Zm.js.map → CompilerPlugin-DZidFuHJ.js.map} +1 -1
  20. package/dist/{EventInterceptor-x-R2qshQ.d.ts → EventInterceptor-CZmWpS08.d.ts} +40 -40
  21. package/dist/{EventInterceptor-BWoEJMHZ.js → EventInterceptor-CxA95XYA.js} +1 -1
  22. package/dist/{EventInterceptor-BWoEJMHZ.js.map → EventInterceptor-CxA95XYA.js.map} +1 -1
  23. package/dist/{EventWorkerContext-D_9q1Bm2.js → EventWorkerContext-CfqamFWu.js} +2 -3
  24. package/dist/{EventWorkerContext-D_9q1Bm2.js.map → EventWorkerContext-CfqamFWu.js.map} +1 -1
  25. package/dist/{EventsRouter-C04XqRKf.js → EventsRouter-Be5NDOX4.js} +2 -6
  26. package/dist/{EventsRouter-C04XqRKf.js.map → EventsRouter-Be5NDOX4.js.map} +1 -1
  27. package/dist/EventsRouter-DZ37r54v.d.ts +90 -0
  28. package/dist/MentionableSelectMenuKit-7URDUM3-.d.ts +61 -0
  29. package/dist/{MessageCommandParser-CKh-tM97.js → MessageCommandParser-VMFFGs0R.js} +2 -3
  30. package/dist/{MessageCommandParser-CKh-tM97.js.map → MessageCommandParser-VMFFGs0R.js.map} +1 -1
  31. package/dist/MessageCommandParser-q3dQcE5N.d.ts +194 -0
  32. package/dist/{Modal-Calb46SJ.d.ts → Modal--iMEUqSm.d.ts} +20 -10
  33. package/dist/{ModalKit-Cq2ns6jv.d.ts → ModalKit-BWXI3Z26.d.ts} +33 -34
  34. package/dist/{PluginCommon-CPWV5xuX.js → PluginCommon-Bfs8d9s7.js} +6 -7
  35. package/dist/{PluginCommon-CPWV5xuX.js.map → PluginCommon-Bfs8d9s7.js.map} +1 -1
  36. package/dist/RoleSelectMenuKit-BY-JJ18w.d.ts +66 -0
  37. package/dist/{RuntimePlugin-COeXe8rP.js → RuntimePlugin-BYQXQO8w.js} +2 -2
  38. package/dist/{RuntimePlugin-COeXe8rP.js.map → RuntimePlugin-BYQXQO8w.js.map} +1 -1
  39. package/dist/{SelectMenu-VcDhOGoJ.d.ts → SelectMenu-DQbmOp1Y.d.ts} +16 -13
  40. package/dist/StringSelectMenuKit-lVhUMc3g.d.ts +66 -0
  41. package/dist/UserSelectMenuKit-CCj4Fpkr.d.ts +66 -0
  42. package/dist/analytics/analytics-engine.d.ts +1 -33
  43. package/dist/analytics/analytics-engine.js +19 -39
  44. package/dist/analytics/analytics-provider.d.ts +1 -33
  45. package/dist/analytics/constants.js +1 -1
  46. package/dist/analytics/utils.js +19 -39
  47. package/dist/{analytics-engine-NOInIjv8.d.ts → analytics-engine-_urJ5QTH.d.ts} +850 -842
  48. package/dist/app/commands/AppCommandRunner.d.ts +1 -33
  49. package/dist/app/commands/AppCommandRunner.js +19 -39
  50. package/dist/app/commands/Context.d.ts +1 -33
  51. package/dist/app/commands/Context.js +19 -39
  52. package/dist/app/commands/MessageCommandParser.d.ts +1 -1
  53. package/dist/app/commands/MessageCommandParser.js +1 -2
  54. package/dist/app/commands/helpers.d.ts +1 -1
  55. package/dist/app/commands/helpers.js +1 -1
  56. package/dist/app/events/EventWorkerContext.d.ts +42 -35
  57. package/dist/app/events/EventWorkerContext.js +1 -1
  58. package/dist/app/handlers/AppCommandHandler.d.ts +1 -33
  59. package/dist/app/handlers/AppCommandHandler.js +19 -39
  60. package/dist/app/handlers/AppEventsHandler.d.ts +1 -33
  61. package/dist/app/handlers/AppEventsHandler.js +19 -39
  62. package/dist/app/index.d.ts +4 -33
  63. package/dist/app/index.js +19 -40
  64. package/dist/app/interrupt/signals.d.ts +1 -1
  65. package/dist/app/interrupt/signals.js +2 -3
  66. package/dist/app/middlewares/permissions.d.ts +1 -33
  67. package/dist/app/middlewares/permissions.js +19 -39
  68. package/dist/app/register/CommandRegistrar.d.ts +1 -33
  69. package/dist/app/register/CommandRegistrar.js +19 -39
  70. package/dist/app/router/CommandsRouter.d.ts +1 -1
  71. package/dist/app/router/CommandsRouter.js +1 -1
  72. package/dist/app/router/EventsRouter.d.ts +1 -1
  73. package/dist/app/router/EventsRouter.js +1 -1
  74. package/dist/app/router/index.d.ts +2 -3
  75. package/dist/app/router/index.js +3 -3
  76. package/dist/{chunk-nOFOJqeH.js → chunk-kSYXY2_d.js} +10 -6
  77. package/dist/cli/app-process.d.ts +0 -1
  78. package/dist/cli/app-process.js +62 -7
  79. package/dist/cli/app-process.js.map +1 -0
  80. package/dist/cli/build.d.ts +2 -33
  81. package/dist/cli/build.js +186 -44
  82. package/dist/cli/build.js.map +1 -0
  83. package/dist/cli/common.d.ts +1 -33
  84. package/dist/cli/common.js +4 -4
  85. package/dist/cli/development.d.ts +18 -1
  86. package/dist/cli/development.js +38 -51
  87. package/dist/cli/development.js.map +1 -1
  88. package/dist/cli/env.d.ts +4 -0
  89. package/dist/cli/env.js +1 -1
  90. package/dist/cli/generators.js +5 -8
  91. package/dist/cli/generators.js.map +1 -1
  92. package/dist/cli/information.js +5 -5
  93. package/dist/cli/information.js.map +1 -1
  94. package/dist/cli/init.d.ts +12 -2
  95. package/dist/cli/init.js +97 -41
  96. package/dist/cli/init.js.map +1 -0
  97. package/dist/cli/production.d.ts +0 -1
  98. package/dist/cli/production.js +33 -51
  99. package/dist/cli/production.js.map +1 -1
  100. package/dist/cli/type-checker.js +5 -5
  101. package/dist/cli/utils.d.ts +0 -1
  102. package/dist/cli/utils.js +17 -2
  103. package/dist/cli/utils.js.map +1 -0
  104. package/dist/{colors-DL3ucTiT.js → colors-Csc0X4QJ.js} +2 -3
  105. package/dist/{colors-DL3ucTiT.js.map → colors-Csc0X4QJ.js.map} +1 -1
  106. package/dist/{commandkit-DabqpQ6v.js → commandkit-B1_NP74k.js} +3187 -2630
  107. package/dist/commandkit-B1_NP74k.js.map +1 -0
  108. package/dist/commandkit.d.ts +1 -33
  109. package/dist/commandkit.js +19 -39
  110. package/dist/{common-DHTTnX82.d.ts → common-DnwCYit8.d.ts} +3 -4
  111. package/dist/{common-fIO6fqGZ.js → common-zQwj90Nz.js} +9 -12
  112. package/dist/{common-fIO6fqGZ.js.map → common-zQwj90Nz.js.map} +1 -1
  113. package/dist/components/common/EventInterceptor.d.ts +1 -1
  114. package/dist/components/common/EventInterceptor.js +1 -1
  115. package/dist/components/common/element.d.ts +2 -5
  116. package/dist/components/common/element.js +27 -8
  117. package/dist/components/common/types.d.ts +1 -1
  118. package/dist/components/common/types.js +0 -1
  119. package/dist/components/display/common.d.ts +0 -1
  120. package/dist/components/display/common.js +20 -2
  121. package/dist/components/display/container.d.ts +1 -1
  122. package/dist/components/display/container.js +20 -3
  123. package/dist/components/display/file.d.ts +1 -1
  124. package/dist/components/display/file.js +1 -1
  125. package/dist/components/display/index.d.ts +8 -9
  126. package/dist/components/display/index.js +25 -16
  127. package/dist/components/display/label.d.ts +1 -1
  128. package/dist/components/display/label.js +20 -3
  129. package/dist/components/display/media-gallery.d.ts +1 -1
  130. package/dist/components/display/media-gallery.js +21 -4
  131. package/dist/components/display/poll.d.ts +1 -1
  132. package/dist/components/display/poll.js +1 -1
  133. package/dist/components/display/section.d.ts +1 -1
  134. package/dist/components/display/section.js +21 -4
  135. package/dist/components/display/separator.d.ts +1 -1
  136. package/dist/components/display/separator.js +1 -1
  137. package/dist/components/display/text-display.d.ts +1 -1
  138. package/dist/components/display/text-display.js +1 -1
  139. package/dist/components/index.d.ts +23 -26
  140. package/dist/components/index.js +34 -52
  141. package/dist/components/interactive/action-row/ActionRow.d.ts +1 -5
  142. package/dist/components/interactive/action-row/ActionRow.js +1 -1
  143. package/dist/components/interactive/button/Button.d.ts +1 -6
  144. package/dist/components/interactive/button/Button.js +19 -39
  145. package/dist/components/interactive/button/ButtonKit.d.ts +1 -2
  146. package/dist/components/interactive/button/ButtonKit.js +19 -39
  147. package/dist/components/interactive/modal/Modal.d.ts +2 -7
  148. package/dist/components/interactive/modal/Modal.js +20 -39
  149. package/dist/components/interactive/modal/ModalKit.d.ts +1 -2
  150. package/dist/components/interactive/modal/ModalKit.js +19 -39
  151. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +1 -3
  152. package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +19 -39
  153. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +1 -3
  154. package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +19 -39
  155. package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +1 -3
  156. package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +19 -39
  157. package/dist/components/interactive/select-menu/SelectMenu.d.ts +1 -9
  158. package/dist/components/interactive/select-menu/SelectMenu.js +19 -39
  159. package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +1 -3
  160. package/dist/components/interactive/select-menu/StringSelectMenuKit.js +19 -39
  161. package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +1 -3
  162. package/dist/components/interactive/select-menu/UserSelectMenuKit.js +19 -39
  163. package/dist/components/interactive/select-menu/common.d.ts +1 -2
  164. package/dist/components/interactive/select-menu/common.js +0 -1
  165. package/dist/config/config.d.ts +15 -35
  166. package/dist/config/config.js +19 -39
  167. package/dist/config/default.d.ts +1 -33
  168. package/dist/config/default.js +19 -39
  169. package/dist/config/loader.d.ts +1 -33
  170. package/dist/config/loader.js +19 -39
  171. package/dist/config/types.d.ts +1 -33
  172. package/dist/config/utils.d.ts +1 -33
  173. package/dist/config/utils.js +1 -1
  174. package/dist/{constants-D0dawKxO.js → constants-BA0TJU6e.js} +2 -3
  175. package/dist/{constants-D0dawKxO.js.map → constants-BA0TJU6e.js.map} +1 -1
  176. package/dist/constants-BS9N2avz.js +27 -0
  177. package/dist/{constants-AH-9qJ89.js.map → constants-BS9N2avz.js.map} +1 -1
  178. package/dist/{constants-BMWH2YUr.js → constants-CeIMhMD0.js} +16 -1
  179. package/dist/constants-CeIMhMD0.js.map +1 -0
  180. package/dist/{constants-DqnSDZ6l.d.ts → constants-CuYW0K10.d.ts} +14 -8
  181. package/dist/{constants-CCFSX2NG.d.ts → constants-EpKcj0dH.d.ts} +2 -2
  182. package/dist/{container-1ltvkavy.d.ts → container-DYcb7zGw.d.ts} +2 -3
  183. package/dist/context/async-context.d.ts +1 -33
  184. package/dist/context/async-context.js +19 -39
  185. package/dist/context/environment.d.ts +1 -33
  186. package/dist/context/environment.js +19 -39
  187. package/dist/{element-CvNhvLZ8.d.ts → element-DZeqbSTk.d.ts} +5 -5
  188. package/dist/{env-8yY-6pbC.js → env-FxaiNasU.js} +7 -3
  189. package/dist/env-FxaiNasU.js.map +1 -0
  190. package/dist/error-codes-Ds0bnPvT.js.map +1 -1
  191. package/dist/events/CommandKitEventsChannel.d.ts +1 -33
  192. package/dist/events/CommandKitEventsChannel.js +1 -1
  193. package/dist/{file-n2yl_-vl.d.ts → file-CrV4lSnl.d.ts} +2 -3
  194. package/dist/{file-DAUOZYhC.js → file-DqI3v90P.js} +2 -3
  195. package/dist/{file-DAUOZYhC.js.map → file-DqI3v90P.js.map} +1 -1
  196. package/dist/flags/FlagProvider.d.ts +1 -33
  197. package/dist/flags/feature-flags.d.ts +1 -33
  198. package/dist/flags/feature-flags.js +22 -43
  199. package/dist/flags/store.d.ts +1 -33
  200. package/dist/flags/store.js +1 -1
  201. package/dist/{helpers-hDh_tMb6.d.ts → helpers-AQPLVY35.d.ts} +2 -3
  202. package/dist/{helpers-D2_1jih6.js → helpers-DSy7EjzP.js} +2 -3
  203. package/dist/{helpers-D2_1jih6.js.map → helpers-DSy7EjzP.js.map} +1 -1
  204. package/dist/index.d.ts +41 -44
  205. package/dist/index.js +49 -68
  206. package/dist/kv/constants.d.ts +1 -1
  207. package/dist/kv/constants.js +1 -1
  208. package/dist/kv/dotprops.js +25 -3
  209. package/dist/kv/dotprops.js.map +1 -0
  210. package/dist/kv/kv.d.ts +289 -290
  211. package/dist/kv/kv.js +14 -16
  212. package/dist/kv/kv.js.map +1 -1
  213. package/dist/kv/serde.d.ts +12 -3
  214. package/dist/kv/serde.js +86 -4
  215. package/dist/kv/serde.js.map +1 -0
  216. package/dist/{label-D0KXeBhk.d.ts → label-37kaNWMH.d.ts} +4 -5
  217. package/dist/logger/DefaultLogger.d.ts +66 -3
  218. package/dist/logger/DefaultLogger.js +19 -39
  219. package/dist/logger/ILogger.d.ts +64 -2
  220. package/dist/logger/ILogger.js +0 -1
  221. package/dist/logger/Logger.d.ts +36 -3
  222. package/dist/logger/Logger.js +19 -39
  223. package/dist/logger/NoopLogger.d.ts +36 -37
  224. package/dist/{media-gallery-BzG70ued.d.ts → media-gallery-Ci3I4ElH.d.ts} +2 -3
  225. package/dist/plugins/CompilerPlugin.d.ts +1 -33
  226. package/dist/plugins/CompilerPlugin.js +1 -2
  227. package/dist/plugins/PluginCommon.d.ts +1 -33
  228. package/dist/plugins/PluginCommon.js +1 -1
  229. package/dist/plugins/RuntimePlugin.d.ts +1 -33
  230. package/dist/plugins/RuntimePlugin.js +1 -2
  231. package/dist/plugins/index.d.ts +1 -33
  232. package/dist/plugins/index.js +21 -39
  233. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -33
  234. package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +19 -39
  235. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -33
  236. package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +19 -39
  237. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -33
  238. package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +19 -39
  239. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -33
  240. package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +19 -39
  241. package/dist/plugins/plugin-runtime/runtime.d.ts +1 -33
  242. package/dist/plugins/plugin-runtime/runtime.js +0 -1
  243. package/dist/plugins/types.d.ts +1 -33
  244. package/dist/plugins/types.js +0 -1
  245. package/dist/{poll-HnaJcB0o.d.ts → poll-Ddtapd6n.d.ts} +8 -9
  246. package/dist/{poll-Bc6rjeUS.js → poll-ziQQQbMU.js} +12 -13
  247. package/dist/{poll-Bc6rjeUS.js.map → poll-ziQQQbMU.js.map} +1 -1
  248. package/dist/{resolve-file-url-CJoD0FAn.js → resolve-file-url-BmjHzIKe.js} +2 -2
  249. package/dist/{resolve-file-url-CJoD0FAn.js.map → resolve-file-url-BmjHzIKe.js.map} +1 -1
  250. package/dist/{section-BOaJKXiy.d.ts → section-DkUKULnB.d.ts} +2 -3
  251. package/dist/{separator-Cb7-6T6N.d.ts → separator-CbXsIFCa.d.ts} +2 -3
  252. package/dist/{separator-C___2K-f.js → separator-DGwA_b1J.js} +2 -3
  253. package/dist/{separator-C___2K-f.js.map → separator-DGwA_b1J.js.map} +1 -1
  254. package/dist/{signals-DBS60vTo.d.ts → signals-BbTgTc0i.d.ts} +2 -2
  255. package/dist/{signals-Cnqe9dFV.js → signals-ewEPW2cO.js} +2 -2
  256. package/dist/{signals-Cnqe9dFV.js.map → signals-ewEPW2cO.js.map} +1 -1
  257. package/dist/{store-ZwL2gN6a.js → store-DK4JA-fQ.js} +2 -3
  258. package/dist/{store-ZwL2gN6a.js.map → store-DK4JA-fQ.js.map} +1 -1
  259. package/dist/{text-display-BtQR88kY.js → text-display-BVuG7dT-.js} +2 -3
  260. package/dist/{text-display-BtQR88kY.js.map → text-display-BVuG7dT-.js.map} +1 -1
  261. package/dist/{text-display-B_hpz50P.d.ts → text-display-D7j39VC-.d.ts} +2 -3
  262. package/dist/{type-checker-CEFHoQoV.js → type-checker-CFpKDDs8.js} +4 -6
  263. package/dist/{type-checker-CEFHoQoV.js.map → type-checker-CFpKDDs8.js.map} +1 -1
  264. package/dist/{types-CJ-XvOFN.d.ts → types-BywA9d2Z.d.ts} +2 -2
  265. package/dist/{types-package-D11rQXLs.js → types-package-Bjh_ap0V.js} +3 -6
  266. package/dist/{types-package-D11rQXLs.js.map → types-package-Bjh_ap0V.js.map} +1 -1
  267. package/dist/types.d.ts +1 -33
  268. package/dist/utils/colors.js +1 -1
  269. package/dist/utils/constants.d.ts +2 -2
  270. package/dist/utils/constants.js +3 -2
  271. package/dist/utils/dev-hooks.d.ts +1 -33
  272. package/dist/utils/dev-hooks.js +19 -39
  273. package/dist/utils/error-codes.d.ts +54 -2
  274. package/dist/utils/resolve-file-url.d.ts +11 -2
  275. package/dist/utils/resolve-file-url.js +1 -1
  276. package/dist/utils/types-package.js +2 -2
  277. package/dist/utils/useful-stuff/async-queue.d.ts +21 -21
  278. package/dist/utils/useful-stuff/mutex.d.ts +62 -62
  279. package/dist/utils/useful-stuff/ratelimiter.d.ts +56 -56
  280. package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
  281. package/dist/utils/useful-stuff/semaphore.d.ts +82 -82
  282. package/dist/utils/utilities.d.ts +113 -2
  283. package/dist/utils/utilities.js +22 -40
  284. package/dist/utils/warning.js +1 -1
  285. package/dist/{utils-Br3eenD1.js → utils-CVaVycsK.js} +1 -1
  286. package/dist/{utils-Br3eenD1.js.map → utils-CVaVycsK.js.map} +1 -1
  287. package/dist/{version-DC4j2ZwU.js → version-DNg-wh2E.js} +2 -2
  288. package/dist/{version-DC4j2ZwU.js.map → version-DNg-wh2E.js.map} +1 -1
  289. package/dist/version.d.ts +8 -2
  290. package/dist/version.js +1 -1
  291. package/dist/{warning-CszH8HeS.js → warning-BWiQltHE.js} +1 -1
  292. package/dist/{warning-CszH8HeS.js.map → warning-BWiQltHE.js.map} +1 -1
  293. package/hooks.cjs +11 -4
  294. package/package.json +14 -7
  295. package/dist/ChannelSelectMenuKit-CsYgIyKe.d.ts +0 -67
  296. package/dist/DefaultLogger-CHMVsizQ.d.ts +0 -67
  297. package/dist/EventWorkerContext-CLhZRHhH.d.ts +0 -43
  298. package/dist/EventsRouter-4pT6vj-U.d.ts +0 -90
  299. package/dist/ILogger-BQ2ew4zR.d.ts +0 -64
  300. package/dist/Logger-DyV7oli4.d.ts +0 -37
  301. package/dist/MentionableSelectMenuKit-CO9phWMf.d.ts +0 -62
  302. package/dist/MessageCommandParser-DEOl_ifb.d.ts +0 -195
  303. package/dist/RoleSelectMenuKit-DvBxzpWh.d.ts +0 -67
  304. package/dist/StringSelectMenuKit-CJ0MzUZJ.d.ts +0 -67
  305. package/dist/UserSelectMenuKit-C_J-9RJs.d.ts +0 -67
  306. package/dist/app-process-AQ3Cbf6j.js +0 -68
  307. package/dist/app-process-AQ3Cbf6j.js.map +0 -1
  308. package/dist/build-BYMHMOl_.js +0 -173
  309. package/dist/build-BYMHMOl_.js.map +0 -1
  310. package/dist/commandkit-DabqpQ6v.js.map +0 -1
  311. package/dist/common-CCx-FJI4.js +0 -17
  312. package/dist/common-CCx-FJI4.js.map +0 -1
  313. package/dist/config-DbgXt6mf.d.ts +0 -16
  314. package/dist/constants-AH-9qJ89.js +0 -27
  315. package/dist/constants-BMWH2YUr.js.map +0 -1
  316. package/dist/container-DC0eQigs.js +0 -44
  317. package/dist/container-DC0eQigs.js.map +0 -1
  318. package/dist/dotprops-DvJUE8fw.js +0 -36
  319. package/dist/dotprops-DvJUE8fw.js.map +0 -1
  320. package/dist/element-DibzzA5L.js +0 -84
  321. package/dist/element-DibzzA5L.js.map +0 -1
  322. package/dist/env-8yY-6pbC.js.map +0 -1
  323. package/dist/error-codes-BiNRVMiV.d.ts +0 -54
  324. package/dist/feature-flags-BoBV4Dsj.js +0 -160
  325. package/dist/feature-flags-BoBV4Dsj.js.map +0 -1
  326. package/dist/index.js.map +0 -1
  327. package/dist/init-CBb0StSB.js +0 -91
  328. package/dist/init-CBb0StSB.js.map +0 -1
  329. package/dist/init-DSYckXwx.d.ts +0 -13
  330. package/dist/label-D-uJWRZ0.js +0 -36
  331. package/dist/label-D-uJWRZ0.js.map +0 -1
  332. package/dist/media-gallery-BLhwe5lO.js +0 -62
  333. package/dist/media-gallery-BLhwe5lO.js.map +0 -1
  334. package/dist/resolve-file-url-DFtR8jRR.d.ts +0 -11
  335. package/dist/section-BMcHN97i.js +0 -60
  336. package/dist/section-BMcHN97i.js.map +0 -1
  337. package/dist/serde-D4H23l2F.d.ts +0 -12
  338. package/dist/serde-DHHwhltz.js +0 -97
  339. package/dist/serde-DHHwhltz.js.map +0 -1
  340. package/dist/types-Cdh4uaFR.js +0 -0
  341. package/dist/types-TC4g3w91.js +0 -0
  342. package/dist/utilities-CQUaua43.d.ts +0 -87
  343. package/dist/utils-Bf-3Eevb.js +0 -23
  344. package/dist/utils-Bf-3Eevb.js.map +0 -1
  345. package/dist/version-DggMfP_1.d.ts +0 -8
  346. /package/dist/{ILogger-B0q7p7L1.js → ILogger-JI8VGyJf.js} +0 -0
  347. /package/dist/{app-CrjK9yWX.js → common-vGj3fpz3.js} +0 -0
  348. /package/dist/{index-B5F3AfVc.d.ts → index-BJfko-dP.d.ts} +0 -0
  349. /package/dist/{index-BLwMeReG.d.ts → index-CCggO_hw.d.ts} +0 -0
  350. /package/dist/{index-h64gcVNJ.d.ts → index-CLjpoGi1.d.ts} +0 -0
  351. /package/dist/{common-0Iw8ZeM6.js → router-CtcApqrw.js} +0 -0
  352. /package/dist/{display-WDb9wMCv.js → runtime-UJIpkNww.js} +0 -0
  353. /package/dist/{router-BvamdzoF.js → types-Bx1EKe0v.js} +0 -0
  354. /package/dist/{runtime-Skt5NiOc.js → types-CAwOz52q.js} +0 -0
@@ -1,13 +0,0 @@
1
- import * as commander0 from "commander";
2
-
3
- //#region src/cli/init.d.ts
4
-
5
- /**
6
- * Creates a command line interface for CommandKit.
7
- * @param argv The arguments passed to the CLI.
8
- * @param options The options passed to the CLI.
9
- */
10
- declare function bootstrapCommandkitCLI(argv: string[], options?: commander0.ParseOptions | undefined): Promise<void>;
11
- //#endregion
12
- export { bootstrapCommandkitCLI };
13
- //# sourceMappingURL=init-DSYckXwx.d.ts.map
@@ -1,36 +0,0 @@
1
- const require_chunk = require('./chunk-nOFOJqeH.js');
2
- const require_common = require('./common-CCx-FJI4.js');
3
- let discord_js = require("discord.js");
4
- discord_js = require_chunk.__toESM(discord_js);
5
-
6
- //#region src/components/display/label.ts
7
- /**
8
- * The label component wraps modal components with text as a label and optional description.
9
- * @param props The label properties.
10
- * @returns The label builder instance.
11
- * @example ```tsx
12
- * import { Label } from 'commandkit';
13
- *
14
- * const label = <Label label="Name" description="Enter your name">
15
- * <ShortInput customId="name" label="Name" placeholder="John" required />
16
- * </Label>;
17
- * ```
18
- */
19
- function Label(props) {
20
- const { children, id,...rest } = props;
21
- const label = new discord_js.LabelBuilder({
22
- ...rest,
23
- component: children
24
- });
25
- require_common.applyId(props, label);
26
- return label;
27
- }
28
-
29
- //#endregion
30
- Object.defineProperty(exports, 'Label', {
31
- enumerable: true,
32
- get: function () {
33
- return Label;
34
- }
35
- });
36
- //# sourceMappingURL=label-D-uJWRZ0.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"label-D-uJWRZ0.js","names":[],"sources":["../src/components/display/label.ts"],"sourcesContent":["import {\n APIComponentInLabel,\n LabelBuilder,\n type LabelBuilderData,\n} from 'discord.js';\nimport { applyId } from './common';\n\n/**\n * The label properties for the label component.\n */\nexport interface LabelProps\n extends Omit<LabelBuilderData, 'component' | 'type'> {\n /**\n * The component that will be wrapped by the label component.\n */\n children: LabelBuilderData['component'] & {};\n}\n\n/**\n * The label component wraps modal components with text as a label and optional description.\n * @param props The label properties.\n * @returns The label builder instance.\n * @example ```tsx\n * import { Label } from 'commandkit';\n *\n * const label = <Label label=\"Name\" description=\"Enter your name\">\n * <ShortInput customId=\"name\" label=\"Name\" placeholder=\"John\" required />\n * </Label>;\n * ```\n */\nexport function Label(props: LabelProps) {\n const { children, id, ...rest } = props;\n\n const label = new LabelBuilder({\n ...rest,\n // channel select menu builder is missing?\n component: children as unknown as APIComponentInLabel,\n });\n\n applyId(props, label);\n\n return label;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA8BA,SAAgB,MAAM,OAAmB;CACvC,MAAM,EAAE,UAAU,GAAI,GAAG,SAAS;CAElC,MAAM,QAAQ,IAAI,wBAAa;EAC7B,GAAG;EAEH,WAAW;EACZ,CAAC;AAEF,wBAAQ,OAAO,MAAM;AAErB,QAAO"}
@@ -1,62 +0,0 @@
1
- const require_chunk = require('./chunk-nOFOJqeH.js');
2
- const require_common = require('./common-CCx-FJI4.js');
3
- let discord_js = require("discord.js");
4
- discord_js = require_chunk.__toESM(discord_js);
5
-
6
- //#region src/components/display/media-gallery.ts
7
- /**
8
- * The media gallery component
9
- * @param props The properties for the media gallery component.
10
- * @returns The media gallery builder instance.
11
- * @example ```tsx
12
- * import { MediaGallery } from 'commandkit';
13
- *
14
- * const gallery = (
15
- * <MediaGallery>
16
- * <MediaGalleryItem url="https://example.com/image1.png" description="Image 1" />
17
- * <MediaGalleryItem url="https://example.com/image2.png" description="Image 2" />
18
- * </MediaGallery>
19
- * );
20
- * ```
21
- */
22
- function MediaGallery(props) {
23
- const gallery = new discord_js.MediaGalleryBuilder();
24
- require_common.applyId(props, gallery);
25
- if (props.children != null) {
26
- if (!Array.isArray(props.children)) props.children = [props.children];
27
- gallery.addItems(props.children.flat());
28
- }
29
- return gallery;
30
- }
31
- /**
32
- * The media gallery item component
33
- * @param props The properties for the media gallery item component.
34
- * @returns The media gallery item builder instance.
35
- * @example ```tsx
36
- * import { MediaGalleryItem } from 'commandkit';
37
- *
38
- * const item = <MediaGalleryItem url="https://example.com/image.png" description="An image" />;
39
- * ```
40
- */
41
- function MediaGalleryItem(props) {
42
- const item = new discord_js.MediaGalleryItemBuilder();
43
- if (props.description != null) item.setDescription(props.description);
44
- if (props.spoiler != null) item.setSpoiler(props.spoiler);
45
- if (props.url != null) item.setURL(props.url);
46
- return item;
47
- }
48
-
49
- //#endregion
50
- Object.defineProperty(exports, 'MediaGallery', {
51
- enumerable: true,
52
- get: function () {
53
- return MediaGallery;
54
- }
55
- });
56
- Object.defineProperty(exports, 'MediaGalleryItem', {
57
- enumerable: true,
58
- get: function () {
59
- return MediaGalleryItem;
60
- }
61
- });
62
- //# sourceMappingURL=media-gallery-BLhwe5lO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"media-gallery-BLhwe5lO.js","names":[],"sources":["../src/components/display/media-gallery.ts"],"sourcesContent":["import { MediaGalleryBuilder, MediaGalleryItemBuilder } from 'discord.js';\nimport { applyId } from './common';\n\n/**\n * Represents the properties for a media gallery component.\n */\nexport interface MediaGalleryProps {\n id?: number;\n children?: MediaGalleryItemBuilder[];\n}\n\n/**\n * The media gallery component\n * @param props The properties for the media gallery component.\n * @returns The media gallery builder instance.\n * @example ```tsx\n * import { MediaGallery } from 'commandkit';\n *\n * const gallery = (\n * <MediaGallery>\n * <MediaGalleryItem url=\"https://example.com/image1.png\" description=\"Image 1\" />\n * <MediaGalleryItem url=\"https://example.com/image2.png\" description=\"Image 2\" />\n * </MediaGallery>\n * );\n * ```\n */\nexport function MediaGallery(props: MediaGalleryProps) {\n const gallery = new MediaGalleryBuilder();\n\n applyId(props, gallery);\n\n if (props.children != null) {\n if (!Array.isArray(props.children)) props.children = [props.children];\n gallery.addItems(props.children.flat());\n }\n\n return gallery;\n}\n\n/**\n * Represents the properties for a media gallery item component.\n */\nexport interface MediaGalleryItemProps {\n description?: string;\n spoiler?: boolean;\n url?: string;\n}\n\n/**\n * The media gallery item component\n * @param props The properties for the media gallery item component.\n * @returns The media gallery item builder instance.\n * @example ```tsx\n * import { MediaGalleryItem } from 'commandkit';\n *\n * const item = <MediaGalleryItem url=\"https://example.com/image.png\" description=\"An image\" />;\n * ```\n */\nexport function MediaGalleryItem(props: MediaGalleryItemProps) {\n const item = new MediaGalleryItemBuilder();\n\n if (props.description != null) {\n item.setDescription(props.description);\n }\n\n if (props.spoiler != null) {\n item.setSpoiler(props.spoiler);\n }\n\n if (props.url != null) {\n item.setURL(props.url);\n }\n\n return item;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,aAAa,OAA0B;CACrD,MAAM,UAAU,IAAI,gCAAqB;AAEzC,wBAAQ,OAAO,QAAQ;AAEvB,KAAI,MAAM,YAAY,MAAM;AAC1B,MAAI,CAAC,MAAM,QAAQ,MAAM,SAAS,CAAE,OAAM,WAAW,CAAC,MAAM,SAAS;AACrE,UAAQ,SAAS,MAAM,SAAS,MAAM,CAAC;;AAGzC,QAAO;;;;;;;;;;;;AAsBT,SAAgB,iBAAiB,OAA8B;CAC7D,MAAM,OAAO,IAAI,oCAAyB;AAE1C,KAAI,MAAM,eAAe,KACvB,MAAK,eAAe,MAAM,YAAY;AAGxC,KAAI,MAAM,WAAW,KACnB,MAAK,WAAW,MAAM,QAAQ;AAGhC,KAAI,MAAM,OAAO,KACf,MAAK,OAAO,MAAM,IAAI;AAGxB,QAAO"}
@@ -1,11 +0,0 @@
1
- //#region src/utils/resolve-file-url.d.ts
2
- /**
3
- * Convert a local file path to a file URL.
4
- * @param filePath - The local file's path.
5
- * @param withTs - Whether to append a timestamp to the URL.
6
- * @returns - The converted file URL.
7
- */
8
- declare function toFileURL(filePath: string, withTs?: boolean): string;
9
- //#endregion
10
- export { toFileURL };
11
- //# sourceMappingURL=resolve-file-url-DFtR8jRR.d.ts.map
@@ -1,60 +0,0 @@
1
- const require_chunk = require('./chunk-nOFOJqeH.js');
2
- const require_common = require('./common-CCx-FJI4.js');
3
- let discord_js = require("discord.js");
4
- discord_js = require_chunk.__toESM(discord_js);
5
-
6
- //#region src/components/display/section.ts
7
- /**
8
- * The components v2 section component
9
- * @param props The properties for the section component.
10
- * @returns The section builder instance.
11
- * @example ```tsx
12
- * import { Section } from 'commandkit';
13
- *
14
- * const section = <Section>...</Section>;
15
- * ```
16
- */
17
- function Section(props) {
18
- const section = new discord_js.SectionBuilder();
19
- require_common.applyId(props, section);
20
- if (props.children != null) {
21
- if (!Array.isArray(props.children)) props.children = [props.children];
22
- for (const accessory of props.children.flat()) if (accessory instanceof discord_js.ThumbnailBuilder) section.setThumbnailAccessory(accessory);
23
- else if (accessory instanceof discord_js.ButtonBuilder) section.setButtonAccessory(accessory);
24
- else if (accessory instanceof discord_js.TextDisplayBuilder) section.addTextDisplayComponents(accessory);
25
- }
26
- return section;
27
- }
28
- /**
29
- * The thumbnail component
30
- * @param props The properties for the thumbnail component.
31
- * @returns The thumbnail builder instance.
32
- * @example ```tsx
33
- * import { Thumbnail } from 'commandkit';
34
- *
35
- * const thumbnail = <Thumbnail url="https://example.com/image.png" description="An image" />;
36
- * ```
37
- */
38
- function Thumbnail(props) {
39
- return new discord_js.ThumbnailBuilder({
40
- description: props.description,
41
- spoiler: props.spoiler,
42
- id: props.id,
43
- media: { url: props.url }
44
- });
45
- }
46
-
47
- //#endregion
48
- Object.defineProperty(exports, 'Section', {
49
- enumerable: true,
50
- get: function () {
51
- return Section;
52
- }
53
- });
54
- Object.defineProperty(exports, 'Thumbnail', {
55
- enumerable: true,
56
- get: function () {
57
- return Thumbnail;
58
- }
59
- });
60
- //# sourceMappingURL=section-BMcHN97i.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"section-BMcHN97i.js","names":[],"sources":["../src/components/display/section.ts"],"sourcesContent":["import {\n ButtonBuilder,\n SectionBuilder,\n TextDisplayBuilder,\n ThumbnailBuilder,\n} from 'discord.js';\nimport { applyId } from './common';\n\n/**\n * Represents the properties for a section component.\n */\nexport interface SectionProps {\n children?: (ThumbnailBuilder | ButtonBuilder | TextDisplayBuilder)[];\n id?: number;\n}\n\n/**\n * The components v2 section component\n * @param props The properties for the section component.\n * @returns The section builder instance.\n * @example ```tsx\n * import { Section } from 'commandkit';\n *\n * const section = <Section>...</Section>;\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\n/**\n * Represents the properties for a thumbnail component.\n */\nexport interface ThumbnailProps {\n id?: number;\n description?: string;\n spoiler?: boolean;\n url: string;\n}\n\n/**\n * The thumbnail component\n * @param props The properties for the thumbnail component.\n * @returns The thumbnail builder instance.\n * @example ```tsx\n * import { Thumbnail } from 'commandkit';\n *\n * const thumbnail = <Thumbnail url=\"https://example.com/image.png\" description=\"An image\" />;\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":";;;;;;;;;;;;;;;;AA0BA,SAAgB,QAAQ,OAAqC;CAC3D,MAAM,UAAU,IAAI,2BAAgB;AAEpC,wBAAQ,OAAO,QAAQ;AAEvB,KAAI,MAAM,YAAY,MAAM;AAC1B,MAAI,CAAC,MAAM,QAAQ,MAAM,SAAS,CAAE,OAAM,WAAW,CAAC,MAAM,SAAS;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;;AAKjD,QAAO;;;;;;;;;;;;AAuBT,SAAgB,UAAU,OAAuB;AAQ/C,QAPkB,IAAI,4BAAiB;EACrC,aAAa,MAAM;EACnB,SAAS,MAAM;EACf,IAAI,MAAM;EACV,OAAO,EAAE,KAAK,MAAM,KAAK;EAC1B,CAAC"}
@@ -1,12 +0,0 @@
1
- import { SerializerType } from "./constants-CCFSX2NG.js";
2
-
3
- //#region src/kv/serde.d.ts
4
- interface SerializedValue {
5
- t: SerializerType;
6
- v: any;
7
- }
8
- declare function serializer(value: any): SerializedValue;
9
- declare function deserializer(serialized: SerializedValue): any;
10
- //#endregion
11
- export { SerializedValue, deserializer, serializer };
12
- //# sourceMappingURL=serde-D4H23l2F.d.ts.map
@@ -1,97 +0,0 @@
1
- const require_constants = require('./constants-AH-9qJ89.js');
2
-
3
- //#region src/kv/serde.ts
4
- function serializer(value) {
5
- if (value === null) return {
6
- t: require_constants.SerializerType.Null,
7
- v: null
8
- };
9
- if (value === void 0) return {
10
- t: require_constants.SerializerType.Undefined,
11
- v: void 0
12
- };
13
- if (typeof value === "string") return {
14
- t: require_constants.SerializerType.String,
15
- v: value
16
- };
17
- if (typeof value === "number") return {
18
- t: require_constants.SerializerType.Number,
19
- v: value
20
- };
21
- if (typeof value === "boolean") return {
22
- t: require_constants.SerializerType.Boolean,
23
- v: value
24
- };
25
- if (typeof value === "bigint") return {
26
- t: require_constants.SerializerType.BigInt,
27
- v: value.toString()
28
- };
29
- if (value instanceof Date) return {
30
- t: require_constants.SerializerType.Date,
31
- v: value.toISOString()
32
- };
33
- if (Array.isArray(value)) return {
34
- t: require_constants.SerializerType.Array,
35
- v: value
36
- };
37
- if (value instanceof Map) return {
38
- t: require_constants.SerializerType.Map,
39
- v: Array.from(value.entries())
40
- };
41
- if (value instanceof Set) return {
42
- t: require_constants.SerializerType.Set,
43
- v: Array.from(value)
44
- };
45
- if (Buffer.isBuffer(value)) return {
46
- t: require_constants.SerializerType.Buffer,
47
- v: value.toString("base64")
48
- };
49
- if (value instanceof RegExp) return {
50
- t: require_constants.SerializerType.RegExp,
51
- v: {
52
- source: value.source,
53
- flags: value.flags
54
- }
55
- };
56
- if (typeof value === "object") return {
57
- t: require_constants.SerializerType.Object,
58
- v: value
59
- };
60
- return {
61
- t: require_constants.SerializerType.String,
62
- v: String(value)
63
- };
64
- }
65
- function deserializer(serialized) {
66
- switch (serialized.t) {
67
- case require_constants.SerializerType.Null: return null;
68
- case require_constants.SerializerType.Undefined: return;
69
- case require_constants.SerializerType.String: return serialized.v;
70
- case require_constants.SerializerType.Number: return serialized.v;
71
- case require_constants.SerializerType.Boolean: return serialized.v;
72
- case require_constants.SerializerType.BigInt: return BigInt(serialized.v);
73
- case require_constants.SerializerType.Date: return new Date(serialized.v);
74
- case require_constants.SerializerType.Array: return serialized.v;
75
- case require_constants.SerializerType.Map: return new Map(serialized.v);
76
- case require_constants.SerializerType.Set: return new Set(serialized.v);
77
- case require_constants.SerializerType.Buffer: return Buffer.from(serialized.v, "base64");
78
- case require_constants.SerializerType.RegExp: return new RegExp(serialized.v.source, serialized.v.flags);
79
- case require_constants.SerializerType.Object: return serialized.v;
80
- default: return serialized.v;
81
- }
82
- }
83
-
84
- //#endregion
85
- Object.defineProperty(exports, 'deserializer', {
86
- enumerable: true,
87
- get: function () {
88
- return deserializer;
89
- }
90
- });
91
- Object.defineProperty(exports, 'serializer', {
92
- enumerable: true,
93
- get: function () {
94
- return serializer;
95
- }
96
- });
97
- //# sourceMappingURL=serde-DHHwhltz.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serde-DHHwhltz.js","names":[],"sources":["../src/kv/serde.ts"],"sourcesContent":["import { SerializerType } from './constants';\n\nexport interface SerializedValue {\n t: SerializerType;\n v: any;\n}\n\nexport function serializer(value: any): SerializedValue {\n if (value === null) {\n return { t: SerializerType.Null, v: null };\n }\n\n if (value === undefined) {\n return { t: SerializerType.Undefined, v: undefined };\n }\n\n if (typeof value === 'string') {\n return { t: SerializerType.String, v: value };\n }\n\n if (typeof value === 'number') {\n return { t: SerializerType.Number, v: value };\n }\n\n if (typeof value === 'boolean') {\n return { t: SerializerType.Boolean, v: value };\n }\n\n if (typeof value === 'bigint') {\n return { t: SerializerType.BigInt, v: value.toString() };\n }\n\n if (value instanceof Date) {\n return { t: SerializerType.Date, v: value.toISOString() };\n }\n\n if (Array.isArray(value)) {\n return { t: SerializerType.Array, v: value };\n }\n\n if (value instanceof Map) {\n return { t: SerializerType.Map, v: Array.from(value.entries()) };\n }\n\n if (value instanceof Set) {\n return { t: SerializerType.Set, v: Array.from(value) };\n }\n\n if (Buffer.isBuffer(value)) {\n return { t: SerializerType.Buffer, v: value.toString('base64') };\n }\n\n if (value instanceof RegExp) {\n return {\n t: SerializerType.RegExp,\n v: { source: value.source, flags: value.flags },\n };\n }\n\n if (typeof value === 'object') {\n return { t: SerializerType.Object, v: value };\n }\n\n // Fallback to string\n return { t: SerializerType.String, v: String(value) };\n}\n\nexport function deserializer(serialized: SerializedValue): any {\n switch (serialized.t) {\n case SerializerType.Null:\n return null;\n case SerializerType.Undefined:\n return undefined;\n case SerializerType.String:\n return serialized.v;\n case SerializerType.Number:\n return serialized.v;\n case SerializerType.Boolean:\n return serialized.v;\n case SerializerType.BigInt:\n return BigInt(serialized.v);\n case SerializerType.Date:\n return new Date(serialized.v);\n case SerializerType.Array:\n return serialized.v;\n case SerializerType.Map:\n return new Map(serialized.v);\n case SerializerType.Set:\n return new Set(serialized.v);\n case SerializerType.Buffer:\n return Buffer.from(serialized.v, 'base64');\n case SerializerType.RegExp:\n return new RegExp(serialized.v.source, serialized.v.flags);\n case SerializerType.Object:\n return serialized.v;\n default:\n return serialized.v;\n }\n}\n"],"mappings":";;;AAOA,SAAgB,WAAW,OAA6B;AACtD,KAAI,UAAU,KACZ,QAAO;EAAE,GAAG,iCAAe;EAAM,GAAG;EAAM;AAG5C,KAAI,UAAU,OACZ,QAAO;EAAE,GAAG,iCAAe;EAAW,GAAG;EAAW;AAGtD,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG;EAAO;AAG/C,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG;EAAO;AAG/C,KAAI,OAAO,UAAU,UACnB,QAAO;EAAE,GAAG,iCAAe;EAAS,GAAG;EAAO;AAGhD,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG,MAAM,UAAU;EAAE;AAG1D,KAAI,iBAAiB,KACnB,QAAO;EAAE,GAAG,iCAAe;EAAM,GAAG,MAAM,aAAa;EAAE;AAG3D,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO;EAAE,GAAG,iCAAe;EAAO,GAAG;EAAO;AAG9C,KAAI,iBAAiB,IACnB,QAAO;EAAE,GAAG,iCAAe;EAAK,GAAG,MAAM,KAAK,MAAM,SAAS,CAAC;EAAE;AAGlE,KAAI,iBAAiB,IACnB,QAAO;EAAE,GAAG,iCAAe;EAAK,GAAG,MAAM,KAAK,MAAM;EAAE;AAGxD,KAAI,OAAO,SAAS,MAAM,CACxB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG,MAAM,SAAS,SAAS;EAAE;AAGlE,KAAI,iBAAiB,OACnB,QAAO;EACL,GAAG,iCAAe;EAClB,GAAG;GAAE,QAAQ,MAAM;GAAQ,OAAO,MAAM;GAAO;EAChD;AAGH,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG;EAAO;AAI/C,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG,OAAO,MAAM;EAAE;;AAGvD,SAAgB,aAAa,YAAkC;AAC7D,SAAQ,WAAW,GAAnB;EACE,KAAK,iCAAe,KAClB,QAAO;EACT,KAAK,iCAAe,UAClB;EACF,KAAK,iCAAe,OAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,OAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,QAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,OAClB,QAAO,OAAO,WAAW,EAAE;EAC7B,KAAK,iCAAe,KAClB,QAAO,IAAI,KAAK,WAAW,EAAE;EAC/B,KAAK,iCAAe,MAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,IAClB,QAAO,IAAI,IAAI,WAAW,EAAE;EAC9B,KAAK,iCAAe,IAClB,QAAO,IAAI,IAAI,WAAW,EAAE;EAC9B,KAAK,iCAAe,OAClB,QAAO,OAAO,KAAK,WAAW,GAAG,SAAS;EAC5C,KAAK,iCAAe,OAClB,QAAO,IAAI,OAAO,WAAW,EAAE,QAAQ,WAAW,EAAE,MAAM;EAC5D,KAAK,iCAAe,OAClB,QAAO,WAAW;EACpB,QACE,QAAO,WAAW"}
File without changes
File without changes
@@ -1,87 +0,0 @@
1
- //#region src/utils/utilities.d.ts
2
- /**
3
- * Returns the current working directory of the CommandKit application.
4
- * This is typically the directory where the source code is located.
5
- */
6
- declare function getCurrentDirectory(): string;
7
- /**
8
- * Returns the possible source directories for the CommandKit application.
9
- * This includes the `src`, `.commandkit`, and the distribution directory.
10
- * @returns An array of possible source directories.
11
- */
12
- declare function getSourceDirectories(): string[];
13
- /**
14
- * Returns the path to the app directory.
15
- * @returns The path to the app directory or `null` if not found.
16
- */
17
- declare function findAppDirectory(): string | null;
18
- /**
19
- * Debounces a function.
20
- * @param fn The function to debounce.
21
- * @param ms The debounce time in milliseconds.
22
- * @returns The debounced function.
23
- * @example
24
- * const debouncedFn = debounce(() => {
25
- * console.log('Debounced function called');
26
- * }, 300);
27
- *
28
- * debouncedFn(); // Will only execute after 300ms of inactivity
29
- * debouncedFn(); // Will reset the timer
30
- * debouncedFn(); // Will reset the timer again
31
- */
32
- declare function debounce<R, F extends (...args: any[]) => R>(fn: F, ms: number): F;
33
- /**
34
- * Defers the execution of a function.
35
- * @param fn The function to defer.
36
- * @param timeout The time in milliseconds to wait before executing the function. Defaults to 0.
37
- * @example
38
- * defer(() => {
39
- * console.log('This will run after a delay');
40
- * });
41
- *
42
- * console.log('This will run immediately');
43
- */
44
- declare function defer<T>(fn: () => T, timeout?: number): void;
45
- /**
46
- * Serializes a value to JSON.
47
- * @param value The value to serialize.
48
- * @param defaultValue The default value to return if the value is not serializable.
49
- * @returns The serialized value.
50
- */
51
- declare function JsonSerialize<R = any>(value: any, defaultValue?: R): R;
52
- /**
53
- * Creates a function from the given function that runs only in development mode.
54
- * @param fn The function to run in development mode.
55
- * @returns The function that runs only in development mode.
56
- * @example
57
- * ```ts
58
- * const devOnlyFn = devOnly(() => {
59
- * console.log('This function runs only in development mode');
60
- * });
61
- * devOnlyFn(); // This will log the message only in development mode
62
- * ```
63
- */
64
- declare function devOnly<T extends (...args: any[]) => any>(fn: T): T;
65
- /**
66
- * Represents a simple proxy object that mirrors a target object.
67
- */
68
- interface SimpleProxy<T extends object> {
69
- /**
70
- * The proxied object that mirrors the target.
71
- */
72
- proxy: T;
73
- /**
74
- * Sets a new target object for the proxy.
75
- * @param newTarget The new target object to set.
76
- */
77
- setTarget(newTarget: T): void;
78
- }
79
- /**
80
- * Creates a simple proxy object that mirrors the target object.
81
- * @param target The target object to proxy.
82
- * @returns The proxied object.
83
- */
84
- declare function createProxy<T extends object>(target: T): SimpleProxy<T>;
85
- //#endregion
86
- export { JsonSerialize, SimpleProxy, createProxy, debounce, defer, devOnly, findAppDirectory, getCurrentDirectory, getSourceDirectories };
87
- //# sourceMappingURL=utilities-CQUaua43.d.ts.map
@@ -1,23 +0,0 @@
1
-
2
- //#region src/cli/utils.ts
3
- let ora;
4
- /**
5
- * @private
6
- * @internal
7
- */
8
- async function createSpinner(text) {
9
- if (!ora) ora = await import("ora");
10
- return (ora.default || ora)({
11
- text,
12
- color: "cyan"
13
- });
14
- }
15
-
16
- //#endregion
17
- Object.defineProperty(exports, 'createSpinner', {
18
- enumerable: true,
19
- get: function () {
20
- return createSpinner;
21
- }
22
- });
23
- //# sourceMappingURL=utils-Bf-3Eevb.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils-Bf-3Eevb.js","names":[],"sources":["../src/cli/utils.ts"],"sourcesContent":["import type { Ora } from 'ora';\n\nlet ora: typeof import('ora') | undefined;\n\n/**\n * @private\n * @internal\n */\nexport async function createSpinner(text: string): Promise<Ora> {\n if (!ora) {\n ora = await import('ora');\n }\n\n return (ora.default || ora)({\n text,\n color: 'cyan',\n });\n}\n"],"mappings":";;AAEA,IAAI;;;;;AAMJ,eAAsB,cAAc,MAA4B;AAC9D,KAAI,CAAC,IACH,OAAM,MAAM,OAAO;AAGrB,SAAQ,IAAI,WAAW,KAAK;EAC1B;EACA,OAAO;EACR,CAAC"}
@@ -1,8 +0,0 @@
1
- //#region src/version.d.ts
2
- /**
3
- * The current version of CommandKit.
4
- */
5
- declare const version: string;
6
- //#endregion
7
- export { version };
8
- //# sourceMappingURL=version-DggMfP_1.d.ts.map
File without changes
File without changes
File without changes
File without changes