commandkit 1.2.0-rc.12 → 1.2.0-rc.13
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/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-B-7n9MMr.d.ts → ActionRow-B-CGmjDp.d.ts} +3 -4
- package/dist/{ActionRow-uJxU4UGo.js → ActionRow-CSN_UKmM.js} +2 -3
- package/dist/{ActionRow-uJxU4UGo.js.map → ActionRow-CSN_UKmM.js.map} +1 -1
- package/dist/{Button-RMp-w8HV.d.ts → Button-C-GPeFA3.d.ts} +6 -7
- package/dist/{ButtonKit-9k4yfhYD.d.ts → ButtonKit-DKu0VAe4.d.ts} +36 -37
- package/dist/ChannelSelectMenuKit-HQZ4hH5s.d.ts +66 -0
- 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-CBdsqaWK.d.ts → CommandsRouter-C7dZEepB.d.ts} +49 -50
- package/dist/{CommandsRouter-CWMipIis.js → CommandsRouter-C_HLsrGX.js} +2 -6
- package/dist/{CommandsRouter-CWMipIis.js.map → CommandsRouter-C_HLsrGX.js.map} +1 -1
- package/dist/{CompilerPlugin-CZ4412Zm.js → CompilerPlugin-CUsGAfgl.js} +2 -2
- package/dist/{CompilerPlugin-CZ4412Zm.js.map → CompilerPlugin-CUsGAfgl.js.map} +1 -1
- package/dist/EventInterceptor-BWoEJMHZ.js.map +1 -1
- package/dist/{EventInterceptor-x-R2qshQ.d.ts → EventInterceptor-CZmWpS08.d.ts} +40 -40
- package/dist/{EventWorkerContext-D_9q1Bm2.js → EventWorkerContext-Dfhgv329.js} +2 -3
- package/dist/{EventWorkerContext-D_9q1Bm2.js.map → EventWorkerContext-Dfhgv329.js.map} +1 -1
- package/dist/EventsRouter-DZ37r54v.d.ts +90 -0
- package/dist/{EventsRouter-C04XqRKf.js → EventsRouter-DZYIha6m.js} +2 -6
- package/dist/{EventsRouter-C04XqRKf.js.map → EventsRouter-DZYIha6m.js.map} +1 -1
- package/dist/MentionableSelectMenuKit-7URDUM3-.d.ts +61 -0
- package/dist/{MessageCommandParser-CKh-tM97.js → MessageCommandParser-Bs9fimmd.js} +2 -3
- package/dist/{MessageCommandParser-CKh-tM97.js.map → MessageCommandParser-Bs9fimmd.js.map} +1 -1
- package/dist/MessageCommandParser-q3dQcE5N.d.ts +194 -0
- package/dist/{Modal-Calb46SJ.d.ts → Modal-CZT9MZsy.d.ts} +20 -10
- package/dist/{ModalKit-Cq2ns6jv.d.ts → ModalKit-BWXI3Z26.d.ts} +33 -34
- package/dist/{PluginCommon-CPWV5xuX.js → PluginCommon-BLxWww5u.js} +6 -7
- package/dist/{PluginCommon-CPWV5xuX.js.map → PluginCommon-BLxWww5u.js.map} +1 -1
- package/dist/RoleSelectMenuKit-BY-JJ18w.d.ts +66 -0
- package/dist/{RuntimePlugin-COeXe8rP.js → RuntimePlugin-CtobluSU.js} +2 -2
- package/dist/{RuntimePlugin-COeXe8rP.js.map → RuntimePlugin-CtobluSU.js.map} +1 -1
- package/dist/{SelectMenu-VcDhOGoJ.d.ts → SelectMenu-q_b3Mjv9.d.ts} +9 -10
- package/dist/StringSelectMenuKit-lVhUMc3g.d.ts +66 -0
- package/dist/UserSelectMenuKit-CCj4Fpkr.d.ts +66 -0
- package/dist/analytics/analytics-engine.d.ts +1 -33
- package/dist/analytics/analytics-engine.js +22 -37
- package/dist/analytics/analytics-provider.d.ts +1 -33
- package/dist/analytics/constants.js +1 -1
- package/dist/analytics/utils.js +22 -37
- package/dist/{analytics-engine-NOInIjv8.d.ts → analytics-engine-WQhXmx3H.d.ts} +844 -841
- package/dist/app/commands/AppCommandRunner.d.ts +1 -33
- package/dist/app/commands/AppCommandRunner.js +22 -37
- package/dist/app/commands/Context.d.ts +1 -33
- package/dist/app/commands/Context.js +22 -37
- 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 +22 -37
- package/dist/app/handlers/AppEventsHandler.d.ts +1 -33
- package/dist/app/handlers/AppEventsHandler.js +22 -37
- package/dist/app/index.d.ts +4 -33
- package/dist/app/index.js +22 -38
- 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 +22 -37
- package/dist/app/register/CommandRegistrar.d.ts +1 -33
- package/dist/app/register/CommandRegistrar.js +22 -37
- 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 +62 -7
- 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 +4 -4
- package/dist/cli/development.d.ts +18 -1
- package/dist/cli/development.js +41 -49
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/env.d.ts +4 -0
- package/dist/cli/env.js +1 -1
- package/dist/cli/generators.js +5 -8
- package/dist/cli/generators.js.map +1 -1
- package/dist/cli/information.js +5 -5
- package/dist/cli/information.js.map +1 -1
- package/dist/cli/init.d.ts +12 -2
- package/dist/cli/init.js +100 -39
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/production.d.ts +0 -1
- package/dist/cli/production.js +36 -49
- package/dist/cli/production.js.map +1 -1
- package/dist/cli/type-checker.js +5 -5
- 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-DL3ucTiT.js → colors-Csc0X4QJ.js} +2 -3
- package/dist/{colors-DL3ucTiT.js.map → colors-Csc0X4QJ.js.map} +1 -1
- package/dist/{commandkit-DabqpQ6v.js → commandkit-SIjTLD2R.js} +145 -46
- package/dist/commandkit-SIjTLD2R.js.map +1 -0
- package/dist/commandkit.d.ts +1 -33
- package/dist/commandkit.js +22 -37
- package/dist/{common-CCx-FJI4.js → common-CEordwf3.js} +1 -1
- package/dist/{common-CCx-FJI4.js.map → common-CEordwf3.js.map} +1 -1
- package/dist/{common-fIO6fqGZ.js → common-DSRs_mfw.js} +9 -12
- package/dist/{common-fIO6fqGZ.js.map → common-DSRs_mfw.js.map} +1 -1
- package/dist/{common-DHTTnX82.d.ts → common-DnwCYit8.d.ts} +3 -4
- 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/common.js +1 -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 +23 -26
- package/dist/components/index.js +23 -36
- 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 +22 -37
- package/dist/components/interactive/button/ButtonKit.d.ts +1 -2
- package/dist/components/interactive/button/ButtonKit.js +22 -37
- package/dist/components/interactive/modal/Modal.d.ts +2 -7
- package/dist/components/interactive/modal/Modal.js +23 -37
- package/dist/components/interactive/modal/ModalKit.d.ts +1 -2
- package/dist/components/interactive/modal/ModalKit.js +22 -37
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +22 -37
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +22 -37
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +22 -37
- package/dist/components/interactive/select-menu/SelectMenu.d.ts +1 -9
- package/dist/components/interactive/select-menu/SelectMenu.js +22 -37
- package/dist/components/interactive/select-menu/StringSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/StringSelectMenuKit.js +22 -37
- package/dist/components/interactive/select-menu/UserSelectMenuKit.d.ts +1 -3
- package/dist/components/interactive/select-menu/UserSelectMenuKit.js +22 -37
- 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 +22 -37
- package/dist/config/default.d.ts +1 -33
- package/dist/config/default.js +22 -37
- package/dist/config/loader.d.ts +1 -33
- package/dist/config/loader.js +22 -37
- 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-AH-9qJ89.js.map → constants-BFFK-hfP.js.map} +1 -1
- package/dist/{constants-DqnSDZ6l.d.ts → constants-CuYW0K10.d.ts} +14 -8
- package/dist/{constants-D0dawKxO.js → constants-Cw8VjCVz.js} +2 -3
- package/dist/{constants-D0dawKxO.js.map → constants-Cw8VjCVz.js.map} +1 -1
- package/dist/{constants-BMWH2YUr.js → constants-CxkFFZ7p.js} +16 -1
- package/dist/constants-CxkFFZ7p.js.map +1 -0
- package/dist/{constants-CCFSX2NG.d.ts → constants-EpKcj0dH.d.ts} +2 -2
- package/dist/{container-DC0eQigs.js → container-DCPljKVH.js} +3 -4
- package/dist/{container-DC0eQigs.js.map → container-DCPljKVH.js.map} +1 -1
- package/dist/{container-1ltvkavy.d.ts → container-DYcb7zGw.d.ts} +2 -3
- package/dist/context/async-context.d.ts +1 -33
- package/dist/context/async-context.js +22 -37
- package/dist/context/environment.d.ts +1 -33
- package/dist/context/environment.js +22 -37
- package/dist/element-DibzzA5L.js.map +1 -1
- package/dist/{element-CvNhvLZ8.d.ts → element-wQo0heGj.d.ts} +4 -5
- package/dist/{env-8yY-6pbC.js → env-CmspDhHy.js} +7 -3
- package/dist/env-CmspDhHy.js.map +1 -0
- 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-DAUOZYhC.js → file-Ca1kpEtE.js} +2 -3
- package/dist/{file-DAUOZYhC.js.map → file-Ca1kpEtE.js.map} +1 -1
- package/dist/{file-n2yl_-vl.d.ts → file-CrV4lSnl.d.ts} +2 -3
- package/dist/flags/FlagProvider.d.ts +1 -33
- package/dist/flags/feature-flags.d.ts +1 -33
- package/dist/flags/feature-flags.js +163 -41
- 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-hDh_tMb6.d.ts → helpers-AQPLVY35.d.ts} +2 -3
- package/dist/{helpers-D2_1jih6.js → helpers-Btx1FSZx.js} +2 -3
- package/dist/{helpers-D2_1jih6.js.map → helpers-Btx1FSZx.js.map} +1 -1
- package/dist/index.d.ts +41 -44
- package/dist/index.js +39 -45
- 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 -16
- 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-D0KXeBhk.d.ts → label-37kaNWMH.d.ts} +4 -5
- package/dist/{label-D-uJWRZ0.js → label-B6vXvwLM.js} +4 -5
- package/dist/{label-D-uJWRZ0.js.map → label-B6vXvwLM.js.map} +1 -1
- package/dist/logger/DefaultLogger.d.ts +66 -3
- package/dist/logger/DefaultLogger.js +22 -37
- 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 +22 -37
- package/dist/logger/NoopLogger.d.ts +36 -37
- package/dist/{media-gallery-BzG70ued.d.ts → media-gallery-Ci3I4ElH.d.ts} +2 -3
- package/dist/{media-gallery-BLhwe5lO.js → media-gallery-u3gjX7yD.js} +3 -4
- package/dist/{media-gallery-BLhwe5lO.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 +24 -37
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -33
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +22 -37
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -33
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +22 -37
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -33
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +22 -37
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -33
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +22 -37
- 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-Bc6rjeUS.js → poll-CFe8yvoJ.js} +12 -13
- package/dist/{poll-Bc6rjeUS.js.map → poll-CFe8yvoJ.js.map} +1 -1
- package/dist/{poll-HnaJcB0o.d.ts → poll-Ddtapd6n.d.ts} +8 -9
- 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-BMcHN97i.js → section-BC8LF-B2.js} +3 -4
- package/dist/{section-BMcHN97i.js.map → section-BC8LF-B2.js.map} +1 -1
- package/dist/{section-BOaJKXiy.d.ts → section-DkUKULnB.d.ts} +2 -3
- package/dist/{separator-C___2K-f.js → separator-BUTiW7uz.js} +2 -3
- package/dist/{separator-C___2K-f.js.map → separator-BUTiW7uz.js.map} +1 -1
- package/dist/{separator-Cb7-6T6N.d.ts → separator-CbXsIFCa.d.ts} +2 -3
- package/dist/{signals-Cnqe9dFV.js → signals-B8z1wJ6W.js} +2 -2
- package/dist/{signals-Cnqe9dFV.js.map → signals-B8z1wJ6W.js.map} +1 -1
- package/dist/{signals-DBS60vTo.d.ts → signals-BbTgTc0i.d.ts} +2 -2
- package/dist/{store-ZwL2gN6a.js → store-D8r_hryO.js} +2 -3
- package/dist/{store-ZwL2gN6a.js.map → store-D8r_hryO.js.map} +1 -1
- package/dist/{text-display-B_hpz50P.d.ts → text-display-D7j39VC-.d.ts} +2 -3
- package/dist/{text-display-BtQR88kY.js → text-display-DANahMN3.js} +2 -3
- package/dist/{text-display-BtQR88kY.js.map → text-display-DANahMN3.js.map} +1 -1
- package/dist/{type-checker-CEFHoQoV.js → type-checker-cVd3Hpnh.js} +4 -6
- package/dist/{type-checker-CEFHoQoV.js.map → type-checker-cVd3Hpnh.js.map} +1 -1
- package/dist/{types-CJ-XvOFN.d.ts → types-BywA9d2Z.d.ts} +2 -2
- package/dist/{types-package-D11rQXLs.js → types-package-CsTNfvv2.js} +3 -6
- package/dist/{types-package-D11rQXLs.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 +2 -2
- package/dist/utils/constants.js +3 -2
- package/dist/utils/dev-hooks.d.ts +1 -33
- package/dist/utils/dev-hooks.js +22 -37
- 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 +2 -2
- 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 +25 -38
- 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/hooks.cjs +11 -4
- package/package.json +14 -7
- package/dist/ChannelSelectMenuKit-CsYgIyKe.d.ts +0 -67
- package/dist/DefaultLogger-CHMVsizQ.d.ts +0 -67
- package/dist/EventWorkerContext-CLhZRHhH.d.ts +0 -43
- package/dist/EventsRouter-4pT6vj-U.d.ts +0 -90
- package/dist/ILogger-BQ2ew4zR.d.ts +0 -64
- package/dist/Logger-DyV7oli4.d.ts +0 -37
- package/dist/MentionableSelectMenuKit-CO9phWMf.d.ts +0 -62
- package/dist/MessageCommandParser-DEOl_ifb.d.ts +0 -195
- package/dist/RoleSelectMenuKit-DvBxzpWh.d.ts +0 -67
- package/dist/StringSelectMenuKit-CJ0MzUZJ.d.ts +0 -67
- package/dist/UserSelectMenuKit-C_J-9RJs.d.ts +0 -67
- package/dist/app-CrjK9yWX.js +0 -0
- package/dist/app-process-AQ3Cbf6j.js +0 -68
- package/dist/app-process-AQ3Cbf6j.js.map +0 -1
- package/dist/build-BYMHMOl_.js +0 -173
- package/dist/build-BYMHMOl_.js.map +0 -1
- package/dist/commandkit-DabqpQ6v.js.map +0 -1
- package/dist/common-0Iw8ZeM6.js +0 -0
- package/dist/config-DbgXt6mf.d.ts +0 -16
- package/dist/constants-AH-9qJ89.js +0 -27
- package/dist/constants-BMWH2YUr.js.map +0 -1
- package/dist/dotprops-DvJUE8fw.js +0 -36
- package/dist/dotprops-DvJUE8fw.js.map +0 -1
- package/dist/env-8yY-6pbC.js.map +0 -1
- package/dist/error-codes-BiNRVMiV.d.ts +0 -54
- package/dist/feature-flags-BoBV4Dsj.js +0 -160
- package/dist/feature-flags-BoBV4Dsj.js.map +0 -1
- package/dist/init-CBb0StSB.js +0 -91
- package/dist/init-CBb0StSB.js.map +0 -1
- package/dist/init-DSYckXwx.d.ts +0 -13
- package/dist/resolve-file-url-DFtR8jRR.d.ts +0 -11
- package/dist/serde-D4H23l2F.d.ts +0 -12
- package/dist/serde-DHHwhltz.js +0 -97
- package/dist/serde-DHHwhltz.js.map +0 -1
- package/dist/utilities-CQUaua43.d.ts +0 -87
- package/dist/utils-Bf-3Eevb.js +0 -23
- package/dist/utils-Bf-3Eevb.js.map +0 -1
- package/dist/version-DC4j2ZwU.js +0 -18
- package/dist/version-DC4j2ZwU.js.map +0 -1
- package/dist/version-DggMfP_1.d.ts +0 -8
- /package/dist/{ILogger-B0q7p7L1.js → common-C2jAjX4U.js} +0 -0
- /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,44 +1,166 @@
|
|
|
1
|
-
require('../colors-
|
|
2
|
-
require('../ActionRow-
|
|
3
|
-
require('../
|
|
4
|
-
require('../
|
|
5
|
-
require('../
|
|
6
|
-
require('../
|
|
7
|
-
require('../
|
|
8
|
-
require('../
|
|
9
|
-
require('../
|
|
10
|
-
require('../
|
|
11
|
-
require('../
|
|
12
|
-
require('../separator-C___2K-f.js');
|
|
13
|
-
require('../text-display-BtQR88kY.js');
|
|
14
|
-
require('../label-D-uJWRZ0.js');
|
|
15
|
-
require('../poll-Bc6rjeUS.js');
|
|
1
|
+
require('../colors-Csc0X4QJ.js');
|
|
2
|
+
require('../ActionRow-CSN_UKmM.js');
|
|
3
|
+
const require_commandkit = require('../commandkit-SIjTLD2R.js');
|
|
4
|
+
require('../container-DCPljKVH.js');
|
|
5
|
+
require('../file-Ca1kpEtE.js');
|
|
6
|
+
require('../media-gallery-u3gjX7yD.js');
|
|
7
|
+
require('../section-BC8LF-B2.js');
|
|
8
|
+
require('../separator-BUTiW7uz.js');
|
|
9
|
+
require('../text-display-DANahMN3.js');
|
|
10
|
+
require('../label-B6vXvwLM.js');
|
|
11
|
+
require('../poll-CFe8yvoJ.js');
|
|
16
12
|
require('../display-WDb9wMCv.js');
|
|
17
|
-
require('../
|
|
18
|
-
require('../types-
|
|
19
|
-
require('../
|
|
20
|
-
require('../
|
|
21
|
-
require('../
|
|
22
|
-
require('../
|
|
23
|
-
require('../
|
|
24
|
-
require('../
|
|
25
|
-
require('../
|
|
26
|
-
require('../runtime-Skt5NiOc.js');
|
|
27
|
-
require('../utils-Br3eenD1.js');
|
|
28
|
-
require('../types-package-D11rQXLs.js');
|
|
29
|
-
require('../constants-D0dawKxO.js');
|
|
30
|
-
require('../EventWorkerContext-D_9q1Bm2.js');
|
|
31
|
-
require('../signals-Cnqe9dFV.js');
|
|
32
|
-
require('../helpers-D2_1jih6.js');
|
|
33
|
-
require('../MessageCommandParser-CKh-tM97.js');
|
|
34
|
-
require('../CommandsRouter-CWMipIis.js');
|
|
35
|
-
require('../EventsRouter-C04XqRKf.js');
|
|
13
|
+
require('../constants-CxkFFZ7p.js');
|
|
14
|
+
require('../types-package-CsTNfvv2.js');
|
|
15
|
+
const require_constants$1 = require('../constants-Cw8VjCVz.js');
|
|
16
|
+
const require_EventWorkerContext = require('../EventWorkerContext-Dfhgv329.js');
|
|
17
|
+
require('../signals-B8z1wJ6W.js');
|
|
18
|
+
require('../helpers-Btx1FSZx.js');
|
|
19
|
+
require('../MessageCommandParser-Bs9fimmd.js');
|
|
20
|
+
require('../CommandsRouter-C_HLsrGX.js');
|
|
21
|
+
require('../EventsRouter-DZYIha6m.js');
|
|
36
22
|
require('../router-BvamdzoF.js');
|
|
37
|
-
require('../common-
|
|
38
|
-
require('../
|
|
39
|
-
require('../store-ZwL2gN6a.js');
|
|
40
|
-
const require_feature_flags = require('../feature-flags-BoBV4Dsj.js');
|
|
23
|
+
require('../common-DSRs_mfw.js');
|
|
24
|
+
require('../store-D8r_hryO.js');
|
|
41
25
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
26
|
+
//#region src/flags/feature-flags.ts
|
|
27
|
+
let flagProvider = null;
|
|
28
|
+
/**
|
|
29
|
+
* Set the global flag provider for all feature flags
|
|
30
|
+
*/
|
|
31
|
+
function setFlagProvider(provider) {
|
|
32
|
+
flagProvider = provider;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Class representing a feature flag in CommandKit.
|
|
36
|
+
*/
|
|
37
|
+
var FeatureFlag = class {
|
|
38
|
+
commandkit;
|
|
39
|
+
/**
|
|
40
|
+
* Create a new feature flag.
|
|
41
|
+
* @param options - The options for the feature flag.
|
|
42
|
+
*/
|
|
43
|
+
constructor(options) {
|
|
44
|
+
this.options = options;
|
|
45
|
+
this.commandkit = require_commandkit.getCommandKit(true);
|
|
46
|
+
const FlagStore = this.commandkit.flags;
|
|
47
|
+
if (FlagStore.has(options.key)) throw new Error(`Feature flag with key "${options.key}" already exists.`);
|
|
48
|
+
FlagStore.set(options.key, this);
|
|
49
|
+
}
|
|
50
|
+
getContext() {
|
|
51
|
+
const env = require_commandkit.getContext();
|
|
52
|
+
if (env === null || env === void 0 ? void 0 : env.context) {
|
|
53
|
+
const { client, commandkit, interaction, message, guild, channel, command } = env.context;
|
|
54
|
+
return {
|
|
55
|
+
client,
|
|
56
|
+
commandkit,
|
|
57
|
+
command: {
|
|
58
|
+
interaction,
|
|
59
|
+
message,
|
|
60
|
+
guild,
|
|
61
|
+
channel,
|
|
62
|
+
command
|
|
63
|
+
},
|
|
64
|
+
event: null
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const eventCtx = require_EventWorkerContext.eventWorkerContext.getStore();
|
|
68
|
+
if (eventCtx) {
|
|
69
|
+
const { commandkit, data, event, namespace } = eventCtx;
|
|
70
|
+
return {
|
|
71
|
+
client: commandkit.client,
|
|
72
|
+
commandkit,
|
|
73
|
+
event: {
|
|
74
|
+
data,
|
|
75
|
+
event,
|
|
76
|
+
namespace,
|
|
77
|
+
arguments: eventCtx.arguments,
|
|
78
|
+
argumentsAs: (eventName) => {
|
|
79
|
+
return eventCtx.arguments;
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
command: null
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
throw new Error("Could not determine the execution context. Feature flags may only be used inside a command or event.");
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Execute the feature flag evaluation.
|
|
89
|
+
* @param res - Optional entities to use for evaluation. If not provided, it will call the identify function.
|
|
90
|
+
* @returns A promise that resolves to the result of the feature flag evaluation.
|
|
91
|
+
*/
|
|
92
|
+
async execute(res) {
|
|
93
|
+
const { decide, identify, disableAnalytics } = this.options;
|
|
94
|
+
const identificationStart = performance.now();
|
|
95
|
+
const entities = res ?? await (async () => {
|
|
96
|
+
const ctx = this.getContext();
|
|
97
|
+
return await (identify === null || identify === void 0 ? void 0 : identify(ctx)) ?? {};
|
|
98
|
+
})();
|
|
99
|
+
const identificationTime = performance.now() - identificationStart;
|
|
100
|
+
let providerConfig = null;
|
|
101
|
+
if (flagProvider) try {
|
|
102
|
+
providerConfig = await flagProvider.getFlag(this.options.key, entities);
|
|
103
|
+
if (providerConfig && !providerConfig.enabled) {
|
|
104
|
+
if (typeof decide === "function") return await decide({
|
|
105
|
+
entities,
|
|
106
|
+
provider: providerConfig
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
} catch (error) {
|
|
110
|
+
require_commandkit.Logger.error`Error fetching flag provider configuration for "${this.options.key}": ${error}`;
|
|
111
|
+
}
|
|
112
|
+
const decisionStart = performance.now();
|
|
113
|
+
const decisionResult = await decide({
|
|
114
|
+
entities,
|
|
115
|
+
provider: providerConfig
|
|
116
|
+
});
|
|
117
|
+
const decisionTime = performance.now() - decisionStart;
|
|
118
|
+
if (!disableAnalytics) {
|
|
119
|
+
require_commandkit.defer(async () => {
|
|
120
|
+
await this.commandkit.analytics.track({
|
|
121
|
+
name: require_constants$1.AnalyticsEvents.FEATURE_FLAG_METRICS,
|
|
122
|
+
data: {
|
|
123
|
+
flag: this.options.key,
|
|
124
|
+
identificationTime: identificationTime.toFixed(2),
|
|
125
|
+
decisionTime: decisionTime.toFixed(2),
|
|
126
|
+
usedProvider: flagProvider !== null,
|
|
127
|
+
providerEnabled: (providerConfig === null || providerConfig === void 0 ? void 0 : providerConfig.enabled) ?? null
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
require_commandkit.defer(async () => {
|
|
132
|
+
await this.commandkit.analytics.track({
|
|
133
|
+
name: require_constants$1.AnalyticsEvents.FEATURE_FLAG_DECISION,
|
|
134
|
+
id: entities && typeof entities === "object" && "id" in entities && typeof entities.id === "string" ? entities.id : void 0,
|
|
135
|
+
data: {
|
|
136
|
+
flag: this.options.key,
|
|
137
|
+
decision: require_commandkit.JsonSerialize(decisionResult, "unknown"),
|
|
138
|
+
providerUsed: flagProvider !== null
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
return decisionResult;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Create a new feature flag.
|
|
148
|
+
* @param options - The options for the feature flag.
|
|
149
|
+
* @returns A new instance of the FeatureFlag class.
|
|
150
|
+
*/
|
|
151
|
+
function flag(options) {
|
|
152
|
+
const flag = new FeatureFlag(options);
|
|
153
|
+
const runner = flag.execute.bind(flag, void 0);
|
|
154
|
+
runner.run = async function(ctx) {
|
|
155
|
+
if (!(ctx === null || ctx === void 0 ? void 0 : ctx.identify)) throw new Error("Custom evaluation context must have an identify function or object.");
|
|
156
|
+
const context = typeof ctx === "function" ? await ctx() : ctx;
|
|
157
|
+
return await flag.execute(context);
|
|
158
|
+
};
|
|
159
|
+
return runner;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
//#endregion
|
|
163
|
+
exports.FeatureFlag = FeatureFlag;
|
|
164
|
+
exports.flag = flag;
|
|
165
|
+
exports.setFlagProvider = setFlagProvider;
|
|
166
|
+
//# sourceMappingURL=feature-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-flags.js","names":[],"sources":["../../src/flags/feature-flags.ts"],"sourcesContent":["import { getCommandKit, getContext } from '../context/async-context';\nimport { eventWorkerContext } from '../app/events/EventWorkerContext';\nimport { ParsedEvent } from '../app/router';\nimport type { CommandKit } from '../commandkit';\nimport {\n AutocompleteInteraction,\n ChatInputCommandInteraction,\n Client,\n ClientEvents,\n ContextMenuCommandInteraction,\n Guild,\n Message,\n TextBasedChannel,\n} from 'discord.js';\nimport { LoadedCommand } from '../app';\nimport { defer, JsonSerialize } from '../utils/utilities';\nimport { AnalyticsEvents } from '../analytics/constants';\nimport { FlagProvider, FlagConfiguration } from './FlagProvider';\nimport { Logger } from '../logger/Logger';\n\n// Global flag provider\nlet flagProvider: FlagProvider | null = null;\n\n/**\n * Set the global flag provider for all feature flags\n */\nexport function setFlagProvider(provider: FlagProvider): void {\n flagProvider = provider;\n}\n\n/**\n * @private\n */\nexport type MaybePromise<T> = T | Promise<T>;\n\n/**\n * Function type for identifying entities in the context of feature flags.\n * This function should return an object representing the entity that will be used\n * to evaluate the feature flag.\n * It can be synchronous or asynchronous.\n */\nexport type IdentifyFunction<R> = (\n context: EvaluationContext,\n) => MaybePromise<R>;\n\n/**\n * Function type for deciding the outcome of a feature flag based on the provided entities.\n * This function receives an object containing the entities and optionally the provider configuration,\n * and should return the result of the decision.\n * It can be synchronous or asynchronous.\n */\nexport type DecideFunction<E, R> = (data: {\n entities: E;\n provider?: FlagConfiguration | null;\n}) => MaybePromise<R>;\n\n/**\n * Definition for a feature flag, including its key, description, identify function,\n * and decide function.\n * The identify function is used to determine the entities that will be evaluated\n * against the feature flag, while the decide function contains the logic for\n * determining the outcome of the flag based on those entities.\n */\nexport interface FeatureFlagDefinition<R, Entity> {\n /**\n * Unique key for the feature flag.\n * Should be a string that identifies the flag.\n */\n key: string;\n /**\n * Optional description of the feature flag.\n * This can be used for documentation or debugging purposes.\n */\n description?: string;\n /**\n * Optional flag to enable integration with an external flag provider.\n * If true, the flag will use the global flag provider to determine its state.\n * Default: false\n */\n identify?: IdentifyFunction<Entity>;\n /**\n * Function to decide the outcome of the feature flag.\n * This function receives the identified entities and should return the result of the decision.\n */\n decide: DecideFunction<Entity, R>;\n /**\n * Whether to disable analytics tracking for this flag.\n * Default: false\n */\n disableAnalytics?: boolean;\n}\n\n/**\n * Context for evaluating command flags in CommandKit.\n */\nexport interface CommandFlagContext {\n /**\n * The Discord client instance.\n * This is the main entry point for interacting with the Discord API.\n */\n client: Client<true>;\n /**\n * The CommandKit instance, which provides access to the command framework.\n * This includes commands, events, and other features of CommandKit.\n */\n commandkit: CommandKit;\n /**\n * The command context, which includes information about the command being executed.\n * This can include the interaction, message, guild, channel, and the loaded command.\n */\n command: {\n /**\n * The interaction object if the command was invoked via an interaction.\n * This can be a ChatInputCommandInteraction, AutocompleteInteraction, or ContextMenuCommandInteraction.\n */\n interaction?:\n | ChatInputCommandInteraction\n | AutocompleteInteraction\n | ContextMenuCommandInteraction;\n /**\n * The message object if the command was invoked via a message.\n */\n message?: Message;\n /**\n * The guild where the command was invoked, if applicable.\n * This will be null for commands invoked in DMs.\n */\n guild: Guild | null;\n /**\n * The channel where the command was invoked.\n * This can be a text channel, DM channel, or any other type of text-based channel.\n */\n channel: TextBasedChannel | null;\n /**\n * The loaded command instance that is being executed.\n * This contains the command's metadata and logic.\n */\n command: LoadedCommand;\n };\n /**\n * The event context is null for command flags, as they are not tied to a specific event.\n * This is used to differentiate between command and event flags.\n */\n event: null;\n}\n\n/**\n * Context for evaluating event flags in CommandKit.\n */\nexport interface EventFlagContext {\n /**\n * The Discord client instance.\n * This is the main entry point for interacting with the Discord API.\n */\n client: Client<true>;\n /**\n * The CommandKit instance, which provides access to the command framework.\n * This includes commands, events, and other features of CommandKit.\n */\n commandkit: CommandKit;\n /**\n * The event context, which includes information about the event being processed.\n * This can include the parsed event data, the event name, and the namespace if applicable.\n */\n event: {\n /**\n * The parsed event data, which contains the raw data from the event.\n * This can include information like user IDs, channel IDs, and other relevant data.\n */\n data: ParsedEvent;\n /**\n * The name of the event being processed.\n * This is the string identifier for the event, such as 'messageCreate' or 'guildMemberAdd'.\n */\n event: string;\n /**\n * The namespace of the event, if applicable.\n * This can be used to group related events or commands together.\n * It is null if the event does not belong to a specific namespace.\n */\n namespace: string | null;\n /**\n * The arguments passed to the event handler.\n * This is an array of arguments that were passed when the event was triggered.\n * It can be used to access specific data related to the event.\n */\n arguments: any[];\n /**\n * A function to retrieve the arguments for a specific event type.\n * This allows for type-safe access to the arguments based on the event name.\n * @param event - The name of the event to retrieve arguments for.\n */\n argumentsAs<E extends keyof ClientEvents>(event: E): ClientEvents[E];\n };\n /**\n * The command context is null for event flags, as they are not tied to a specific command.\n * This is used to differentiate between command and event flags.\n */\n command: null;\n}\n\n/**\n * Combined context type for feature flag evaluation.\n */\nexport type EvaluationContext = CommandFlagContext | EventFlagContext;\n\n/**\n * Function type for custom evaluation of feature flags.\n * This function can be used to provide a custom evaluation context for the flag.\n * It should return an object representing the entities to be evaluated.\n */\nexport type CustomEvaluationFunction<E> = () => MaybePromise<E>;\n\n/**\n * Context for custom evaluation of feature flags.\n * This allows for more flexible evaluation based on custom logic or external data.\n * The identify function can be a direct object or a function that returns the entities.\n */\nexport type CustomEvaluationContext<E> = {\n /**\n * Optional function to identify the entities for evaluation.\n * This can be a function that returns the entities based on the current context.\n */\n identify: E | CustomEvaluationFunction<E>;\n};\n\nexport interface FlagRunner<E, R> {\n /**\n * Execute the feature flag evaluation with the provided entities.\n * This method will run the identify and decide functions to determine the flag's outcome.\n * @param res - Optional entities to use for evaluation. If not provided, it will call the identify function.\n * @returns A promise that resolves to the result of the feature flag evaluation.\n */\n (): Promise<R>;\n /**\n * Run the feature flag evaluation with a custom context.\n * This allows for more flexible evaluation based on custom logic or external data.\n * @param context - The custom evaluation context containing the identify function or object.\n * @returns A promise that resolves to the result of the feature flag evaluation.\n */\n run(context: CustomEvaluationContext<E>): Promise<R>;\n}\n\n/**\n * Class representing a feature flag in CommandKit.\n */\nexport class FeatureFlag<R, T> {\n private commandkit: CommandKit;\n\n /**\n * Create a new feature flag.\n * @param options - The options for the feature flag.\n */\n public constructor(public readonly options: FeatureFlagDefinition<R, T>) {\n this.commandkit = getCommandKit(true);\n const FlagStore = this.commandkit.flags;\n\n if (FlagStore.has(options.key)) {\n throw new Error(`Feature flag with key \"${options.key}\" already exists.`);\n }\n\n FlagStore.set(options.key, this);\n }\n\n private getContext(): EvaluationContext {\n const env = getContext();\n\n if (env?.context) {\n const {\n client,\n commandkit,\n interaction,\n message,\n guild,\n channel,\n command,\n } = env.context;\n\n return {\n client: client as Client<true>,\n commandkit,\n command: {\n interaction,\n message,\n guild,\n channel,\n command,\n },\n event: null,\n };\n }\n\n const eventCtx = eventWorkerContext.getStore();\n\n if (eventCtx) {\n const { commandkit, data, event, namespace } = eventCtx;\n\n return {\n client: commandkit.client as Client<true>,\n commandkit,\n event: {\n data,\n event,\n namespace,\n arguments: eventCtx.arguments,\n argumentsAs: (eventName) => {\n const args = eventCtx.arguments as ClientEvents[typeof eventName];\n return args;\n },\n },\n command: null,\n };\n }\n\n throw new Error(\n 'Could not determine the execution context. Feature flags may only be used inside a command or event.',\n );\n }\n\n /**\n * Execute the feature flag evaluation.\n * @param res - Optional entities to use for evaluation. If not provided, it will call the identify function.\n * @returns A promise that resolves to the result of the feature flag evaluation.\n */\n public async execute(res?: T): Promise<R> {\n const { decide, identify, disableAnalytics } = this.options;\n\n const identificationStart = performance.now();\n const entities =\n res ??\n (await (async () => {\n const ctx = this.getContext();\n return (await identify?.(ctx)) ?? ({} as T);\n })());\n const identificationTime = performance.now() - identificationStart;\n\n // Get provider configuration if global provider is available\n let providerConfig: FlagConfiguration | null = null;\n if (flagProvider) {\n try {\n providerConfig = await flagProvider.getFlag(this.options.key, entities);\n\n // If provider says flag is disabled, return early with default behavior\n if (providerConfig && !providerConfig.enabled) {\n // For boolean flags, return false; for others, let decide function handle it\n if (typeof decide === 'function') {\n const decisionResult = await decide({\n entities,\n provider: providerConfig,\n });\n return decisionResult as R;\n }\n }\n } catch (error) {\n Logger.error`Error fetching flag provider configuration for \"${this.options.key}\": ${error}`;\n // continue with local decision if provider fails\n }\n }\n\n const decisionStart = performance.now();\n const decisionResult = await decide({\n entities,\n provider: providerConfig,\n });\n const decisionTime = performance.now() - decisionStart;\n\n // Skip analytics if disabled\n if (!disableAnalytics) {\n defer(async () => {\n await this.commandkit.analytics.track({\n name: AnalyticsEvents.FEATURE_FLAG_METRICS,\n data: {\n flag: this.options.key,\n identificationTime: identificationTime.toFixed(2),\n decisionTime: decisionTime.toFixed(2),\n usedProvider: flagProvider !== null,\n providerEnabled: providerConfig?.enabled ?? null,\n },\n });\n });\n\n defer(async () => {\n await this.commandkit.analytics.track({\n name: AnalyticsEvents.FEATURE_FLAG_DECISION,\n id:\n entities &&\n typeof entities === 'object' &&\n 'id' in entities &&\n typeof entities.id === 'string'\n ? entities.id\n : undefined,\n data: {\n flag: this.options.key,\n decision: JsonSerialize(decisionResult, 'unknown'),\n providerUsed: flagProvider !== null,\n },\n });\n });\n }\n\n return decisionResult as R;\n }\n}\n\n/**\n * Create a new feature flag.\n * @param options - The options for the feature flag.\n * @returns A new instance of the FeatureFlag class.\n */\nexport function flag<Returns = boolean, Entity = Record<any, any>>(\n options: FeatureFlagDefinition<Returns, Entity>,\n): FlagRunner<Entity, Returns> {\n const flag = new FeatureFlag<Returns, Entity>(options);\n const runner = flag.execute.bind(flag, undefined) as FlagRunner<\n Entity,\n Returns\n >;\n\n runner.run = async function (ctx) {\n if (!ctx?.identify) {\n throw new Error(\n 'Custom evaluation context must have an identify function or object.',\n );\n }\n\n const context = (\n typeof ctx === 'function'\n ? await (ctx as CustomEvaluationFunction<Entity>)()\n : ctx\n ) as Entity;\n\n const decisionResult = await flag.execute(context);\n\n return decisionResult;\n };\n\n return runner;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAqBI,eAAoC;;;;AAKxC,SAAgB,gBAAgB,UAA8B;AAC5D,gBAAe;;;;;AA2NjB,IAAa,cAAb,MAA+B;CAC7B,AAAQ;;;;;CAMR,AAAO,YAAY,AAAgB,SAAsC;EAAtC;AACjC,OAAK,aAAa,iCAAc,KAAK;EACrC,MAAM,YAAY,KAAK,WAAW;AAElC,MAAI,UAAU,IAAI,QAAQ,IAAI,CAC5B,OAAM,IAAI,MAAM,0BAA0B,QAAQ,IAAI,mBAAmB;AAG3E,YAAU,IAAI,QAAQ,KAAK,KAAK;;CAGlC,AAAQ,aAAgC;EACtC,MAAM,MAAM,+BAAY;AAExB,gDAAI,IAAK,SAAS;GAChB,MAAM,EACJ,QACA,YACA,aACA,SACA,OACA,SACA,YACE,IAAI;AAER,UAAO;IACG;IACR;IACA,SAAS;KACP;KACA;KACA;KACA;KACA;KACD;IACD,OAAO;IACR;;EAGH,MAAM,WAAW,8CAAmB,UAAU;AAE9C,MAAI,UAAU;GACZ,MAAM,EAAE,YAAY,MAAM,OAAO,cAAc;AAE/C,UAAO;IACL,QAAQ,WAAW;IACnB;IACA,OAAO;KACL;KACA;KACA;KACA,WAAW,SAAS;KACpB,cAAc,cAAc;AAE1B,aADa,SAAS;;KAGzB;IACD,SAAS;IACV;;AAGH,QAAM,IAAI,MACR,uGACD;;;;;;;CAQH,MAAa,QAAQ,KAAqB;EACxC,MAAM,EAAE,QAAQ,UAAU,qBAAqB,KAAK;EAEpD,MAAM,sBAAsB,YAAY,KAAK;EAC7C,MAAM,WACN,OACA,OAAG,YAAgB;GACjB,MAAE,MAAU,KAAE,YAAe;AAC7B,UAAQ,2DAAE,SAAe,IAAE,KAAO,EAAE;MAClC;EACJ,MAAM,qBAAqB,YAAY,KAAK,GAAG;EAG/C,IAAI,iBAA2C;AAC/C,MAAI,aACF,KAAI;AACF,oBAAiB,MAAM,aAAa,QAAQ,KAAK,QAAQ,KAAK,SAAS;AAGvE,OAAI,kBAAkB,CAAC,eAAe,SAEpC;QAAI,OAAO,WAAW,WAKpB,QAJuB,MAAM,OAAO;KAClC;KACA,UAAU;KACX,CAAC;;WAIC,OAAO;AACd,6BAAO,KAAK,mDAAmD,KAAK,QAAQ,IAAI,KAAK;;EAKzF,MAAM,gBAAgB,YAAY,KAAK;EACvC,MAAM,iBAAiB,MAAM,OAAO;GAClC;GACA,UAAU;GACX,CAAC;EACF,MAAM,eAAe,YAAY,KAAK,GAAG;AAGzC,MAAI,CAAC,kBAAkB;AACrB,4BAAM,YAAY;AAChB,UAAM,KAAK,WAAW,UAAU,MAAM;KACpC,MAAM,oCAAgB;KACtB,MAAM;MACJ,MAAM,KAAK,QAAQ;MACnB,oBAAoB,mBAAmB,QAAQ,EAAE;MACjD,cAAc,aAAa,QAAQ,EAAE;MACrC,cAAc,iBAAiB;MAC/B,kFAAiB,eAAgB,YAAW;MAC7C;KACF,CAAC;KACF;AAEF,4BAAM,YAAY;AAChB,UAAM,KAAK,WAAW,UAAU,MAAM;KACpC,MAAM,oCAAgB;KACtB,IACA,YACA,OAAE,aAAkB,YACpB,QAAO,YACP,OAAE,SAAO,OAAc,WACvB,SAAM,KACN;KACA,MAAM;MACJ,MAAM,KAAK,QAAQ;MACnB,UAAU,iCAAc,gBAAgB,UAAU;MAClD,cAAc,iBAAiB;MAChC;KACF,CAAC;KACF;;AAGJ,SAAO;;;;;;;;AASX,SAAgB,KAChB,SAC8B;CAC5B,MAAM,OAAO,IAAI,YAA6B,QAAQ;CACtD,MAAM,SAAS,KAAK,QAAQ,KAAK,MAAM,OAAU;AAKjD,QAAO,MAAM,eAAgB,KAAK;AAChC,MAAI,4CAAC,IAAK,UACR,OAAM,IAAI,MACR,sEACD;EAGH,MAAM,UACN,OAAE,QAAa,aACf,MAAM,KAAuC,GAC7C;AAKA,SAFuB,MAAM,KAAK,QAAQ,QAAQ;;AAKpD,QAAO"}
|
package/dist/flags/store.d.ts
CHANGED
|
@@ -1,34 +1,2 @@
|
|
|
1
|
-
import { FlagStore } from "../analytics-engine-
|
|
2
|
-
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
|
-
import "../ButtonKit-9k4yfhYD.js";
|
|
4
|
-
import "../ModalKit-Cq2ns6jv.js";
|
|
5
|
-
import "../element-CvNhvLZ8.js";
|
|
6
|
-
import "../ActionRow-B-7n9MMr.js";
|
|
7
|
-
import "../types-CJ-XvOFN.js";
|
|
8
|
-
import "../Button-RMp-w8HV.js";
|
|
9
|
-
import "../Modal-Calb46SJ.js";
|
|
10
|
-
import "../common-DHTTnX82.js";
|
|
11
|
-
import "../StringSelectMenuKit-CJ0MzUZJ.js";
|
|
12
|
-
import "../ChannelSelectMenuKit-CsYgIyKe.js";
|
|
13
|
-
import "../MentionableSelectMenuKit-CO9phWMf.js";
|
|
14
|
-
import "../UserSelectMenuKit-C_J-9RJs.js";
|
|
15
|
-
import "../RoleSelectMenuKit-DvBxzpWh.js";
|
|
16
|
-
import "../SelectMenu-VcDhOGoJ.js";
|
|
17
|
-
import "../container-1ltvkavy.js";
|
|
18
|
-
import "../file-n2yl_-vl.js";
|
|
19
|
-
import "../media-gallery-BzG70ued.js";
|
|
20
|
-
import "../section-BOaJKXiy.js";
|
|
21
|
-
import "../separator-Cb7-6T6N.js";
|
|
22
|
-
import "../text-display-B_hpz50P.js";
|
|
23
|
-
import "../label-D0KXeBhk.js";
|
|
24
|
-
import "../poll-HnaJcB0o.js";
|
|
25
|
-
import "../index-h64gcVNJ.js";
|
|
26
|
-
import "../index-BLwMeReG.js";
|
|
27
|
-
import "../MessageCommandParser-DEOl_ifb.js";
|
|
28
|
-
import "../signals-DBS60vTo.js";
|
|
29
|
-
import "../helpers-hDh_tMb6.js";
|
|
30
|
-
import "../CommandsRouter-CBdsqaWK.js";
|
|
31
|
-
import "../EventsRouter-4pT6vj-U.js";
|
|
32
|
-
import "../index-B5F3AfVc.js";
|
|
33
|
-
import "../constants-DqnSDZ6l.js";
|
|
1
|
+
import { v as FlagStore } from "../analytics-engine-WQhXmx3H.js";
|
|
34
2
|
export { FlagStore };
|
package/dist/flags/store.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Interaction, Message } from "discord.js";
|
|
2
2
|
|
|
3
3
|
//#region src/app/commands/helpers.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Union type representing possible command sources.
|
|
7
6
|
*/
|
|
@@ -19,5 +18,5 @@ declare function isMessageSource(source: CommandSource): source is Message;
|
|
|
19
18
|
*/
|
|
20
19
|
declare function isInteractionSource(source: CommandSource): source is Interaction;
|
|
21
20
|
//#endregion
|
|
22
|
-
export {
|
|
23
|
-
//# sourceMappingURL=helpers-
|
|
21
|
+
export { isInteractionSource as n, isMessageSource as r, CommandSource as t };
|
|
22
|
+
//# sourceMappingURL=helpers-AQPLVY35.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-
|
|
1
|
+
const require_chunk = require('./chunk-kSYXY2_d.js');
|
|
2
2
|
let discord_js = require("discord.js");
|
|
3
|
-
discord_js = require_chunk.__toESM(discord_js);
|
|
4
3
|
|
|
5
4
|
//#region src/app/commands/helpers.ts
|
|
6
5
|
/**
|
|
@@ -33,4 +32,4 @@ Object.defineProperty(exports, 'isMessageSource', {
|
|
|
33
32
|
return isMessageSource;
|
|
34
33
|
}
|
|
35
34
|
});
|
|
36
|
-
//# sourceMappingURL=helpers-
|
|
35
|
+
//# sourceMappingURL=helpers-Btx1FSZx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-
|
|
1
|
+
{"version":3,"file":"helpers-Btx1FSZx.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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,45 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { MaybeArray } from "./types-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import "./
|
|
26
|
-
import "./
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import "./
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import { debounce, defer, devOnly, getCurrentDirectory, getSourceDirectories } from "./utilities-CQUaua43.js";
|
|
42
|
-
import { toFileURL } from "./resolve-file-url-DFtR8jRR.js";
|
|
43
|
-
import { CommandKitErrorCodes, isErrorType } from "./error-codes-BiNRVMiV.js";
|
|
1
|
+
import { $ as isRuntimePlugin, $t as MessageCommand, A as flag, At as makeContextAwareFunction, B as CommonPluginRuntime, Bt as PreRegisterCommandsEvent, C as EvaluationContext, D as FlagRunner, Dt as getCommandKit, E as FeatureFlagDefinition, Et as exitContext, F as CommandKitPluginRuntime, Ft as CommandKitEnvironmentInternalData, G as PluginTransformParameters, Gt as ChatInputCommand, H as CommonDirectiveTransformer, Ht as AutocompleteCommand, It as CommandKitEnvironmentType, J as CommandKitEventDispatch, Jt as CommandExecutionMode, K as TransformedResult, Kt as ChatInputCommandContext, Lt as after, Mt as useEnvironment, Nt as useStore, O as IdentifyFunction, Ot as getContext, Pt as CommandKitEnvironment, Q as RuntimePlugin, Qt as InteractionCommandMiddlewareContext, Rt as cancelAfter, S as DecideFunction, T as FeatureFlag, Tt as GenericFunction, U as CommonDirectiveTransformerOptions, Ut as AutocompleteCommandContext, V as CompilerPluginRuntime, Vt as AnyCommandExecute, W as CompilerPlugin, Wt as AutocompleteCommandMiddlewareContext, X as MaybeFalsey, Xt as ContextParameters, Y as CommandKitPlugin, Yt as Context, Z as TemplateHandler, Zt as InteractionCommandContext, _t as CustomAppCommandProps, an as MiddlewareContext, b as CustomEvaluationContext, bt as ResolvableCommand, c as CommandKitConfiguration, cn as UserContextMenuCommand, d as onBootstrap, dn as CommandContext, dt as AppCommandNative, en as MessageCommandContext, et as CommandKitHMREvent, fn as CommandData, ft as CommandBuilderLike, gn as EventHandler, gt as CommandTypeData, hn as CommandMetadataFunction, ht as CommandDataSchemaValue, in as MessageContextMenuCommandMiddlewareContext, j as setFlagProvider, jt as provideContext, k as MaybePromise, kt as isCommandWorkerContext, l as commandkit, ln as UserContextMenuCommandContext, lt as AppCommand, mn as CommandMetadata, mt as CommandDataSchemaKey, nn as MessageContextMenuCommand, o as BootstrapFunction, on as MiddlewareContextArgs, pn as CommandKitOptions, pt as CommandDataSchema, q as isCompilerPlugin, qt as CommandContextOptions, rn as MessageContextMenuCommandContext, s as CommandKit, sn as SlashCommandMiddlewareContext, tn as MessageCommandMiddlewareContext, u as onApplicationBootstrap, un as UserContextMenuCommandMiddlewareContext, ut as AppCommandHandler, vt as LoadedCommand, w as EventFlagContext, wt as AsyncFunction, x as CustomEvaluationFunction, xt as RunCommand, y as CommandFlagContext, yt as PreparedAppCommandExecution, zt as CommandRegistrar } from "./analytics-engine-WQhXmx3H.js";
|
|
2
|
+
import { n as EventInterceptorContextData, r as EventInterceptorErrorHandler, t as EventInterceptor } from "./EventInterceptor-CZmWpS08.js";
|
|
3
|
+
import { a as CommandKitButtonBuilderOnEnd, i as CommandKitButtonBuilderInteractionCollectorDispatchContextData, n as ButtonKitPredicate, o as OnButtonKitClick, r as CommandKitButtonBuilderInteractionCollectorDispatch, s as OnButtonKitEnd, t as ButtonKit } from "./ButtonKit-DKu0VAe4.js";
|
|
4
|
+
import { a as ModalKitPredicate, i as ModalKit, n as CommandKitModalBuilderInteractionCollectorDispatchContextData, o as OnModalKitEnd, r as CommandKitModalBuilderOnEnd, s as OnModalKitSubmit, t as CommandKitModalBuilderInteractionCollectorDispatch } from "./ModalKit-BWXI3Z26.js";
|
|
5
|
+
import { a as Fragment, c as getElement, i as ElementType, l as isCommandKitElement, n as CommandKitElement, o as FragmentElementProps, r as CommandKitElementData, s as createElement, t as AnyCommandKitElement } from "./element-wQo0heGj.js";
|
|
6
|
+
import { n as ActionRowProps, t as ActionRow } from "./ActionRow-B-CGmjDp.js";
|
|
7
|
+
import { t as MaybeArray } from "./types-BywA9d2Z.js";
|
|
8
|
+
import { n as ButtonChildrenLike, r as ButtonProps, t as Button } from "./Button-C-GPeFA3.js";
|
|
9
|
+
import { a as ParagraphInput, c as TextInputProps, i as ModalProps, n as FileUploadProps, o as ShortInput, r as Modal, s as TextInput, t as FileUpload } from "./Modal-CZT9MZsy.js";
|
|
10
|
+
import { a as OnSelectMenuKitSubmit, i as OnSelectMenuKitEnd, n as CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, o as SelectMenuKitPredicate, r as CommandKitSelectMenuBuilderOnEnd, t as CommandKitSelectMenuBuilderInteractionCollectorDispatch } from "./common-DnwCYit8.js";
|
|
11
|
+
import { n as StringSelectMenuKit, r as StringSelectMenuKitPredicate, t as OnStringSelectMenuKitSubmit } from "./StringSelectMenuKit-lVhUMc3g.js";
|
|
12
|
+
import { n as ChannelSelectMenuKitPredicate, r as OnChannelSelectMenuKitSubmit, t as ChannelSelectMenuKit } from "./ChannelSelectMenuKit-HQZ4hH5s.js";
|
|
13
|
+
import { n as MentionableSelectMenuKitPredicate, r as OnMentionableSelectMenuKitSubmit, t as MentionableSelectMenuKit } from "./MentionableSelectMenuKit-7URDUM3-.js";
|
|
14
|
+
import { n as UserSelectMenuKit, r as UserSelectMenuKitPredicate, t as OnUserSelectMenuKitSubmit } from "./UserSelectMenuKit-CCj4Fpkr.js";
|
|
15
|
+
import { n as RoleSelectMenuKit, r as RoleSelectMenuKitPredicate, t as OnRoleSelectMenuKitSubmit } from "./RoleSelectMenuKit-BY-JJ18w.js";
|
|
16
|
+
import { a as MentionableSelectMenu, c as RoleSelectMenu, d as StringSelectMenu, f as StringSelectMenuOption, g as UserSelectMenuProps, h as UserSelectMenu, i as CommonSelectMenuProps, l as RoleSelectMenuProps, m as StringSelectMenuProps, n as ChannelSelectMenuProps, o as MentionableSelectMenuProps, p as StringSelectMenuOptionProps, r as CommonBuilderKit, s as ResolveBuilderInteraction, t as ChannelSelectMenu, u as SelectMenuProps } from "./SelectMenu-q_b3Mjv9.js";
|
|
17
|
+
import { n as ContainerProps, t as Container } from "./container-DYcb7zGw.js";
|
|
18
|
+
import { n as FileProps, t as File } from "./file-CrV4lSnl.js";
|
|
19
|
+
import { i as MediaGalleryProps, n as MediaGalleryItem, r as MediaGalleryItemProps, t as MediaGallery } from "./media-gallery-Ci3I4ElH.js";
|
|
20
|
+
import { i as ThumbnailProps, n as SectionProps, r as Thumbnail, t as Section } from "./section-DkUKULnB.js";
|
|
21
|
+
import { n as SeparatorProps, t as Separator } from "./separator-CbXsIFCa.js";
|
|
22
|
+
import { n as TextDisplay, r as TextDisplayProps, t as StringEncodable } from "./text-display-D7j39VC-.js";
|
|
23
|
+
import { n as LabelProps, t as Label } from "./label-37kaNWMH.js";
|
|
24
|
+
import { a as PollProps, i as PollChildrenType, n as PollAnswer, o as PollQuestion, r as PollAnswerProps, s as PollQuestionProps, t as Poll } from "./poll-Ddtapd6n.js";
|
|
25
|
+
import { i as ParsedMessageCommand, n as MessageCommandOptionsSchema, r as MessageCommandParser, t as MessageCommandOptions } from "./MessageCommandParser-q3dQcE5N.js";
|
|
26
|
+
import { i as stopMiddlewares, n as rethrow, r as stopEvents, t as redirect } from "./signals-BbTgTc0i.js";
|
|
27
|
+
import { n as isInteractionSource, r as isMessageSource, t as CommandSource } from "./helpers-AQPLVY35.js";
|
|
28
|
+
import { a as ParsedCommandData, i as Middleware, n as CommandsRouter, r as CommandsRouterOptions, t as Command } from "./CommandsRouter-C7dZEepB.js";
|
|
29
|
+
import { i as ParsedEvent, n as EventsRouterOptions, r as EventsTree, t as EventsRouter } from "./EventsRouter-DZ37r54v.js";
|
|
30
|
+
import { a as COMMANDKIT_IS_TEST, i as COMMANDKIT_IS_DEV, n as COMMANDKIT_CWD, o as HMREventType, r as COMMANDKIT_IS_CLI, s as isBuildLikeEnvironment, t as COMMANDKIT_BOOTSTRAP_MODE } from "./constants-CuYW0K10.js";
|
|
31
|
+
import { EventWorkerContext, eventWorkerContext, getEventWorkerContext, isEventWorkerContext, runInEventWorkerContext } from "./app/events/EventWorkerContext.js";
|
|
32
|
+
import { defineConfig, getConfig } from "./config/config.js";
|
|
33
|
+
import { ILogger } from "./logger/ILogger.js";
|
|
34
|
+
import { DefaultLogger } from "./logger/DefaultLogger.js";
|
|
35
|
+
import { CommandKitLoggerOptions, Logger, LoggerImpl, createLogger } from "./logger/Logger.js";
|
|
36
|
+
import { version } from "./version.js";
|
|
37
|
+
import { debounce, defer, devOnly, getCurrentDirectory, getSourceDirectories } from "./utils/utilities.js";
|
|
38
|
+
import { emitWarning, warnDeprecated, warnUnstable } from "./utils/warning.js";
|
|
39
|
+
import { toFileURL } from "./utils/resolve-file-url.js";
|
|
40
|
+
import { CommandKitErrorCodes, isErrorType } from "./utils/error-codes.js";
|
|
44
41
|
import { Client, Collection } from "discord.js";
|
|
45
|
-
export { ActionRow, ActionRowProps, AnyCommandExecute, AnyCommandKitElement, AppCommand, AppCommandHandler, AppCommandNative, AsyncFunction, AutocompleteCommand, AutocompleteCommandContext, AutocompleteCommandMiddlewareContext, BootstrapFunction, Button, ButtonChildrenLike, ButtonKit, ButtonKitPredicate, ButtonProps, COMMANDKIT_BOOTSTRAP_MODE, COMMANDKIT_CWD, COMMANDKIT_IS_CLI, COMMANDKIT_IS_DEV, COMMANDKIT_IS_TEST, ChannelSelectMenu, ChannelSelectMenuKit, ChannelSelectMenuKitPredicate, ChannelSelectMenuProps, ChatInputCommand, ChatInputCommandContext, type Client, Collection, Command, CommandBuilderLike, CommandContext, CommandContextOptions, CommandData, CommandDataSchema, CommandDataSchemaKey, CommandDataSchemaValue, CommandExecutionMode, CommandFlagContext, CommandKit, CommandKitButtonBuilderInteractionCollectorDispatch, CommandKitButtonBuilderInteractionCollectorDispatchContextData, CommandKitButtonBuilderOnEnd, CommandKitConfiguration, CommandKitElement, CommandKitElementData, CommandKitEnvironment, type CommandKitEnvironmentInternalData, CommandKitEnvironmentType, CommandKitErrorCodes, CommandKitEventDispatch, type CommandKitHMREvent, CommandKitLoggerOptions, CommandKitModalBuilderInteractionCollectorDispatch, CommandKitModalBuilderInteractionCollectorDispatchContextData, CommandKitModalBuilderOnEnd, CommandKitOptions, CommandKitPlugin, CommandKitPluginRuntime, CommandKitSelectMenuBuilderInteractionCollectorDispatch, CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, CommandKitSelectMenuBuilderOnEnd, CommandMetadata, CommandMetadataFunction, CommandRegistrar, CommandSource, CommandTypeData, CommandsRouter, CommandsRouterOptions, CommonBuilderKit, CommonDirectiveTransformer, CommonDirectiveTransformerOptions, CommonPluginRuntime, CommonSelectMenuProps, CompilerPlugin, CompilerPluginRuntime, Container, ContainerProps, Context, ContextParameters, CustomAppCommandProps, CustomEvaluationContext, CustomEvaluationFunction, DecideFunction, DefaultLogger, ElementType, EvaluationContext, EventFlagContext, EventHandler, EventInterceptor, EventInterceptorContextData, EventInterceptorErrorHandler, EventWorkerContext, EventsRouter, EventsRouterOptions, EventsTree, FeatureFlag, FeatureFlagDefinition, File, FileProps, FlagRunner, Fragment, FragmentElementProps, GenericFunction, HMREventType, ILogger, IdentifyFunction, InteractionCommandContext, InteractionCommandMiddlewareContext, Label, LabelProps, LoadedCommand, Logger, LoggerImpl, MaybeArray, MaybeFalsey, MaybePromise, MediaGallery, MediaGalleryItem, MediaGalleryItemProps, MediaGalleryProps, MentionableSelectMenu, MentionableSelectMenuKit, MentionableSelectMenuKitPredicate, MentionableSelectMenuProps, MessageCommand, MessageCommandContext, MessageCommandMiddlewareContext, MessageCommandOptions, MessageCommandOptionsSchema, MessageCommandParser, MessageContextMenuCommand, MessageContextMenuCommandContext, MessageContextMenuCommandMiddlewareContext, Middleware, MiddlewareContext, MiddlewareContextArgs, Modal, ModalKit, ModalKitPredicate, ModalProps, OnButtonKitClick, OnButtonKitEnd, OnChannelSelectMenuKitSubmit, OnMentionableSelectMenuKitSubmit, OnModalKitEnd, OnModalKitSubmit, OnRoleSelectMenuKitSubmit, OnSelectMenuKitEnd, OnSelectMenuKitSubmit, OnStringSelectMenuKitSubmit, OnUserSelectMenuKitSubmit, ParagraphInput, ParsedCommandData, ParsedEvent, ParsedMessageCommand, PluginTransformParameters, Poll, PollAnswer, PollAnswerProps, PollChildrenType, PollProps, PollQuestion, PollQuestionProps, PreRegisterCommandsEvent, PreparedAppCommandExecution, ResolvableCommand, ResolveBuilderInteraction, RoleSelectMenu, RoleSelectMenuKit, RoleSelectMenuKitPredicate, RoleSelectMenuProps, RunCommand, RuntimePlugin, Section, SectionProps, SelectMenuKitPredicate, SelectMenuProps, Separator, SeparatorProps, ShortInput, SlashCommandMiddlewareContext, StringEncodable, StringSelectMenu, StringSelectMenuKit, StringSelectMenuKitPredicate, StringSelectMenuOption, StringSelectMenuOptionProps, StringSelectMenuProps, TemplateHandler, TextDisplay, TextDisplayProps, TextInput, TextInputProps, Thumbnail, ThumbnailProps, TransformedResult, UserContextMenuCommand, UserContextMenuCommandContext, UserContextMenuCommandMiddlewareContext, UserSelectMenu, UserSelectMenuKit, UserSelectMenuKitPredicate, UserSelectMenuProps,
|
|
42
|
+
export { ActionRow, ActionRowProps, AnyCommandExecute, AnyCommandKitElement, AppCommand, AppCommandHandler, AppCommandNative, AsyncFunction, AutocompleteCommand, AutocompleteCommandContext, AutocompleteCommandMiddlewareContext, BootstrapFunction, Button, ButtonChildrenLike, ButtonKit, ButtonKitPredicate, ButtonProps, COMMANDKIT_BOOTSTRAP_MODE, COMMANDKIT_CWD, COMMANDKIT_IS_CLI, COMMANDKIT_IS_DEV, COMMANDKIT_IS_TEST, ChannelSelectMenu, ChannelSelectMenuKit, ChannelSelectMenuKitPredicate, ChannelSelectMenuProps, ChatInputCommand, ChatInputCommandContext, type Client, Collection, Command, CommandBuilderLike, CommandContext, CommandContextOptions, CommandData, CommandDataSchema, CommandDataSchemaKey, CommandDataSchemaValue, CommandExecutionMode, CommandFlagContext, CommandKit, CommandKit as default, CommandKitButtonBuilderInteractionCollectorDispatch, CommandKitButtonBuilderInteractionCollectorDispatchContextData, CommandKitButtonBuilderOnEnd, CommandKitConfiguration, CommandKitElement, CommandKitElementData, CommandKitEnvironment, type CommandKitEnvironmentInternalData, CommandKitEnvironmentType, CommandKitErrorCodes, CommandKitEventDispatch, type CommandKitHMREvent, CommandKitLoggerOptions, CommandKitModalBuilderInteractionCollectorDispatch, CommandKitModalBuilderInteractionCollectorDispatchContextData, CommandKitModalBuilderOnEnd, CommandKitOptions, CommandKitPlugin, CommandKitPluginRuntime, CommandKitSelectMenuBuilderInteractionCollectorDispatch, CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData, CommandKitSelectMenuBuilderOnEnd, CommandMetadata, CommandMetadataFunction, CommandRegistrar, CommandSource, CommandTypeData, CommandsRouter, CommandsRouterOptions, CommonBuilderKit, CommonDirectiveTransformer, CommonDirectiveTransformerOptions, CommonPluginRuntime, CommonSelectMenuProps, CompilerPlugin, CompilerPluginRuntime, Container, ContainerProps, Context, ContextParameters, CustomAppCommandProps, CustomEvaluationContext, CustomEvaluationFunction, DecideFunction, DefaultLogger, ElementType, EvaluationContext, EventFlagContext, EventHandler, EventInterceptor, EventInterceptorContextData, EventInterceptorErrorHandler, EventWorkerContext, EventsRouter, EventsRouterOptions, EventsTree, FeatureFlag, FeatureFlagDefinition, File, FileProps, FileUpload, FileUploadProps, FlagRunner, Fragment, FragmentElementProps, GenericFunction, HMREventType, ILogger, IdentifyFunction, InteractionCommandContext, InteractionCommandMiddlewareContext, Label, LabelProps, LoadedCommand, Logger, LoggerImpl, MaybeArray, MaybeFalsey, MaybePromise, MediaGallery, MediaGalleryItem, MediaGalleryItemProps, MediaGalleryProps, MentionableSelectMenu, MentionableSelectMenuKit, MentionableSelectMenuKitPredicate, MentionableSelectMenuProps, MessageCommand, MessageCommandContext, MessageCommandMiddlewareContext, MessageCommandOptions, MessageCommandOptionsSchema, MessageCommandParser, MessageContextMenuCommand, MessageContextMenuCommandContext, MessageContextMenuCommandMiddlewareContext, Middleware, MiddlewareContext, MiddlewareContextArgs, Modal, ModalKit, ModalKitPredicate, ModalProps, OnButtonKitClick, OnButtonKitEnd, OnChannelSelectMenuKitSubmit, OnMentionableSelectMenuKitSubmit, OnModalKitEnd, OnModalKitSubmit, OnRoleSelectMenuKitSubmit, OnSelectMenuKitEnd, OnSelectMenuKitSubmit, OnStringSelectMenuKitSubmit, OnUserSelectMenuKitSubmit, ParagraphInput, ParsedCommandData, ParsedEvent, ParsedMessageCommand, PluginTransformParameters, Poll, PollAnswer, PollAnswerProps, PollChildrenType, PollProps, PollQuestion, PollQuestionProps, PreRegisterCommandsEvent, PreparedAppCommandExecution, ResolvableCommand, ResolveBuilderInteraction, RoleSelectMenu, RoleSelectMenuKit, RoleSelectMenuKitPredicate, RoleSelectMenuProps, RunCommand, RuntimePlugin, Section, SectionProps, SelectMenuKitPredicate, SelectMenuProps, Separator, SeparatorProps, ShortInput, SlashCommandMiddlewareContext, StringEncodable, StringSelectMenu, StringSelectMenuKit, StringSelectMenuKitPredicate, StringSelectMenuOption, StringSelectMenuOptionProps, StringSelectMenuProps, TemplateHandler, TextDisplay, TextDisplayProps, TextInput, TextInputProps, Thumbnail, ThumbnailProps, TransformedResult, UserContextMenuCommand, UserContextMenuCommandContext, UserContextMenuCommandMiddlewareContext, UserSelectMenu, UserSelectMenuKit, UserSelectMenuKitPredicate, UserSelectMenuProps, commandkit, createElement, createElement as jsx, createElement as jsxs, createLogger, debounce, defer, defineConfig, devOnly, emitWarning, eventWorkerContext, exitContext, flag, getCommandKit, getConfig, getContext, getCurrentDirectory, getElement, getEventWorkerContext, getSourceDirectories, isBuildLikeEnvironment, isCommandKitElement, isCommandWorkerContext, isCompilerPlugin, isErrorType, isEventWorkerContext, isInteractionSource, isMessageSource, isRuntimePlugin, makeContextAwareFunction, onApplicationBootstrap, onBootstrap, provideContext, redirect, rethrow, runInEventWorkerContext, setFlagProvider, stopEvents, stopMiddlewares, toFileURL, after as unstable_after, cancelAfter as unstable_cancelAfter, useEnvironment, useStore, version, warnDeprecated, warnUnstable };
|
package/dist/index.js
CHANGED
|
@@ -1,51 +1,41 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
const require_chunk = require('./chunk-
|
|
3
|
-
require('./colors-
|
|
4
|
-
const require_ActionRow = require('./ActionRow-
|
|
2
|
+
const require_chunk = require('./chunk-kSYXY2_d.js');
|
|
3
|
+
require('./colors-Csc0X4QJ.js');
|
|
4
|
+
const require_ActionRow = require('./ActionRow-CSN_UKmM.js');
|
|
5
5
|
const require_error_codes = require('./error-codes-Ds0bnPvT.js');
|
|
6
|
-
const require_commandkit = require('./commandkit-
|
|
7
|
-
require('./warning-CszH8HeS.js');
|
|
8
|
-
require('./
|
|
9
|
-
require('./
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const require_label = require('./label-D-uJWRZ0.js');
|
|
17
|
-
const require_poll = require('./poll-Bc6rjeUS.js');
|
|
6
|
+
const require_commandkit = require('./commandkit-SIjTLD2R.js');
|
|
7
|
+
const require_warning = require('./warning-CszH8HeS.js');
|
|
8
|
+
const require_container = require('./container-DCPljKVH.js');
|
|
9
|
+
const require_file = require('./file-Ca1kpEtE.js');
|
|
10
|
+
const require_media_gallery = require('./media-gallery-u3gjX7yD.js');
|
|
11
|
+
const require_section = require('./section-BC8LF-B2.js');
|
|
12
|
+
const require_separator = require('./separator-BUTiW7uz.js');
|
|
13
|
+
const require_text_display = require('./text-display-DANahMN3.js');
|
|
14
|
+
const require_label = require('./label-B6vXvwLM.js');
|
|
15
|
+
const require_poll = require('./poll-CFe8yvoJ.js');
|
|
18
16
|
require('./display-WDb9wMCv.js');
|
|
19
17
|
const require_element = require('./element-DibzzA5L.js');
|
|
20
|
-
require('./types-TC4g3w91.js');
|
|
21
18
|
const require_EventInterceptor = require('./EventInterceptor-BWoEJMHZ.js');
|
|
22
|
-
const require_constants = require('./constants-
|
|
23
|
-
require('./
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
require('./types-
|
|
27
|
-
|
|
28
|
-
require('./
|
|
29
|
-
require('./
|
|
30
|
-
require('./
|
|
31
|
-
require('./
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const require_helpers = require('./helpers-D2_1jih6.js');
|
|
35
|
-
const require_MessageCommandParser = require('./MessageCommandParser-CKh-tM97.js');
|
|
36
|
-
const require_CommandsRouter = require('./CommandsRouter-CWMipIis.js');
|
|
37
|
-
const require_EventsRouter = require('./EventsRouter-C04XqRKf.js');
|
|
19
|
+
const require_constants = require('./constants-CxkFFZ7p.js');
|
|
20
|
+
const require_CompilerPlugin = require('./CompilerPlugin-CUsGAfgl.js');
|
|
21
|
+
const require_RuntimePlugin = require('./RuntimePlugin-CtobluSU.js');
|
|
22
|
+
const require_resolve_file_url = require('./resolve-file-url-CdHqwWs3.js');
|
|
23
|
+
require('./types-package-CsTNfvv2.js');
|
|
24
|
+
require('./constants-Cw8VjCVz.js');
|
|
25
|
+
const require_EventWorkerContext = require('./EventWorkerContext-Dfhgv329.js');
|
|
26
|
+
const require_signals = require('./signals-B8z1wJ6W.js');
|
|
27
|
+
const require_helpers = require('./helpers-Btx1FSZx.js');
|
|
28
|
+
const require_MessageCommandParser = require('./MessageCommandParser-Bs9fimmd.js');
|
|
29
|
+
const require_CommandsRouter = require('./CommandsRouter-C_HLsrGX.js');
|
|
30
|
+
const require_EventsRouter = require('./EventsRouter-DZYIha6m.js');
|
|
38
31
|
require('./router-BvamdzoF.js');
|
|
39
|
-
require('./common-
|
|
40
|
-
require('./
|
|
41
|
-
require('./
|
|
42
|
-
require('./
|
|
43
|
-
require('./
|
|
44
|
-
const
|
|
45
|
-
const require_feature_flags = require('./feature-flags-BoBV4Dsj.js');
|
|
46
|
-
const require_init = require('./init-CBb0StSB.js');
|
|
32
|
+
require('./common-DSRs_mfw.js');
|
|
33
|
+
require('./store-D8r_hryO.js');
|
|
34
|
+
require('./app/index.js');
|
|
35
|
+
require('./logger/ILogger.js');
|
|
36
|
+
const require_version = require('./version.js');
|
|
37
|
+
const require_flags_feature_flags = require('./flags/feature-flags.js');
|
|
47
38
|
let discord_js = require("discord.js");
|
|
48
|
-
discord_js = require_chunk.__toESM(discord_js);
|
|
49
39
|
|
|
50
40
|
//#region src/index.ts
|
|
51
41
|
var src_default = require_commandkit.CommandKit;
|
|
@@ -85,8 +75,9 @@ exports.DefaultLogger = require_commandkit.DefaultLogger;
|
|
|
85
75
|
exports.ElementType = require_element.ElementType;
|
|
86
76
|
exports.EventInterceptor = require_EventInterceptor.EventInterceptor;
|
|
87
77
|
exports.EventsRouter = require_EventsRouter.EventsRouter;
|
|
88
|
-
exports.FeatureFlag =
|
|
78
|
+
exports.FeatureFlag = require_flags_feature_flags.FeatureFlag;
|
|
89
79
|
exports.File = require_file.File;
|
|
80
|
+
exports.FileUpload = require_commandkit.FileUpload;
|
|
90
81
|
exports.Fragment = require_element.Fragment;
|
|
91
82
|
exports.HMREventType = require_constants.HMREventType;
|
|
92
83
|
exports.Label = require_label.Label;
|
|
@@ -118,7 +109,6 @@ exports.TextInput = require_commandkit.TextInput;
|
|
|
118
109
|
exports.Thumbnail = require_section.Thumbnail;
|
|
119
110
|
exports.UserSelectMenu = require_commandkit.UserSelectMenu;
|
|
120
111
|
exports.UserSelectMenuKit = require_commandkit.UserSelectMenuKit;
|
|
121
|
-
exports.bootstrapCommandkitCLI = require_init.bootstrapCommandkitCLI;
|
|
122
112
|
exports.commandkit = require_commandkit.commandkit;
|
|
123
113
|
exports.createElement = require_element.createElement;
|
|
124
114
|
exports.jsx = require_element.createElement;
|
|
@@ -129,9 +119,10 @@ exports.default = src_default;
|
|
|
129
119
|
exports.defer = require_commandkit.defer;
|
|
130
120
|
exports.defineConfig = require_commandkit.defineConfig;
|
|
131
121
|
exports.devOnly = require_commandkit.devOnly;
|
|
122
|
+
exports.emitWarning = require_warning.emitWarning;
|
|
132
123
|
exports.eventWorkerContext = require_EventWorkerContext.eventWorkerContext;
|
|
133
124
|
exports.exitContext = require_commandkit.exitContext;
|
|
134
|
-
exports.flag =
|
|
125
|
+
exports.flag = require_flags_feature_flags.flag;
|
|
135
126
|
exports.getCommandKit = require_commandkit.getCommandKit;
|
|
136
127
|
exports.getConfig = require_commandkit.getConfig;
|
|
137
128
|
exports.getContext = require_commandkit.getContext;
|
|
@@ -139,6 +130,7 @@ exports.getCurrentDirectory = require_commandkit.getCurrentDirectory;
|
|
|
139
130
|
exports.getElement = require_element.getElement;
|
|
140
131
|
exports.getEventWorkerContext = require_EventWorkerContext.getEventWorkerContext;
|
|
141
132
|
exports.getSourceDirectories = require_commandkit.getSourceDirectories;
|
|
133
|
+
exports.isBuildLikeEnvironment = require_constants.isBuildLikeEnvironment;
|
|
142
134
|
exports.isCommandKitElement = require_element.isCommandKitElement;
|
|
143
135
|
exports.isCommandWorkerContext = require_commandkit.isCommandWorkerContext;
|
|
144
136
|
exports.isCompilerPlugin = require_CompilerPlugin.isCompilerPlugin;
|
|
@@ -154,7 +146,7 @@ exports.provideContext = require_commandkit.provideContext;
|
|
|
154
146
|
exports.redirect = require_signals.redirect;
|
|
155
147
|
exports.rethrow = require_signals.rethrow;
|
|
156
148
|
exports.runInEventWorkerContext = require_EventWorkerContext.runInEventWorkerContext;
|
|
157
|
-
exports.setFlagProvider =
|
|
149
|
+
exports.setFlagProvider = require_flags_feature_flags.setFlagProvider;
|
|
158
150
|
exports.stopEvents = require_signals.stopEvents;
|
|
159
151
|
exports.stopMiddlewares = require_signals.stopMiddlewares;
|
|
160
152
|
exports.toFileURL = require_resolve_file_url.toFileURL;
|
|
@@ -163,4 +155,6 @@ exports.unstable_cancelAfter = require_commandkit.cancelAfter;
|
|
|
163
155
|
exports.useEnvironment = require_commandkit.useEnvironment;
|
|
164
156
|
exports.useStore = require_commandkit.useStore;
|
|
165
157
|
exports.version = require_version.version;
|
|
158
|
+
exports.warnDeprecated = require_warning.warnDeprecated;
|
|
159
|
+
exports.warnUnstable = require_warning.warnUnstable;
|
|
166
160
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { CommandKit } from './commandkit';\n\nexport default CommandKit;\n\nexport * from './commandkit';\nexport * from './components';\nexport * from './components/common/EventInterceptor';\nexport * from './config/config';\nexport * from './context/async-context';\nexport {\n type CommandKitEnvironmentInternalData,\n CommandKitEnvironment,\n CommandKitEnvironmentType,\n cancelAfter as unstable_cancelAfter,\n after as unstable_after,\n} from './context/environment';\nexport * from './app/index';\nexport * from './logger/DefaultLogger';\nexport * from './logger/ILogger';\nexport * from './logger/Logger';\nexport * from './app/router/index';\nexport type * from './types';\nexport * from './version';\nexport * from './plugins/index';\nexport * from './flags/feature-flags';\nexport {\n getCurrentDirectory,\n getSourceDirectories,\n devOnly,\n debounce,\n defer,\n} from './utils/utilities';\nexport { toFileURL } from './utils/resolve-file-url';\nexport * from './app/interrupt/signals';\nexport type { CommandKitHMREvent } from './utils/dev-hooks';\nexport * from './utils/constants';\nexport * from './app/events/EventWorkerContext';\nexport { CommandKitErrorCodes, isErrorType } from './utils/error-codes';\nexport { Collection, type Client } from 'discord.js';\n
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { CommandKit } from './commandkit';\n\nexport default CommandKit;\n\nexport * from './commandkit';\nexport * from './components';\nexport * from './components/common/EventInterceptor';\nexport * from './config/config';\nexport * from './context/async-context';\nexport {\n type CommandKitEnvironmentInternalData,\n CommandKitEnvironment,\n CommandKitEnvironmentType,\n cancelAfter as unstable_cancelAfter,\n after as unstable_after,\n} from './context/environment';\nexport * from './app/index';\nexport * from './logger/DefaultLogger';\nexport * from './logger/ILogger';\nexport * from './logger/Logger';\nexport * from './app/router/index';\nexport type * from './types';\nexport * from './version';\nexport * from './plugins/index';\nexport * from './flags/feature-flags';\nexport {\n getCurrentDirectory,\n getSourceDirectories,\n devOnly,\n debounce,\n defer,\n} from './utils/utilities';\nexport { warnDeprecated, emitWarning, warnUnstable } from './utils/warning';\nexport { toFileURL } from './utils/resolve-file-url';\nexport * from './app/interrupt/signals';\nexport type { CommandKitHMREvent } from './utils/dev-hooks';\nexport * from './utils/constants';\nexport * from './app/events/EventWorkerContext';\nexport { CommandKitErrorCodes, isErrorType } from './utils/error-codes';\nexport { Collection, type Client } from 'discord.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,kBAAe"}
|
package/dist/kv/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SerializerType } from "../constants-
|
|
1
|
+
import { t as SerializerType } from "../constants-EpKcj0dH.js";
|
|
2
2
|
export { SerializerType };
|