commandkit 1.2.0-rc.9 → 1.2.0
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/LICENSE +19 -3
- package/README.md +45 -26
- package/bin/index.mjs +1 -1
- package/cli.d.ts +19 -0
- package/config.cjs +3 -0
- package/config.d.ts +1 -0
- package/dist/{ActionRow-DKnFVDME.d.ts → ActionRow-Bt9qi0Mb.d.ts} +4 -5
- package/dist/{Button-4ZUXdA56.d.ts → Button-DxJLcZIU.d.ts} +7 -8
- package/dist/{ButtonKit-C7r7RPNf.d.ts → ButtonKit-BfcyvWfj.d.ts} +4 -5
- package/dist/{ChannelSelectMenuKit-BrXvBYNH.d.ts → ChannelSelectMenuKit-DYkudikb.d.ts} +5 -6
- package/dist/{CommandsRouter-CoOA7hkf.d.ts → CommandsRouter-DiNoF0dq.d.ts} +2 -3
- package/dist/{EventInterceptor-x-R2qshQ.d.ts → EventInterceptor-D9JKMcfi.d.ts} +2 -2
- package/dist/{EventsRouter-BacqK6z3.d.ts → EventsRouter-EuuSu6NH.d.ts} +2 -2
- package/dist/{MentionableSelectMenuKit-CPTKqx-O.d.ts → MentionableSelectMenuKit-Mu4xqP6B.d.ts} +5 -6
- package/dist/{MessageCommandParser-ROLibZPX.d.ts → MessageCommandParser-DPCbHXCS.d.ts} +4 -5
- package/dist/{Modal-C6UTRdYQ.d.ts → Modal-v9rrcMl-.d.ts} +25 -12
- package/dist/{ModalKit-Btz58KYn.d.ts → ModalKit-XJSM65SV.d.ts} +4 -5
- package/dist/{RoleSelectMenuKit-C26lU3sN.d.ts → RoleSelectMenuKit-CCjcp3HY.d.ts} +5 -6
- package/dist/{SelectMenu-Diy87_ba.d.ts → SelectMenu-CY0vvoSu.d.ts} +17 -14
- package/dist/{StringSelectMenuKit-Bhs8U6WI.d.ts → StringSelectMenuKit-G5nBTicX.d.ts} +5 -6
- package/dist/{UserSelectMenuKit-CfqFJdxz.d.ts → UserSelectMenuKit-D3SO_fXA.d.ts} +5 -6
- package/dist/analytics/analytics-engine.d.ts +1 -31
- package/dist/analytics/analytics-engine.js +2 -36
- package/dist/analytics/analytics-provider.d.ts +1 -31
- package/dist/analytics/analytics-provider.js +1 -0
- package/dist/analytics/constants.js +26 -3
- package/dist/analytics/constants.js.map +1 -0
- package/dist/analytics/utils.js +2 -36
- package/dist/{analytics-engine-B7JNRnEN.d.ts → analytics-engine-DnRsHBId.d.ts} +48 -34
- package/dist/app/commands/AppCommandRunner.d.ts +1 -31
- package/dist/app/commands/AppCommandRunner.js +2 -36
- package/dist/app/commands/Context.d.ts +1 -31
- package/dist/app/commands/Context.js +2 -36
- package/dist/app/commands/MessageCommandParser.d.ts +1 -1
- package/dist/app/commands/MessageCommandParser.js +261 -4
- package/dist/app/commands/MessageCommandParser.js.map +1 -0
- package/dist/app/commands/helpers.d.ts +1 -1
- package/dist/app/commands/helpers.js +25 -3
- package/dist/app/commands/helpers.js.map +1 -0
- package/dist/app/events/EventWorkerContext.d.ts +42 -33
- package/dist/app/events/EventWorkerContext.js +48 -5
- package/dist/app/events/EventWorkerContext.js.map +1 -0
- package/dist/app/handlers/AppCommandHandler.d.ts +1 -31
- package/dist/app/handlers/AppCommandHandler.js +2 -36
- package/dist/app/handlers/AppEventsHandler.d.ts +1 -31
- package/dist/app/handlers/AppEventsHandler.js +2 -36
- package/dist/app/index.d.ts +4 -31
- package/dist/app/index.js +13 -45
- package/dist/app/interrupt/signals.d.ts +1 -1
- package/dist/app/interrupt/signals.js +54 -7
- package/dist/app/interrupt/signals.js.map +1 -0
- package/dist/app/middlewares/permissions.d.ts +1 -31
- package/dist/app/middlewares/permissions.js +2 -36
- package/dist/app/register/CommandRegistrar.d.ts +1 -31
- package/dist/app/register/CommandRegistrar.js +2 -36
- package/dist/app/router/CommandsRouter.d.ts +1 -1
- package/dist/app/router/CommandsRouter.js +210 -2
- package/dist/app/router/CommandsRouter.js.map +1 -0
- package/dist/app/router/EventsRouter.d.ts +1 -1
- package/dist/app/router/EventsRouter.js +128 -2
- package/dist/app/router/EventsRouter.js.map +1 -0
- package/dist/app/router/index.d.ts +2 -3
- package/dist/app/router/index.js +5 -5
- package/dist/{chunk-nOFOJqeH.js → chunk-BE-pF4vm.js} +11 -7
- package/dist/cli/app-process.d.ts +2 -3
- package/dist/cli/app-process.js +60 -7
- package/dist/cli/app-process.js.map +1 -0
- package/dist/cli/build.d.ts +2 -31
- package/dist/cli/build.js +171 -41
- package/dist/cli/build.js.map +1 -0
- package/dist/cli/common.d.ts +10 -34
- package/dist/cli/common.js +182 -11
- package/dist/cli/common.js.map +1 -0
- package/dist/cli/development.d.ts +18 -1
- package/dist/cli/development.js +52 -78
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/env.d.ts +4 -0
- package/dist/cli/env.js +73 -9
- package/dist/cli/env.js.map +1 -0
- package/dist/cli/generators.js +10 -13
- package/dist/cli/generators.js.map +1 -1
- package/dist/cli/information.js +11 -10
- package/dist/cli/information.js.map +1 -1
- package/dist/cli/init.d.ts +12 -2
- package/dist/cli/init.js +83 -38
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/production.d.ts +2 -3
- package/dist/cli/production.js +19 -52
- package/dist/cli/production.js.map +1 -1
- package/dist/cli/type-checker.js +83 -6
- package/dist/cli/type-checker.js.map +1 -0
- package/dist/cli/utils.d.ts +0 -1
- package/dist/cli/utils.js +18 -2
- package/dist/cli/utils.js.map +1 -0
- package/dist/{commandkit-Bm0gLN8i.js → commandkit--k6yDJEr.js} +3219 -2616
- package/dist/commandkit--k6yDJEr.js.map +1 -0
- package/dist/commandkit.d.ts +1 -31
- package/dist/commandkit.js +2 -36
- package/dist/{common-DOCvOVC4.d.ts → common-CCvvgnxi.d.ts} +4 -5
- package/dist/components/common/EventInterceptor.d.ts +1 -1
- package/dist/components/common/EventInterceptor.js +137 -2
- package/dist/components/common/EventInterceptor.js.map +1 -0
- package/dist/components/common/element.d.ts +2 -5
- package/dist/components/common/element.js +10 -8
- package/dist/components/common/types.d.ts +1 -1
- package/dist/components/common/types.js +1 -1
- package/dist/components/{v2 → display}/common.d.ts +1 -2
- package/dist/components/display/common.js +4 -0
- package/dist/components/display/container.d.ts +2 -0
- package/dist/components/display/container.js +4 -0
- package/dist/components/display/file.d.ts +2 -0
- package/dist/{file-DVOELoNv.js → components/display/file.js} +5 -10
- package/dist/components/display/file.js.map +1 -0
- package/dist/components/display/index.d.ts +9 -0
- package/dist/components/display/index.js +19 -0
- package/dist/components/display/label.d.ts +2 -0
- package/dist/components/display/label.js +4 -0
- package/dist/components/display/media-gallery.d.ts +2 -0
- package/dist/components/display/media-gallery.js +5 -0
- package/dist/components/display/poll.d.ts +2 -0
- package/dist/components/display/poll.js +86 -0
- package/dist/components/display/poll.js.map +1 -0
- package/dist/components/display/section.d.ts +2 -0
- package/dist/components/display/section.js +5 -0
- package/dist/components/display/separator.d.ts +2 -0
- package/dist/{separator-DL6QH5H1.js → components/display/separator.js} +5 -10
- package/dist/components/display/separator.js.map +1 -0
- package/dist/components/display/text-display.d.ts +2 -0
- package/dist/{text-display-DbMumig_.js → components/display/text-display.js} +5 -10
- package/dist/components/display/text-display.js.map +1 -0
- package/dist/components/index.d.ts +23 -24
- package/dist/components/index.js +29 -53
- package/dist/components/interactive/action-row/ActionRow.d.ts +2 -0
- package/dist/{ActionRow-CbdGFWMT.js → components/interactive/action-row/ActionRow.js} +5 -10
- package/dist/components/interactive/action-row/ActionRow.js.map +1 -0
- package/dist/components/interactive/button/Button.d.ts +2 -0
- package/dist/components/interactive/button/Button.js +4 -0
- package/dist/components/interactive/button/ButtonKit.d.ts +2 -0
- package/dist/components/interactive/button/ButtonKit.js +4 -0
- package/dist/components/interactive/modal/Modal.d.ts +2 -0
- package/dist/components/interactive/modal/Modal.js +8 -0
- package/dist/components/interactive/modal/ModalKit.d.ts +2 -0
- package/dist/components/interactive/modal/ModalKit.js +4 -0
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +2 -0
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +4 -0
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +2 -0
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +4 -0
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +2 -0
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +4 -0
- package/dist/components/interactive/select-menu/SelectMenu.d.ts +2 -0
- package/dist/components/interactive/select-menu/SelectMenu.js +9 -0
- package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +2 -0
- package/dist/components/interactive/select-menu/StringSelectMenuKit.js +4 -0
- package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +2 -0
- package/dist/components/interactive/select-menu/UserSelectMenuKit.js +4 -0
- package/dist/components/interactive/select-menu/common.d.ts +2 -0
- package/dist/components/interactive/select-menu/common.js +1 -0
- package/dist/config/config.d.ts +15 -33
- package/dist/config/config.js +2 -36
- package/dist/config/default.d.ts +1 -31
- package/dist/config/default.js +2 -36
- package/dist/config/loader.d.ts +1 -31
- package/dist/config/loader.js +2 -36
- package/dist/config/types.d.ts +1 -31
- package/dist/config/types.js +1 -0
- package/dist/config/utils.d.ts +1 -31
- package/dist/config/utils.js +29 -2
- package/dist/config/utils.js.map +1 -0
- package/dist/{constants-D8PMA9on.d.ts → constants-DqtJY0t-.d.ts} +3 -3
- package/dist/{constants-MKu-Q1jh.d.ts → constants-DwxpkIeH.d.ts} +8 -2
- package/dist/{container-DHBELeJ3.d.ts → container-CYojOA9d.d.ts} +3 -4
- package/dist/context/async-context.d.ts +1 -31
- package/dist/context/async-context.js +2 -36
- package/dist/context/environment.d.ts +1 -31
- package/dist/context/environment.js +2 -36
- package/dist/{element-CAXu1XtK.d.ts → element-DeLvTMfZ.d.ts} +5 -5
- package/dist/events/CommandKitEventsChannel.d.ts +1 -31
- package/dist/events/CommandKitEventsChannel.js +83 -2
- package/dist/events/CommandKitEventsChannel.js.map +1 -0
- package/dist/{file-DTrr-p09.d.ts → file-DLO1zEcH.d.ts} +3 -4
- package/dist/flags/FlagProvider.d.ts +1 -31
- package/dist/flags/FlagProvider.js +1 -0
- package/dist/flags/FlagProvider.js.map +1 -1
- package/dist/flags/feature-flags.d.ts +1 -31
- package/dist/flags/feature-flags.js +5 -40
- package/dist/flags/store.d.ts +1 -31
- package/dist/flags/store.js +13 -2
- package/dist/flags/store.js.map +1 -0
- package/dist/{helpers-Wg6P5fRQ.d.ts → helpers-zmC44Mcu.d.ts} +2 -3
- package/dist/index-BIsCUWAs.d.ts +1 -0
- package/dist/index-CwHYpK-f.d.ts +1 -0
- package/dist/index-DHrsNvX1.d.ts +1 -0
- package/dist/index.d.ts +41 -42
- package/dist/index.js +80 -98
- package/dist/kv/constants.d.ts +1 -1
- package/dist/kv/constants.js +22 -2
- package/dist/kv/constants.js.map +1 -0
- package/dist/kv/dotprops.js +26 -3
- package/dist/kv/dotprops.js.map +1 -0
- package/dist/kv/kv.d.ts +1 -2
- package/dist/kv/kv.js +15 -18
- package/dist/kv/kv.js.map +1 -1
- package/dist/kv/serde.d.ts +12 -3
- package/dist/kv/serde.js +87 -4
- package/dist/kv/serde.js.map +1 -0
- package/dist/label-DqGRqodo.d.ts +28 -0
- package/dist/logger/DefaultLogger.d.ts +66 -3
- package/dist/logger/DefaultLogger.js +2 -36
- package/dist/logger/ILogger.d.ts +64 -2
- package/dist/logger/ILogger.js +1 -1
- package/dist/logger/Logger.d.ts +36 -3
- package/dist/logger/Logger.js +2 -36
- package/dist/logger/NoopLogger.d.ts +1 -2
- package/dist/logger/NoopLogger.js +1 -0
- package/dist/logger/NoopLogger.js.map +1 -1
- package/dist/{media-gallery-BMsXSot3.d.ts → media-gallery-Ca8es-eB.d.ts} +3 -4
- package/dist/plugins/CompilerPlugin.d.ts +1 -31
- package/dist/plugins/CompilerPlugin.js +33 -4
- package/dist/plugins/CompilerPlugin.js.map +1 -0
- package/dist/plugins/PluginCommon.d.ts +1 -31
- package/dist/plugins/PluginCommon.js +55 -4
- package/dist/plugins/PluginCommon.js.map +1 -0
- package/dist/plugins/RuntimePlugin.d.ts +1 -31
- package/dist/plugins/RuntimePlugin.js +124 -4
- package/dist/plugins/RuntimePlugin.js.map +1 -0
- package/dist/plugins/index.d.ts +1 -31
- package/dist/plugins/index.js +8 -40
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -31
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +2 -36
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -31
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +2 -36
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -31
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +2 -36
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -31
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +2 -36
- package/dist/plugins/plugin-runtime/runtime.d.ts +1 -31
- package/dist/plugins/plugin-runtime/runtime.js +1 -1
- package/dist/plugins/types.d.ts +1 -31
- package/dist/plugins/types.js +1 -1
- package/dist/poll-DQ6DX_Tt.d.ts +88 -0
- package/dist/{section-Dh_FhPeC.d.ts → section-Q8nwx_-q.d.ts} +3 -4
- package/dist/{separator-CMf6Cyy5.d.ts → separator-B8P-kdIK.d.ts} +3 -4
- package/dist/{signals-SHg7J1U_.d.ts → signals-CBXwugBW.d.ts} +2 -2
- package/dist/{text-display-DRw3r_lK.d.ts → text-display-CL9C2yMc.d.ts} +3 -4
- package/dist/{types-CJ-XvOFN.d.ts → types-DZy7U-Ld.d.ts} +2 -2
- package/dist/types.d.ts +2 -32
- package/dist/types.js +1 -0
- package/dist/utils/colors.js +9 -3
- package/dist/utils/colors.js.map +1 -0
- package/dist/utils/constants.d.ts +2 -2
- package/dist/utils/constants.js +50 -7
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/dev-hooks.d.ts +1 -31
- package/dist/utils/dev-hooks.js +2 -36
- package/dist/utils/error-codes.d.ts +54 -2
- package/dist/utils/error-codes.js +53 -5
- package/dist/utils/error-codes.js.map +1 -0
- package/dist/utils/resolve-file-url.d.ts +11 -2
- package/dist/utils/resolve-file-url.js +18 -2
- package/dist/utils/resolve-file-url.js.map +1 -0
- package/dist/utils/types-package.js +61 -4
- package/dist/utils/types-package.js.map +1 -0
- package/dist/utils/useful-stuff/async-queue.js +2 -2
- package/dist/utils/useful-stuff/async-queue.js.map +1 -1
- package/dist/utils/useful-stuff/mutex.js +1 -0
- package/dist/utils/useful-stuff/mutex.js.map +1 -1
- package/dist/utils/useful-stuff/ratelimiter.js +2 -2
- package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
- package/dist/utils/useful-stuff/semaphore.js +2 -3
- package/dist/utils/useful-stuff/semaphore.js.map +1 -1
- package/dist/utils/utilities.d.ts +113 -2
- package/dist/utils/utilities.js +5 -37
- package/dist/utils/{warn-unstable.d.ts → warning.d.ts} +12 -3
- package/dist/utils/{warn-unstable.js → warning.js} +15 -2
- package/dist/utils/warning.js.map +1 -0
- package/dist/version.d.ts +8 -2
- package/dist/version.js +13 -2
- package/dist/version.js.map +1 -0
- package/hooks.cjs +11 -4
- package/package.json +22 -18
- package/dist/ActionRow-CbdGFWMT.js.map +0 -1
- package/dist/CommandKitEventsChannel-BtRzr3Tz.js +0 -88
- package/dist/CommandKitEventsChannel-BtRzr3Tz.js.map +0 -1
- package/dist/CommandsRouter-Cgcy6cK9.js +0 -220
- package/dist/CommandsRouter-Cgcy6cK9.js.map +0 -1
- package/dist/CompilerPlugin-M8r3yNAl.js +0 -43
- package/dist/CompilerPlugin-M8r3yNAl.js.map +0 -1
- package/dist/DefaultLogger-XCOl5nLd.d.ts +0 -67
- package/dist/EventInterceptor-CQEXyUTp.js +0 -142
- package/dist/EventInterceptor-CQEXyUTp.js.map +0 -1
- package/dist/EventWorkerContext-BMk7IXpC.d.ts +0 -43
- package/dist/EventWorkerContext-Dq29tieI.js +0 -69
- package/dist/EventWorkerContext-Dq29tieI.js.map +0 -1
- package/dist/EventsRouter-3Gygh-km.js +0 -137
- package/dist/EventsRouter-3Gygh-km.js.map +0 -1
- package/dist/ILogger-BW8GM-YZ.d.ts +0 -64
- package/dist/ILogger-dQ7Y9X1f.js +0 -0
- package/dist/Logger-DyfkPk7u.d.ts +0 -37
- package/dist/MessageCommandParser-CEuO6Ex3.js +0 -269
- package/dist/MessageCommandParser-CEuO6Ex3.js.map +0 -1
- package/dist/PluginCommon-Cvl5yYM_.js +0 -71
- package/dist/PluginCommon-Cvl5yYM_.js.map +0 -1
- package/dist/RuntimePlugin-BUecuBIU.js +0 -134
- package/dist/RuntimePlugin-BUecuBIU.js.map +0 -1
- package/dist/app-HN1cVg8J.js +0 -0
- package/dist/app-process-DoG6Spkf.js +0 -68
- package/dist/app-process-DoG6Spkf.js.map +0 -1
- package/dist/build-C9ltqPmn.js +0 -175
- package/dist/build-C9ltqPmn.js.map +0 -1
- package/dist/colors-DL3ucTiT.js +0 -15
- package/dist/colors-DL3ucTiT.js.map +0 -1
- package/dist/commandkit-Bm0gLN8i.js.map +0 -1
- package/dist/common-CcfjYnPG.js +0 -0
- package/dist/common-Dxr9-XPa.js +0 -211
- package/dist/common-Dxr9-XPa.js.map +0 -1
- package/dist/common-vnMIelAE.js +0 -17
- package/dist/common-vnMIelAE.js.map +0 -1
- package/dist/components/v1/action-row/ActionRow.d.ts +0 -6
- package/dist/components/v1/action-row/ActionRow.js +0 -3
- package/dist/components/v1/button/Button.d.ts +0 -7
- package/dist/components/v1/button/Button.js +0 -38
- package/dist/components/v1/button/ButtonKit.d.ts +0 -3
- package/dist/components/v1/button/ButtonKit.js +0 -38
- package/dist/components/v1/modal/Modal.d.ts +0 -7
- package/dist/components/v1/modal/Modal.js +0 -41
- package/dist/components/v1/modal/ModalKit.d.ts +0 -3
- package/dist/components/v1/modal/ModalKit.js +0 -38
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.d.ts +0 -4
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.d.ts +0 -4
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/RoleSelectMenuKit.d.ts +0 -4
- package/dist/components/v1/select-menu/RoleSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/SelectMenu.d.ts +0 -10
- package/dist/components/v1/select-menu/SelectMenu.js +0 -43
- package/dist/components/v1/select-menu/StringSelectMenuKit.d.ts +0 -4
- package/dist/components/v1/select-menu/StringSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/UserSelectMenuKit.d.ts +0 -4
- package/dist/components/v1/select-menu/UserSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/common.d.ts +0 -3
- package/dist/components/v1/select-menu/common.js +0 -1
- package/dist/components/v2/common.js +0 -3
- package/dist/components/v2/container.d.ts +0 -2
- package/dist/components/v2/container.js +0 -4
- package/dist/components/v2/file.d.ts +0 -2
- package/dist/components/v2/file.js +0 -3
- package/dist/components/v2/index.d.ts +0 -8
- package/dist/components/v2/index.js +0 -17
- package/dist/components/v2/media-gallery.d.ts +0 -2
- package/dist/components/v2/media-gallery.js +0 -5
- package/dist/components/v2/section.d.ts +0 -2
- package/dist/components/v2/section.js +0 -5
- package/dist/components/v2/separator.d.ts +0 -2
- package/dist/components/v2/separator.js +0 -3
- package/dist/components/v2/text-display.d.ts +0 -2
- package/dist/components/v2/text-display.js +0 -3
- package/dist/config-BhVxyjmZ.d.ts +0 -16
- package/dist/constants-4oxxvaJA.js +0 -27
- package/dist/constants-4oxxvaJA.js.map +0 -1
- package/dist/constants-B5_Ta7PR.js +0 -70
- package/dist/constants-B5_Ta7PR.js.map +0 -1
- package/dist/constants-BOOGN85p.js +0 -37
- package/dist/constants-BOOGN85p.js.map +0 -1
- package/dist/container-C6GtfAPW.js +0 -44
- package/dist/container-C6GtfAPW.js.map +0 -1
- package/dist/dotprops-tnhpnszJ.js +0 -36
- package/dist/dotprops-tnhpnszJ.js.map +0 -1
- package/dist/element-Bak9llw_.js +0 -84
- package/dist/element-Bak9llw_.js.map +0 -1
- package/dist/env-_68PRRoA.js +0 -109
- package/dist/env-_68PRRoA.js.map +0 -1
- package/dist/error-codes-B4TyW4Ct.d.ts +0 -54
- package/dist/error-codes-Ds0bnPvT.js +0 -73
- package/dist/error-codes-Ds0bnPvT.js.map +0 -1
- package/dist/feature-flags-nZJB7-e5.js +0 -160
- package/dist/feature-flags-nZJB7-e5.js.map +0 -1
- package/dist/file-DVOELoNv.js.map +0 -1
- package/dist/helpers-BSwwrKJW.js +0 -36
- package/dist/helpers-BSwwrKJW.js.map +0 -1
- package/dist/index-DKcmsWXw.d.ts +0 -1
- package/dist/index-DSBMRX9A.d.ts +0 -1
- package/dist/index-DdqikUQD.d.ts +0 -1
- package/dist/index.js.map +0 -1
- package/dist/init-Cy_bcUt4.js +0 -95
- package/dist/init-Cy_bcUt4.js.map +0 -1
- package/dist/init-DOr-Y3GQ.d.ts +0 -13
- package/dist/media-gallery-zDtJ3kxb.js +0 -62
- package/dist/media-gallery-zDtJ3kxb.js.map +0 -1
- package/dist/resolve-file-url-ChIyw-Vf.js +0 -23
- package/dist/resolve-file-url-ChIyw-Vf.js.map +0 -1
- package/dist/resolve-file-url-yO8bUxok.d.ts +0 -11
- package/dist/router-Dn35v30f.js +0 -0
- package/dist/runtime-DB9CiPfe.js +0 -0
- package/dist/section-DlvrDoJK.js +0 -60
- package/dist/section-DlvrDoJK.js.map +0 -1
- package/dist/separator-DL6QH5H1.js.map +0 -1
- package/dist/serde-BYaKrsOV.d.ts +0 -12
- package/dist/serde-Cc8iUa9J.js +0 -97
- package/dist/serde-Cc8iUa9J.js.map +0 -1
- package/dist/signals-ChFMD7mB.js +0 -74
- package/dist/signals-ChFMD7mB.js.map +0 -1
- package/dist/store-CM6pWVZh.js +0 -19
- package/dist/store-CM6pWVZh.js.map +0 -1
- package/dist/text-display-DbMumig_.js.map +0 -1
- package/dist/type-checker-DR7RZFs5.js +0 -90
- package/dist/type-checker-DR7RZFs5.js.map +0 -1
- package/dist/types-CUZOquUl.js +0 -0
- package/dist/types-package-BWArjyBF.js +0 -75
- package/dist/types-package-BWArjyBF.js.map +0 -1
- package/dist/types-q0Nm882H.js +0 -0
- package/dist/utilities-DtdPlr4c.d.ts +0 -87
- package/dist/utils/warn-unstable.js.map +0 -1
- package/dist/utils-DCSnVAZ6.js +0 -23
- package/dist/utils-DCSnVAZ6.js.map +0 -1
- package/dist/utils-KsNof0Xz.js +0 -34
- package/dist/utils-KsNof0Xz.js.map +0 -1
- package/dist/v2-DofkPKHs.js +0 -0
- package/dist/version-CtJtBJXI.d.ts +0 -8
- package/dist/version-DRSQMx0w.js +0 -18
- package/dist/version-DRSQMx0w.js.map +0 -1
|
@@ -1,5 +1,262 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_chunk = require('../../chunk-BE-pF4vm.js');
|
|
3
|
+
const require_utils_error_codes = require('../../utils/error-codes.js');
|
|
4
|
+
let discord_js = require("discord.js");
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
//#region src/app/commands/MessageCommandParser.ts
|
|
7
|
+
/**
|
|
8
|
+
* Parses message content into structured command data with options and subcommands.
|
|
9
|
+
*/
|
|
10
|
+
var MessageCommandParser = class {
|
|
11
|
+
/**
|
|
12
|
+
* @private
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
#parsed = null;
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
#options = null;
|
|
21
|
+
/**
|
|
22
|
+
* @private
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
#args = [];
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new message command parser.
|
|
28
|
+
* @param message - The Discord message to parse
|
|
29
|
+
* @param prefix - Array of valid command prefixes or a regular expression
|
|
30
|
+
* @param schema - Function that returns the options schema for a command
|
|
31
|
+
*/
|
|
32
|
+
constructor(message, prefix, schema) {
|
|
33
|
+
this.message = message;
|
|
34
|
+
this.prefix = prefix;
|
|
35
|
+
this.schema = schema;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Gets the parsed command arguments.
|
|
39
|
+
* @returns Array of command arguments
|
|
40
|
+
*/
|
|
41
|
+
getArgs() {
|
|
42
|
+
this.parse();
|
|
43
|
+
return this.#args;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Gets the message command options object for easy access to typed option values.
|
|
47
|
+
*/
|
|
48
|
+
get options() {
|
|
49
|
+
if (!this.#options) this.#options = new MessageCommandOptions(this);
|
|
50
|
+
return this.#options;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Gets a specific option value by name.
|
|
54
|
+
* @param name - The option name
|
|
55
|
+
* @returns The option value or undefined if not found
|
|
56
|
+
*/
|
|
57
|
+
getOption(name) {
|
|
58
|
+
var _this$parse$options$f;
|
|
59
|
+
return (_this$parse$options$f = this.parse().options.find((o) => o.name === name)) === null || _this$parse$options$f === void 0 ? void 0 : _this$parse$options$f.value;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Gets the main command name.
|
|
63
|
+
* @returns The command name
|
|
64
|
+
*/
|
|
65
|
+
getCommand() {
|
|
66
|
+
return this.parse().command;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Gets the subcommand name if present.
|
|
70
|
+
* @returns The subcommand name or undefined
|
|
71
|
+
*/
|
|
72
|
+
getSubcommand() {
|
|
73
|
+
return this.parse().subcommand;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Gets the subcommand group name if present.
|
|
77
|
+
* @returns The subcommand group name or undefined
|
|
78
|
+
*/
|
|
79
|
+
getSubcommandGroup() {
|
|
80
|
+
return this.parse().subcommandGroup;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Gets the prefix used in the message.
|
|
84
|
+
* @returns The matched prefix or undefined
|
|
85
|
+
*/
|
|
86
|
+
getPrefix() {
|
|
87
|
+
if (this.prefix instanceof RegExp) {
|
|
88
|
+
const match = this.message.content.match(this.prefix);
|
|
89
|
+
return match === null || match === void 0 ? void 0 : match[0];
|
|
90
|
+
}
|
|
91
|
+
for (const p of this.prefix) if (this.message.content.startsWith(p)) return p;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Gets the full command including subcommand group and subcommand.
|
|
95
|
+
* @returns The complete command string
|
|
96
|
+
*/
|
|
97
|
+
getFullCommand() {
|
|
98
|
+
return [
|
|
99
|
+
this.getCommand(),
|
|
100
|
+
this.getSubcommandGroup(),
|
|
101
|
+
this.getSubcommand()
|
|
102
|
+
].filter((v) => v).join(" ");
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Parses the message content into structured command data.
|
|
106
|
+
* @returns The parsed command data
|
|
107
|
+
*/
|
|
108
|
+
parse() {
|
|
109
|
+
if (this.#parsed) return this.#parsed;
|
|
110
|
+
const content = this.message.content;
|
|
111
|
+
const prefix = this.getPrefix();
|
|
112
|
+
if (!prefix) throw require_utils_error_codes.createCommandKitError(require_utils_error_codes.CommandKitErrorCodes.InvalidCommandPrefix);
|
|
113
|
+
const parts = content.slice(prefix.length).trim().split(" ");
|
|
114
|
+
const command = parts.shift();
|
|
115
|
+
this.#args = parts;
|
|
116
|
+
let subcommandGroup;
|
|
117
|
+
let subcommand;
|
|
118
|
+
if (command === null || command === void 0 ? void 0 : command.includes(":")) {
|
|
119
|
+
const [, group, cmd] = command.split(":");
|
|
120
|
+
if (!cmd && group) subcommand = group;
|
|
121
|
+
else if (cmd && group) {
|
|
122
|
+
subcommandGroup = group;
|
|
123
|
+
subcommand = cmd;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const schema = this.schema([
|
|
127
|
+
command,
|
|
128
|
+
subcommandGroup,
|
|
129
|
+
subcommand
|
|
130
|
+
].filter(Boolean).join(" ").trim());
|
|
131
|
+
this.#parsed = {
|
|
132
|
+
command,
|
|
133
|
+
options: parts.map((part) => {
|
|
134
|
+
try {
|
|
135
|
+
const [name, value] = part.split(":");
|
|
136
|
+
if (!(name in schema)) return null;
|
|
137
|
+
switch (schema[name]) {
|
|
138
|
+
case discord_js.ApplicationCommandOptionType.Boolean: return {
|
|
139
|
+
name,
|
|
140
|
+
value: value === "true"
|
|
141
|
+
};
|
|
142
|
+
case discord_js.ApplicationCommandOptionType.Integer: return {
|
|
143
|
+
name,
|
|
144
|
+
value: parseInt(value, 10)
|
|
145
|
+
};
|
|
146
|
+
case discord_js.ApplicationCommandOptionType.Number: return {
|
|
147
|
+
name,
|
|
148
|
+
value: parseFloat(value)
|
|
149
|
+
};
|
|
150
|
+
case discord_js.ApplicationCommandOptionType.String: return {
|
|
151
|
+
name,
|
|
152
|
+
value
|
|
153
|
+
};
|
|
154
|
+
case discord_js.ApplicationCommandOptionType.User: return {
|
|
155
|
+
name,
|
|
156
|
+
value: this.message.mentions.users.find((u) => {
|
|
157
|
+
return u.id === value.replace(/[<@!>]/g, "");
|
|
158
|
+
})
|
|
159
|
+
};
|
|
160
|
+
case discord_js.ApplicationCommandOptionType.Channel: return {
|
|
161
|
+
name,
|
|
162
|
+
value: this.message.mentions.channels.find((c) => {
|
|
163
|
+
return c.id === value.replace(/[<#>]/g, "");
|
|
164
|
+
})
|
|
165
|
+
};
|
|
166
|
+
case discord_js.ApplicationCommandOptionType.Role: return {
|
|
167
|
+
name,
|
|
168
|
+
value: this.message.mentions.roles.find((r) => {
|
|
169
|
+
return r.id === value.replace(/[<@&>]/g, "");
|
|
170
|
+
})
|
|
171
|
+
};
|
|
172
|
+
case discord_js.ApplicationCommandOptionType.Attachment: return {
|
|
173
|
+
name,
|
|
174
|
+
value: this.message.attachments.find((a) => {
|
|
175
|
+
return a.name === value;
|
|
176
|
+
})
|
|
177
|
+
};
|
|
178
|
+
default: return null;
|
|
179
|
+
}
|
|
180
|
+
} catch {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
}).filter((v) => v !== null),
|
|
184
|
+
subcommand,
|
|
185
|
+
subcommandGroup
|
|
186
|
+
};
|
|
187
|
+
return this.#parsed;
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Provides typed access to message command options with methods similar to Discord.js interaction options.
|
|
192
|
+
*/
|
|
193
|
+
var MessageCommandOptions = class {
|
|
194
|
+
/**
|
|
195
|
+
* Creates a new message command options instance.
|
|
196
|
+
* @param parser - The message command parser instance
|
|
197
|
+
*/
|
|
198
|
+
constructor(parser) {
|
|
199
|
+
this.parser = parser;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @private
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
205
|
+
assertOption(name, required = false) {
|
|
206
|
+
const option = this.parser.getOption(name);
|
|
207
|
+
if (required && option === void 0) throw new Error(`Option "${name}" is required.`);
|
|
208
|
+
return option ?? null;
|
|
209
|
+
}
|
|
210
|
+
getMember(name, required = false) {
|
|
211
|
+
var _this$parser$message$;
|
|
212
|
+
const user = this.assertOption(name, required);
|
|
213
|
+
const member = (_this$parser$message$ = this.parser.message.guild) === null || _this$parser$message$ === void 0 ? void 0 : _this$parser$message$.members.cache.get(user === null || user === void 0 ? void 0 : user.id);
|
|
214
|
+
if (required && !member) throw new Error(`Member "${name}" is required.`);
|
|
215
|
+
return member ?? null;
|
|
216
|
+
}
|
|
217
|
+
getAttachment(name, required = false) {
|
|
218
|
+
return this.assertOption(name, required);
|
|
219
|
+
}
|
|
220
|
+
getBoolean(name, required = false) {
|
|
221
|
+
return this.assertOption(name, required);
|
|
222
|
+
}
|
|
223
|
+
getNumber(name, required = false) {
|
|
224
|
+
return this.assertOption(name, required);
|
|
225
|
+
}
|
|
226
|
+
getString(name, required = false) {
|
|
227
|
+
return this.assertOption(name, required);
|
|
228
|
+
}
|
|
229
|
+
getInteger(name, required = false) {
|
|
230
|
+
return this.assertOption(name, required);
|
|
231
|
+
}
|
|
232
|
+
getUser(name, required = false) {
|
|
233
|
+
return this.assertOption(name, required);
|
|
234
|
+
}
|
|
235
|
+
getChannel(name, required = false) {
|
|
236
|
+
return this.assertOption(name, required);
|
|
237
|
+
}
|
|
238
|
+
getRole(name, required = false) {
|
|
239
|
+
return this.assertOption(name, required);
|
|
240
|
+
}
|
|
241
|
+
getMentionable(name, required = false) {
|
|
242
|
+
const target = this.assertOption(name, required);
|
|
243
|
+
if (target instanceof discord_js.GuildMember || target instanceof discord_js.User || target instanceof discord_js.Role) return target;
|
|
244
|
+
if (required) throw new Error(`Mentionable "${name}" is required.`);
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
getSubcommand(required = false) {
|
|
248
|
+
const sub = this.parser.getSubcommand();
|
|
249
|
+
if (required && sub === void 0) throw new Error("Subcommand is required.");
|
|
250
|
+
return sub ?? null;
|
|
251
|
+
}
|
|
252
|
+
getSubcommandGroup(required = false) {
|
|
253
|
+
const sub = this.parser.getSubcommandGroup();
|
|
254
|
+
if (required && sub === void 0) throw new Error("Subcommand group is required.");
|
|
255
|
+
return sub ?? null;
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
//#endregion
|
|
260
|
+
exports.MessageCommandOptions = MessageCommandOptions;
|
|
261
|
+
exports.MessageCommandParser = MessageCommandParser;
|
|
262
|
+
//# sourceMappingURL=MessageCommandParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageCommandParser.js","names":[],"sources":["../../../src/app/commands/MessageCommandParser.ts"],"sourcesContent":["import { Channel } from 'diagnostics_channel';\nimport {\n Message,\n ApplicationCommandOptionType,\n GuildMember,\n Attachment,\n User,\n Role,\n CommandInteractionOption,\n} from 'discord.js';\nimport {\n CommandKitErrorCodes,\n createCommandKitError,\n} from '../../utils/error-codes';\n\n/**\n * Represents a parsed message command with its components.\n */\nexport interface ParsedMessageCommand {\n command: string;\n options: { name: string; value: unknown }[];\n subcommand?: string;\n subcommandGroup?: string;\n}\n\n/**\n * Schema defining the types of options for a message command.\n */\nexport type MessageCommandOptionsSchema = Record<\n string,\n ApplicationCommandOptionType\n>;\n\n/**\n * Parses message content into structured command data with options and subcommands.\n */\nexport class MessageCommandParser {\n /**\n * @private\n * @internal\n */\n #parsed: ParsedMessageCommand | null = null;\n\n /**\n * @private\n * @internal\n */\n #options: MessageCommandOptions | null = null;\n\n /**\n * @private\n * @internal\n */\n #args: string[] = [];\n\n /**\n * Creates a new message command parser.\n * @param message - The Discord message to parse\n * @param prefix - Array of valid command prefixes or a regular expression\n * @param schema - Function that returns the options schema for a command\n */\n public constructor(\n public message: Message,\n private prefix: string[] | RegExp,\n private schema: (command: string) => MessageCommandOptionsSchema,\n ) {}\n\n /**\n * Gets the parsed command arguments.\n * @returns Array of command arguments\n */\n public getArgs() {\n void this.parse();\n return this.#args;\n }\n\n /**\n * Gets the message command options object for easy access to typed option values.\n */\n public get options() {\n if (!this.#options) {\n this.#options = new MessageCommandOptions(this);\n }\n\n return this.#options;\n }\n\n /**\n * Gets a specific option value by name.\n * @param name - The option name\n * @returns The option value or undefined if not found\n */\n public getOption<T>(name: string): T | undefined {\n return this.parse().options.find((o) => o.name === name)?.value as T;\n }\n\n /**\n * Gets the main command name.\n * @returns The command name\n */\n public getCommand(): string {\n return this.parse().command;\n }\n\n /**\n * Gets the subcommand name if present.\n * @returns The subcommand name or undefined\n */\n public getSubcommand(): string | undefined {\n return this.parse().subcommand;\n }\n\n /**\n * Gets the subcommand group name if present.\n * @returns The subcommand group name or undefined\n */\n public getSubcommandGroup(): string | undefined {\n return this.parse().subcommandGroup;\n }\n\n /**\n * Gets the prefix used in the message.\n * @returns The matched prefix or undefined\n */\n public getPrefix() {\n if (this.prefix instanceof RegExp) {\n const match = this.message.content.match(this.prefix);\n return match?.[0];\n }\n\n for (const p of this.prefix) {\n if (this.message.content.startsWith(p)) {\n return p;\n }\n }\n }\n\n /**\n * Gets the full command including subcommand group and subcommand.\n * @returns The complete command string\n */\n public getFullCommand() {\n return [this.getCommand(), this.getSubcommandGroup(), this.getSubcommand()]\n .filter((v) => v)\n .join(' ');\n }\n\n /**\n * Parses the message content into structured command data.\n * @returns The parsed command data\n */\n public parse(): ParsedMessageCommand {\n if (this.#parsed) {\n return this.#parsed;\n }\n\n const content = this.message.content;\n\n const prefix = this.getPrefix();\n\n if (!prefix) {\n throw createCommandKitError(CommandKitErrorCodes.InvalidCommandPrefix);\n }\n\n const parts = content.slice(prefix.length).trim().split(' ');\n const command = parts.shift();\n\n this.#args = parts;\n\n let subcommandGroup: string | undefined;\n let subcommand: string | undefined;\n\n if (command?.includes(':')) {\n const [, group, cmd] = command.split(':');\n\n if (!cmd && group) {\n subcommand = group;\n } else if (cmd && group) {\n subcommandGroup = group;\n subcommand = cmd;\n }\n }\n\n const schema = this.schema(\n [command, subcommandGroup, subcommand].filter(Boolean).join(' ').trim(),\n );\n\n const options = parts\n .map((part) => {\n try {\n const [name, value] = part.split(':');\n\n if (!(name in schema)) return null;\n\n switch (schema[name]) {\n case ApplicationCommandOptionType.Boolean:\n return { name, value: value === 'true' };\n case ApplicationCommandOptionType.Integer:\n return { name, value: parseInt(value, 10) };\n case ApplicationCommandOptionType.Number:\n return { name, value: parseFloat(value) };\n case ApplicationCommandOptionType.String:\n return { name, value };\n case ApplicationCommandOptionType.User:\n return {\n name,\n value: this.message.mentions.users.find((u) => {\n return u.id === value.replace(/[<@!>]/g, '');\n }),\n };\n case ApplicationCommandOptionType.Channel:\n return {\n name,\n value: this.message.mentions.channels.find((c) => {\n return c.id === value.replace(/[<#>]/g, '');\n }),\n };\n case ApplicationCommandOptionType.Role:\n return {\n name,\n value: this.message.mentions.roles.find((r) => {\n return r.id === value.replace(/[<@&>]/g, '');\n }),\n };\n case ApplicationCommandOptionType.Attachment:\n return {\n name,\n value: this.message.attachments.find((a) => {\n return a.name === value;\n }),\n };\n default:\n return null;\n }\n } catch {\n // Invalid option\n return null;\n }\n })\n .filter((v) => v !== null);\n\n this.#parsed = {\n command: command!,\n options,\n subcommand,\n subcommandGroup,\n };\n\n return this.#parsed;\n }\n}\n\n/**\n * Provides typed access to message command options with methods similar to Discord.js interaction options.\n */\nexport class MessageCommandOptions {\n /**\n * Creates a new message command options instance.\n * @param parser - The message command parser instance\n */\n public constructor(private parser: MessageCommandParser) {}\n\n /**\n * @private\n * @internal\n */\n private assertOption<T>(name: string, required = false) {\n const option = this.parser.getOption<T>(name);\n\n if (required && option === undefined) {\n throw new Error(`Option \"${name}\" is required.`);\n }\n\n return option ?? null;\n }\n\n /**\n * Gets a guild member from the command options.\n * @param name - The option name\n * @param required - Whether the option is required\n * @returns The guild member or null if not found\n */\n getMember(name: string): GuildMember | null;\n getMember(name: string, required: true): GuildMember;\n getMember(name: string, required = false) {\n const user = this.assertOption<User>(name, required);\n const member = this.parser.message.guild?.members.cache.get(user?.id!);\n\n if (required && !member) {\n throw new Error(`Member \"${name}\" is required.`);\n }\n\n return member ?? null;\n }\n\n /**\n * Gets an attachment from the command options.\n * @param name - The option name\n * @param required - Whether the option is required\n * @returns The attachment or null if not found\n */\n getAttachment(name: string): Attachment | null;\n getAttachment(name: string, required: true): Attachment;\n getAttachment(name: string, required = false) {\n return this.assertOption<Attachment>(name, required);\n }\n\n /**\n * Gets a boolean value from the command options.\n * @param name - The option name\n * @param required - Whether the option is required\n * @returns The boolean value or null if not found\n */\n getBoolean(name: string): boolean | null;\n getBoolean(name: string, required: true): boolean;\n getBoolean(name: string, required = false) {\n return this.assertOption<boolean>(name, required);\n }\n\n /**\n * Gets a number value from the command options.\n * @param name - The option name\n * @param required - Whether the option is required\n * @returns The number value or null if not found\n */\n getNumber(name: string): number | null;\n getNumber(name: string, required: true): number;\n getNumber(name: string, required = false) {\n return this.assertOption<number>(name, required);\n }\n\n /**\n * Gets a string value from the command options.\n * @param name - The option name\n * @param required - Whether the option is required\n * @returns The string value or null if not found\n */\n getString(name: string): string | null;\n getString(name: string, required: true): string;\n getString(name: string, required = false) {\n return this.assertOption<string>(name, required);\n }\n\n /**\n * Gets an integer value from the command options.\n * @param name - The option name\n * @param required - Whether the option is required\n * @returns The integer value or null if not found\n */\n getInteger(name: string): number | null;\n getInteger(name: string, required: true): number;\n getInteger(name: string, required = false) {\n return this.assertOption<number>(name, required);\n }\n\n /**\n * Gets a user from the command options.\n * @param name - The option name\n * @param required - Whether the option is required\n * @returns The user or null if not found\n */\n getUser(name: string): User | null;\n getUser(name: string, required: true): User;\n getUser(name: string, required = false) {\n return this.assertOption<User>(name, required);\n }\n\n /**\n * Gets a channel from the command options.\n * @param name - The option name\n * @param required - Whether the option is required\n * @returns The channel or null if not found\n */\n getChannel(name: string): Channel | null;\n getChannel(name: string, required: true): Channel;\n getChannel(name: string, required = false) {\n return this.assertOption<Channel>(name, required);\n }\n\n /**\n * Gets a role from the command options.\n * @param name - The option name\n * @param required - Whether the option is required\n * @returns The role or null if not found\n */\n getRole(name: string): Role | null;\n getRole(name: string, required: true): Role;\n getRole(name: string, required = false) {\n return this.assertOption<Role>(name, required);\n }\n\n /**\n * Gets a mentionable (user, member, or role) from the command options.\n * @param name - The option name\n * @param required - Whether the option is required\n * @returns The mentionable or null if not found\n */\n getMentionable(\n name: string,\n ): NonNullable<CommandInteractionOption['member' | 'role' | 'user']> | null;\n getMentionable(\n name: string,\n required: true,\n ): NonNullable<CommandInteractionOption['member' | 'role' | 'user']>;\n getMentionable(\n name: string,\n required = false,\n ): NonNullable<CommandInteractionOption['member' | 'role' | 'user']> | null {\n const target = this.assertOption(name, required);\n\n if (\n target instanceof GuildMember ||\n target instanceof User ||\n target instanceof Role\n ) {\n return target;\n }\n\n if (required) {\n throw new Error(`Mentionable \"${name}\" is required.`);\n }\n\n return null;\n }\n\n /**\n * Gets the subcommand name from the command.\n * @param required - Whether the subcommand is required\n * @returns The subcommand name or null if not found\n */\n getSubcommand(): string | null;\n getSubcommand(required: true): string;\n getSubcommand(required = false) {\n const sub = this.parser.getSubcommand();\n\n if (required && sub === undefined) {\n throw new Error('Subcommand is required.');\n }\n\n return sub ?? null;\n }\n\n /**\n * Gets the subcommand group name from the command.\n * @param required - Whether the subcommand group is required\n * @returns The subcommand group name or null if not found\n */\n getSubcommandGroup(): string | null;\n getSubcommandGroup(required: true): string;\n getSubcommandGroup(required = false) {\n const sub = this.parser.getSubcommandGroup();\n\n if (required && sub === undefined) {\n throw new Error('Subcommand group is required.');\n }\n\n return sub ?? null;\n }\n}\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as isInteractionSource, r as isMessageSource, t as CommandSource } from "../../helpers-zmC44Mcu.js";
|
|
2
2
|
export { CommandSource, isInteractionSource, isMessageSource };
|
|
@@ -1,4 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_chunk = require('../../chunk-BE-pF4vm.js');
|
|
3
|
+
let discord_js = require("discord.js");
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
//#region src/app/commands/helpers.ts
|
|
6
|
+
/**
|
|
7
|
+
* Type guard to check if a command source is a Discord message.
|
|
8
|
+
* @param source - The command source to check
|
|
9
|
+
* @returns True if the source is a Message
|
|
10
|
+
*/
|
|
11
|
+
function isMessageSource(source) {
|
|
12
|
+
return source instanceof discord_js.Message;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Type guard to check if a command source is a Discord interaction.
|
|
16
|
+
* @param source - The command source to check
|
|
17
|
+
* @returns True if the source is an Interaction
|
|
18
|
+
*/
|
|
19
|
+
function isInteractionSource(source) {
|
|
20
|
+
return !isMessageSource(source);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.isInteractionSource = isInteractionSource;
|
|
25
|
+
exports.isMessageSource = isMessageSource;
|
|
26
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","names":[],"sources":["../../../src/app/commands/helpers.ts"],"sourcesContent":["import { Interaction, Message } from 'discord.js';\n\n/**\n * Union type representing possible command sources.\n */\nexport type CommandSource = Interaction | Message;\n\n/**\n * Type guard to check if a command source is a Discord message.\n * @param source - The command source to check\n * @returns True if the source is a Message\n */\nexport function isMessageSource(source: CommandSource): source is Message {\n return source instanceof Message;\n}\n\n/**\n * Type guard to check if a command source is a Discord interaction.\n * @param source - The command source to check\n * @returns True if the source is an Interaction\n */\nexport function isInteractionSource(\n source: CommandSource,\n): source is Interaction {\n return !isMessageSource(source);\n}\n"],"mappings":";;;;;;;;;;AAYA,SAAgB,gBAAgB,QAA0C;AACxE,QAAO,kBAAkB;;;;;;;AAQ3B,SAAgB,oBAChB,QACwB;AACtB,QAAO,CAAC,gBAAgB,OAAO"}
|
|
@@ -1,33 +1,42 @@
|
|
|
1
|
-
import "../../analytics-engine-
|
|
2
|
-
import "../../
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import { s as CommandKit } from "../../analytics-engine-DnRsHBId.js";
|
|
2
|
+
import { i as ParsedEvent } from "../../EventsRouter-EuuSu6NH.js";
|
|
3
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
|
+
|
|
5
|
+
//#region src/app/events/EventWorkerContext.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Context object containing information about the currently executing event.
|
|
8
|
+
*/
|
|
9
|
+
interface EventWorkerContext {
|
|
10
|
+
event: string;
|
|
11
|
+
namespace: string | null;
|
|
12
|
+
data: ParsedEvent;
|
|
13
|
+
commandkit: CommandKit;
|
|
14
|
+
arguments: any[];
|
|
15
|
+
variables: Map<string, any>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Async local storage for event worker context.
|
|
19
|
+
*/
|
|
20
|
+
declare const eventWorkerContext: AsyncLocalStorage<EventWorkerContext>;
|
|
21
|
+
/**
|
|
22
|
+
* Runs a callback within an event worker context.
|
|
23
|
+
* @param context - The event worker context
|
|
24
|
+
* @param callback - The callback to execute
|
|
25
|
+
* @returns The result of the callback
|
|
26
|
+
*/
|
|
27
|
+
declare function runInEventWorkerContext<T>(context: EventWorkerContext, callback: () => T): T;
|
|
28
|
+
/**
|
|
29
|
+
* Gets the current event worker context.
|
|
30
|
+
* @returns The current event worker context
|
|
31
|
+
* @throws Error if no context is found
|
|
32
|
+
*/
|
|
33
|
+
declare function getEventWorkerContext(): EventWorkerContext;
|
|
34
|
+
/**
|
|
35
|
+
* Type guard to check if an object is an event worker context.
|
|
36
|
+
* @param worker - The object to check
|
|
37
|
+
* @returns True if the object is an event worker context
|
|
38
|
+
*/
|
|
39
|
+
declare function isEventWorkerContext(worker: any): worker is EventWorkerContext;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { EventWorkerContext, eventWorkerContext, getEventWorkerContext, isEventWorkerContext, runInEventWorkerContext };
|
|
42
|
+
//# sourceMappingURL=EventWorkerContext.d.ts.map
|
|
@@ -1,6 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_chunk = require('../../chunk-BE-pF4vm.js');
|
|
3
|
+
let node_async_hooks = require("node:async_hooks");
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
//#region src/app/events/EventWorkerContext.ts
|
|
6
|
+
/**
|
|
7
|
+
* @private
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
const kEventWorker = Symbol("commandkitEventWorker");
|
|
11
|
+
/**
|
|
12
|
+
* Async local storage for event worker context.
|
|
13
|
+
*/
|
|
14
|
+
const eventWorkerContext = new node_async_hooks.AsyncLocalStorage();
|
|
15
|
+
/**
|
|
16
|
+
* Runs a callback within an event worker context.
|
|
17
|
+
* @param context - The event worker context
|
|
18
|
+
* @param callback - The callback to execute
|
|
19
|
+
* @returns The result of the callback
|
|
20
|
+
*/
|
|
21
|
+
function runInEventWorkerContext(context, callback) {
|
|
22
|
+
Reflect.set(context, kEventWorker, true);
|
|
23
|
+
return eventWorkerContext.run(context, callback);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Gets the current event worker context.
|
|
27
|
+
* @returns The current event worker context
|
|
28
|
+
* @throws Error if no context is found
|
|
29
|
+
*/
|
|
30
|
+
function getEventWorkerContext() {
|
|
31
|
+
const context = eventWorkerContext.getStore();
|
|
32
|
+
if (!context) throw new Error("Event worker context not found");
|
|
33
|
+
return context;
|
|
34
|
+
}
|
|
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
|
+
function isEventWorkerContext(worker) {
|
|
41
|
+
return worker && Reflect.get(worker, kEventWorker) === true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
exports.eventWorkerContext = eventWorkerContext;
|
|
46
|
+
exports.getEventWorkerContext = getEventWorkerContext;
|
|
47
|
+
exports.isEventWorkerContext = isEventWorkerContext;
|
|
48
|
+
exports.runInEventWorkerContext = runInEventWorkerContext;
|
|
49
|
+
//# sourceMappingURL=EventWorkerContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventWorkerContext.js","names":[],"sources":["../../../src/app/events/EventWorkerContext.ts"],"sourcesContent":["import { AsyncLocalStorage } from 'node:async_hooks';\nimport { ParsedEvent } from '../router';\nimport type { CommandKit } from '../../commandkit';\n\n/**\n * Context object containing information about the currently executing event.\n */\nexport interface EventWorkerContext {\n event: string;\n namespace: string | null;\n data: ParsedEvent;\n commandkit: CommandKit;\n arguments: any[];\n variables: Map<string, any>;\n}\n\n/**\n * @private\n * @internal\n */\nconst kEventWorker = Symbol('commandkitEventWorker');\n\n/**\n * Async local storage for event worker context.\n */\nexport const eventWorkerContext = new AsyncLocalStorage<EventWorkerContext>();\n\n/**\n * Runs a callback within an event worker context.\n * @param context - The event worker context\n * @param callback - The callback to execute\n * @returns The result of the callback\n */\nexport function runInEventWorkerContext<T>(\n context: EventWorkerContext,\n callback: () => T,\n): T {\n Reflect.set(context, kEventWorker, true);\n\n return eventWorkerContext.run(context, callback);\n}\n\n/**\n * Gets the current event worker context.\n * @returns The current event worker context\n * @throws Error if no context is found\n */\nexport function getEventWorkerContext(): EventWorkerContext {\n const context = eventWorkerContext.getStore();\n\n if (!context) {\n throw new Error('Event worker context not found');\n }\n\n return context;\n}\n\n/**\n * Type guard to check if an object is an event worker context.\n * @param worker - The object to check\n * @returns True if the object is an event worker context\n */\nexport function isEventWorkerContext(\n worker: any,\n): worker is EventWorkerContext {\n return worker && Reflect.get(worker, kEventWorker) === true;\n}\n"],"mappings":";;;;;;;;;AAoBA,MAAM,eAAe,OAAO,wBAAwB;;;;AAKpD,MAAa,qBAAqB,IAAI,oCAAuC;;;;;;;AAQ7E,SAAgB,wBAChB,SACA,UACI;AACF,SAAQ,IAAI,SAAS,cAAc,KAAK;AAExC,QAAO,mBAAmB,IAAI,SAAS,SAAS;;;;;;;AAQlD,SAAgB,wBAA4C;CAC1D,MAAM,UAAU,mBAAmB,UAAU;AAE7C,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,iCAAiC;AAGnD,QAAO;;;;;;;AAQT,SAAgB,qBAChB,QAC+B;AAC7B,QAAO,UAAU,QAAQ,IAAI,QAAQ,aAAa,KAAK"}
|
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../EventInterceptor-x-R2qshQ.js";
|
|
3
|
-
import "../../ButtonKit-C7r7RPNf.js";
|
|
4
|
-
import "../../ModalKit-Btz58KYn.js";
|
|
5
|
-
import "../../element-CAXu1XtK.js";
|
|
6
|
-
import "../../ActionRow-DKnFVDME.js";
|
|
7
|
-
import "../../types-CJ-XvOFN.js";
|
|
8
|
-
import "../../Button-4ZUXdA56.js";
|
|
9
|
-
import "../../Modal-C6UTRdYQ.js";
|
|
10
|
-
import "../../common-DOCvOVC4.js";
|
|
11
|
-
import "../../StringSelectMenuKit-Bhs8U6WI.js";
|
|
12
|
-
import "../../ChannelSelectMenuKit-BrXvBYNH.js";
|
|
13
|
-
import "../../MentionableSelectMenuKit-CPTKqx-O.js";
|
|
14
|
-
import "../../UserSelectMenuKit-CfqFJdxz.js";
|
|
15
|
-
import "../../RoleSelectMenuKit-C26lU3sN.js";
|
|
16
|
-
import "../../SelectMenu-Diy87_ba.js";
|
|
17
|
-
import "../../container-DHBELeJ3.js";
|
|
18
|
-
import "../../file-DTrr-p09.js";
|
|
19
|
-
import "../../media-gallery-BMsXSot3.js";
|
|
20
|
-
import "../../section-Dh_FhPeC.js";
|
|
21
|
-
import "../../separator-CMf6Cyy5.js";
|
|
22
|
-
import "../../text-display-DRw3r_lK.js";
|
|
23
|
-
import "../../index-DSBMRX9A.js";
|
|
24
|
-
import "../../index-DdqikUQD.js";
|
|
25
|
-
import "../../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../../signals-SHg7J1U_.js";
|
|
27
|
-
import "../../helpers-Wg6P5fRQ.js";
|
|
28
|
-
import "../../CommandsRouter-CoOA7hkf.js";
|
|
29
|
-
import "../../EventsRouter-BacqK6z3.js";
|
|
30
|
-
import "../../index-DKcmsWXw.js";
|
|
31
|
-
import "../../constants-MKu-Q1jh.js";
|
|
1
|
+
import { _t as CustomAppCommandProps, bt as ResolvableCommand, dt as AppCommandNative, ft as CommandBuilderLike, gt as CommandTypeData, ht as CommandDataSchemaValue, lt as AppCommand, mt as CommandDataSchemaKey, pt as CommandDataSchema, ut as AppCommandHandler, vt as LoadedCommand, xt as RunCommand, yt as PreparedAppCommandExecution } from "../../analytics-engine-DnRsHBId.js";
|
|
32
2
|
export { AppCommand, AppCommandHandler, AppCommandNative, CommandBuilderLike, CommandDataSchema, CommandDataSchemaKey, CommandDataSchemaValue, CommandTypeData, CustomAppCommandProps, LoadedCommand, PreparedAppCommandExecution, ResolvableCommand, RunCommand };
|
|
@@ -1,38 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
require('../../
|
|
3
|
-
require('../../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../../commandkit-Bm0gLN8i.js');
|
|
5
|
-
require('../../common-CcfjYnPG.js');
|
|
6
|
-
require('../../common-vnMIelAE.js');
|
|
7
|
-
require('../../container-C6GtfAPW.js');
|
|
8
|
-
require('../../file-DVOELoNv.js');
|
|
9
|
-
require('../../media-gallery-zDtJ3kxb.js');
|
|
10
|
-
require('../../section-DlvrDoJK.js');
|
|
11
|
-
require('../../separator-DL6QH5H1.js');
|
|
12
|
-
require('../../text-display-DbMumig_.js');
|
|
13
|
-
require('../../v2-DofkPKHs.js');
|
|
14
|
-
require('../../element-Bak9llw_.js');
|
|
15
|
-
require('../../types-CUZOquUl.js');
|
|
16
|
-
require('../../EventInterceptor-CQEXyUTp.js');
|
|
17
|
-
require('../../constants-B5_Ta7PR.js');
|
|
18
|
-
require('../../PluginCommon-Cvl5yYM_.js');
|
|
19
|
-
require('../../CompilerPlugin-M8r3yNAl.js');
|
|
20
|
-
require('../../RuntimePlugin-BUecuBIU.js');
|
|
21
|
-
require('../../types-q0Nm882H.js');
|
|
22
|
-
require('../../resolve-file-url-ChIyw-Vf.js');
|
|
23
|
-
require('../../runtime-DB9CiPfe.js');
|
|
24
|
-
require('../../utils-KsNof0Xz.js');
|
|
25
|
-
require('../../types-package-BWArjyBF.js');
|
|
26
|
-
require('../../constants-BOOGN85p.js');
|
|
27
|
-
require('../../EventWorkerContext-Dq29tieI.js');
|
|
28
|
-
require('../../signals-ChFMD7mB.js');
|
|
29
|
-
require('../../MessageCommandParser-CEuO6Ex3.js');
|
|
30
|
-
require('../../helpers-BSwwrKJW.js');
|
|
31
|
-
require('../../CommandsRouter-Cgcy6cK9.js');
|
|
32
|
-
require('../../EventsRouter-3Gygh-km.js');
|
|
33
|
-
require('../../router-Dn35v30f.js');
|
|
34
|
-
require('../../common-Dxr9-XPa.js');
|
|
35
|
-
require('../../CommandKitEventsChannel-BtRzr3Tz.js');
|
|
36
|
-
require('../../store-CM6pWVZh.js');
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_commandkit = require('../../commandkit--k6yDJEr.js');
|
|
37
3
|
|
|
38
4
|
exports.AppCommandHandler = require_commandkit.AppCommandHandler;
|
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../EventInterceptor-x-R2qshQ.js";
|
|
3
|
-
import "../../ButtonKit-C7r7RPNf.js";
|
|
4
|
-
import "../../ModalKit-Btz58KYn.js";
|
|
5
|
-
import "../../element-CAXu1XtK.js";
|
|
6
|
-
import "../../ActionRow-DKnFVDME.js";
|
|
7
|
-
import "../../types-CJ-XvOFN.js";
|
|
8
|
-
import "../../Button-4ZUXdA56.js";
|
|
9
|
-
import "../../Modal-C6UTRdYQ.js";
|
|
10
|
-
import "../../common-DOCvOVC4.js";
|
|
11
|
-
import "../../StringSelectMenuKit-Bhs8U6WI.js";
|
|
12
|
-
import "../../ChannelSelectMenuKit-BrXvBYNH.js";
|
|
13
|
-
import "../../MentionableSelectMenuKit-CPTKqx-O.js";
|
|
14
|
-
import "../../UserSelectMenuKit-CfqFJdxz.js";
|
|
15
|
-
import "../../RoleSelectMenuKit-C26lU3sN.js";
|
|
16
|
-
import "../../SelectMenu-Diy87_ba.js";
|
|
17
|
-
import "../../container-DHBELeJ3.js";
|
|
18
|
-
import "../../file-DTrr-p09.js";
|
|
19
|
-
import "../../media-gallery-BMsXSot3.js";
|
|
20
|
-
import "../../section-Dh_FhPeC.js";
|
|
21
|
-
import "../../separator-CMf6Cyy5.js";
|
|
22
|
-
import "../../text-display-DRw3r_lK.js";
|
|
23
|
-
import "../../index-DSBMRX9A.js";
|
|
24
|
-
import "../../index-DdqikUQD.js";
|
|
25
|
-
import "../../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../../signals-SHg7J1U_.js";
|
|
27
|
-
import "../../helpers-Wg6P5fRQ.js";
|
|
28
|
-
import "../../CommandsRouter-CoOA7hkf.js";
|
|
29
|
-
import "../../EventsRouter-BacqK6z3.js";
|
|
30
|
-
import "../../index-DKcmsWXw.js";
|
|
31
|
-
import "../../constants-MKu-Q1jh.js";
|
|
1
|
+
import { at as EventListener, it as AppEventsHandlerLoadedData, ot as LoadedEvent, rt as AppEventsHandler } from "../../analytics-engine-DnRsHBId.js";
|
|
32
2
|
export { AppEventsHandler, AppEventsHandlerLoadedData, EventListener, LoadedEvent };
|
|
@@ -1,38 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
require('../../
|
|
3
|
-
require('../../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../../commandkit-Bm0gLN8i.js');
|
|
5
|
-
require('../../common-CcfjYnPG.js');
|
|
6
|
-
require('../../common-vnMIelAE.js');
|
|
7
|
-
require('../../container-C6GtfAPW.js');
|
|
8
|
-
require('../../file-DVOELoNv.js');
|
|
9
|
-
require('../../media-gallery-zDtJ3kxb.js');
|
|
10
|
-
require('../../section-DlvrDoJK.js');
|
|
11
|
-
require('../../separator-DL6QH5H1.js');
|
|
12
|
-
require('../../text-display-DbMumig_.js');
|
|
13
|
-
require('../../v2-DofkPKHs.js');
|
|
14
|
-
require('../../element-Bak9llw_.js');
|
|
15
|
-
require('../../types-CUZOquUl.js');
|
|
16
|
-
require('../../EventInterceptor-CQEXyUTp.js');
|
|
17
|
-
require('../../constants-B5_Ta7PR.js');
|
|
18
|
-
require('../../PluginCommon-Cvl5yYM_.js');
|
|
19
|
-
require('../../CompilerPlugin-M8r3yNAl.js');
|
|
20
|
-
require('../../RuntimePlugin-BUecuBIU.js');
|
|
21
|
-
require('../../types-q0Nm882H.js');
|
|
22
|
-
require('../../resolve-file-url-ChIyw-Vf.js');
|
|
23
|
-
require('../../runtime-DB9CiPfe.js');
|
|
24
|
-
require('../../utils-KsNof0Xz.js');
|
|
25
|
-
require('../../types-package-BWArjyBF.js');
|
|
26
|
-
require('../../constants-BOOGN85p.js');
|
|
27
|
-
require('../../EventWorkerContext-Dq29tieI.js');
|
|
28
|
-
require('../../signals-ChFMD7mB.js');
|
|
29
|
-
require('../../MessageCommandParser-CEuO6Ex3.js');
|
|
30
|
-
require('../../helpers-BSwwrKJW.js');
|
|
31
|
-
require('../../CommandsRouter-Cgcy6cK9.js');
|
|
32
|
-
require('../../EventsRouter-3Gygh-km.js');
|
|
33
|
-
require('../../router-Dn35v30f.js');
|
|
34
|
-
require('../../common-Dxr9-XPa.js');
|
|
35
|
-
require('../../CommandKitEventsChannel-BtRzr3Tz.js');
|
|
36
|
-
require('../../store-CM6pWVZh.js');
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_commandkit = require('../../commandkit--k6yDJEr.js');
|
|
37
3
|
|
|
38
4
|
exports.AppEventsHandler = require_commandkit.AppEventsHandler;
|