commandkit 1.2.0-dev.20251125125452 → 1.2.0-dev.20260115004503
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.
- package/{COPYING.md → LICENSE.md} +3 -3
- package/README.md +3 -3
- package/dist/{ActionRow-BtKd-ZRS.d.ts → ActionRow-B-CGmjDp.d.ts} +2 -3
- package/dist/{ActionRow-D6knpVd6.js → ActionRow-CSN_UKmM.js} +2 -2
- package/dist/{ActionRow-D6knpVd6.js.map → ActionRow-CSN_UKmM.js.map} +1 -1
- package/dist/{Button-DiXeKdXO.d.ts → Button-C-GPeFA3.d.ts} +5 -6
- package/dist/{ButtonKit-B_HCmb3D.d.ts → ButtonKit-DKu0VAe4.d.ts} +35 -36
- package/dist/{ChannelSelectMenuKit-DrsqXWiO.d.ts → ChannelSelectMenuKit-HQZ4hH5s.d.ts} +33 -34
- package/dist/{CommandKitEventsChannel-2l9Za-le.js → CommandKitEventsChannel-CnT5ymYe.js} +2 -2
- package/dist/{CommandKitEventsChannel-2l9Za-le.js.map → CommandKitEventsChannel-CnT5ymYe.js.map} +1 -1
- package/dist/{CommandsRouter-Bdkx7SZS.d.ts → CommandsRouter-C7dZEepB.d.ts} +48 -49
- package/dist/{CommandsRouter-NAgpWzTJ.js → CommandsRouter-C_HLsrGX.js} +2 -2
- package/dist/{CommandsRouter-NAgpWzTJ.js.map → CommandsRouter-C_HLsrGX.js.map} +1 -1
- package/dist/{CompilerPlugin-DbN5-ls3.js → CompilerPlugin-CUsGAfgl.js} +2 -2
- package/dist/{CompilerPlugin-DbN5-ls3.js.map → CompilerPlugin-CUsGAfgl.js.map} +1 -1
- package/dist/EventInterceptor-BWoEJMHZ.js.map +1 -1
- package/dist/{EventInterceptor-Dk5Fwu-7.d.ts → EventInterceptor-CZmWpS08.d.ts} +39 -39
- package/dist/{EventWorkerContext-yTm5vI3b.js → EventWorkerContext-Dfhgv329.js} +2 -2
- package/dist/{EventWorkerContext-yTm5vI3b.js.map → EventWorkerContext-Dfhgv329.js.map} +1 -1
- package/dist/{EventsRouter-bILsV3Lh.d.ts → EventsRouter-DZ37r54v.d.ts} +34 -34
- package/dist/{EventsRouter-D4_vBMhl.js → EventsRouter-DZYIha6m.js} +2 -2
- package/dist/{EventsRouter-D4_vBMhl.js.map → EventsRouter-DZYIha6m.js.map} +1 -1
- package/dist/{MentionableSelectMenuKit-DNan_JWk.d.ts → MentionableSelectMenuKit-7URDUM3-.d.ts} +33 -34
- package/dist/{MessageCommandParser-CD7ynlBO.js → MessageCommandParser-Bs9fimmd.js} +2 -2
- package/dist/{MessageCommandParser-CD7ynlBO.js.map → MessageCommandParser-Bs9fimmd.js.map} +1 -1
- package/dist/MessageCommandParser-q3dQcE5N.d.ts +194 -0
- package/dist/{Modal-Dd5plFpo.d.ts → Modal-CZT9MZsy.d.ts} +7 -8
- package/dist/{ModalKit-C8WkeoDl.d.ts → ModalKit-BWXI3Z26.d.ts} +32 -33
- package/dist/{PluginCommon-Bp5T3ubs.js → PluginCommon-BLxWww5u.js} +6 -6
- package/dist/{PluginCommon-Bp5T3ubs.js.map → PluginCommon-BLxWww5u.js.map} +1 -1
- package/dist/{RoleSelectMenuKit-FfGw3CSa.d.ts → RoleSelectMenuKit-BY-JJ18w.d.ts} +33 -34
- package/dist/{RuntimePlugin-Bq6z-Upz.js → RuntimePlugin-CtobluSU.js} +2 -2
- package/dist/{RuntimePlugin-Bq6z-Upz.js.map → RuntimePlugin-CtobluSU.js.map} +1 -1
- package/dist/{SelectMenu-DTWKY-JJ.d.ts → SelectMenu-q_b3Mjv9.d.ts} +8 -9
- package/dist/{StringSelectMenuKit-BMA0rjhA.d.ts → StringSelectMenuKit-lVhUMc3g.d.ts} +33 -34
- package/dist/{UserSelectMenuKit-CRpFbwA9.d.ts → UserSelectMenuKit-CCj4Fpkr.d.ts} +33 -34
- package/dist/analytics/analytics-engine.d.ts +1 -33
- package/dist/analytics/analytics-engine.js +21 -36
- package/dist/analytics/analytics-provider.d.ts +1 -33
- package/dist/analytics/constants.js +1 -1
- package/dist/analytics/utils.js +21 -36
- package/dist/{analytics-engine-DHmLGxFA.d.ts → analytics-engine-WQhXmx3H.d.ts} +840 -840
- package/dist/app/commands/AppCommandRunner.d.ts +1 -33
- package/dist/app/commands/AppCommandRunner.js +21 -36
- package/dist/app/commands/Context.d.ts +1 -33
- package/dist/app/commands/Context.js +21 -36
- package/dist/app/commands/MessageCommandParser.d.ts +1 -1
- package/dist/app/commands/MessageCommandParser.js +1 -2
- package/dist/app/commands/helpers.d.ts +1 -1
- package/dist/app/commands/helpers.js +1 -1
- package/dist/app/events/EventWorkerContext.d.ts +42 -35
- package/dist/app/events/EventWorkerContext.js +1 -1
- package/dist/app/handlers/AppCommandHandler.d.ts +1 -33
- package/dist/app/handlers/AppCommandHandler.js +21 -36
- package/dist/app/handlers/AppEventsHandler.d.ts +1 -33
- package/dist/app/handlers/AppEventsHandler.js +21 -36
- package/dist/app/index.d.ts +4 -33
- package/dist/app/index.js +21 -37
- package/dist/app/interrupt/signals.d.ts +1 -1
- package/dist/app/interrupt/signals.js +2 -3
- package/dist/app/middlewares/permissions.d.ts +1 -33
- package/dist/app/middlewares/permissions.js +21 -36
- package/dist/app/register/CommandRegistrar.d.ts +1 -33
- package/dist/app/register/CommandRegistrar.js +21 -36
- package/dist/app/router/CommandsRouter.d.ts +1 -1
- package/dist/app/router/CommandsRouter.js +1 -1
- package/dist/app/router/EventsRouter.d.ts +1 -1
- package/dist/app/router/EventsRouter.js +1 -1
- package/dist/app/router/index.d.ts +2 -3
- package/dist/app/router/index.js +2 -2
- package/dist/{chunk-nOFOJqeH.js → chunk-kSYXY2_d.js} +10 -6
- package/dist/cli/app-process.d.ts +0 -1
- package/dist/cli/app-process.js +61 -6
- package/dist/cli/app-process.js.map +1 -0
- package/dist/cli/build.d.ts +2 -33
- package/dist/cli/build.js +189 -42
- package/dist/cli/build.js.map +1 -0
- package/dist/cli/common.d.ts +1 -33
- package/dist/cli/common.js +3 -3
- package/dist/cli/development.d.ts +1 -2
- package/dist/cli/development.js +30 -44
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/env.js +1 -1
- package/dist/cli/generators.js +4 -4
- package/dist/cli/generators.js.map +1 -1
- package/dist/cli/information.js +2 -2
- package/dist/cli/information.js.map +1 -1
- package/dist/cli/init.d.ts +0 -1
- package/dist/cli/init.js +27 -41
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/production.d.ts +0 -1
- package/dist/cli/production.js +33 -47
- package/dist/cli/production.js.map +1 -1
- package/dist/cli/type-checker.js +4 -4
- package/dist/cli/utils.d.ts +0 -1
- package/dist/cli/utils.js +17 -2
- package/dist/cli/utils.js.map +1 -0
- package/dist/{colors-CLmBiP9I.js → colors-Csc0X4QJ.js} +2 -2
- package/dist/{colors-CLmBiP9I.js.map → colors-Csc0X4QJ.js.map} +1 -1
- package/dist/{commandkit-B0wT0Mxx.js → commandkit-SIjTLD2R.js} +31 -31
- package/dist/{commandkit-B0wT0Mxx.js.map → commandkit-SIjTLD2R.js.map} +1 -1
- package/dist/commandkit.d.ts +1 -33
- package/dist/commandkit.js +21 -36
- package/dist/{common-B2-sF49Q.js → common-DSRs_mfw.js} +6 -6
- package/dist/{common-B2-sF49Q.js.map → common-DSRs_mfw.js.map} +1 -1
- package/dist/{common-DAxu7-kG.d.ts → common-DnwCYit8.d.ts} +2 -3
- package/dist/components/common/EventInterceptor.d.ts +1 -1
- package/dist/components/common/element.d.ts +1 -4
- package/dist/components/common/types.d.ts +1 -1
- package/dist/components/common/types.js +0 -1
- package/dist/components/display/common.d.ts +0 -1
- package/dist/components/display/container.d.ts +1 -1
- package/dist/components/display/container.js +1 -2
- package/dist/components/display/file.d.ts +1 -1
- package/dist/components/display/file.js +1 -1
- package/dist/components/display/index.d.ts +8 -9
- package/dist/components/display/index.js +8 -9
- package/dist/components/display/label.d.ts +1 -1
- package/dist/components/display/label.js +1 -2
- package/dist/components/display/media-gallery.d.ts +1 -1
- package/dist/components/display/media-gallery.js +1 -2
- package/dist/components/display/poll.d.ts +1 -1
- package/dist/components/display/poll.js +1 -1
- package/dist/components/display/section.d.ts +1 -1
- package/dist/components/display/section.js +1 -2
- package/dist/components/display/separator.d.ts +1 -1
- package/dist/components/display/separator.js +1 -1
- package/dist/components/display/text-display.d.ts +1 -1
- package/dist/components/display/text-display.js +1 -1
- package/dist/components/index.d.ts +22 -25
- package/dist/components/index.js +21 -35
- package/dist/components/interactive/action-row/ActionRow.d.ts +1 -5
- package/dist/components/interactive/action-row/ActionRow.js +1 -1
- package/dist/components/interactive/button/Button.d.ts +1 -6
- package/dist/components/interactive/button/Button.js +21 -36
- package/dist/components/interactive/button/ButtonKit.d.ts +1 -2
- package/dist/components/interactive/button/ButtonKit.js +21 -36
- package/dist/components/interactive/modal/Modal.d.ts +1 -6
- package/dist/components/interactive/modal/Modal.js +21 -36
- package/dist/components/interactive/modal/ModalKit.d.ts +1 -2
- package/dist/components/interactive/modal/ModalKit.js +21 -36
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +21 -36
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +21 -36
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +21 -36
- package/dist/components/interactive/select-menu/SelectMenu.d.ts +1 -9
- package/dist/components/interactive/select-menu/SelectMenu.js +21 -36
- package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/StringSelectMenuKit.js +21 -36
- package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/UserSelectMenuKit.js +21 -36
- package/dist/components/interactive/select-menu/common.d.ts +1 -2
- package/dist/components/interactive/select-menu/common.js +0 -1
- package/dist/config/config.d.ts +15 -35
- package/dist/config/config.js +21 -36
- package/dist/config/default.d.ts +1 -33
- package/dist/config/default.js +21 -36
- package/dist/config/loader.d.ts +1 -33
- package/dist/config/loader.js +21 -36
- package/dist/config/types.d.ts +1 -33
- package/dist/config/utils.d.ts +1 -33
- package/dist/constants-BFFK-hfP.js +27 -0
- package/dist/{constants-Dy6P2veX.js.map → constants-BFFK-hfP.js.map} +1 -1
- package/dist/{constants-CAMgxUyw.d.ts → constants-CuYW0K10.d.ts} +7 -7
- package/dist/{constants-BqrEmoih.js → constants-Cw8VjCVz.js} +2 -2
- package/dist/{constants-BqrEmoih.js.map → constants-Cw8VjCVz.js.map} +1 -1
- package/dist/{constants-D95ayHBM.d.ts → constants-EpKcj0dH.d.ts} +1 -1
- package/dist/{container-C319x4cG.js → container-DCPljKVH.js} +2 -2
- package/dist/{container-C319x4cG.js.map → container-DCPljKVH.js.map} +1 -1
- package/dist/{container-0C3ZMb_f.d.ts → container-DYcb7zGw.d.ts} +1 -2
- package/dist/context/async-context.d.ts +1 -33
- package/dist/context/async-context.js +21 -36
- package/dist/context/environment.d.ts +1 -33
- package/dist/context/environment.js +21 -36
- package/dist/element-DibzzA5L.js.map +1 -1
- package/dist/{element-CGY5MlNe.d.ts → element-wQo0heGj.d.ts} +3 -4
- package/dist/{env-CQJgOkQD.js → env-CmspDhHy.js} +1 -1
- package/dist/{env-CQJgOkQD.js.map → env-CmspDhHy.js.map} +1 -1
- package/dist/error-codes-Ds0bnPvT.js.map +1 -1
- package/dist/events/CommandKitEventsChannel.d.ts +1 -33
- package/dist/events/CommandKitEventsChannel.js +1 -1
- package/dist/{file-DgEXJx3x.js → file-Ca1kpEtE.js} +2 -2
- package/dist/{file-DgEXJx3x.js.map → file-Ca1kpEtE.js.map} +1 -1
- package/dist/{file-CfUTZjJh.d.ts → file-CrV4lSnl.d.ts} +1 -2
- package/dist/flags/FlagProvider.d.ts +1 -33
- package/dist/flags/feature-flags.d.ts +1 -33
- package/dist/flags/feature-flags.js +162 -40
- package/dist/flags/feature-flags.js.map +1 -0
- package/dist/flags/store.d.ts +1 -33
- package/dist/flags/store.js +1 -1
- package/dist/{helpers-t6PiYdMb.d.ts → helpers-AQPLVY35.d.ts} +1 -2
- package/dist/{helpers-0FUA42u8.js → helpers-Btx1FSZx.js} +2 -2
- package/dist/{helpers-0FUA42u8.js.map → helpers-Btx1FSZx.js.map} +1 -1
- package/dist/index.d.ts +40 -43
- package/dist/index.js +32 -40
- package/dist/index.js.map +1 -1
- package/dist/kv/constants.d.ts +1 -1
- package/dist/kv/constants.js +1 -1
- package/dist/kv/dotprops.js +25 -3
- package/dist/kv/dotprops.js.map +1 -0
- package/dist/kv/kv.d.ts +289 -290
- package/dist/kv/kv.js +14 -15
- package/dist/kv/kv.js.map +1 -1
- package/dist/kv/serde.d.ts +12 -3
- package/dist/kv/serde.js +86 -4
- package/dist/kv/serde.js.map +1 -0
- package/dist/{label-CQD5hBwB.d.ts → label-37kaNWMH.d.ts} +3 -4
- package/dist/{label-CCHbfQW8.js → label-B6vXvwLM.js} +3 -3
- package/dist/{label-CCHbfQW8.js.map → label-B6vXvwLM.js.map} +1 -1
- package/dist/logger/DefaultLogger.d.ts +66 -3
- package/dist/logger/DefaultLogger.js +21 -36
- package/dist/logger/ILogger.d.ts +64 -2
- package/dist/logger/ILogger.js +0 -1
- package/dist/logger/Logger.d.ts +36 -3
- package/dist/logger/Logger.js +21 -36
- package/dist/logger/NoopLogger.d.ts +36 -37
- package/dist/{media-gallery-DalbYf1v.d.ts → media-gallery-Ci3I4ElH.d.ts} +1 -2
- package/dist/{media-gallery-DdU7o9Cf.js → media-gallery-u3gjX7yD.js} +2 -2
- package/dist/{media-gallery-DdU7o9Cf.js.map → media-gallery-u3gjX7yD.js.map} +1 -1
- package/dist/plugins/CompilerPlugin.d.ts +1 -33
- package/dist/plugins/CompilerPlugin.js +1 -2
- package/dist/plugins/PluginCommon.d.ts +1 -33
- package/dist/plugins/PluginCommon.js +1 -1
- package/dist/plugins/RuntimePlugin.d.ts +1 -33
- package/dist/plugins/RuntimePlugin.js +1 -2
- package/dist/plugins/index.d.ts +1 -33
- package/dist/plugins/index.js +23 -36
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -33
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +21 -36
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -33
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +21 -36
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -33
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +21 -36
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -33
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +21 -36
- package/dist/plugins/plugin-runtime/runtime.d.ts +1 -33
- package/dist/plugins/plugin-runtime/runtime.js +0 -1
- package/dist/plugins/types.d.ts +1 -33
- package/dist/plugins/types.js +0 -1
- package/dist/{poll-6lSMoohv.js → poll-CFe8yvoJ.js} +12 -12
- package/dist/{poll-6lSMoohv.js.map → poll-CFe8yvoJ.js.map} +1 -1
- package/dist/{poll-Bo-skHvn.d.ts → poll-Ddtapd6n.d.ts} +7 -8
- package/dist/{resolve-file-url-CJoD0FAn.js → resolve-file-url-CdHqwWs3.js} +2 -2
- package/dist/{resolve-file-url-CJoD0FAn.js.map → resolve-file-url-CdHqwWs3.js.map} +1 -1
- package/dist/{section-C4qfgzOQ.js → section-BC8LF-B2.js} +2 -2
- package/dist/{section-C4qfgzOQ.js.map → section-BC8LF-B2.js.map} +1 -1
- package/dist/{section-CszS2hd5.d.ts → section-DkUKULnB.d.ts} +1 -2
- package/dist/{separator-CsoRs1aX.js → separator-BUTiW7uz.js} +2 -2
- package/dist/{separator-CsoRs1aX.js.map → separator-BUTiW7uz.js.map} +1 -1
- package/dist/{separator-DfRlVHne.d.ts → separator-CbXsIFCa.d.ts} +1 -2
- package/dist/{signals-C2Ly0wDt.js → signals-B8z1wJ6W.js} +2 -2
- package/dist/{signals-C2Ly0wDt.js.map → signals-B8z1wJ6W.js.map} +1 -1
- package/dist/{signals-DeafthGG.d.ts → signals-BbTgTc0i.d.ts} +1 -1
- package/dist/{store-GrsErvli.js → store-D8r_hryO.js} +2 -2
- package/dist/{store-GrsErvli.js.map → store-D8r_hryO.js.map} +1 -1
- package/dist/{text-display-DvydvE0D.d.ts → text-display-D7j39VC-.d.ts} +1 -2
- package/dist/{text-display-C0oSz5y0.js → text-display-DANahMN3.js} +2 -2
- package/dist/{text-display-C0oSz5y0.js.map → text-display-DANahMN3.js.map} +1 -1
- package/dist/{type-checker-CEt5Inbw.js → type-checker-cVd3Hpnh.js} +4 -4
- package/dist/{type-checker-CEt5Inbw.js.map → type-checker-cVd3Hpnh.js.map} +1 -1
- package/dist/{types-CQwntdAo.d.ts → types-BywA9d2Z.d.ts} +1 -1
- package/dist/{types-package-BxIhhZgZ.js → types-package-CsTNfvv2.js} +2 -2
- package/dist/{types-package-BxIhhZgZ.js.map → types-package-CsTNfvv2.js.map} +1 -1
- package/dist/types.d.ts +1 -33
- package/dist/utils/colors.js +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/dev-hooks.d.ts +1 -33
- package/dist/utils/dev-hooks.js +21 -36
- package/dist/utils/error-codes.d.ts +54 -2
- package/dist/utils/resolve-file-url.d.ts +11 -2
- package/dist/utils/resolve-file-url.js +1 -1
- package/dist/utils/types-package.js +1 -1
- package/dist/utils/useful-stuff/async-queue.d.ts +21 -21
- package/dist/utils/useful-stuff/mutex.d.ts +62 -62
- package/dist/utils/useful-stuff/ratelimiter.d.ts +56 -56
- package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
- package/dist/utils/useful-stuff/semaphore.d.ts +82 -82
- package/dist/utils/utilities.d.ts +113 -2
- package/dist/utils/utilities.js +21 -36
- package/dist/utils/warning.d.ts +25 -2
- package/dist/utils-Br3eenD1.js.map +1 -1
- package/dist/version.d.ts +8 -2
- package/dist/version.js +12 -2
- package/dist/version.js.map +1 -0
- package/dist/warning-CszH8HeS.js.map +1 -1
- package/package.json +5 -5
- package/dist/DefaultLogger-CgCFHJ4J.d.ts +0 -67
- package/dist/EventWorkerContext-CNPnDdUZ.d.ts +0 -43
- package/dist/ILogger-B-vsuZ1C.d.ts +0 -64
- package/dist/ILogger-B0q7p7L1.js +0 -0
- package/dist/Logger-BmHeS1Qd.d.ts +0 -37
- package/dist/MessageCommandParser-JmJWga4L.d.ts +0 -195
- package/dist/app-CrjK9yWX.js +0 -0
- package/dist/app-process-DCkz7RlU.js +0 -65
- package/dist/app-process-DCkz7RlU.js.map +0 -1
- package/dist/build-CaoHQPvm.js +0 -169
- package/dist/build-CaoHQPvm.js.map +0 -1
- package/dist/config-2prRz7_7.d.ts +0 -16
- package/dist/constants-Dy6P2veX.js +0 -27
- package/dist/dotprops-Dp98nRuu.js +0 -36
- package/dist/dotprops-Dp98nRuu.js.map +0 -1
- package/dist/error-codes-BuWUNGpX.d.ts +0 -54
- package/dist/feature-flags-BRF8OH7U.js +0 -160
- package/dist/feature-flags-BRF8OH7U.js.map +0 -1
- package/dist/resolve-file-url-B63_4Wm3.d.ts +0 -11
- package/dist/serde-CqUxaQUh.js +0 -97
- package/dist/serde-CqUxaQUh.js.map +0 -1
- package/dist/serde-DR1JEtRZ.d.ts +0 -12
- package/dist/utilities-BV9Osg71.d.ts +0 -113
- package/dist/utils-DGovVwyA.js +0 -23
- package/dist/utils-DGovVwyA.js.map +0 -1
- package/dist/version-BKZNlkbA.d.ts +0 -8
- package/dist/version-DGfGT6Tx.js +0 -18
- package/dist/version-DGfGT6Tx.js.map +0 -1
- package/dist/warning-BucG024D.d.ts +0 -25
- /package/dist/{index-B5F3AfVc.d.ts → index-BJfko-dP.d.ts} +0 -0
- /package/dist/{index-BLwMeReG.d.ts → index-CCggO_hw.d.ts} +0 -0
- /package/dist/{index-h64gcVNJ.d.ts → index-CLjpoGi1.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-Br3eenD1.js","names":[],"sources":["../src/config/utils.ts"],"sourcesContent":["import { CommandKitConfig } from './types';\n\n/**\n * @private\n */\nexport type DeepRequired<T, OptionalKeys extends keyof T = never> = {\n [P in keyof T]-?: P extends OptionalKeys ? Partial<T[P]> : DeepRequired<T[P]>;\n};\n\n/**\n * @private\n */\nexport type DeepPartial<T> = {\n [P in keyof T]?: DeepPartial<T[P]>;\n};\n\n/**\n * @private\n * @example\n * ```ts\n * const target = { a: 1, b: { c: 2 } };\n * const source = { b: { d: 3 } };\n * const result = mergeDeep(target, source);\n * // result = { a: 1, b: { c: 2, d: 3 } }\n * ```\n */\nexport const mergeDeep = <T extends Record<string, any>>(\n target: T,\n source?: T,\n tracker = new WeakMap<object, boolean>(),\n): T => {\n if (!source) return target;\n const isObject = (obj: unknown) =>\n obj && typeof obj === 'object' && !Array.isArray(obj);\n\n // Prevent infinite recursion\n if (tracker.has(target)) {\n return target;\n }\n\n // Mark the target as visited\n tracker.set(target, true);\n\n const output: T = { ...target };\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!(key in target)) {\n Object.assign(output, { [key]: source[key] });\n } else {\n output[key as keyof T] = mergeDeep(target[key], source[key], tracker);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n\n return output as T;\n};\n\nexport type ResolvedCommandKitConfig = DeepRequired<\n CommandKitConfig,\n 'compilerOptions'\n>;\n"],"mappings":";;;;;;;;;;;;AA0BA,MAAa,aACb,QACA,QACA,0BAAU,
|
|
1
|
+
{"version":3,"file":"utils-Br3eenD1.js","names":[],"sources":["../src/config/utils.ts"],"sourcesContent":["import { CommandKitConfig } from './types';\n\n/**\n * @private\n */\nexport type DeepRequired<T, OptionalKeys extends keyof T = never> = {\n [P in keyof T]-?: P extends OptionalKeys ? Partial<T[P]> : DeepRequired<T[P]>;\n};\n\n/**\n * @private\n */\nexport type DeepPartial<T> = {\n [P in keyof T]?: DeepPartial<T[P]>;\n};\n\n/**\n * @private\n * @example\n * ```ts\n * const target = { a: 1, b: { c: 2 } };\n * const source = { b: { d: 3 } };\n * const result = mergeDeep(target, source);\n * // result = { a: 1, b: { c: 2, d: 3 } }\n * ```\n */\nexport const mergeDeep = <T extends Record<string, any>>(\n target: T,\n source?: T,\n tracker = new WeakMap<object, boolean>(),\n): T => {\n if (!source) return target;\n const isObject = (obj: unknown) =>\n obj && typeof obj === 'object' && !Array.isArray(obj);\n\n // Prevent infinite recursion\n if (tracker.has(target)) {\n return target;\n }\n\n // Mark the target as visited\n tracker.set(target, true);\n\n const output: T = { ...target };\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!(key in target)) {\n Object.assign(output, { [key]: source[key] });\n } else {\n output[key as keyof T] = mergeDeep(target[key], source[key], tracker);\n }\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n\n return output as T;\n};\n\nexport type ResolvedCommandKitConfig = DeepRequired<\n CommandKitConfig,\n 'compilerOptions'\n>;\n"],"mappings":";;;;;;;;;;;;AA0BA,MAAa,aACb,QACA,QACA,0BAAU,IAAE,SAA4B,KACjC;AACL,KAAI,CAAC,OAAQ,QAAO;CACpB,MAAM,YAAY,QAClB,OAAO,OAAE,QAAa,YAAY,CAAC,MAAE,QAAM,IAAQ;AAGnD,KAAI,QAAQ,IAAI,OAAO,CACrB,QAAO;AAIT,SAAQ,IAAI,QAAQ,KAAK;CAEzB,MAAM,SAAY,EAAE,GAAG,QAAQ;AAC/B,KAAI,SAAS,OAAO,IAAI,SAAS,OAAO,CACtC,QAAO,KAAK,OAAO,CAAC,SAAS,QAAQ;AACnC,MAAI,SAAS,OAAO,KAAK,CACvB,KAAI,EAAE,OAAO,QACX,QAAO,OAAO,QAAQ,GAAG,MAAM,OAAO,MAAM,CAAC;MAE7C,QAAO,OAAkB,UAAU,OAAO,MAAM,OAAO,MAAM,QAAQ;MAGvE,QAAO,OAAO,QAAQ,GAAG,MAAM,OAAO,MAAM,CAAC;GAE/C;AAGJ,QAAO"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
const require_version = require('./version-DGfGT6Tx.js');
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
//#region src/version.ts
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The current version of CommandKit.
|
|
8
|
+
*/
|
|
9
|
+
const version = "1.2.0-dev.20260115004503";
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.version = version;
|
|
13
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["/**\n * @private\n */\nfunction $version(): string {\n 'use macro';\n return require('../package.json').version;\n}\n\n/**\n * The current version of CommandKit.\n */\nexport const version: string = $version();\n"],"mappings":";;;;;;;;AAWA,MAAa,UAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warning-CszH8HeS.js","names":[],"sources":["../src/utils/warning.ts"],"sourcesContent":["const WARNED_KEYS = new Set<string>();\nconst DEPRECATED_KEYS = new Set<string>();\n\n/**\n * Emit a warning message to the console as a CommandKitWarning.\n * @param message - The warning message to emit.\n * @param code - The warning code (default is 'CommandKitWarning').\n */\nexport function emitWarning(message: string, code = 'CommandKitWarning') {\n process.emitWarning(message, { code });\n}\n\n/**\n * Emit a warning for unstable features in CommandKit.\n * @param name - The name of the unstable feature.\n * @example warnUnstable('MyUnstableFeature');\n */\nexport function warnUnstable(name: string) {\n if (WARNED_KEYS.has(name)) return;\n\n WARNED_KEYS.add(name);\n\n emitWarning(\n `${name} is unstable and may change in future versions.`,\n 'CommandKitUnstableWarning',\n );\n}\nexport function warnDeprecated({\n what,\n message,\n where,\n}: {\n what: string;\n where?: string;\n message?: string;\n}) {\n const name = `${what}:${where}`;\n\n if (DEPRECATED_KEYS.has(name)) return;\n\n DEPRECATED_KEYS.add(name);\n\n emitWarning(\n [\n `${what} is deprecated`,\n where ? `in ${where}` : '',\n message || 'and may be removed in future versions.',\n ]\n .filter(Boolean)\n .join(' '),\n 'CommandKitDeprecatedWarning',\n );\n}\n"],"mappings":";;AAAA,MAAM,8BAAc,IAAI,KAAa;AACrC,MAAM,kCAAkB,IAAI,KAAa;;;;;;AAOzC,SAAgB,YAAY,SAAiB,OAAO,qBAAqB;AACvE,SAAQ,YAAY,SAAS,EAAE,MAAM,CAAC;;;;;;;AAQxC,SAAgB,aAAa,MAAc;AACzC,KAAI,YAAY,IAAI,KAAK,CAAE;AAE3B,aAAY,IAAI,KAAK;AAErB,aACE,GAAG,KAAK,kDACR,4BACD;;AAEH,SAAgB,eAAe,EAC7B,MACA,SACA,SAKC;CACD,MAAM,OAAO,GAAG,KAAK,GAAG;AAExB,KAAI,gBAAgB,IAAI,KAAK,CAAE;AAE/B,iBAAgB,IAAI,KAAK;AAEzB,aACE;EACA,GAAG,
|
|
1
|
+
{"version":3,"file":"warning-CszH8HeS.js","names":[],"sources":["../src/utils/warning.ts"],"sourcesContent":["const WARNED_KEYS = new Set<string>();\nconst DEPRECATED_KEYS = new Set<string>();\n\n/**\n * Emit a warning message to the console as a CommandKitWarning.\n * @param message - The warning message to emit.\n * @param code - The warning code (default is 'CommandKitWarning').\n */\nexport function emitWarning(message: string, code = 'CommandKitWarning') {\n process.emitWarning(message, { code });\n}\n\n/**\n * Emit a warning for unstable features in CommandKit.\n * @param name - The name of the unstable feature.\n * @example warnUnstable('MyUnstableFeature');\n */\nexport function warnUnstable(name: string) {\n if (WARNED_KEYS.has(name)) return;\n\n WARNED_KEYS.add(name);\n\n emitWarning(\n `${name} is unstable and may change in future versions.`,\n 'CommandKitUnstableWarning',\n );\n}\nexport function warnDeprecated({\n what,\n message,\n where,\n}: {\n what: string;\n where?: string;\n message?: string;\n}) {\n const name = `${what}:${where}`;\n\n if (DEPRECATED_KEYS.has(name)) return;\n\n DEPRECATED_KEYS.add(name);\n\n emitWarning(\n [\n `${what} is deprecated`,\n where ? `in ${where}` : '',\n message || 'and may be removed in future versions.',\n ]\n .filter(Boolean)\n .join(' '),\n 'CommandKitDeprecatedWarning',\n );\n}\n"],"mappings":";;AAAA,MAAM,8BAAc,IAAI,KAAa;AACrC,MAAM,kCAAkB,IAAI,KAAa;;;;;;AAOzC,SAAgB,YAAY,SAAiB,OAAO,qBAAqB;AACvE,SAAQ,YAAY,SAAS,EAAE,MAAM,CAAC;;;;;;;AAQxC,SAAgB,aAAa,MAAc;AACzC,KAAI,YAAY,IAAI,KAAK,CAAE;AAE3B,aAAY,IAAI,KAAK;AAErB,aACE,GAAG,KAAK,kDACR,4BACD;;AAEH,SAAgB,eAAe,EAC7B,MACA,SACA,SAKC;CACD,MAAM,OAAO,GAAG,KAAK,GAAG;AAExB,KAAI,gBAAgB,IAAI,KAAK,CAAE;AAE/B,iBAAgB,IAAI,KAAK;AAEzB,aACE;EACA,GAAG,KAAE;EACL,QAAQ,MAAM,UAAU;EACxB,WAAW;EAAyC,CAEpD,OAAG,QAAO,CACV,KAAG,IAAM,EACT,8BACD"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commandkit",
|
|
3
3
|
"description": "Beginner friendly command & event handler for Discord.js",
|
|
4
|
-
"version": "1.2.0-dev.
|
|
4
|
+
"version": "1.2.0-dev.20260115004503",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
},
|
|
155
155
|
"repository": {
|
|
156
156
|
"type": "git",
|
|
157
|
-
"url": "https://github.com/
|
|
157
|
+
"url": "https://github.com/neplextech/commandkit",
|
|
158
158
|
"directory": "packages/commandkit"
|
|
159
159
|
},
|
|
160
160
|
"homepage": "https://commandkit.dev",
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"picocolors": "^1.1.1",
|
|
177
177
|
"rfdc": "^1.3.1",
|
|
178
178
|
"rimraf": "^6.0.0",
|
|
179
|
-
"tsdown": "^0.
|
|
179
|
+
"tsdown": "^0.20.0-beta.3",
|
|
180
180
|
"use-macro": "^1.1.0"
|
|
181
181
|
},
|
|
182
182
|
"devDependencies": {
|
|
@@ -185,9 +185,9 @@
|
|
|
185
185
|
"@types/yargs": "^17.0.32",
|
|
186
186
|
"discord.js": "^14.24.0",
|
|
187
187
|
"tsx": "^4.19.2",
|
|
188
|
-
"typescript": "^5.
|
|
188
|
+
"typescript": "^5.9.3",
|
|
189
189
|
"vitest": "^3.0.5",
|
|
190
|
-
"tsconfig": "0.0.0-dev.
|
|
190
|
+
"tsconfig": "0.0.0-dev.20260115004503"
|
|
191
191
|
},
|
|
192
192
|
"engines": {
|
|
193
193
|
"node": ">=24"
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { t as ILogger } from "./ILogger-B-vsuZ1C.js";
|
|
2
|
-
|
|
3
|
-
//#region src/logger/DefaultLogger.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Default logger implementation that logs messages to the console.
|
|
7
|
-
* It formats the log messages with timestamps, log levels, and context information.
|
|
8
|
-
*/
|
|
9
|
-
declare class DefaultLogger implements ILogger {
|
|
10
|
-
stdout: NodeJS.WriteStream & {
|
|
11
|
-
fd: 1;
|
|
12
|
-
};
|
|
13
|
-
stderr: NodeJS.WriteStream & {
|
|
14
|
-
fd: 2;
|
|
15
|
-
};
|
|
16
|
-
private logger;
|
|
17
|
-
/**
|
|
18
|
-
* Creates a new instance of DefaultLogger.
|
|
19
|
-
* @param stdout The output stream for standard messages (default: process.stdout).
|
|
20
|
-
* @param stderr The output stream for error messages (default: process.stderr).
|
|
21
|
-
*/
|
|
22
|
-
constructor(stdout?: NodeJS.WriteStream & {
|
|
23
|
-
fd: 1;
|
|
24
|
-
}, stderr?: NodeJS.WriteStream & {
|
|
25
|
-
fd: 2;
|
|
26
|
-
});
|
|
27
|
-
private _formatTime;
|
|
28
|
-
private _getContext;
|
|
29
|
-
private _getLevelLabel;
|
|
30
|
-
private _getPrefix;
|
|
31
|
-
private _log;
|
|
32
|
-
private _logTemplate;
|
|
33
|
-
/**
|
|
34
|
-
* Logs a debug message.
|
|
35
|
-
* @param message The message to log.
|
|
36
|
-
*/
|
|
37
|
-
debug(message: any): void;
|
|
38
|
-
debug(strings: TemplateStringsArray, ...values: any[]): void;
|
|
39
|
-
/**
|
|
40
|
-
* Logs an error message.
|
|
41
|
-
* @param message The error message to log.
|
|
42
|
-
*/
|
|
43
|
-
error(message: any): void;
|
|
44
|
-
error(strings: TemplateStringsArray, ...values: any[]): void;
|
|
45
|
-
/**
|
|
46
|
-
* Logs a default message.
|
|
47
|
-
* @param message The message to log.
|
|
48
|
-
*/
|
|
49
|
-
log(message: any): void;
|
|
50
|
-
log(strings: TemplateStringsArray, ...values: any[]): void;
|
|
51
|
-
/**
|
|
52
|
-
* Logs an info message.
|
|
53
|
-
* @param message The informational message to log.
|
|
54
|
-
*/
|
|
55
|
-
info(message: any): void;
|
|
56
|
-
info(strings: TemplateStringsArray, ...values: any[]): void;
|
|
57
|
-
/**
|
|
58
|
-
* Logs a warning message.
|
|
59
|
-
* @param message The warning message to log.
|
|
60
|
-
*/
|
|
61
|
-
warn(message: any): void;
|
|
62
|
-
warn(strings: TemplateStringsArray, ...values: any[]): void;
|
|
63
|
-
private _isTemplateStringsArray;
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
export { DefaultLogger as t };
|
|
67
|
-
//# sourceMappingURL=DefaultLogger-CgCFHJ4J.d.ts.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { s as CommandKit } from "./analytics-engine-DHmLGxFA.js";
|
|
2
|
-
import { i as ParsedEvent } from "./EventsRouter-bILsV3Lh.js";
|
|
3
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
|
-
|
|
5
|
-
//#region src/app/events/EventWorkerContext.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Context object containing information about the currently executing event.
|
|
9
|
-
*/
|
|
10
|
-
interface EventWorkerContext {
|
|
11
|
-
event: string;
|
|
12
|
-
namespace: string | null;
|
|
13
|
-
data: ParsedEvent;
|
|
14
|
-
commandkit: CommandKit;
|
|
15
|
-
arguments: any[];
|
|
16
|
-
variables: Map<string, any>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Async local storage for event worker context.
|
|
20
|
-
*/
|
|
21
|
-
declare const eventWorkerContext: AsyncLocalStorage<EventWorkerContext>;
|
|
22
|
-
/**
|
|
23
|
-
* Runs a callback within an event worker context.
|
|
24
|
-
* @param context - The event worker context
|
|
25
|
-
* @param callback - The callback to execute
|
|
26
|
-
* @returns The result of the callback
|
|
27
|
-
*/
|
|
28
|
-
declare function runInEventWorkerContext<T>(context: EventWorkerContext, callback: () => T): T;
|
|
29
|
-
/**
|
|
30
|
-
* Gets the current event worker context.
|
|
31
|
-
* @returns The current event worker context
|
|
32
|
-
* @throws Error if no context is found
|
|
33
|
-
*/
|
|
34
|
-
declare function getEventWorkerContext(): EventWorkerContext;
|
|
35
|
-
/**
|
|
36
|
-
* Type guard to check if an object is an event worker context.
|
|
37
|
-
* @param worker - The object to check
|
|
38
|
-
* @returns True if the object is an event worker context
|
|
39
|
-
*/
|
|
40
|
-
declare function isEventWorkerContext(worker: any): worker is EventWorkerContext;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { runInEventWorkerContext as a, isEventWorkerContext as i, eventWorkerContext as n, getEventWorkerContext as r, EventWorkerContext as t };
|
|
43
|
-
//# sourceMappingURL=EventWorkerContext-CNPnDdUZ.d.ts.map
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
//#region src/logger/ILogger.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* ILogger interface for logging functionality.
|
|
4
|
-
*/
|
|
5
|
-
interface ILogger {
|
|
6
|
-
/**
|
|
7
|
-
* Logs a message with the default log level.
|
|
8
|
-
* @param message The message to log.
|
|
9
|
-
*/
|
|
10
|
-
log(message: any): void;
|
|
11
|
-
/**
|
|
12
|
-
* Logs a message with the default log level using template literals.
|
|
13
|
-
* @param strings The template literal strings.
|
|
14
|
-
* @param values The values to interpolate.
|
|
15
|
-
*/
|
|
16
|
-
log(strings: TemplateStringsArray, ...values: any[]): void;
|
|
17
|
-
/**
|
|
18
|
-
* Logs an error message.
|
|
19
|
-
* @param message The error message to log.
|
|
20
|
-
*/
|
|
21
|
-
error(message: any): void;
|
|
22
|
-
/**
|
|
23
|
-
* Logs an error message using template literals.
|
|
24
|
-
* @param strings The template literal strings.
|
|
25
|
-
* @param values The values to interpolate.
|
|
26
|
-
*/
|
|
27
|
-
error(strings: TemplateStringsArray, ...values: any[]): void;
|
|
28
|
-
/**
|
|
29
|
-
* Logs a warning message.
|
|
30
|
-
* @param message The warning message to log.
|
|
31
|
-
*/
|
|
32
|
-
warn(message: any): void;
|
|
33
|
-
/**
|
|
34
|
-
* Logs a warning message using template literals.
|
|
35
|
-
* @param strings The template literal strings.
|
|
36
|
-
* @param values The values to interpolate.
|
|
37
|
-
*/
|
|
38
|
-
warn(strings: TemplateStringsArray, ...values: any[]): void;
|
|
39
|
-
/**
|
|
40
|
-
* Logs an informational message.
|
|
41
|
-
* @param message The informational message to log.
|
|
42
|
-
*/
|
|
43
|
-
info(message: any): void;
|
|
44
|
-
/**
|
|
45
|
-
* Logs an informational message using template literals.
|
|
46
|
-
* @param strings The template literal strings.
|
|
47
|
-
* @param values The values to interpolate.
|
|
48
|
-
*/
|
|
49
|
-
info(strings: TemplateStringsArray, ...values: any[]): void;
|
|
50
|
-
/**
|
|
51
|
-
* Logs a debug message.
|
|
52
|
-
* @param message The debug message to log.
|
|
53
|
-
*/
|
|
54
|
-
debug(message: any): void;
|
|
55
|
-
/**
|
|
56
|
-
* Logs a debug message using template literals.
|
|
57
|
-
* @param strings The template literal strings.
|
|
58
|
-
* @param values The values to interpolate.
|
|
59
|
-
*/
|
|
60
|
-
debug(strings: TemplateStringsArray, ...values: any[]): void;
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
|
-
export { ILogger as t };
|
|
64
|
-
//# sourceMappingURL=ILogger-B-vsuZ1C.d.ts.map
|
package/dist/ILogger-B0q7p7L1.js
DELETED
|
File without changes
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { t as ILogger } from "./ILogger-B-vsuZ1C.js";
|
|
2
|
-
|
|
3
|
-
//#region src/logger/Logger.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Options for configuring the CommandKit logger.
|
|
7
|
-
*/
|
|
8
|
-
interface CommandKitLoggerOptions {
|
|
9
|
-
/**
|
|
10
|
-
* The logger provider to use.
|
|
11
|
-
*/
|
|
12
|
-
provider: ILogger;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Logger implementation for CommandKit.
|
|
16
|
-
*/
|
|
17
|
-
interface LoggerImpl extends ILogger {
|
|
18
|
-
/**
|
|
19
|
-
* Configures the logger with the specified options.
|
|
20
|
-
* @param options The logger options to apply.
|
|
21
|
-
*/
|
|
22
|
-
configure(options: CommandKitLoggerOptions): void;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Creates a new logger instance with the specified options.
|
|
26
|
-
* @param options The options for configuring the logger.
|
|
27
|
-
* @returns A new logger instance.
|
|
28
|
-
*/
|
|
29
|
-
declare function createLogger(options: CommandKitLoggerOptions): LoggerImpl;
|
|
30
|
-
/**
|
|
31
|
-
* Default logger instance for CommandKit. This logger uses the DefaultLogger as its provider.
|
|
32
|
-
* The provider can be replaced with a custom logger implementation using the `configure` method.
|
|
33
|
-
*/
|
|
34
|
-
declare const Logger: LoggerImpl;
|
|
35
|
-
//#endregion
|
|
36
|
-
export { createLogger as i, Logger as n, LoggerImpl as r, CommandKitLoggerOptions as t };
|
|
37
|
-
//# sourceMappingURL=Logger-BmHeS1Qd.d.ts.map
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { ApplicationCommandOptionType, Attachment, CommandInteractionOption, GuildMember, Message, Role, User } from "discord.js";
|
|
2
|
-
import { Channel } from "diagnostics_channel";
|
|
3
|
-
|
|
4
|
-
//#region src/app/commands/MessageCommandParser.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Represents a parsed message command with its components.
|
|
8
|
-
*/
|
|
9
|
-
interface ParsedMessageCommand {
|
|
10
|
-
command: string;
|
|
11
|
-
options: {
|
|
12
|
-
name: string;
|
|
13
|
-
value: unknown;
|
|
14
|
-
}[];
|
|
15
|
-
subcommand?: string;
|
|
16
|
-
subcommandGroup?: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Schema defining the types of options for a message command.
|
|
20
|
-
*/
|
|
21
|
-
type MessageCommandOptionsSchema = Record<string, ApplicationCommandOptionType>;
|
|
22
|
-
/**
|
|
23
|
-
* Parses message content into structured command data with options and subcommands.
|
|
24
|
-
*/
|
|
25
|
-
declare class MessageCommandParser {
|
|
26
|
-
#private;
|
|
27
|
-
message: Message;
|
|
28
|
-
private prefix;
|
|
29
|
-
private schema;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a new message command parser.
|
|
32
|
-
* @param message - The Discord message to parse
|
|
33
|
-
* @param prefix - Array of valid command prefixes or a regular expression
|
|
34
|
-
* @param schema - Function that returns the options schema for a command
|
|
35
|
-
*/
|
|
36
|
-
constructor(message: Message, prefix: string[] | RegExp, schema: (command: string) => MessageCommandOptionsSchema);
|
|
37
|
-
/**
|
|
38
|
-
* Gets the parsed command arguments.
|
|
39
|
-
* @returns Array of command arguments
|
|
40
|
-
*/
|
|
41
|
-
getArgs(): string[];
|
|
42
|
-
/**
|
|
43
|
-
* Gets the message command options object for easy access to typed option values.
|
|
44
|
-
*/
|
|
45
|
-
get options(): MessageCommandOptions;
|
|
46
|
-
/**
|
|
47
|
-
* Gets a specific option value by name.
|
|
48
|
-
* @param name - The option name
|
|
49
|
-
* @returns The option value or undefined if not found
|
|
50
|
-
*/
|
|
51
|
-
getOption<T>(name: string): T | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* Gets the main command name.
|
|
54
|
-
* @returns The command name
|
|
55
|
-
*/
|
|
56
|
-
getCommand(): string;
|
|
57
|
-
/**
|
|
58
|
-
* Gets the subcommand name if present.
|
|
59
|
-
* @returns The subcommand name or undefined
|
|
60
|
-
*/
|
|
61
|
-
getSubcommand(): string | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Gets the subcommand group name if present.
|
|
64
|
-
* @returns The subcommand group name or undefined
|
|
65
|
-
*/
|
|
66
|
-
getSubcommandGroup(): string | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* Gets the prefix used in the message.
|
|
69
|
-
* @returns The matched prefix or undefined
|
|
70
|
-
*/
|
|
71
|
-
getPrefix(): string | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* Gets the full command including subcommand group and subcommand.
|
|
74
|
-
* @returns The complete command string
|
|
75
|
-
*/
|
|
76
|
-
getFullCommand(): string;
|
|
77
|
-
/**
|
|
78
|
-
* Parses the message content into structured command data.
|
|
79
|
-
* @returns The parsed command data
|
|
80
|
-
*/
|
|
81
|
-
parse(): ParsedMessageCommand;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Provides typed access to message command options with methods similar to Discord.js interaction options.
|
|
85
|
-
*/
|
|
86
|
-
declare class MessageCommandOptions {
|
|
87
|
-
private parser;
|
|
88
|
-
/**
|
|
89
|
-
* Creates a new message command options instance.
|
|
90
|
-
* @param parser - The message command parser instance
|
|
91
|
-
*/
|
|
92
|
-
constructor(parser: MessageCommandParser);
|
|
93
|
-
/**
|
|
94
|
-
* @private
|
|
95
|
-
* @internal
|
|
96
|
-
*/
|
|
97
|
-
private assertOption;
|
|
98
|
-
/**
|
|
99
|
-
* Gets a guild member from the command options.
|
|
100
|
-
* @param name - The option name
|
|
101
|
-
* @param required - Whether the option is required
|
|
102
|
-
* @returns The guild member or null if not found
|
|
103
|
-
*/
|
|
104
|
-
getMember(name: string): GuildMember | null;
|
|
105
|
-
getMember(name: string, required: true): GuildMember;
|
|
106
|
-
/**
|
|
107
|
-
* Gets an attachment from the command options.
|
|
108
|
-
* @param name - The option name
|
|
109
|
-
* @param required - Whether the option is required
|
|
110
|
-
* @returns The attachment or null if not found
|
|
111
|
-
*/
|
|
112
|
-
getAttachment(name: string): Attachment | null;
|
|
113
|
-
getAttachment(name: string, required: true): Attachment;
|
|
114
|
-
/**
|
|
115
|
-
* Gets a boolean value from the command options.
|
|
116
|
-
* @param name - The option name
|
|
117
|
-
* @param required - Whether the option is required
|
|
118
|
-
* @returns The boolean value or null if not found
|
|
119
|
-
*/
|
|
120
|
-
getBoolean(name: string): boolean | null;
|
|
121
|
-
getBoolean(name: string, required: true): boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Gets a number value from the command options.
|
|
124
|
-
* @param name - The option name
|
|
125
|
-
* @param required - Whether the option is required
|
|
126
|
-
* @returns The number value or null if not found
|
|
127
|
-
*/
|
|
128
|
-
getNumber(name: string): number | null;
|
|
129
|
-
getNumber(name: string, required: true): number;
|
|
130
|
-
/**
|
|
131
|
-
* Gets a string value from the command options.
|
|
132
|
-
* @param name - The option name
|
|
133
|
-
* @param required - Whether the option is required
|
|
134
|
-
* @returns The string value or null if not found
|
|
135
|
-
*/
|
|
136
|
-
getString(name: string): string | null;
|
|
137
|
-
getString(name: string, required: true): string;
|
|
138
|
-
/**
|
|
139
|
-
* Gets an integer value from the command options.
|
|
140
|
-
* @param name - The option name
|
|
141
|
-
* @param required - Whether the option is required
|
|
142
|
-
* @returns The integer value or null if not found
|
|
143
|
-
*/
|
|
144
|
-
getInteger(name: string): number | null;
|
|
145
|
-
getInteger(name: string, required: true): number;
|
|
146
|
-
/**
|
|
147
|
-
* Gets a user from the command options.
|
|
148
|
-
* @param name - The option name
|
|
149
|
-
* @param required - Whether the option is required
|
|
150
|
-
* @returns The user or null if not found
|
|
151
|
-
*/
|
|
152
|
-
getUser(name: string): User | null;
|
|
153
|
-
getUser(name: string, required: true): User;
|
|
154
|
-
/**
|
|
155
|
-
* Gets a channel from the command options.
|
|
156
|
-
* @param name - The option name
|
|
157
|
-
* @param required - Whether the option is required
|
|
158
|
-
* @returns The channel or null if not found
|
|
159
|
-
*/
|
|
160
|
-
getChannel(name: string): Channel | null;
|
|
161
|
-
getChannel(name: string, required: true): Channel;
|
|
162
|
-
/**
|
|
163
|
-
* Gets a role from the command options.
|
|
164
|
-
* @param name - The option name
|
|
165
|
-
* @param required - Whether the option is required
|
|
166
|
-
* @returns The role or null if not found
|
|
167
|
-
*/
|
|
168
|
-
getRole(name: string): Role | null;
|
|
169
|
-
getRole(name: string, required: true): Role;
|
|
170
|
-
/**
|
|
171
|
-
* Gets a mentionable (user, member, or role) from the command options.
|
|
172
|
-
* @param name - The option name
|
|
173
|
-
* @param required - Whether the option is required
|
|
174
|
-
* @returns The mentionable or null if not found
|
|
175
|
-
*/
|
|
176
|
-
getMentionable(name: string): NonNullable<CommandInteractionOption['member' | 'role' | 'user']> | null;
|
|
177
|
-
getMentionable(name: string, required: true): NonNullable<CommandInteractionOption['member' | 'role' | 'user']>;
|
|
178
|
-
/**
|
|
179
|
-
* Gets the subcommand name from the command.
|
|
180
|
-
* @param required - Whether the subcommand is required
|
|
181
|
-
* @returns The subcommand name or null if not found
|
|
182
|
-
*/
|
|
183
|
-
getSubcommand(): string | null;
|
|
184
|
-
getSubcommand(required: true): string;
|
|
185
|
-
/**
|
|
186
|
-
* Gets the subcommand group name from the command.
|
|
187
|
-
* @param required - Whether the subcommand group is required
|
|
188
|
-
* @returns The subcommand group name or null if not found
|
|
189
|
-
*/
|
|
190
|
-
getSubcommandGroup(): string | null;
|
|
191
|
-
getSubcommandGroup(required: true): string;
|
|
192
|
-
}
|
|
193
|
-
//#endregion
|
|
194
|
-
export { ParsedMessageCommand as i, MessageCommandOptionsSchema as n, MessageCommandParser as r, MessageCommandOptions as t };
|
|
195
|
-
//# sourceMappingURL=MessageCommandParser-JmJWga4L.d.ts.map
|
package/dist/app-CrjK9yWX.js
DELETED
|
File without changes
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
|
-
const require_common = require('./common-B2-sF49Q.js');
|
|
3
|
-
const require_env = require('./env-CQJgOkQD.js');
|
|
4
|
-
let node_fs = require("node:fs");
|
|
5
|
-
let node_path = require("node:path");
|
|
6
|
-
let node_child_process = require("node:child_process");
|
|
7
|
-
|
|
8
|
-
//#region src/cli/app-process.ts
|
|
9
|
-
/**
|
|
10
|
-
* @private
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
function getStdio(supportsCommands) {
|
|
14
|
-
if (supportsCommands) return [
|
|
15
|
-
"pipe",
|
|
16
|
-
"pipe",
|
|
17
|
-
"pipe",
|
|
18
|
-
"ipc"
|
|
19
|
-
];
|
|
20
|
-
return [
|
|
21
|
-
"pipe",
|
|
22
|
-
"pipe",
|
|
23
|
-
"pipe"
|
|
24
|
-
];
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @private
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
function createAppProcess(fileName, cwd, isDev) {
|
|
31
|
-
var _ps$stdout, _ps$stderr;
|
|
32
|
-
if (!(0, node_fs.existsSync)((0, node_path.join)(cwd, fileName))) require_common.panic(`Could not locate the entrypoint file: ${fileName}`);
|
|
33
|
-
const stdio = getStdio(isDev);
|
|
34
|
-
const baseArgs = [`--title="CommandKit ${isDev ? "Development" : "Production"}"`, "--enable-source-maps"];
|
|
35
|
-
const nodeOptions = process.env.CK_NODE_OPTIONS || process.env.NODE_OPTIONS;
|
|
36
|
-
let nodeArgs = [...baseArgs];
|
|
37
|
-
if (nodeOptions) {
|
|
38
|
-
const options = nodeOptions.trim().split(/\s+/);
|
|
39
|
-
for (const option of options) {
|
|
40
|
-
const optionName = option.split("=")[0];
|
|
41
|
-
const existingIndex = nodeArgs.findIndex((arg) => arg.startsWith(optionName));
|
|
42
|
-
if (existingIndex !== -1) nodeArgs[existingIndex] = option;
|
|
43
|
-
else nodeArgs.push(option);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
nodeArgs.push(fileName);
|
|
47
|
-
const ps = (0, node_child_process.spawn)("node", nodeArgs, {
|
|
48
|
-
cwd,
|
|
49
|
-
windowsHide: true,
|
|
50
|
-
env: isDev ? require_env.DevEnv() : require_env.ProdEnv(),
|
|
51
|
-
stdio
|
|
52
|
-
});
|
|
53
|
-
(_ps$stdout = ps.stdout) === null || _ps$stdout === void 0 || _ps$stdout.pipe(process.stdout);
|
|
54
|
-
(_ps$stderr = ps.stderr) === null || _ps$stderr === void 0 || _ps$stderr.pipe(process.stderr);
|
|
55
|
-
return ps;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
Object.defineProperty(exports, 'createAppProcess', {
|
|
60
|
-
enumerable: true,
|
|
61
|
-
get: function () {
|
|
62
|
-
return createAppProcess;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
//# sourceMappingURL=app-process-DCkz7RlU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-process-DCkz7RlU.js","names":[],"sources":["../src/cli/app-process.ts"],"sourcesContent":["import { IOType, spawn } from 'node:child_process';\nimport { DevEnv, ProdEnv } from './env';\nimport { join } from 'node:path';\nimport { existsSync } from 'node:fs';\nimport { panic } from './common';\n\n/**\n * @private\n * @internal\n */\nfunction getStdio(supportsCommands: boolean) {\n if (supportsCommands) {\n return ['pipe', 'pipe', 'pipe', 'ipc'];\n }\n\n return ['pipe', 'pipe', 'pipe'];\n}\n\n/**\n * @private\n * @internal\n */\nexport function createAppProcess(\n fileName: string,\n cwd: string,\n isDev: boolean,\n) {\n if (!existsSync(join(cwd, fileName))) {\n panic(`Could not locate the entrypoint file: ${fileName}`);\n }\n\n const stdio = getStdio(isDev) as IOType[];\n\n const baseArgs = [\n `--title=\"CommandKit ${isDev ? 'Development' : 'Production'}\"`,\n '--enable-source-maps',\n ];\n\n const nodeOptions = process.env.CK_NODE_OPTIONS || process.env.NODE_OPTIONS;\n let nodeArgs = [...baseArgs];\n\n if (nodeOptions) {\n const options = nodeOptions.trim().split(/\\s+/);\n\n for (const option of options) {\n const optionName = option.split('=')[0];\n const existingIndex = nodeArgs.findIndex((arg) =>\n arg.startsWith(optionName),\n );\n\n if (existingIndex !== -1) {\n nodeArgs[existingIndex] = option;\n } else {\n nodeArgs.push(option);\n }\n }\n }\n\n nodeArgs.push(fileName);\n\n const ps = spawn('node', nodeArgs, {\n cwd,\n windowsHide: true,\n env: isDev ? DevEnv() : ProdEnv(),\n stdio,\n });\n\n ps.stdout?.pipe(process.stdout);\n ps.stderr?.pipe(process.stderr);\n\n return ps;\n}\n"],"mappings":";;;;;;;;;;;;AAUA,SAAS,SAAS,kBAA2B;AAC3C,KAAI,iBACF,QAAO;EAAC;EAAQ;EAAQ;EAAQ;EAAM;AAGxC,QAAO;EAAC;EAAQ;EAAQ;EAAO;;;;;;AAOjC,SAAgB,iBAChB,UACA,KACA,OACA;;AACE,KAAI,6CAAiB,KAAK,SAAS,CAAC,CAClC,sBAAM,yCAAyC,WAAW;CAG5D,MAAM,QAAQ,SAAS,MAAM;CAE7B,MAAM,WAAW,CACjB,uBAAuB,QAAQ,gBAAgB,aAAa,IAC5D,uBAAuB;CAGvB,MAAM,cAAc,QAAQ,IAAI,mBAAmB,QAAQ,IAAI;CAC/D,IAAI,WAAW,CAAC,GAAG,SAAS;AAE5B,KAAI,aAAa;EACf,MAAM,UAAU,YAAY,MAAM,CAAC,MAAM,MAAM;AAE/C,OAAK,MAAM,UAAU,SAAS;GAC5B,MAAM,aAAa,OAAO,MAAM,IAAI,CAAC;GACrC,MAAM,gBAAgB,SAAS,WAAW,QAC1C,IAAI,WAAW,WAAW,CACzB;AAED,OAAI,kBAAkB,GACpB,UAAS,iBAAiB;OAE1B,UAAS,KAAK,OAAO;;;AAK3B,UAAS,KAAK,SAAS;CAEvB,MAAM,mCAAW,QAAQ,UAAU;EACjC;EACA,aAAa;EACb,KAAK,QAAQ,oBAAQ,GAAG,qBAAS;EACjC;EACD,CAAC;AAEF,kBAAG,wDAAQ,KAAK,QAAQ,OAAO;AAC/B,kBAAG,wDAAQ,KAAK,QAAQ,OAAO;AAE/B,QAAO"}
|