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,39 +1,34 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-
|
|
2
|
-
const require_colors = require('./colors-
|
|
1
|
+
const require_chunk = require('./chunk-kSYXY2_d.js');
|
|
2
|
+
const require_colors = require('./colors-Csc0X4QJ.js');
|
|
3
3
|
const require_error_codes = require('./error-codes-Ds0bnPvT.js');
|
|
4
4
|
const require_warning = require('./warning-CszH8HeS.js');
|
|
5
|
+
const require_common = require('./common-CEordwf3.js');
|
|
5
6
|
const require_element = require('./element-DibzzA5L.js');
|
|
6
7
|
const require_EventInterceptor = require('./EventInterceptor-BWoEJMHZ.js');
|
|
7
|
-
const require_constants = require('./constants-
|
|
8
|
-
const require_CompilerPlugin = require('./CompilerPlugin-
|
|
9
|
-
const require_RuntimePlugin = require('./RuntimePlugin-
|
|
10
|
-
const require_resolve_file_url = require('./resolve-file-url-
|
|
8
|
+
const require_constants = require('./constants-CxkFFZ7p.js');
|
|
9
|
+
const require_CompilerPlugin = require('./CompilerPlugin-CUsGAfgl.js');
|
|
10
|
+
const require_RuntimePlugin = require('./RuntimePlugin-CtobluSU.js');
|
|
11
|
+
const require_resolve_file_url = require('./resolve-file-url-CdHqwWs3.js');
|
|
11
12
|
const require_utils = require('./utils-Br3eenD1.js');
|
|
12
|
-
const require_types_package = require('./types-package-
|
|
13
|
-
const require_constants$1 = require('./constants-
|
|
14
|
-
const require_EventWorkerContext = require('./EventWorkerContext-
|
|
15
|
-
const require_signals = require('./signals-
|
|
16
|
-
const require_helpers = require('./helpers-
|
|
17
|
-
const require_MessageCommandParser = require('./MessageCommandParser-
|
|
18
|
-
const require_CommandsRouter = require('./CommandsRouter-
|
|
19
|
-
const require_EventsRouter = require('./EventsRouter-
|
|
20
|
-
const require_common = require('./common-
|
|
21
|
-
const require_CommandKitEventsChannel = require('./CommandKitEventsChannel-
|
|
22
|
-
const require_store = require('./store-
|
|
13
|
+
const require_types_package = require('./types-package-CsTNfvv2.js');
|
|
14
|
+
const require_constants$1 = require('./constants-Cw8VjCVz.js');
|
|
15
|
+
const require_EventWorkerContext = require('./EventWorkerContext-Dfhgv329.js');
|
|
16
|
+
const require_signals = require('./signals-B8z1wJ6W.js');
|
|
17
|
+
const require_helpers = require('./helpers-Btx1FSZx.js');
|
|
18
|
+
const require_MessageCommandParser = require('./MessageCommandParser-Bs9fimmd.js');
|
|
19
|
+
const require_CommandsRouter = require('./CommandsRouter-C_HLsrGX.js');
|
|
20
|
+
const require_EventsRouter = require('./EventsRouter-DZYIha6m.js');
|
|
21
|
+
const require_common$1 = require('./common-DSRs_mfw.js');
|
|
22
|
+
const require_CommandKitEventsChannel = require('./CommandKitEventsChannel-CnT5ymYe.js');
|
|
23
|
+
const require_store = require('./store-D8r_hryO.js');
|
|
23
24
|
let node_events = require("node:events");
|
|
24
25
|
node_events = require_chunk.__toESM(node_events);
|
|
25
26
|
let discord_js = require("discord.js");
|
|
26
|
-
discord_js = require_chunk.__toESM(discord_js);
|
|
27
27
|
let node_async_hooks = require("node:async_hooks");
|
|
28
|
-
node_async_hooks = require_chunk.__toESM(node_async_hooks);
|
|
29
28
|
let node_fs = require("node:fs");
|
|
30
|
-
node_fs = require_chunk.__toESM(node_fs);
|
|
31
29
|
let node_path = require("node:path");
|
|
32
|
-
node_path = require_chunk.__toESM(node_path);
|
|
33
30
|
let node_crypto = require("node:crypto");
|
|
34
|
-
node_crypto = require_chunk.__toESM(node_crypto);
|
|
35
31
|
let util = require("util");
|
|
36
|
-
util = require_chunk.__toESM(util);
|
|
37
32
|
|
|
38
33
|
//#region src/context/async-context.ts
|
|
39
34
|
const kCommandWorker = Symbol("commandkitCommandWorker");
|
|
@@ -461,6 +456,21 @@ function ParagraphInput(props) {
|
|
|
461
456
|
style: discord_js.TextInputStyle.Paragraph
|
|
462
457
|
});
|
|
463
458
|
}
|
|
459
|
+
/**
|
|
460
|
+
* The file upload component.
|
|
461
|
+
* @param props The file upload properties.
|
|
462
|
+
* @returns The commandkit element.
|
|
463
|
+
* @example <FileUpload customId="file" />
|
|
464
|
+
*/
|
|
465
|
+
function FileUpload(props) {
|
|
466
|
+
const file = new discord_js.FileUploadBuilder();
|
|
467
|
+
require_common.applyId(props, file);
|
|
468
|
+
if (props.maxValues != null) file.setMaxValues(props.maxValues);
|
|
469
|
+
if (props.minValues != null) file.setMinValues(props.minValues);
|
|
470
|
+
if (props.customId != null) file.setCustomId(props.customId);
|
|
471
|
+
if (props.required != null) file.setRequired(props.required);
|
|
472
|
+
return file;
|
|
473
|
+
}
|
|
464
474
|
|
|
465
475
|
//#endregion
|
|
466
476
|
//#region src/components/interactive/select-menu/StringSelectMenuKit.ts
|
|
@@ -1204,13 +1214,13 @@ function ChannelSelectMenu(props) {
|
|
|
1204
1214
|
/**
|
|
1205
1215
|
* Log levels for the logger.
|
|
1206
1216
|
*/
|
|
1207
|
-
var LogLevel = /* @__PURE__ */ function(LogLevel
|
|
1208
|
-
LogLevel
|
|
1209
|
-
LogLevel
|
|
1210
|
-
LogLevel
|
|
1211
|
-
LogLevel
|
|
1212
|
-
LogLevel
|
|
1213
|
-
return LogLevel
|
|
1217
|
+
var LogLevel = /* @__PURE__ */ function(LogLevel) {
|
|
1218
|
+
LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG";
|
|
1219
|
+
LogLevel[LogLevel["INFO"] = 1] = "INFO";
|
|
1220
|
+
LogLevel[LogLevel["WARN"] = 2] = "WARN";
|
|
1221
|
+
LogLevel[LogLevel["ERROR"] = 3] = "ERROR";
|
|
1222
|
+
LogLevel[LogLevel["DEFAULT"] = 4] = "DEFAULT";
|
|
1223
|
+
return LogLevel;
|
|
1214
1224
|
}(LogLevel || {});
|
|
1215
1225
|
const execHandlerKind = {
|
|
1216
1226
|
autocomplete: "Autocomplete",
|
|
@@ -1423,7 +1433,7 @@ var CommandKitPluginRuntime = class {
|
|
|
1423
1433
|
* @param plugin The plugin to pre-load.
|
|
1424
1434
|
*/
|
|
1425
1435
|
async preload(plugin) {
|
|
1426
|
-
for (const entrypoint of plugin.preload) await import(require_resolve_file_url.toFileURL(`${getCurrentDirectory()}/${entrypoint}`));
|
|
1436
|
+
for (const entrypoint of plugin.preload) await (entrypoint.startsWith("module:") ? import(entrypoint.slice(7)) : import(require_resolve_file_url.toFileURL(`${getCurrentDirectory()}/${entrypoint}`)));
|
|
1427
1437
|
}
|
|
1428
1438
|
/**
|
|
1429
1439
|
* Soft registers a plugin in the runtime.
|
|
@@ -1509,10 +1519,10 @@ var CommandKitPluginRuntime = class {
|
|
|
1509
1519
|
* It can be either 'activate' or 'deactivate'.
|
|
1510
1520
|
* @private
|
|
1511
1521
|
*/
|
|
1512
|
-
var PluginExecutionMode = /* @__PURE__ */ function(PluginExecutionMode
|
|
1513
|
-
PluginExecutionMode
|
|
1514
|
-
PluginExecutionMode
|
|
1515
|
-
return PluginExecutionMode
|
|
1522
|
+
var PluginExecutionMode = /* @__PURE__ */ function(PluginExecutionMode) {
|
|
1523
|
+
PluginExecutionMode["Activate"] = "activate";
|
|
1524
|
+
PluginExecutionMode["Deactivate"] = "deactivate";
|
|
1525
|
+
return PluginExecutionMode;
|
|
1516
1526
|
}(PluginExecutionMode || {});
|
|
1517
1527
|
/**
|
|
1518
1528
|
* CompilerPluginRuntime is a runtime for managing compiler plugins in CommandKit.
|
|
@@ -1525,9 +1535,11 @@ var CompilerPluginRuntime = class {
|
|
|
1525
1535
|
/**
|
|
1526
1536
|
* Creates a new instance of CompilerPluginRuntime.
|
|
1527
1537
|
* @param plugins An array of compiler plugins to be managed by this runtime.
|
|
1538
|
+
* @param isDevMode Whether the build is in development mode.
|
|
1528
1539
|
*/
|
|
1529
|
-
constructor(plugins) {
|
|
1540
|
+
constructor(plugins, isDevMode) {
|
|
1530
1541
|
this.plugins = plugins;
|
|
1542
|
+
this.isDevMode = isDevMode;
|
|
1531
1543
|
this.plugins = this.plugins.filter((p) => !!p && require_CompilerPlugin.isCompilerPlugin(p));
|
|
1532
1544
|
}
|
|
1533
1545
|
/**
|
|
@@ -1688,6 +1700,7 @@ var CommonDirectiveTransformer = class extends require_CompilerPlugin.CompilerPl
|
|
|
1688
1700
|
if (!this.options.enabled) return null;
|
|
1689
1701
|
if (!this.transformer) return null;
|
|
1690
1702
|
if (/\.json$/.test(params.id)) return null;
|
|
1703
|
+
if (!params.code.includes(this.options.directive)) return null;
|
|
1691
1704
|
return {
|
|
1692
1705
|
code: (await this.transformer(params.code.toString(), params.id)).contents,
|
|
1693
1706
|
map: null
|
|
@@ -1721,6 +1734,7 @@ var MacroPlugin = class extends require_CompilerPlugin.CompilerPlugin {
|
|
|
1721
1734
|
async transform(params) {
|
|
1722
1735
|
if (!this.options.enabled) return null;
|
|
1723
1736
|
if (/\.json$/.test(params.id)) return null;
|
|
1737
|
+
if (!params.code.includes("use macro")) return null;
|
|
1724
1738
|
const { contents } = await this.macroTransformer.transform(params.code, params.id);
|
|
1725
1739
|
return {
|
|
1726
1740
|
code: typeof contents === "string" ? contents : new TextDecoder().decode(contents),
|
|
@@ -1945,6 +1959,42 @@ function devOnly(fn) {
|
|
|
1945
1959
|
return f;
|
|
1946
1960
|
}
|
|
1947
1961
|
/**
|
|
1962
|
+
* Creates a function from the given function that runs only in build mode.
|
|
1963
|
+
* @param fn The function to run in build mode.
|
|
1964
|
+
* @returns The function that runs only in build mode.
|
|
1965
|
+
* @example
|
|
1966
|
+
* ```ts
|
|
1967
|
+
* const buildOnlyFn = buildOnly(() => {
|
|
1968
|
+
* console.log('This function runs only in build mode');
|
|
1969
|
+
* });
|
|
1970
|
+
* buildOnlyFn(); // This will log the message only in build mode
|
|
1971
|
+
* ```
|
|
1972
|
+
*/
|
|
1973
|
+
function buildOnly(fn) {
|
|
1974
|
+
const f = (...args) => {
|
|
1975
|
+
if (require_constants.isBuildLikeEnvironment()) return fn(...args);
|
|
1976
|
+
};
|
|
1977
|
+
return f;
|
|
1978
|
+
}
|
|
1979
|
+
/**
|
|
1980
|
+
* Creates a function from the given function that runs only outside of build mode.
|
|
1981
|
+
* @param fn The function to run outside of build mode.
|
|
1982
|
+
* @returns The function that runs only outside of build mode.
|
|
1983
|
+
* @example
|
|
1984
|
+
* ```ts
|
|
1985
|
+
* const noBuildOnlyFn = noBuildOnly(() => {
|
|
1986
|
+
* console.log('This function runs only outside of build mode');
|
|
1987
|
+
* });
|
|
1988
|
+
* noBuildOnlyFn(); // This will log the message only outside of build mode
|
|
1989
|
+
* ```
|
|
1990
|
+
*/
|
|
1991
|
+
function noBuildOnly(fn) {
|
|
1992
|
+
const f = (...args) => {
|
|
1993
|
+
if (!require_constants.isBuildLikeEnvironment()) return fn(...args);
|
|
1994
|
+
};
|
|
1995
|
+
return f;
|
|
1996
|
+
}
|
|
1997
|
+
/**
|
|
1948
1998
|
* Creates a simple proxy object that mirrors the target object.
|
|
1949
1999
|
* @param target The target object to proxy.
|
|
1950
2000
|
* @returns The proxied object.
|
|
@@ -2151,9 +2201,9 @@ var CommandKitEnvironment = class {
|
|
|
2151
2201
|
return Math.abs(this.#data.markEnd - this.#data.markStart);
|
|
2152
2202
|
}
|
|
2153
2203
|
};
|
|
2154
|
-
let CommandKitEnvironmentType = /* @__PURE__ */ function(CommandKitEnvironmentType
|
|
2155
|
-
CommandKitEnvironmentType
|
|
2156
|
-
return CommandKitEnvironmentType
|
|
2204
|
+
let CommandKitEnvironmentType = /* @__PURE__ */ function(CommandKitEnvironmentType) {
|
|
2205
|
+
CommandKitEnvironmentType["CommandHandler"] = "COMMAND_HANDLER";
|
|
2206
|
+
return CommandKitEnvironmentType;
|
|
2157
2207
|
}({});
|
|
2158
2208
|
/**
|
|
2159
2209
|
* Schedules the given function to run after the current command has finished executing.
|
|
@@ -3436,7 +3486,8 @@ var AppEventsHandler = class {
|
|
|
3436
3486
|
if (!handler.default || typeof handler.default !== "function") Logger.error`Event handler for ${event.event}${event.namespace ? ` of namespace ${event.namespace}` : ""} does not have a default export or is not a function`;
|
|
3437
3487
|
listeners.push({
|
|
3438
3488
|
handler: handler.default,
|
|
3439
|
-
once: !!handler.once
|
|
3489
|
+
once: !!handler.once,
|
|
3490
|
+
parallel: !!handler.parallel
|
|
3440
3491
|
});
|
|
3441
3492
|
}
|
|
3442
3493
|
const len = listeners.length;
|
|
@@ -3471,6 +3522,10 @@ var AppEventsHandler = class {
|
|
|
3471
3522
|
const { name, listeners, namespace } = data;
|
|
3472
3523
|
const onceListeners = listeners.filter((listener) => listener.once);
|
|
3473
3524
|
const onListeners = listeners.filter((listener) => !listener.once);
|
|
3525
|
+
const onParallelListeners = onListeners.filter((listener) => listener.parallel);
|
|
3526
|
+
const onSequentialListeners = onListeners.filter((listener) => !listener.parallel);
|
|
3527
|
+
const onceParallelListeners = onceListeners.filter((listener) => listener.parallel);
|
|
3528
|
+
const onceSequentialListeners = onceListeners.filter((listener) => !listener.parallel);
|
|
3474
3529
|
const executedOnceListeners = /* @__PURE__ */ new Set();
|
|
3475
3530
|
const mainHandler = async (...args) => {
|
|
3476
3531
|
let accepted = false;
|
|
@@ -3498,7 +3553,14 @@ var AppEventsHandler = class {
|
|
|
3498
3553
|
arguments: args,
|
|
3499
3554
|
variables: /* @__PURE__ */ new Map()
|
|
3500
3555
|
}, async () => {
|
|
3501
|
-
|
|
3556
|
+
if (onParallelListeners.length > 0) await Promise.all(onParallelListeners.map(async (listener) => {
|
|
3557
|
+
try {
|
|
3558
|
+
await listener.handler(...args, client, this.commandkit);
|
|
3559
|
+
} catch (e) {
|
|
3560
|
+
Logger.error`Error handling event ${name}${namespace ? ` of namespace ${namespace}` : ""}: ${e}`;
|
|
3561
|
+
}
|
|
3562
|
+
}));
|
|
3563
|
+
for (const listener of onSequentialListeners) try {
|
|
3502
3564
|
await listener.handler(...args, client, this.commandkit);
|
|
3503
3565
|
} catch (e) {
|
|
3504
3566
|
if (require_error_codes.isErrorType(e, require_error_codes.CommandKitErrorCodes.StopEvents)) {
|
|
@@ -3528,7 +3590,25 @@ var AppEventsHandler = class {
|
|
|
3528
3590
|
if (accepted) return;
|
|
3529
3591
|
return (_plugin$willEmitEvent2 = plugin.willEmitEvent) === null || _plugin$willEmitEvent2 === void 0 ? void 0 : _plugin$willEmitEvent2.call(plugin, ctx, event);
|
|
3530
3592
|
}).catch(Object);
|
|
3531
|
-
|
|
3593
|
+
if (onceParallelListeners.length > 0) await Promise.all(onceParallelListeners.map(async (listener) => {
|
|
3594
|
+
return require_EventWorkerContext.runInEventWorkerContext({
|
|
3595
|
+
event: name,
|
|
3596
|
+
namespace: namespace ?? null,
|
|
3597
|
+
data: data.event,
|
|
3598
|
+
commandkit: this.commandkit,
|
|
3599
|
+
arguments: args,
|
|
3600
|
+
variables: /* @__PURE__ */ new Map()
|
|
3601
|
+
}, async () => {
|
|
3602
|
+
try {
|
|
3603
|
+
if (executedOnceListeners.has(listener.handler)) return;
|
|
3604
|
+
await listener.handler(...args, client, this.commandkit);
|
|
3605
|
+
executedOnceListeners.add(listener.handler);
|
|
3606
|
+
} catch (e) {
|
|
3607
|
+
Logger.error`Error handling event ${name}${namespace ? ` of namespace ${namespace}` : ""}: ${e}`;
|
|
3608
|
+
}
|
|
3609
|
+
});
|
|
3610
|
+
}));
|
|
3611
|
+
for (const listener of onceSequentialListeners) {
|
|
3532
3612
|
if (broken) break;
|
|
3533
3613
|
await require_EventWorkerContext.runInEventWorkerContext({
|
|
3534
3614
|
event: name,
|
|
@@ -3560,7 +3640,8 @@ var AppEventsHandler = class {
|
|
|
3560
3640
|
...data,
|
|
3561
3641
|
mainListener: onListeners.length > 0 ? {
|
|
3562
3642
|
handler: mainHandler,
|
|
3563
|
-
once: false
|
|
3643
|
+
once: false,
|
|
3644
|
+
parallel: false
|
|
3564
3645
|
} : void 0,
|
|
3565
3646
|
executedOnceListeners
|
|
3566
3647
|
});
|
|
@@ -3571,7 +3652,7 @@ var AppEventsHandler = class {
|
|
|
3571
3652
|
if (onListeners.length > 0) client.on(name, mainHandler);
|
|
3572
3653
|
if (onceListeners.length > 0) client.once(name, onceHandler);
|
|
3573
3654
|
}
|
|
3574
|
-
Logger.info(`🔌 Registered event ${name}${namespace ? ` of namespace ${namespace}` : ""} (${
|
|
3655
|
+
Logger.info(`🔌 Registered event ${name}${namespace ? ` of namespace ${namespace}` : ""} (${onSequentialListeners.length} sequential, ${onParallelListeners.length} parallel, ${onceSequentialListeners.length} once-sequential, ${onceParallelListeners.length} once-parallel)`);
|
|
3575
3656
|
}
|
|
3576
3657
|
}
|
|
3577
3658
|
/**
|
|
@@ -3624,7 +3705,7 @@ async function loadConfigFile(entrypoint = require_constants.COMMANDKIT_CWD) {
|
|
|
3624
3705
|
if (loadedConfig) return loadedConfig;
|
|
3625
3706
|
const filePath = findConfigFile(entrypoint);
|
|
3626
3707
|
if (!filePath) return getConfig();
|
|
3627
|
-
const config = await require_common.loadConfigFileFromPath(filePath.path);
|
|
3708
|
+
const config = await require_common$1.loadConfigFileFromPath(filePath.path);
|
|
3628
3709
|
loadedConfig = config;
|
|
3629
3710
|
return config;
|
|
3630
3711
|
}
|
|
@@ -4229,6 +4310,12 @@ Object.defineProperty(exports, 'DefaultLogger', {
|
|
|
4229
4310
|
return DefaultLogger;
|
|
4230
4311
|
}
|
|
4231
4312
|
});
|
|
4313
|
+
Object.defineProperty(exports, 'FileUpload', {
|
|
4314
|
+
enumerable: true,
|
|
4315
|
+
get: function () {
|
|
4316
|
+
return FileUpload;
|
|
4317
|
+
}
|
|
4318
|
+
});
|
|
4232
4319
|
Object.defineProperty(exports, 'JsonSerialize', {
|
|
4233
4320
|
enumerable: true,
|
|
4234
4321
|
get: function () {
|
|
@@ -4349,6 +4436,12 @@ Object.defineProperty(exports, 'beforeExecute', {
|
|
|
4349
4436
|
return beforeExecute;
|
|
4350
4437
|
}
|
|
4351
4438
|
});
|
|
4439
|
+
Object.defineProperty(exports, 'buildOnly', {
|
|
4440
|
+
enumerable: true,
|
|
4441
|
+
get: function () {
|
|
4442
|
+
return buildOnly;
|
|
4443
|
+
}
|
|
4444
|
+
});
|
|
4352
4445
|
Object.defineProperty(exports, 'cancelAfter', {
|
|
4353
4446
|
enumerable: true,
|
|
4354
4447
|
get: function () {
|
|
@@ -4487,6 +4580,12 @@ Object.defineProperty(exports, 'noAnalytics', {
|
|
|
4487
4580
|
return noAnalytics;
|
|
4488
4581
|
}
|
|
4489
4582
|
});
|
|
4583
|
+
Object.defineProperty(exports, 'noBuildOnly', {
|
|
4584
|
+
enumerable: true,
|
|
4585
|
+
get: function () {
|
|
4586
|
+
return noBuildOnly;
|
|
4587
|
+
}
|
|
4588
|
+
});
|
|
4490
4589
|
Object.defineProperty(exports, 'onApplicationBootstrap', {
|
|
4491
4590
|
enumerable: true,
|
|
4492
4591
|
get: function () {
|
|
@@ -4523,4 +4622,4 @@ Object.defineProperty(exports, 'useStore', {
|
|
|
4523
4622
|
return useStore;
|
|
4524
4623
|
}
|
|
4525
4624
|
});
|
|
4526
|
-
//# sourceMappingURL=commandkit-
|
|
4625
|
+
//# sourceMappingURL=commandkit-SIjTLD2R.js.map
|