commandkit 1.2.0-rc.10 → 1.2.0-rc.12
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 +684 -0
- package/dist/{ActionRow-DKnFVDME.d.ts → ActionRow-B-7n9MMr.d.ts} +3 -3
- package/dist/{ActionRow-CbdGFWMT.js → ActionRow-uJxU4UGo.js} +2 -2
- package/dist/ActionRow-uJxU4UGo.js.map +1 -0
- package/dist/{Button-4ZUXdA56.d.ts → Button-RMp-w8HV.d.ts} +4 -4
- package/dist/{ButtonKit-C7r7RPNf.d.ts → ButtonKit-9k4yfhYD.d.ts} +2 -2
- package/dist/{ChannelSelectMenuKit-BrXvBYNH.d.ts → ChannelSelectMenuKit-CsYgIyKe.d.ts} +3 -3
- package/dist/{CommandKitEventsChannel-BtRzr3Tz.js → CommandKitEventsChannel-2l9Za-le.js} +1 -1
- package/dist/{CommandKitEventsChannel-BtRzr3Tz.js.map → CommandKitEventsChannel-2l9Za-le.js.map} +1 -1
- package/dist/{CommandsRouter-CoOA7hkf.d.ts → CommandsRouter-CBdsqaWK.d.ts} +1 -1
- package/dist/{CommandsRouter-Dmzw-ikm.js → CommandsRouter-CWMipIis.js} +1 -1
- package/dist/{CommandsRouter-Dmzw-ikm.js.map → CommandsRouter-CWMipIis.js.map} +1 -1
- package/dist/{CompilerPlugin-M8r3yNAl.js → CompilerPlugin-CZ4412Zm.js} +2 -2
- package/dist/{CompilerPlugin-M8r3yNAl.js.map → CompilerPlugin-CZ4412Zm.js.map} +1 -1
- package/dist/{DefaultLogger-XCOl5nLd.d.ts → DefaultLogger-CHMVsizQ.d.ts} +2 -2
- package/dist/{EventInterceptor-CQEXyUTp.js → EventInterceptor-BWoEJMHZ.js} +1 -1
- package/dist/{EventInterceptor-CQEXyUTp.js.map → EventInterceptor-BWoEJMHZ.js.map} +1 -1
- package/dist/{EventWorkerContext-DNWfsE1t.d.ts → EventWorkerContext-CLhZRHhH.d.ts} +3 -3
- package/dist/{EventWorkerContext-Dq29tieI.js → EventWorkerContext-D_9q1Bm2.js} +1 -1
- package/dist/EventWorkerContext-D_9q1Bm2.js.map +1 -0
- package/dist/{EventsRouter-BacqK6z3.d.ts → EventsRouter-4pT6vj-U.d.ts} +1 -1
- package/dist/{EventsRouter-3Gygh-km.js → EventsRouter-C04XqRKf.js} +1 -1
- package/dist/{EventsRouter-3Gygh-km.js.map → EventsRouter-C04XqRKf.js.map} +1 -1
- package/dist/{ILogger-BW8GM-YZ.d.ts → ILogger-BQ2ew4zR.d.ts} +1 -1
- package/dist/{Logger-DyfkPk7u.d.ts → Logger-DyV7oli4.d.ts} +2 -2
- package/dist/{MentionableSelectMenuKit-CPTKqx-O.d.ts → MentionableSelectMenuKit-CO9phWMf.d.ts} +3 -3
- package/dist/{MessageCommandParser-Dl0xxtdr.js → MessageCommandParser-CKh-tM97.js} +52 -53
- package/dist/{MessageCommandParser-Dl0xxtdr.js.map → MessageCommandParser-CKh-tM97.js.map} +1 -1
- package/dist/{MessageCommandParser-BsGMOTDo.d.ts → MessageCommandParser-DEOl_ifb.d.ts} +1 -1
- package/dist/{Modal-C6UTRdYQ.d.ts → Modal-Calb46SJ.d.ts} +11 -8
- package/dist/{ModalKit-Btz58KYn.d.ts → ModalKit-Cq2ns6jv.d.ts} +2 -2
- package/dist/{PluginCommon-Cvl5yYM_.js → PluginCommon-CPWV5xuX.js} +1 -1
- package/dist/{PluginCommon-Cvl5yYM_.js.map → PluginCommon-CPWV5xuX.js.map} +1 -1
- package/dist/{RoleSelectMenuKit-C26lU3sN.d.ts → RoleSelectMenuKit-DvBxzpWh.d.ts} +3 -3
- package/dist/{RuntimePlugin-BUecuBIU.js → RuntimePlugin-COeXe8rP.js} +2 -2
- package/dist/{RuntimePlugin-BUecuBIU.js.map → RuntimePlugin-COeXe8rP.js.map} +1 -1
- package/dist/{SelectMenu-Diy87_ba.d.ts → SelectMenu-VcDhOGoJ.d.ts} +8 -8
- package/dist/{StringSelectMenuKit-Bhs8U6WI.d.ts → StringSelectMenuKit-CJ0MzUZJ.d.ts} +3 -3
- package/dist/{UserSelectMenuKit-CfqFJdxz.d.ts → UserSelectMenuKit-C_J-9RJs.d.ts} +3 -3
- package/dist/analytics/analytics-engine.d.ts +31 -29
- package/dist/analytics/analytics-engine.js +37 -34
- package/dist/analytics/analytics-provider.d.ts +31 -29
- package/dist/analytics/constants.js +1 -1
- package/dist/analytics/utils.js +37 -34
- package/dist/{analytics-engine-jVeSoxEk.d.ts → analytics-engine-NOInIjv8.d.ts} +30 -24
- package/dist/app/commands/AppCommandRunner.d.ts +31 -29
- package/dist/app/commands/AppCommandRunner.js +37 -34
- package/dist/app/commands/Context.d.ts +31 -29
- package/dist/app/commands/Context.js +37 -34
- package/dist/app/commands/MessageCommandParser.d.ts +1 -1
- package/dist/app/commands/MessageCommandParser.js +1 -1
- package/dist/app/commands/helpers.d.ts +1 -1
- package/dist/app/commands/helpers.js +1 -1
- package/dist/app/events/EventWorkerContext.d.ts +32 -30
- package/dist/app/events/EventWorkerContext.js +1 -1
- package/dist/app/handlers/AppCommandHandler.d.ts +31 -29
- package/dist/app/handlers/AppCommandHandler.js +37 -34
- package/dist/app/handlers/AppEventsHandler.d.ts +31 -29
- package/dist/app/handlers/AppEventsHandler.js +37 -34
- package/dist/app/index.d.ts +31 -29
- package/dist/app/index.js +38 -35
- package/dist/app/interrupt/signals.d.ts +1 -1
- package/dist/app/interrupt/signals.js +2 -2
- package/dist/app/middlewares/permissions.d.ts +31 -29
- package/dist/app/middlewares/permissions.js +37 -34
- package/dist/app/register/CommandRegistrar.d.ts +31 -29
- package/dist/app/register/CommandRegistrar.js +37 -34
- 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 +3 -3
- package/dist/app/router/index.js +3 -3
- package/dist/{app-process-cj2vF12T.js → app-process-AQ3Cbf6j.js} +4 -4
- package/dist/app-process-AQ3Cbf6j.js.map +1 -0
- package/dist/{build-DB_aX5xt.js → build-BYMHMOl_.js} +11 -12
- package/dist/{build-DB_aX5xt.js.map → build-BYMHMOl_.js.map} +1 -1
- package/dist/cli/app-process.js +5 -5
- package/dist/cli/build.d.ts +31 -29
- package/dist/cli/build.js +40 -37
- package/dist/cli/common.d.ts +31 -29
- package/dist/cli/common.js +3 -3
- package/dist/cli/development.js +41 -38
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/env.js +1 -1
- package/dist/cli/generators.js +3 -3
- package/dist/cli/information.js +2 -2
- package/dist/cli/init.d.ts +1 -1
- package/dist/cli/init.js +38 -35
- package/dist/cli/production.js +43 -41
- package/dist/cli/production.js.map +1 -1
- package/dist/cli/type-checker.js +4 -4
- package/dist/cli/utils.js +1 -1
- package/dist/{commandkit-lhbfAyX9.js → commandkit-DabqpQ6v.js} +110 -69
- package/dist/commandkit-DabqpQ6v.js.map +1 -0
- package/dist/commandkit.d.ts +31 -29
- package/dist/commandkit.js +37 -34
- package/dist/{common-vnMIelAE.js → common-CCx-FJI4.js} +3 -3
- package/dist/common-CCx-FJI4.js.map +1 -0
- package/dist/{common-DOCvOVC4.d.ts → common-DHTTnX82.d.ts} +2 -2
- package/dist/{common-CrqwC-sx.js → common-fIO6fqGZ.js} +4 -5
- package/dist/{common-CrqwC-sx.js.map → common-fIO6fqGZ.js.map} +1 -1
- package/dist/components/common/EventInterceptor.js +1 -1
- package/dist/components/common/element.d.ts +3 -3
- package/dist/components/common/element.js +1 -1
- package/dist/components/common/types.js +1 -1
- package/dist/components/{v2 → display}/common.d.ts +1 -1
- package/dist/components/display/common.js +3 -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/components/display/file.js +3 -0
- package/dist/components/display/index.d.ts +10 -0
- package/dist/components/display/index.js +23 -0
- package/dist/components/display/label.d.ts +2 -0
- package/dist/components/display/label.js +4 -0
- package/dist/components/{v2 → display}/media-gallery.d.ts +1 -1
- package/dist/components/{v2 → display}/media-gallery.js +2 -2
- package/dist/components/display/poll.d.ts +2 -0
- package/dist/components/display/poll.js +5 -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/components/display/separator.js +3 -0
- package/dist/components/display/text-display.d.ts +2 -0
- package/dist/components/display/text-display.js +3 -0
- package/dist/components/index.d.ts +25 -23
- package/dist/components/index.js +41 -35
- package/dist/components/interactive/action-row/ActionRow.d.ts +6 -0
- package/dist/components/interactive/action-row/ActionRow.js +3 -0
- package/dist/components/interactive/button/Button.d.ts +7 -0
- package/dist/components/interactive/button/Button.js +41 -0
- package/dist/components/{v1 → interactive}/button/ButtonKit.d.ts +1 -1
- package/dist/components/interactive/button/ButtonKit.js +41 -0
- package/dist/components/{v1 → interactive}/modal/Modal.d.ts +4 -4
- package/dist/components/interactive/modal/Modal.js +44 -0
- package/dist/components/{v1 → interactive}/modal/ModalKit.d.ts +1 -1
- package/dist/components/interactive/modal/ModalKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/ChannelSelectMenuKit.d.ts +2 -2
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/MentionableSelectMenuKit.d.ts +2 -2
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/RoleSelectMenuKit.d.ts +2 -2
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/SelectMenu.d.ts +7 -7
- package/dist/components/interactive/select-menu/SelectMenu.js +46 -0
- package/dist/components/{v1 → interactive}/select-menu/StringSelectMenuKit.d.ts +2 -2
- package/dist/components/interactive/select-menu/StringSelectMenuKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/UserSelectMenuKit.d.ts +2 -2
- package/dist/components/interactive/select-menu/UserSelectMenuKit.js +41 -0
- package/dist/components/{v1 → interactive}/select-menu/common.d.ts +1 -1
- package/dist/components/interactive/select-menu/common.js +1 -0
- package/dist/config/config.d.ts +32 -30
- package/dist/config/config.js +37 -34
- package/dist/config/default.d.ts +31 -29
- package/dist/config/default.js +37 -34
- package/dist/config/loader.d.ts +31 -29
- package/dist/config/loader.js +37 -34
- package/dist/config/types.d.ts +31 -29
- package/dist/config/utils.d.ts +31 -29
- package/dist/config/utils.js +1 -1
- package/dist/{config-YAQdMBqh.d.ts → config-DbgXt6mf.d.ts} +2 -2
- package/dist/{constants-4oxxvaJA.js → constants-AH-9qJ89.js} +1 -1
- package/dist/{constants-4oxxvaJA.js.map → constants-AH-9qJ89.js.map} +1 -1
- package/dist/{constants-B5_Ta7PR.js → constants-BMWH2YUr.js} +1 -1
- package/dist/{constants-B5_Ta7PR.js.map → constants-BMWH2YUr.js.map} +1 -1
- package/dist/{constants-D8PMA9on.d.ts → constants-CCFSX2NG.d.ts} +1 -1
- package/dist/{constants-BOOGN85p.js → constants-D0dawKxO.js} +1 -1
- package/dist/{constants-BOOGN85p.js.map → constants-D0dawKxO.js.map} +1 -1
- package/dist/{constants-MKu-Q1jh.d.ts → constants-DqnSDZ6l.d.ts} +1 -1
- package/dist/{container-DHBELeJ3.d.ts → container-1ltvkavy.d.ts} +2 -2
- package/dist/{container-C6GtfAPW.js → container-DC0eQigs.js} +3 -3
- package/dist/container-DC0eQigs.js.map +1 -0
- package/dist/context/async-context.d.ts +31 -29
- package/dist/context/async-context.js +37 -34
- package/dist/context/environment.d.ts +31 -29
- package/dist/context/environment.js +37 -34
- package/dist/{dotprops-tnhpnszJ.js → dotprops-DvJUE8fw.js} +1 -1
- package/dist/{dotprops-tnhpnszJ.js.map → dotprops-DvJUE8fw.js.map} +1 -1
- package/dist/{element-CAXu1XtK.d.ts → element-CvNhvLZ8.d.ts} +3 -3
- package/dist/{element-Bak9llw_.js → element-DibzzA5L.js} +1 -1
- package/dist/element-DibzzA5L.js.map +1 -0
- package/dist/{env-_68PRRoA.js → env-8yY-6pbC.js} +1 -1
- package/dist/{env-_68PRRoA.js.map → env-8yY-6pbC.js.map} +1 -1
- package/dist/{error-codes-B4TyW4Ct.d.ts → error-codes-BiNRVMiV.d.ts} +1 -1
- package/dist/events/CommandKitEventsChannel.d.ts +31 -29
- package/dist/events/CommandKitEventsChannel.js +1 -1
- package/dist/{feature-flags-DnnKABHf.js → feature-flags-BoBV4Dsj.js} +4 -4
- package/dist/feature-flags-BoBV4Dsj.js.map +1 -0
- package/dist/{file-DVOELoNv.js → file-DAUOZYhC.js} +2 -2
- package/dist/file-DAUOZYhC.js.map +1 -0
- package/dist/{file-DTrr-p09.d.ts → file-n2yl_-vl.d.ts} +2 -2
- package/dist/flags/FlagProvider.d.ts +31 -29
- package/dist/flags/feature-flags.d.ts +31 -29
- package/dist/flags/feature-flags.js +38 -35
- package/dist/flags/store.d.ts +31 -29
- package/dist/flags/store.js +1 -1
- package/dist/{helpers-Dl8wW6aO.js → helpers-D2_1jih6.js} +1 -1
- package/dist/{helpers-Dl8wW6aO.js.map → helpers-D2_1jih6.js.map} +1 -1
- package/dist/{helpers-Wg6P5fRQ.d.ts → helpers-hDh_tMb6.d.ts} +1 -1
- package/dist/index.d.ts +42 -40
- package/dist/index.js +46 -39
- package/dist/index.js.map +1 -1
- package/dist/{init-CY7OJPF-.js → init-CBb0StSB.js} +11 -15
- package/dist/{init-CY7OJPF-.js.map → init-CBb0StSB.js.map} +1 -1
- package/dist/{init-DOr-Y3GQ.d.ts → init-DSYckXwx.d.ts} +1 -1
- package/dist/kv/constants.d.ts +1 -1
- package/dist/kv/constants.js +1 -1
- package/dist/kv/dotprops.js +1 -1
- package/dist/kv/kv.d.ts +2 -2
- package/dist/kv/kv.js +5 -7
- package/dist/kv/kv.js.map +1 -1
- package/dist/kv/serde.d.ts +2 -2
- package/dist/kv/serde.js +2 -2
- package/dist/label-D-uJWRZ0.js +36 -0
- package/dist/label-D-uJWRZ0.js.map +1 -0
- package/dist/label-D0KXeBhk.d.ts +29 -0
- package/dist/logger/DefaultLogger.d.ts +2 -2
- package/dist/logger/DefaultLogger.js +37 -34
- package/dist/logger/ILogger.d.ts +1 -1
- package/dist/logger/ILogger.js +1 -1
- package/dist/logger/Logger.d.ts +2 -2
- package/dist/logger/Logger.js +37 -34
- package/dist/logger/NoopLogger.d.ts +1 -1
- package/dist/{media-gallery-zDtJ3kxb.js → media-gallery-BLhwe5lO.js} +3 -3
- package/dist/media-gallery-BLhwe5lO.js.map +1 -0
- package/dist/{media-gallery-BMsXSot3.d.ts → media-gallery-BzG70ued.d.ts} +2 -2
- package/dist/plugins/CompilerPlugin.d.ts +31 -29
- package/dist/plugins/CompilerPlugin.js +2 -2
- package/dist/plugins/PluginCommon.d.ts +31 -29
- package/dist/plugins/PluginCommon.js +1 -1
- package/dist/plugins/RuntimePlugin.d.ts +31 -29
- package/dist/plugins/RuntimePlugin.js +2 -2
- package/dist/plugins/index.d.ts +31 -29
- package/dist/plugins/index.js +37 -34
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +31 -29
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +37 -34
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +31 -29
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +37 -34
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +31 -29
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +37 -34
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +31 -29
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +37 -34
- package/dist/plugins/plugin-runtime/runtime.d.ts +31 -29
- package/dist/plugins/plugin-runtime/runtime.js +1 -1
- package/dist/plugins/types.d.ts +31 -29
- package/dist/plugins/types.js +1 -1
- package/dist/poll-Bc6rjeUS.js +101 -0
- package/dist/poll-Bc6rjeUS.js.map +1 -0
- package/dist/poll-HnaJcB0o.d.ts +89 -0
- package/dist/{resolve-file-url-ChIyw-Vf.js → resolve-file-url-CJoD0FAn.js} +1 -1
- package/dist/{resolve-file-url-ChIyw-Vf.js.map → resolve-file-url-CJoD0FAn.js.map} +1 -1
- package/dist/{resolve-file-url-yO8bUxok.d.ts → resolve-file-url-DFtR8jRR.d.ts} +1 -1
- package/dist/{section-DlvrDoJK.js → section-BMcHN97i.js} +3 -3
- package/dist/section-BMcHN97i.js.map +1 -0
- package/dist/{section-Dh_FhPeC.d.ts → section-BOaJKXiy.d.ts} +2 -2
- package/dist/{separator-DL6QH5H1.js → separator-C___2K-f.js} +2 -2
- package/dist/separator-C___2K-f.js.map +1 -0
- package/dist/{separator-CMf6Cyy5.d.ts → separator-Cb7-6T6N.d.ts} +2 -2
- package/dist/{serde-BYaKrsOV.d.ts → serde-D4H23l2F.d.ts} +2 -2
- package/dist/{serde-Cc8iUa9J.js → serde-DHHwhltz.js} +2 -2
- package/dist/{serde-Cc8iUa9J.js.map → serde-DHHwhltz.js.map} +1 -1
- package/dist/{signals-ChFMD7mB.js → signals-Cnqe9dFV.js} +2 -2
- package/dist/{signals-ChFMD7mB.js.map → signals-Cnqe9dFV.js.map} +1 -1
- package/dist/{signals-SHg7J1U_.d.ts → signals-DBS60vTo.d.ts} +1 -1
- package/dist/{store-CM6pWVZh.js → store-ZwL2gN6a.js} +1 -1
- package/dist/{store-CM6pWVZh.js.map → store-ZwL2gN6a.js.map} +1 -1
- package/dist/{text-display-DRw3r_lK.d.ts → text-display-B_hpz50P.d.ts} +2 -2
- package/dist/{text-display-DbMumig_.js → text-display-BtQR88kY.js} +2 -2
- package/dist/text-display-BtQR88kY.js.map +1 -0
- package/dist/{type-checker-ocNSZh0W.js → type-checker-CEFHoQoV.js} +2 -2
- package/dist/{type-checker-ocNSZh0W.js.map → type-checker-CEFHoQoV.js.map} +1 -1
- package/dist/{types-package-BWArjyBF.js → types-package-D11rQXLs.js} +3 -4
- package/dist/{types-package-BWArjyBF.js.map → types-package-D11rQXLs.js.map} +1 -1
- package/dist/types.d.ts +32 -30
- package/dist/{utilities-DtdPlr4c.d.ts → utilities-CQUaua43.d.ts} +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/dev-hooks.d.ts +31 -29
- package/dist/utils/dev-hooks.js +37 -34
- package/dist/utils/error-codes.d.ts +1 -1
- package/dist/utils/resolve-file-url.d.ts +1 -1
- package/dist/utils/resolve-file-url.js +1 -1
- package/dist/utils/types-package.js +2 -2
- package/dist/utils/useful-stuff/async-queue.js +1 -2
- package/dist/utils/useful-stuff/async-queue.js.map +1 -1
- package/dist/utils/useful-stuff/ratelimiter.js +1 -2
- package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
- package/dist/utils/useful-stuff/semaphore.js +1 -3
- package/dist/utils/useful-stuff/semaphore.js.map +1 -1
- package/dist/utils/utilities.d.ts +1 -1
- package/dist/utils/utilities.js +37 -34
- package/dist/utils/{warn-unstable.d.ts → warning.d.ts} +12 -3
- package/dist/utils/warning.js +5 -0
- package/dist/{utils-DCSnVAZ6.js → utils-Bf-3Eevb.js} +1 -1
- package/dist/{utils-DCSnVAZ6.js.map → utils-Bf-3Eevb.js.map} +1 -1
- package/dist/{utils-KsNof0Xz.js → utils-Br3eenD1.js} +1 -1
- package/dist/{utils-KsNof0Xz.js.map → utils-Br3eenD1.js.map} +1 -1
- package/dist/{version-BCILNeQb.js → version-DC4j2ZwU.js} +2 -2
- package/dist/{version-BCILNeQb.js.map → version-DC4j2ZwU.js.map} +1 -1
- package/dist/{version-CtJtBJXI.d.ts → version-DggMfP_1.d.ts} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/warning-CszH8HeS.js +53 -0
- package/dist/warning-CszH8HeS.js.map +1 -0
- package/package.json +4 -4
- package/LICENSE +0 -5
- package/dist/ActionRow-CbdGFWMT.js.map +0 -1
- package/dist/EventWorkerContext-Dq29tieI.js.map +0 -1
- package/dist/app-process-cj2vF12T.js.map +0 -1
- package/dist/commandkit-lhbfAyX9.js.map +0 -1
- 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.js +0 -38
- package/dist/components/v1/modal/Modal.js +0 -41
- package/dist/components/v1/modal/ModalKit.js +0 -38
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/RoleSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/SelectMenu.js +0 -43
- package/dist/components/v1/select-menu/StringSelectMenuKit.js +0 -38
- package/dist/components/v1/select-menu/UserSelectMenuKit.js +0 -38
- 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/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/container-C6GtfAPW.js.map +0 -1
- package/dist/element-Bak9llw_.js.map +0 -1
- package/dist/feature-flags-DnnKABHf.js.map +0 -1
- package/dist/file-DVOELoNv.js.map +0 -1
- package/dist/media-gallery-zDtJ3kxb.js.map +0 -1
- package/dist/section-DlvrDoJK.js.map +0 -1
- package/dist/separator-DL6QH5H1.js.map +0 -1
- package/dist/text-display-DbMumig_.js.map +0 -1
- package/dist/utils/warn-unstable.js +0 -26
- package/dist/utils/warn-unstable.js.map +0 -1
- /package/dist/{ILogger-dQ7Y9X1f.js → ILogger-B0q7p7L1.js} +0 -0
- /package/dist/{app-HN1cVg8J.js → app-CrjK9yWX.js} +0 -0
- /package/dist/{common-CcfjYnPG.js → common-0Iw8ZeM6.js} +0 -0
- /package/dist/{router-Dn35v30f.js → display-WDb9wMCv.js} +0 -0
- /package/dist/{index-CUPkUUOR.d.ts → index-B5F3AfVc.d.ts} +0 -0
- /package/dist/{index-Dw5cCt-A.d.ts → index-BLwMeReG.d.ts} +0 -0
- /package/dist/{index-E7Wvm5uX.d.ts → index-h64gcVNJ.d.ts} +0 -0
- /package/dist/{runtime-DB9CiPfe.js → router-BvamdzoF.js} +0 -0
- /package/dist/{types-CUZOquUl.js → runtime-Skt5NiOc.js} +0 -0
- /package/dist/{types-q0Nm882H.js → types-Cdh4uaFR.js} +0 -0
- /package/dist/{v2-DofkPKHs.js → types-TC4g3w91.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-DC0eQigs.js","names":[],"sources":["../src/components/display/container.ts"],"sourcesContent":["import {\n ActionRowBuilder,\n ColorResolvable,\n ComponentBuilder,\n ContainerBuilder,\n ContainerComponentData,\n FileBuilder,\n MediaGalleryBuilder,\n resolveColor,\n SectionBuilder,\n SeparatorBuilder,\n TextDisplayBuilder,\n} from 'discord.js';\nimport { applyId } from './common';\n\n/**\n * Represents the properties for a container component.\n */\nexport interface ContainerProps\n extends Omit<ContainerComponentData, 'type' | 'components' | 'accentColor'> {\n accentColor?: ColorResolvable;\n children?: ComponentBuilder[];\n}\n\n/**\n * The components v2 container component\n * @param props - The properties for the container component.\n * @returns the container builder instance.\n * @example ```tsx\n * import { Container } from 'commandkit';\n *\n * const container = <Container>...</Container>;\n * ```\n */\nexport function Container(props: ContainerProps): ContainerBuilder {\n const container = new ContainerBuilder();\n\n applyId(props, container);\n\n if (typeof props.accentColor != null) {\n container.setAccentColor(resolveColor(props.accentColor!));\n }\n\n if (props.spoiler != null) {\n container.setSpoiler(props.spoiler);\n }\n\n if (props.children != null) {\n if (!Array.isArray(props.children)) props.children = [props.children];\n if (props.children.length === 0) return container;\n\n for (const child of props.children.flat()) {\n if (child instanceof TextDisplayBuilder) {\n container.addTextDisplayComponents(child);\n }\n\n if (child instanceof FileBuilder) {\n container.addFileComponents(child);\n }\n\n if (child instanceof ActionRowBuilder) {\n container.addActionRowComponents(child);\n }\n\n if (child instanceof SeparatorBuilder) {\n container.addSeparatorComponents(child);\n }\n\n if (child instanceof SectionBuilder) {\n container.addSectionComponents(child);\n }\n\n if (child instanceof MediaGalleryBuilder) {\n container.addMediaGalleryComponents(child);\n }\n }\n }\n\n return container;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkCA,SAAgB,UAAU,OAAyC;CACjE,MAAM,YAAY,IAAI,6BAAkB;AAExC,wBAAQ,OAAO,UAAU;AAGvB,WAAU,4CAA4B,MAAM,YAAa,CAAC;AAG5D,KAAI,MAAM,WAAW,KACnB,WAAU,WAAW,MAAM,QAAQ;AAGrC,KAAI,MAAM,YAAY,MAAM;AAC1B,MAAI,CAAC,MAAM,QAAQ,MAAM,SAAS,CAAE,OAAM,WAAW,CAAC,MAAM,SAAS;AACrE,MAAI,MAAM,SAAS,WAAW,EAAG,QAAO;AAExC,OAAK,MAAM,SAAS,MAAM,SAAS,MAAM,EAAE;AACzC,OAAI,iBAAiB,8BACnB,WAAU,yBAAyB,MAAM;AAG3C,OAAI,iBAAiB,uBACnB,WAAU,kBAAkB,MAAM;AAGpC,OAAI,iBAAiB,4BACnB,WAAU,uBAAuB,MAAM;AAGzC,OAAI,iBAAiB,4BACnB,WAAU,uBAAuB,MAAM;AAGzC,OAAI,iBAAiB,0BACnB,WAAU,qBAAqB,MAAM;AAGvC,OAAI,iBAAiB,+BACnB,WAAU,0BAA0B,MAAM;;;AAKhD,QAAO"}
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import { AsyncFunction, GenericFunction, exitContext, getCommandKit, getContext, isCommandWorkerContext, makeContextAwareFunction, provideContext, useEnvironment, useStore } from "../analytics-engine-
|
|
1
|
+
import { AsyncFunction, GenericFunction, exitContext, getCommandKit, getContext, isCommandWorkerContext, makeContextAwareFunction, provideContext, useEnvironment, useStore } from "../analytics-engine-NOInIjv8.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
|
-
import "../ButtonKit-
|
|
4
|
-
import "../ModalKit-
|
|
5
|
-
import "../element-
|
|
6
|
-
import "../ActionRow-
|
|
3
|
+
import "../ButtonKit-9k4yfhYD.js";
|
|
4
|
+
import "../ModalKit-Cq2ns6jv.js";
|
|
5
|
+
import "../element-CvNhvLZ8.js";
|
|
6
|
+
import "../ActionRow-B-7n9MMr.js";
|
|
7
7
|
import "../types-CJ-XvOFN.js";
|
|
8
|
-
import "../Button-
|
|
9
|
-
import "../Modal-
|
|
10
|
-
import "../common-
|
|
11
|
-
import "../StringSelectMenuKit-
|
|
12
|
-
import "../ChannelSelectMenuKit-
|
|
13
|
-
import "../MentionableSelectMenuKit-
|
|
14
|
-
import "../UserSelectMenuKit-
|
|
15
|
-
import "../RoleSelectMenuKit-
|
|
16
|
-
import "../SelectMenu-
|
|
17
|
-
import "../container-
|
|
18
|
-
import "../file-
|
|
19
|
-
import "../media-gallery-
|
|
20
|
-
import "../section-
|
|
21
|
-
import "../separator-
|
|
22
|
-
import "../text-display-
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import "../
|
|
30
|
-
import "../
|
|
31
|
-
import "../
|
|
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";
|
|
32
34
|
export { AsyncFunction, GenericFunction, exitContext, getCommandKit, getContext, isCommandWorkerContext, makeContextAwareFunction, provideContext, useEnvironment, useStore };
|
|
@@ -1,39 +1,42 @@
|
|
|
1
1
|
require('../colors-DL3ucTiT.js');
|
|
2
|
-
require('../ActionRow-
|
|
2
|
+
require('../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
5
|
-
require('../
|
|
6
|
-
require('../common-
|
|
7
|
-
require('../
|
|
8
|
-
require('../
|
|
9
|
-
require('../
|
|
10
|
-
require('../
|
|
11
|
-
require('../
|
|
12
|
-
require('../
|
|
13
|
-
require('../
|
|
14
|
-
require('../
|
|
15
|
-
require('../
|
|
16
|
-
require('../
|
|
17
|
-
require('../
|
|
18
|
-
require('../
|
|
19
|
-
require('../
|
|
20
|
-
require('../
|
|
21
|
-
require('../
|
|
22
|
-
require('../
|
|
23
|
-
require('../
|
|
24
|
-
require('../
|
|
25
|
-
require('../
|
|
26
|
-
require('../
|
|
27
|
-
require('../
|
|
28
|
-
require('../
|
|
29
|
-
require('../
|
|
30
|
-
require('../
|
|
31
|
-
require('../
|
|
32
|
-
require('../
|
|
33
|
-
require('../
|
|
34
|
-
require('../
|
|
35
|
-
require('../
|
|
36
|
-
require('../
|
|
4
|
+
const require_commandkit = require('../commandkit-DabqpQ6v.js');
|
|
5
|
+
require('../warning-CszH8HeS.js');
|
|
6
|
+
require('../common-0Iw8ZeM6.js');
|
|
7
|
+
require('../common-CCx-FJI4.js');
|
|
8
|
+
require('../container-DC0eQigs.js');
|
|
9
|
+
require('../file-DAUOZYhC.js');
|
|
10
|
+
require('../media-gallery-BLhwe5lO.js');
|
|
11
|
+
require('../section-BMcHN97i.js');
|
|
12
|
+
require('../separator-C___2K-f.js');
|
|
13
|
+
require('../text-display-BtQR88kY.js');
|
|
14
|
+
require('../label-D-uJWRZ0.js');
|
|
15
|
+
require('../poll-Bc6rjeUS.js');
|
|
16
|
+
require('../display-WDb9wMCv.js');
|
|
17
|
+
require('../element-DibzzA5L.js');
|
|
18
|
+
require('../types-TC4g3w91.js');
|
|
19
|
+
require('../EventInterceptor-BWoEJMHZ.js');
|
|
20
|
+
require('../constants-BMWH2YUr.js');
|
|
21
|
+
require('../PluginCommon-CPWV5xuX.js');
|
|
22
|
+
require('../CompilerPlugin-CZ4412Zm.js');
|
|
23
|
+
require('../RuntimePlugin-COeXe8rP.js');
|
|
24
|
+
require('../types-Cdh4uaFR.js');
|
|
25
|
+
require('../resolve-file-url-CJoD0FAn.js');
|
|
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');
|
|
36
|
+
require('../router-BvamdzoF.js');
|
|
37
|
+
require('../common-fIO6fqGZ.js');
|
|
38
|
+
require('../CommandKitEventsChannel-2l9Za-le.js');
|
|
39
|
+
require('../store-ZwL2gN6a.js');
|
|
37
40
|
|
|
38
41
|
exports.exitContext = require_commandkit.exitContext;
|
|
39
42
|
exports.getCommandKit = require_commandkit.getCommandKit;
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import { CommandKitEnvironment, CommandKitEnvironmentInternalData, CommandKitEnvironmentType, after, cancelAfter } from "../analytics-engine-
|
|
1
|
+
import { CommandKitEnvironment, CommandKitEnvironmentInternalData, CommandKitEnvironmentType, after, cancelAfter } from "../analytics-engine-NOInIjv8.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
|
-
import "../ButtonKit-
|
|
4
|
-
import "../ModalKit-
|
|
5
|
-
import "../element-
|
|
6
|
-
import "../ActionRow-
|
|
3
|
+
import "../ButtonKit-9k4yfhYD.js";
|
|
4
|
+
import "../ModalKit-Cq2ns6jv.js";
|
|
5
|
+
import "../element-CvNhvLZ8.js";
|
|
6
|
+
import "../ActionRow-B-7n9MMr.js";
|
|
7
7
|
import "../types-CJ-XvOFN.js";
|
|
8
|
-
import "../Button-
|
|
9
|
-
import "../Modal-
|
|
10
|
-
import "../common-
|
|
11
|
-
import "../StringSelectMenuKit-
|
|
12
|
-
import "../ChannelSelectMenuKit-
|
|
13
|
-
import "../MentionableSelectMenuKit-
|
|
14
|
-
import "../UserSelectMenuKit-
|
|
15
|
-
import "../RoleSelectMenuKit-
|
|
16
|
-
import "../SelectMenu-
|
|
17
|
-
import "../container-
|
|
18
|
-
import "../file-
|
|
19
|
-
import "../media-gallery-
|
|
20
|
-
import "../section-
|
|
21
|
-
import "../separator-
|
|
22
|
-
import "../text-display-
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import "../
|
|
30
|
-
import "../
|
|
31
|
-
import "../
|
|
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";
|
|
32
34
|
export { CommandKitEnvironment, CommandKitEnvironmentInternalData, CommandKitEnvironmentType, after, cancelAfter };
|
|
@@ -1,39 +1,42 @@
|
|
|
1
1
|
require('../colors-DL3ucTiT.js');
|
|
2
|
-
require('../ActionRow-
|
|
2
|
+
require('../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
5
|
-
require('../
|
|
6
|
-
require('../common-
|
|
7
|
-
require('../
|
|
8
|
-
require('../
|
|
9
|
-
require('../
|
|
10
|
-
require('../
|
|
11
|
-
require('../
|
|
12
|
-
require('../
|
|
13
|
-
require('../
|
|
14
|
-
require('../
|
|
15
|
-
require('../
|
|
16
|
-
require('../
|
|
17
|
-
require('../
|
|
18
|
-
require('../
|
|
19
|
-
require('../
|
|
20
|
-
require('../
|
|
21
|
-
require('../
|
|
22
|
-
require('../
|
|
23
|
-
require('../
|
|
24
|
-
require('../
|
|
25
|
-
require('../
|
|
26
|
-
require('../
|
|
27
|
-
require('../
|
|
28
|
-
require('../
|
|
29
|
-
require('../
|
|
30
|
-
require('../
|
|
31
|
-
require('../
|
|
32
|
-
require('../
|
|
33
|
-
require('../
|
|
34
|
-
require('../
|
|
35
|
-
require('../
|
|
36
|
-
require('../
|
|
4
|
+
const require_commandkit = require('../commandkit-DabqpQ6v.js');
|
|
5
|
+
require('../warning-CszH8HeS.js');
|
|
6
|
+
require('../common-0Iw8ZeM6.js');
|
|
7
|
+
require('../common-CCx-FJI4.js');
|
|
8
|
+
require('../container-DC0eQigs.js');
|
|
9
|
+
require('../file-DAUOZYhC.js');
|
|
10
|
+
require('../media-gallery-BLhwe5lO.js');
|
|
11
|
+
require('../section-BMcHN97i.js');
|
|
12
|
+
require('../separator-C___2K-f.js');
|
|
13
|
+
require('../text-display-BtQR88kY.js');
|
|
14
|
+
require('../label-D-uJWRZ0.js');
|
|
15
|
+
require('../poll-Bc6rjeUS.js');
|
|
16
|
+
require('../display-WDb9wMCv.js');
|
|
17
|
+
require('../element-DibzzA5L.js');
|
|
18
|
+
require('../types-TC4g3w91.js');
|
|
19
|
+
require('../EventInterceptor-BWoEJMHZ.js');
|
|
20
|
+
require('../constants-BMWH2YUr.js');
|
|
21
|
+
require('../PluginCommon-CPWV5xuX.js');
|
|
22
|
+
require('../CompilerPlugin-CZ4412Zm.js');
|
|
23
|
+
require('../RuntimePlugin-COeXe8rP.js');
|
|
24
|
+
require('../types-Cdh4uaFR.js');
|
|
25
|
+
require('../resolve-file-url-CJoD0FAn.js');
|
|
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');
|
|
36
|
+
require('../router-BvamdzoF.js');
|
|
37
|
+
require('../common-fIO6fqGZ.js');
|
|
38
|
+
require('../CommandKitEventsChannel-2l9Za-le.js');
|
|
39
|
+
require('../store-ZwL2gN6a.js');
|
|
37
40
|
|
|
38
41
|
exports.CommandKitEnvironment = require_commandkit.CommandKitEnvironment;
|
|
39
42
|
exports.CommandKitEnvironmentType = require_commandkit.CommandKitEnvironmentType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dotprops-
|
|
1
|
+
{"version":3,"file":"dotprops-DvJUE8fw.js","names":[],"sources":["../src/kv/dotprops.ts"],"sourcesContent":["export function getNestedValue(obj: any, path: string): any {\n const keys = path.split('.');\n let current = obj;\n\n for (const key of keys) {\n if (current === null || current === undefined) {\n return undefined;\n }\n current = current[key];\n }\n\n return current;\n}\n\nexport function setNestedValue(obj: any, path: string, value: any): void {\n const keys = path.split('.');\n const lastKey = keys.pop()!;\n let current = obj;\n\n for (const key of keys) {\n if (current[key] === null || current[key] === undefined) {\n current[key] = {};\n }\n current = current[key];\n }\n\n current[lastKey] = value;\n}\n"],"mappings":";;AAAA,SAAgB,eAAe,KAAU,MAAmB;CAC1D,MAAM,OAAO,KAAK,MAAM,IAAI;CAC5B,IAAI,UAAU;AAEd,MAAK,MAAM,OAAO,MAAM;AACtB,MAAI,YAAY,QAAQ,YAAY,OAClC;AAEF,YAAU,QAAQ;;AAGpB,QAAO;;AAGT,SAAgB,eAAe,KAAU,MAAc,OAAkB;CACvE,MAAM,OAAO,KAAK,MAAM,IAAI;CAC5B,MAAM,UAAU,KAAK,KAAK;CAC1B,IAAI,UAAU;AAEd,MAAK,MAAM,OAAO,MAAM;AACtB,MAAI,QAAQ,SAAS,QAAQ,QAAQ,SAAS,OAC5C,SAAQ,OAAO,EAAE;AAEnB,YAAU,QAAQ;;AAGpB,SAAQ,WAAW"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ButtonKit } from "./ButtonKit-
|
|
2
|
-
import { ModalKit } from "./ModalKit-
|
|
1
|
+
import { ButtonKit } from "./ButtonKit-9k4yfhYD.js";
|
|
2
|
+
import { ModalKit } from "./ModalKit-Cq2ns6jv.js";
|
|
3
3
|
import { ActionRowBuilder, TextInputBuilder } from "discord.js";
|
|
4
4
|
|
|
5
5
|
//#region src/components/common/element.d.ts
|
|
@@ -69,4 +69,4 @@ declare function Fragment(props: FragmentElementProps): CommandKitElementData[El
|
|
|
69
69
|
declare function createElement(type: Function, props: Record<string, unknown>, ...children: any[]): CommandKitElement<ElementType>;
|
|
70
70
|
//#endregion
|
|
71
71
|
export { AnyCommandKitElement, CommandKitElement, CommandKitElementData, ElementType, Fragment, FragmentElementProps, createElement, getElement, isCommandKitElement };
|
|
72
|
-
//# sourceMappingURL=element-
|
|
72
|
+
//# sourceMappingURL=element-CvNhvLZ8.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-DibzzA5L.js","names":[],"sources":["../src/components/common/element.ts"],"sourcesContent":["import type { ActionRowBuilder, TextInputBuilder } from 'discord.js';\nimport type { ButtonKit } from '../interactive/button/ButtonKit';\nimport type { ModalKit } from '../interactive/modal/ModalKit';\n\n/**\n * Represents the types of elements that can be used in CommandKit.\n */\nexport const ElementType = {\n ActionRow: 'action-row',\n Button: 'button-kit',\n Modal: 'modal',\n TextInput: 'text-input',\n} as const;\n\n/**\n * The type of element that can be used in CommandKit.\n * This is a union of the keys of the ElementType object.\n */\nexport type ElementType = (typeof ElementType)[keyof typeof ElementType];\n\n/**\n * The data structure that maps each ElementType to its corresponding CommandKit element.\n */\nexport interface CommandKitElementData {\n [ElementType.ActionRow]: ActionRowBuilder;\n [ElementType.Button]: ButtonKit;\n [ElementType.Modal]: ModalKit;\n [ElementType.TextInput]: TextInputBuilder;\n}\n\n/**\n * Represents a CommandKit element with a specific type and data.\n */\nexport type CommandKitElement<Type extends ElementType> =\n CommandKitElementData[Type];\n\n/**\n * Represents any CommandKit element, which can be of any type defined in CommandKitElementData.\n */\nexport type AnyCommandKitElement = CommandKitElement<ElementType>;\n\n/**\n * Checks if the given element is a CommandKit element.\n * @param element The element to check.\n * @returns True if the element is a CommandKit element, false otherwise.\n */\nexport function isCommandKitElement(\n element: unknown,\n): element is CommandKitElement<ElementType> {\n if (typeof element !== 'object' || element === null) return false;\n if (!Reflect.has(element, 'type')) return false;\n if (!Reflect.has(element, 'data')) return false;\n\n return true;\n}\n\n/**\n * Gets the element data for a specific CommandKit element.\n * @param element The CommandKit element to get the data for.\n * @returns The element data for the specified CommandKit element.\n */\nexport function getElement<\n T extends ElementType,\n E extends CommandKitElement<T>,\n>(element: E): CommandKitElementData[T] {\n return element.data as CommandKitElementData[T];\n}\n\n/**\n * Represents the properties for a fragment element in CommandKit.\n */\nexport interface FragmentElementProps {\n children: [];\n}\n\n/**\n * Represents a fragment of CommandKit elements.\n * @param props The properties for the fragment.\n * @returns The fragment element.\n */\nexport function Fragment(\n props: FragmentElementProps,\n): CommandKitElementData[ElementType][] {\n return Array.isArray(props.children)\n ? props.children.flat()\n : [props.children];\n}\n\n/**\n * The createElement function is used to create CommandKit elements.\n * @param type The type of the element to create.\n * @param props The properties for the element.\n * @param children The children of the element.\n * @returns The created CommandKit element.\n */\nexport function createElement(\n type: Function,\n props: Record<string, unknown>,\n ...children: any[]\n): CommandKitElement<ElementType> {\n return type({ ...props, children: props.children ?? children });\n}\n\nexport { createElement as jsx, createElement as jsxs };\n"],"mappings":";;;;;AAOA,MAAa,cAAc;CACzB,WAAW;CACX,QAAQ;CACR,OAAO;CACP,WAAW;CACZ;;;;;;AAkCD,SAAgB,oBAChB,SAC4C;AAC1C,KAAI,OAAO,YAAY,YAAY,YAAY,KAAM,QAAO;AAC5D,KAAI,CAAC,QAAQ,IAAI,SAAS,OAAO,CAAE,QAAO;AAC1C,KAAI,CAAC,QAAQ,IAAI,SAAS,OAAO,CAAE,QAAO;AAE1C,QAAO;;;;;;;AAQT,SAAgB,WAGhB,SAAsC;AACpC,QAAO,QAAQ;;;;;;;AAejB,SAAgB,SAChB,OACuC;AACrC,QAAO,MAAM,QAAQ,MAAM,SAAQ,GACnC,MAAM,SAAS,MAAM,GACrB,CAAC,MAAM,SAAS;;;;;;;;;AAUlB,SAAgB,cAChB,MACA,OACA,GAAG,UAC8B;AAC/B,QAAO,KAAK;EAAE,GAAG;EAAO,UAAU,MAAM,YAAY;EAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-
|
|
1
|
+
{"version":3,"file":"env-8yY-6pbC.js","names":[],"sources":["../src/cli/env.ts"],"sourcesContent":["/**\n * @private\n * @internal\n */\nexport function DevEnv(_static = false) {\n const common = {\n NODE_ENV: 'development',\n COMMANDKIT_IS_DEV: 'true',\n };\n\n if (_static) return Object.assign({}, common);\n\n return Object.assign({}, process.env, common);\n}\n\n/**\n * @private\n * @internal\n */\nexport function ProdEnv(_static = false) {\n const common = {\n NODE_ENV: 'production',\n COMMANDKIT_IS_DEV: 'false',\n };\n\n if (_static) return Object.assign({}, common);\n\n return Object.assign({}, process.env, common);\n}\n\n/**\n * @private\n * @internal\n */\nexport const CommonEnvFiles = ['.env', '.env.local'];\n/**\n * @private\n * @internal\n */\nexport const DevEnvFiles = ['.env.development', '.env.development.local'];\n/**\n * @private\n * @internal\n */\nexport const ProdEnvFiles = ['.env.production', '.env.production.local'];\n/**\n * @private\n * @internal\n */\nexport const devEnvFileArgs = [...CommonEnvFiles, ...DevEnvFiles];\n/**\n * @private\n * @internal\n */\nexport const prodEnvFileArgs = [...CommonEnvFiles, ...ProdEnvFiles];\n/**\n * @private\n * @internal\n */\nexport function setCLIEnv() {\n process.env.COMMANDKIT_IS_CLI = 'true';\n}\n"],"mappings":";;;;;;AAIA,SAAgB,OAAO,UAAU,OAAO;CACtC,MAAM,SAAS;EACb,UAAU;EACV,mBAAmB;EACpB;AAED,KAAI,QAAS,QAAO,OAAO,OAAO,EAAE,EAAE,OAAO;AAE7C,QAAO,OAAO,OAAO,EAAE,EAAE,QAAQ,KAAK,OAAO;;;;;;AAO/C,SAAgB,QAAQ,UAAU,OAAO;CACvC,MAAM,SAAS;EACb,UAAU;EACV,mBAAmB;EACpB;AAED,KAAI,QAAS,QAAO,OAAO,OAAO,EAAE,EAAE,OAAO;AAE7C,QAAO,OAAO,OAAO,EAAE,EAAE,QAAQ,KAAK,OAAO;;;;;;AAO/C,MAAa,iBAAiB,CAAC,QAAQ,aAAa;;;;;AAKpD,MAAa,cAAc,CAAC,oBAAoB,yBAAyB;;;;;AAKzE,MAAa,eAAe,CAAC,mBAAmB,wBAAwB;;;;;AAKxE,MAAa,iBAAiB,CAAC,GAAG,gBAAgB,GAAG,YAAY;;;;;AAKjE,MAAa,kBAAkB,CAAC,GAAG,gBAAgB,GAAG,aAAa;;;;;AAKnE,SAAgB,YAAY;AAC1B,SAAQ,IAAI,oBAAoB"}
|
|
@@ -51,4 +51,4 @@ declare function isCommandKitError(error: unknown): error is CommandKitError;
|
|
|
51
51
|
declare function isErrorType(error: unknown, code: symbol | symbol[]): boolean;
|
|
52
52
|
//#endregion
|
|
53
53
|
export { CommandKitError, CommandKitErrorCodes, createCommandKitError, isCommandKitError, isErrorType };
|
|
54
|
-
//# sourceMappingURL=error-codes-
|
|
54
|
+
//# sourceMappingURL=error-codes-BiNRVMiV.d.ts.map
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import { CommandKitEventsChannel, ListenerFunction } from "../analytics-engine-
|
|
1
|
+
import { CommandKitEventsChannel, ListenerFunction } from "../analytics-engine-NOInIjv8.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
|
-
import "../ButtonKit-
|
|
4
|
-
import "../ModalKit-
|
|
5
|
-
import "../element-
|
|
6
|
-
import "../ActionRow-
|
|
3
|
+
import "../ButtonKit-9k4yfhYD.js";
|
|
4
|
+
import "../ModalKit-Cq2ns6jv.js";
|
|
5
|
+
import "../element-CvNhvLZ8.js";
|
|
6
|
+
import "../ActionRow-B-7n9MMr.js";
|
|
7
7
|
import "../types-CJ-XvOFN.js";
|
|
8
|
-
import "../Button-
|
|
9
|
-
import "../Modal-
|
|
10
|
-
import "../common-
|
|
11
|
-
import "../StringSelectMenuKit-
|
|
12
|
-
import "../ChannelSelectMenuKit-
|
|
13
|
-
import "../MentionableSelectMenuKit-
|
|
14
|
-
import "../UserSelectMenuKit-
|
|
15
|
-
import "../RoleSelectMenuKit-
|
|
16
|
-
import "../SelectMenu-
|
|
17
|
-
import "../container-
|
|
18
|
-
import "../file-
|
|
19
|
-
import "../media-gallery-
|
|
20
|
-
import "../section-
|
|
21
|
-
import "../separator-
|
|
22
|
-
import "../text-display-
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import "../
|
|
30
|
-
import "../
|
|
31
|
-
import "../
|
|
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";
|
|
32
34
|
export { CommandKitEventsChannel, ListenerFunction };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const require_CommandKitEventsChannel = require('../CommandKitEventsChannel-
|
|
1
|
+
const require_CommandKitEventsChannel = require('../CommandKitEventsChannel-2l9Za-le.js');
|
|
2
2
|
|
|
3
3
|
exports.CommandKitEventsChannel = require_CommandKitEventsChannel.CommandKitEventsChannel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_commandkit = require('./commandkit-
|
|
2
|
-
const require_constants = require('./constants-
|
|
3
|
-
const require_EventWorkerContext = require('./EventWorkerContext-
|
|
1
|
+
const require_commandkit = require('./commandkit-DabqpQ6v.js');
|
|
2
|
+
const require_constants = require('./constants-D0dawKxO.js');
|
|
3
|
+
const require_EventWorkerContext = require('./EventWorkerContext-D_9q1Bm2.js');
|
|
4
4
|
|
|
5
5
|
//#region src/flags/feature-flags.ts
|
|
6
6
|
let flagProvider = null;
|
|
@@ -157,4 +157,4 @@ Object.defineProperty(exports, 'setFlagProvider', {
|
|
|
157
157
|
return setFlagProvider;
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
|
-
//# sourceMappingURL=feature-flags-
|
|
160
|
+
//# sourceMappingURL=feature-flags-BoBV4Dsj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-flags-BoBV4Dsj.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":";;;;;AAqBA,IAAI,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,OAAO,YAAY;GACjB,MAAM,MAAM,KAAK,YAAY;AAC7B,UAAQ,2DAAM,SAAW,IAAI,KAAK,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,kCAAgB;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,kCAAgB;KACtB,IACA,YACA,OAAO,aAAa,YACpB,QAAQ,YACR,OAAO,SAAS,OAAO,WACvB,SAAS,KACT;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,SAAO,IAAI,YAA6B,QAAQ;CACtD,MAAM,SAAS,OAAK,QAAQ,KAAK,QAAM,OAAU;AAKjD,QAAO,MAAM,eAAgB,KAAK;AAChC,MAAI,4CAAC,IAAK,UACR,OAAM,IAAI,MACR,sEACD;EAGH,MAAM,UACN,OAAO,QAAQ,aACf,MAAO,KAA0C,GACjD;AAKA,SAFuB,MAAM,OAAK,QAAQ,QAAQ;;AAKpD,QAAO"}
|
|
@@ -2,7 +2,7 @@ const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
|
2
2
|
let discord_js = require("discord.js");
|
|
3
3
|
discord_js = require_chunk.__toESM(discord_js);
|
|
4
4
|
|
|
5
|
-
//#region src/components/
|
|
5
|
+
//#region src/components/display/file.ts
|
|
6
6
|
/**
|
|
7
7
|
* The file component
|
|
8
8
|
* @param props - The properties for the file component.
|
|
@@ -26,4 +26,4 @@ Object.defineProperty(exports, 'File', {
|
|
|
26
26
|
return File;
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
-
//# sourceMappingURL=file-
|
|
29
|
+
//# sourceMappingURL=file-DAUOZYhC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-DAUOZYhC.js","names":[],"sources":["../src/components/display/file.ts"],"sourcesContent":["import { FileBuilder, FileComponentData } from 'discord.js';\n\n/**\n * Represents the properties for a file component.\n */\nexport interface FileProps extends Omit<FileComponentData, 'type' | 'file'> {\n url: string;\n}\n\n/**\n * The file component\n * @param props - The properties for the file component.\n * @returns The file builder instance.\n * @example ```tsx\n * import { File } from 'commandkit';\n *\n * const file = <File url=\"https://example.com/file.png\" />;\n * ```\n */\nexport function File(props: FileProps) {\n const file = new FileBuilder(props);\n\n if (props.url != null) {\n file.setURL(props.url);\n }\n\n return file;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,SAAgB,KAAK,OAAkB;CACrC,MAAM,OAAO,IAAI,uBAAY,MAAM;AAEnC,KAAI,MAAM,OAAO,KACf,MAAK,OAAO,MAAM,IAAI;AAGxB,QAAO"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileBuilder, FileComponentData } from "discord.js";
|
|
2
2
|
|
|
3
|
-
//#region src/components/
|
|
3
|
+
//#region src/components/display/file.d.ts
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents the properties for a file component.
|
|
@@ -21,4 +21,4 @@ interface FileProps extends Omit<FileComponentData, 'type' | 'file'> {
|
|
|
21
21
|
declare function File(props: FileProps): FileBuilder;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { File, FileProps };
|
|
24
|
-
//# sourceMappingURL=file-
|
|
24
|
+
//# sourceMappingURL=file-n2yl_-vl.d.ts.map
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import { FlagConfiguration, FlagProvider, JsonFlagProvider } from "../analytics-engine-
|
|
1
|
+
import { FlagConfiguration, FlagProvider, JsonFlagProvider } from "../analytics-engine-NOInIjv8.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
|
-
import "../ButtonKit-
|
|
4
|
-
import "../ModalKit-
|
|
5
|
-
import "../element-
|
|
6
|
-
import "../ActionRow-
|
|
3
|
+
import "../ButtonKit-9k4yfhYD.js";
|
|
4
|
+
import "../ModalKit-Cq2ns6jv.js";
|
|
5
|
+
import "../element-CvNhvLZ8.js";
|
|
6
|
+
import "../ActionRow-B-7n9MMr.js";
|
|
7
7
|
import "../types-CJ-XvOFN.js";
|
|
8
|
-
import "../Button-
|
|
9
|
-
import "../Modal-
|
|
10
|
-
import "../common-
|
|
11
|
-
import "../StringSelectMenuKit-
|
|
12
|
-
import "../ChannelSelectMenuKit-
|
|
13
|
-
import "../MentionableSelectMenuKit-
|
|
14
|
-
import "../UserSelectMenuKit-
|
|
15
|
-
import "../RoleSelectMenuKit-
|
|
16
|
-
import "../SelectMenu-
|
|
17
|
-
import "../container-
|
|
18
|
-
import "../file-
|
|
19
|
-
import "../media-gallery-
|
|
20
|
-
import "../section-
|
|
21
|
-
import "../separator-
|
|
22
|
-
import "../text-display-
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import "../
|
|
30
|
-
import "../
|
|
31
|
-
import "../
|
|
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";
|
|
32
34
|
export { FlagConfiguration, FlagProvider, JsonFlagProvider };
|