commandkit 1.2.0-dev.20251107015846 → 1.2.0-dev.20251108015252
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/dist/{ActionRow-uJxU4UGo.js → ActionRow-D6knpVd6.js} +1 -2
- package/dist/{ActionRow-uJxU4UGo.js.map → ActionRow-D6knpVd6.js.map} +1 -1
- package/dist/{CommandsRouter-CWMipIis.js → CommandsRouter-NAgpWzTJ.js} +1 -5
- package/dist/{CommandsRouter-CWMipIis.js.map → CommandsRouter-NAgpWzTJ.js.map} +1 -1
- package/dist/{CompilerPlugin-CZ4412Zm.js → CompilerPlugin-DbN5-ls3.js} +2 -2
- package/dist/{CompilerPlugin-CZ4412Zm.js.map → CompilerPlugin-DbN5-ls3.js.map} +1 -1
- package/dist/{EventWorkerContext-D_9q1Bm2.js → EventWorkerContext-yTm5vI3b.js} +1 -2
- package/dist/{EventWorkerContext-D_9q1Bm2.js.map → EventWorkerContext-yTm5vI3b.js.map} +1 -1
- package/dist/{EventsRouter-C04XqRKf.js → EventsRouter-D4_vBMhl.js} +1 -5
- package/dist/{EventsRouter-C04XqRKf.js.map → EventsRouter-D4_vBMhl.js.map} +1 -1
- package/dist/{MessageCommandParser-CKh-tM97.js → MessageCommandParser-CD7ynlBO.js} +1 -2
- package/dist/{MessageCommandParser-CKh-tM97.js.map → MessageCommandParser-CD7ynlBO.js.map} +1 -1
- package/dist/{PluginCommon-CPWV5xuX.js → PluginCommon-Bp5T3ubs.js} +1 -2
- package/dist/{PluginCommon-CPWV5xuX.js.map → PluginCommon-Bp5T3ubs.js.map} +1 -1
- package/dist/{RuntimePlugin-COeXe8rP.js → RuntimePlugin-Bq6z-Upz.js} +2 -2
- package/dist/{RuntimePlugin-COeXe8rP.js.map → RuntimePlugin-Bq6z-Upz.js.map} +1 -1
- package/dist/analytics/analytics-engine.js +24 -24
- package/dist/analytics/constants.js +1 -1
- package/dist/analytics/utils.js +24 -24
- package/dist/app/commands/AppCommandRunner.js +24 -24
- package/dist/app/commands/Context.js +24 -24
- package/dist/app/commands/MessageCommandParser.js +1 -1
- package/dist/app/commands/helpers.js +1 -1
- package/dist/app/events/EventWorkerContext.js +1 -1
- package/dist/app/handlers/AppCommandHandler.js +24 -24
- package/dist/app/handlers/AppEventsHandler.js +24 -24
- package/dist/app/index.js +24 -24
- package/dist/app/interrupt/signals.js +2 -2
- package/dist/app/middlewares/permissions.js +24 -24
- package/dist/app/register/CommandRegistrar.js +24 -24
- package/dist/app/router/CommandsRouter.js +1 -1
- package/dist/app/router/EventsRouter.js +1 -1
- package/dist/app/router/index.js +2 -2
- package/dist/{app-process-CPsd2tOG.js → app-process-DCkz7RlU.js} +2 -5
- package/dist/{app-process-CPsd2tOG.js.map → app-process-DCkz7RlU.js.map} +1 -1
- package/dist/{build-2qBFjOm0.js → build-C9EvWSOT.js} +4 -8
- package/dist/{build-2qBFjOm0.js.map → build-C9EvWSOT.js.map} +1 -1
- package/dist/cli/app-process.js +4 -4
- package/dist/cli/build.js +26 -26
- package/dist/cli/common.js +3 -3
- package/dist/cli/development.js +27 -31
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/generators.js +3 -6
- package/dist/cli/generators.js.map +1 -1
- package/dist/cli/information.js +1 -2
- package/dist/cli/information.js.map +1 -1
- package/dist/cli/init.js +24 -27
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/production.js +27 -28
- package/dist/cli/production.js.map +1 -1
- package/dist/cli/type-checker.js +4 -4
- package/dist/{colors-DL3ucTiT.js → colors-CLmBiP9I.js} +1 -2
- package/dist/{colors-DL3ucTiT.js.map → colors-CLmBiP9I.js.map} +1 -1
- package/dist/{commandkit-EYiM6C_P.js → commandkit-Dc56U1Ri.js} +14 -20
- package/dist/{commandkit-EYiM6C_P.js.map → commandkit-Dc56U1Ri.js.map} +1 -1
- package/dist/commandkit.js +24 -24
- package/dist/{common-vl9iZ7Th.js → common-B2-sF49Q.js} +5 -8
- package/dist/{common-vl9iZ7Th.js.map → common-B2-sF49Q.js.map} +1 -1
- package/dist/components/display/container.js +1 -1
- package/dist/components/display/file.js +1 -1
- package/dist/components/display/index.js +8 -8
- package/dist/components/display/label.js +1 -1
- package/dist/components/display/media-gallery.js +1 -1
- package/dist/components/display/poll.js +1 -1
- package/dist/components/display/section.js +1 -1
- package/dist/components/display/separator.js +1 -1
- package/dist/components/display/text-display.js +1 -1
- package/dist/components/index.js +24 -24
- package/dist/components/interactive/action-row/ActionRow.js +1 -1
- package/dist/components/interactive/button/Button.js +24 -24
- package/dist/components/interactive/button/ButtonKit.js +24 -24
- package/dist/components/interactive/modal/Modal.js +24 -24
- package/dist/components/interactive/modal/ModalKit.js +24 -24
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +24 -24
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +24 -24
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +24 -24
- package/dist/components/interactive/select-menu/SelectMenu.js +24 -24
- package/dist/components/interactive/select-menu/StringSelectMenuKit.js +24 -24
- package/dist/components/interactive/select-menu/UserSelectMenuKit.js +24 -24
- package/dist/config/config.js +24 -24
- package/dist/config/default.js +24 -24
- package/dist/config/loader.js +24 -24
- package/dist/{constants-D0dawKxO.js → constants-BqrEmoih.js} +1 -2
- package/dist/{constants-D0dawKxO.js.map → constants-BqrEmoih.js.map} +1 -1
- package/dist/{container-C3ze4nog.js → container-C319x4cG.js} +1 -2
- package/dist/{container-C3ze4nog.js.map → container-C319x4cG.js.map} +1 -1
- package/dist/context/async-context.js +24 -24
- package/dist/context/environment.js +24 -24
- package/dist/{feature-flags-Du04NVnL.js → feature-flags-BjZpBgLv.js} +4 -4
- package/dist/{feature-flags-Du04NVnL.js.map → feature-flags-BjZpBgLv.js.map} +1 -1
- package/dist/{file-DAUOZYhC.js → file-DgEXJx3x.js} +1 -2
- package/dist/{file-DAUOZYhC.js.map → file-DgEXJx3x.js.map} +1 -1
- package/dist/flags/feature-flags.js +25 -25
- package/dist/flags/store.js +1 -1
- package/dist/{helpers-D2_1jih6.js → helpers-0FUA42u8.js} +1 -2
- package/dist/{helpers-D2_1jih6.js.map → helpers-0FUA42u8.js.map} +1 -1
- package/dist/index.js +26 -27
- package/dist/index.js.map +1 -1
- package/dist/kv/kv.js +0 -1
- package/dist/kv/kv.js.map +1 -1
- package/dist/{label-BJle9M13.js → label-CCHbfQW8.js} +1 -2
- package/dist/{label-BJle9M13.js.map → label-CCHbfQW8.js.map} +1 -1
- package/dist/logger/DefaultLogger.js +24 -24
- package/dist/logger/Logger.js +24 -24
- package/dist/{media-gallery-8u1Ql7qo.js → media-gallery-DdU7o9Cf.js} +1 -2
- package/dist/{media-gallery-8u1Ql7qo.js.map → media-gallery-DdU7o9Cf.js.map} +1 -1
- package/dist/plugins/CompilerPlugin.js +2 -2
- package/dist/plugins/PluginCommon.js +1 -1
- package/dist/plugins/RuntimePlugin.js +2 -2
- package/dist/plugins/index.js +24 -24
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +24 -24
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +24 -24
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +24 -24
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +24 -24
- package/dist/{poll-Bc6rjeUS.js → poll-6lSMoohv.js} +1 -2
- package/dist/{poll-Bc6rjeUS.js.map → poll-6lSMoohv.js.map} +1 -1
- package/dist/{section-CAwOrH-Z.js → section-C4qfgzOQ.js} +1 -2
- package/dist/{section-CAwOrH-Z.js.map → section-C4qfgzOQ.js.map} +1 -1
- package/dist/{separator-C___2K-f.js → separator-CsoRs1aX.js} +1 -2
- package/dist/{separator-C___2K-f.js.map → separator-CsoRs1aX.js.map} +1 -1
- package/dist/{signals-Cnqe9dFV.js → signals-C2Ly0wDt.js} +2 -2
- package/dist/{signals-Cnqe9dFV.js.map → signals-C2Ly0wDt.js.map} +1 -1
- package/dist/{store-ZwL2gN6a.js → store-GrsErvli.js} +1 -2
- package/dist/{store-ZwL2gN6a.js.map → store-GrsErvli.js.map} +1 -1
- package/dist/{text-display-BtQR88kY.js → text-display-C0oSz5y0.js} +1 -2
- package/dist/{text-display-BtQR88kY.js.map → text-display-C0oSz5y0.js.map} +1 -1
- package/dist/{type-checker-BckhTCQ9.js → type-checker-CEt5Inbw.js} +3 -5
- package/dist/{type-checker-BckhTCQ9.js.map → type-checker-CEt5Inbw.js.map} +1 -1
- package/dist/{types-package-elMCB4mL.js → types-package-BxIhhZgZ.js} +1 -4
- package/dist/{types-package-elMCB4mL.js.map → types-package-BxIhhZgZ.js.map} +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/dev-hooks.js +24 -24
- package/dist/utils/types-package.js +1 -1
- package/dist/utils/utilities.js +24 -24
- package/dist/{version-CbBY4D9I.js → version-De1NA7Vn.js} +2 -2
- package/dist/{version-CbBY4D9I.js.map → version-De1NA7Vn.js.map} +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
require('../../../colors-
|
|
2
|
-
require('../../../ActionRow-
|
|
1
|
+
require('../../../colors-CLmBiP9I.js');
|
|
2
|
+
require('../../../ActionRow-D6knpVd6.js');
|
|
3
3
|
require('../../../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../../../commandkit-
|
|
4
|
+
const require_commandkit = require('../../../commandkit-Dc56U1Ri.js');
|
|
5
5
|
require('../../../warning-CszH8HeS.js');
|
|
6
6
|
require('../../../common-CEordwf3.js');
|
|
7
7
|
require('../../../common-C2jAjX4U.js');
|
|
8
|
-
require('../../../container-
|
|
9
|
-
require('../../../file-
|
|
10
|
-
require('../../../media-gallery-
|
|
11
|
-
require('../../../section-
|
|
12
|
-
require('../../../separator-
|
|
13
|
-
require('../../../text-display-
|
|
14
|
-
require('../../../label-
|
|
15
|
-
require('../../../poll-
|
|
8
|
+
require('../../../container-C319x4cG.js');
|
|
9
|
+
require('../../../file-DgEXJx3x.js');
|
|
10
|
+
require('../../../media-gallery-DdU7o9Cf.js');
|
|
11
|
+
require('../../../section-C4qfgzOQ.js');
|
|
12
|
+
require('../../../separator-CsoRs1aX.js');
|
|
13
|
+
require('../../../text-display-C0oSz5y0.js');
|
|
14
|
+
require('../../../label-CCHbfQW8.js');
|
|
15
|
+
require('../../../poll-6lSMoohv.js');
|
|
16
16
|
require('../../../display-WDb9wMCv.js');
|
|
17
17
|
require('../../../element-DibzzA5L.js');
|
|
18
18
|
require('../../../types-TC4g3w91.js');
|
|
19
19
|
require('../../../EventInterceptor-BWoEJMHZ.js');
|
|
20
20
|
require('../../../constants-CxkFFZ7p.js');
|
|
21
|
-
require('../../../PluginCommon-
|
|
22
|
-
require('../../../CompilerPlugin-
|
|
23
|
-
require('../../../RuntimePlugin-
|
|
21
|
+
require('../../../PluginCommon-Bp5T3ubs.js');
|
|
22
|
+
require('../../../CompilerPlugin-DbN5-ls3.js');
|
|
23
|
+
require('../../../RuntimePlugin-Bq6z-Upz.js');
|
|
24
24
|
require('../../../types-Cdh4uaFR.js');
|
|
25
25
|
require('../../../resolve-file-url-CJoD0FAn.js');
|
|
26
26
|
require('../../../runtime-Skt5NiOc.js');
|
|
27
27
|
require('../../../utils-Br3eenD1.js');
|
|
28
|
-
require('../../../types-package-
|
|
29
|
-
require('../../../constants-
|
|
30
|
-
require('../../../EventWorkerContext-
|
|
31
|
-
require('../../../signals-
|
|
32
|
-
require('../../../helpers-
|
|
33
|
-
require('../../../MessageCommandParser-
|
|
34
|
-
require('../../../CommandsRouter-
|
|
35
|
-
require('../../../EventsRouter-
|
|
28
|
+
require('../../../types-package-BxIhhZgZ.js');
|
|
29
|
+
require('../../../constants-BqrEmoih.js');
|
|
30
|
+
require('../../../EventWorkerContext-yTm5vI3b.js');
|
|
31
|
+
require('../../../signals-C2Ly0wDt.js');
|
|
32
|
+
require('../../../helpers-0FUA42u8.js');
|
|
33
|
+
require('../../../MessageCommandParser-CD7ynlBO.js');
|
|
34
|
+
require('../../../CommandsRouter-NAgpWzTJ.js');
|
|
35
|
+
require('../../../EventsRouter-D4_vBMhl.js');
|
|
36
36
|
require('../../../router-BvamdzoF.js');
|
|
37
|
-
require('../../../common-
|
|
37
|
+
require('../../../common-B2-sF49Q.js');
|
|
38
38
|
require('../../../CommandKitEventsChannel-2l9Za-le.js');
|
|
39
|
-
require('../../../store-
|
|
39
|
+
require('../../../store-GrsErvli.js');
|
|
40
40
|
|
|
41
41
|
exports.CommonDirectiveTransformer = require_commandkit.CommonDirectiveTransformer;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
require('../../../colors-
|
|
2
|
-
require('../../../ActionRow-
|
|
1
|
+
require('../../../colors-CLmBiP9I.js');
|
|
2
|
+
require('../../../ActionRow-D6knpVd6.js');
|
|
3
3
|
require('../../../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../../../commandkit-
|
|
4
|
+
const require_commandkit = require('../../../commandkit-Dc56U1Ri.js');
|
|
5
5
|
require('../../../warning-CszH8HeS.js');
|
|
6
6
|
require('../../../common-CEordwf3.js');
|
|
7
7
|
require('../../../common-C2jAjX4U.js');
|
|
8
|
-
require('../../../container-
|
|
9
|
-
require('../../../file-
|
|
10
|
-
require('../../../media-gallery-
|
|
11
|
-
require('../../../section-
|
|
12
|
-
require('../../../separator-
|
|
13
|
-
require('../../../text-display-
|
|
14
|
-
require('../../../label-
|
|
15
|
-
require('../../../poll-
|
|
8
|
+
require('../../../container-C319x4cG.js');
|
|
9
|
+
require('../../../file-DgEXJx3x.js');
|
|
10
|
+
require('../../../media-gallery-DdU7o9Cf.js');
|
|
11
|
+
require('../../../section-C4qfgzOQ.js');
|
|
12
|
+
require('../../../separator-CsoRs1aX.js');
|
|
13
|
+
require('../../../text-display-C0oSz5y0.js');
|
|
14
|
+
require('../../../label-CCHbfQW8.js');
|
|
15
|
+
require('../../../poll-6lSMoohv.js');
|
|
16
16
|
require('../../../display-WDb9wMCv.js');
|
|
17
17
|
require('../../../element-DibzzA5L.js');
|
|
18
18
|
require('../../../types-TC4g3w91.js');
|
|
19
19
|
require('../../../EventInterceptor-BWoEJMHZ.js');
|
|
20
20
|
require('../../../constants-CxkFFZ7p.js');
|
|
21
|
-
require('../../../PluginCommon-
|
|
22
|
-
require('../../../CompilerPlugin-
|
|
23
|
-
require('../../../RuntimePlugin-
|
|
21
|
+
require('../../../PluginCommon-Bp5T3ubs.js');
|
|
22
|
+
require('../../../CompilerPlugin-DbN5-ls3.js');
|
|
23
|
+
require('../../../RuntimePlugin-Bq6z-Upz.js');
|
|
24
24
|
require('../../../types-Cdh4uaFR.js');
|
|
25
25
|
require('../../../resolve-file-url-CJoD0FAn.js');
|
|
26
26
|
require('../../../runtime-Skt5NiOc.js');
|
|
27
27
|
require('../../../utils-Br3eenD1.js');
|
|
28
|
-
require('../../../types-package-
|
|
29
|
-
require('../../../constants-
|
|
30
|
-
require('../../../EventWorkerContext-
|
|
31
|
-
require('../../../signals-
|
|
32
|
-
require('../../../helpers-
|
|
33
|
-
require('../../../MessageCommandParser-
|
|
34
|
-
require('../../../CommandsRouter-
|
|
35
|
-
require('../../../EventsRouter-
|
|
28
|
+
require('../../../types-package-BxIhhZgZ.js');
|
|
29
|
+
require('../../../constants-BqrEmoih.js');
|
|
30
|
+
require('../../../EventWorkerContext-yTm5vI3b.js');
|
|
31
|
+
require('../../../signals-C2Ly0wDt.js');
|
|
32
|
+
require('../../../helpers-0FUA42u8.js');
|
|
33
|
+
require('../../../MessageCommandParser-CD7ynlBO.js');
|
|
34
|
+
require('../../../CommandsRouter-NAgpWzTJ.js');
|
|
35
|
+
require('../../../EventsRouter-D4_vBMhl.js');
|
|
36
36
|
require('../../../router-BvamdzoF.js');
|
|
37
|
-
require('../../../common-
|
|
37
|
+
require('../../../common-B2-sF49Q.js');
|
|
38
38
|
require('../../../CommandKitEventsChannel-2l9Za-le.js');
|
|
39
|
-
require('../../../store-
|
|
39
|
+
require('../../../store-GrsErvli.js');
|
|
40
40
|
|
|
41
41
|
exports.MacroPlugin = require_commandkit.MacroPlugin;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
let discord_js = require("discord.js");
|
|
3
|
-
discord_js = require_chunk.__toESM(discord_js);
|
|
4
3
|
|
|
5
4
|
//#region src/components/display/poll.ts
|
|
6
5
|
var PollChildType = /* @__PURE__ */ function(PollChildType$1) {
|
|
@@ -98,4 +97,4 @@ Object.defineProperty(exports, 'PollQuestion', {
|
|
|
98
97
|
return PollQuestion;
|
|
99
98
|
}
|
|
100
99
|
});
|
|
101
|
-
//# sourceMappingURL=poll-
|
|
100
|
+
//# sourceMappingURL=poll-6lSMoohv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poll-
|
|
1
|
+
{"version":3,"file":"poll-6lSMoohv.js","names":[],"sources":["../src/components/display/poll.ts"],"sourcesContent":["import {\n PollLayoutType,\n type PollAnswerData,\n type PollData,\n type PollQuestionMedia,\n} from 'discord.js';\n\n/**\n * The poll properties for the poll component.\n */\nexport interface PollProps\n extends Partial<Omit<PollData, 'question' | 'answers'>> {\n /**\n * The poll children components (question and answers).\n */\n children: PollChildrenType[];\n}\n\nenum PollChildType {\n Answer,\n Question,\n}\n\ntype PollChild<T, Type extends PollChildType> = T & {\n $$typeof: Type;\n};\n\nexport type PollChildrenType =\n | PollChild<PollQuestionProps, PollChildType.Question>\n | PollChild<PollAnswerProps, PollChildType.Answer>;\n\n/**\n * The poll component creates a Discord poll with a question and multiple answer options.\n * @param props The poll properties.\n * @returns The poll data object.\n * @example ```tsx\n * import { Poll, PollQuestion, PollAnswer } from 'commandkit';\n *\n * const poll = <Poll duration={24} allowMultiselect={false}>\n * <PollQuestion>What's your favorite color?</PollQuestion>\n * <PollAnswer emoji=\"🟥\">Red</PollAnswer>\n * <PollAnswer emoji=\"🟦\">Blue</PollAnswer>\n * <PollAnswer emoji=\"🟩\">Green</PollAnswer>\n * </Poll>;\n * ```\n */\nexport function Poll({ children, ...props }: PollProps): PollData {\n const question = children.find(\n (child): child is PollChild<PollQuestionProps, PollChildType.Question> =>\n child.$$typeof === PollChildType.Question,\n );\n\n if (!question) {\n throw new Error('Poll question is required');\n }\n\n const answers = children.filter(\n (child): child is PollChild<PollAnswerProps, PollChildType.Answer> =>\n child.$$typeof === PollChildType.Answer,\n );\n\n const { children: questionChildren, ...questionProps } = question;\n const { duration, allowMultiselect, layoutType, ...restProps } = props;\n\n return {\n duration: duration ?? 24,\n allowMultiselect: allowMultiselect ?? false,\n layoutType: layoutType ?? PollLayoutType.Default,\n ...restProps,\n question: { text: questionChildren, ...questionProps },\n answers: answers.map(\n ({ children: answerChildren, $$typeof, ...answerProps }) => ({\n text: answerChildren,\n ...answerProps,\n }),\n ),\n };\n}\n\n/**\n * The poll question properties for the poll question component.\n */\nexport interface PollQuestionProps extends Omit<PollQuestionMedia, 'text'> {\n /**\n * The question text content.\n */\n children: PollQuestionMedia['text'];\n}\n\n/**\n * The poll question component defines the question text for a Discord poll.\n * @param props The poll question properties.\n * @returns The poll question media object.\n * @example ```tsx\n * import { PollQuestion } from 'commandkit';\n *\n * const question = <PollQuestion>What's your favorite programming language?</PollQuestion>;\n * ```\n */\nexport function PollQuestion({\n children,\n ...props\n}: PollQuestionProps): PollChild<PollQuestionMedia, PollChildType.Question> {\n return { ...props, text: children, $$typeof: PollChildType.Question };\n}\n\n/**\n * The poll answer properties for the poll answer component.\n */\nexport interface PollAnswerProps extends Omit<PollAnswerData, 'text'> {\n /**\n * The answer text content.\n */\n children: PollAnswerData['text'];\n}\n\n/**\n * The poll answer component defines an answer option for a Discord poll.\n * @param props The poll answer properties.\n * @returns The poll answer data object.\n * @example ```tsx\n * import { PollAnswer } from 'commandkit';\n *\n * const answer = <PollAnswer emoji=\"🟦\">TypeScript</PollAnswer>;\n * ```\n */\nexport function PollAnswer({\n children,\n ...props\n}: PollAnswerProps): PollChild<PollAnswerData, PollChildType.Answer> {\n return { ...props, text: children, $$typeof: PollChildType.Answer };\n}\n"],"mappings":";;;;AAkBA,IAAK,0DAAL;AACE;AACA;;EAFG;;;;;;;;;;;;;;;;AA4BL,SAAgB,KAAK,EAAE,SAAU,GAAG,SAA8B;CAChE,MAAM,WAAW,SAAS,MACvB,UACD,MAAM,aAAa,cAAc,SAClC;AAED,KAAI,CAAC,SACH,OAAM,IAAI,MAAM,4BAA4B;CAG9C,MAAM,UAAU,SAAS,QACtB,UACD,MAAM,aAAa,cAAc,OAClC;CAED,MAAM,EAAE,UAAU,iBAAkB,GAAG,kBAAkB;CACzD,MAAM,EAAE,UAAU,kBAAkB,WAAY,GAAG,cAAc;AAEjE,QAAO;EACL,UAAU,YAAY;EACtB,kBAAkB,oBAAoB;EACtC,YAAY,cAAc,0BAAe;EACzC,GAAG;EACH,UAAU;GAAE,MAAM;GAAkB,GAAG;GAAe;EACtD,SAAS,QAAQ,KACd,EAAE,UAAU,gBAAgB,SAAU,GAAG,mBAAmB;GAC3D,MAAM;GACN,GAAG;GACJ,EACF;EACF;;;;;;;;;;;;AAuBH,SAAgB,aAAa,EAC3B,SACA,GAAG,SACuE;AAC1E,QAAO;EAAE,GAAG;EAAO,MAAM;EAAU,UAAU,cAAc;EAAU;;;;;;;;;;;;AAuBvE,SAAgB,WAAW,EACzB,SACA,GAAG,SACgE;AACnE,QAAO;EAAE,GAAG;EAAO,MAAM;EAAU,UAAU,cAAc;EAAQ"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
const require_common = require('./common-CEordwf3.js');
|
|
3
3
|
let discord_js = require("discord.js");
|
|
4
|
-
discord_js = require_chunk.__toESM(discord_js);
|
|
5
4
|
|
|
6
5
|
//#region src/components/display/section.ts
|
|
7
6
|
/**
|
|
@@ -57,4 +56,4 @@ Object.defineProperty(exports, 'Thumbnail', {
|
|
|
57
56
|
return Thumbnail;
|
|
58
57
|
}
|
|
59
58
|
});
|
|
60
|
-
//# sourceMappingURL=section-
|
|
59
|
+
//# sourceMappingURL=section-C4qfgzOQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-
|
|
1
|
+
{"version":3,"file":"section-C4qfgzOQ.js","names":[],"sources":["../src/components/display/section.ts"],"sourcesContent":["import {\n ButtonBuilder,\n SectionBuilder,\n TextDisplayBuilder,\n ThumbnailBuilder,\n} from 'discord.js';\nimport { applyId } from './common';\n\n/**\n * Represents the properties for a section component.\n */\nexport interface SectionProps {\n children?: (ThumbnailBuilder | ButtonBuilder | TextDisplayBuilder)[];\n id?: number;\n}\n\n/**\n * The components v2 section component\n * @param props The properties for the section component.\n * @returns The section builder instance.\n * @example ```tsx\n * import { Section } from 'commandkit';\n *\n * const section = <Section>...</Section>;\n * ```\n */\nexport function Section(props: SectionProps): SectionBuilder {\n const section = new SectionBuilder();\n\n applyId(props, section);\n\n if (props.children != null) {\n if (!Array.isArray(props.children)) props.children = [props.children];\n for (const accessory of props.children.flat()) {\n if (accessory instanceof ThumbnailBuilder) {\n section.setThumbnailAccessory(accessory);\n } else if (accessory instanceof ButtonBuilder) {\n section.setButtonAccessory(accessory);\n } else if (accessory instanceof TextDisplayBuilder) {\n section.addTextDisplayComponents(accessory);\n }\n }\n }\n\n return section;\n}\n\n/**\n * Represents the properties for a thumbnail component.\n */\nexport interface ThumbnailProps {\n id?: number;\n description?: string;\n spoiler?: boolean;\n url: string;\n}\n\n/**\n * The thumbnail component\n * @param props The properties for the thumbnail component.\n * @returns The thumbnail builder instance.\n * @example ```tsx\n * import { Thumbnail } from 'commandkit';\n *\n * const thumbnail = <Thumbnail url=\"https://example.com/image.png\" description=\"An image\" />;\n * ```\n */\nexport function Thumbnail(props: ThumbnailProps) {\n const thumbnail = new ThumbnailBuilder({\n description: props.description,\n spoiler: props.spoiler,\n id: props.id,\n media: { url: props.url },\n });\n\n return thumbnail;\n}\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,SAAgB,QAAQ,OAAqC;CAC3D,MAAM,UAAU,IAAI,2BAAgB;AAEpC,wBAAQ,OAAO,QAAQ;AAEvB,KAAI,MAAM,YAAY,MAAM;AAC1B,MAAI,CAAC,MAAM,QAAQ,MAAM,SAAS,CAAE,OAAM,WAAW,CAAC,MAAM,SAAS;AACrE,OAAK,MAAM,aAAa,MAAM,SAAS,MAAM,CAC3C,KAAI,qBAAqB,4BACvB,SAAQ,sBAAsB,UAAU;WAC/B,qBAAqB,yBAC9B,SAAQ,mBAAmB,UAAU;WAC5B,qBAAqB,8BAC9B,SAAQ,yBAAyB,UAAU;;AAKjD,QAAO;;;;;;;;;;;;AAuBT,SAAgB,UAAU,OAAuB;AAQ/C,QAPkB,IAAI,4BAAiB;EACrC,aAAa,MAAM;EACnB,SAAS,MAAM;EACf,IAAI,MAAM;EACV,OAAO,EAAE,KAAK,MAAM,KAAK;EAC1B,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
let discord_js = require("discord.js");
|
|
3
|
-
discord_js = require_chunk.__toESM(discord_js);
|
|
4
3
|
|
|
5
4
|
//#region src/components/display/separator.ts
|
|
6
5
|
/**
|
|
@@ -24,4 +23,4 @@ Object.defineProperty(exports, 'Separator', {
|
|
|
24
23
|
return Separator;
|
|
25
24
|
}
|
|
26
25
|
});
|
|
27
|
-
//# sourceMappingURL=separator-
|
|
26
|
+
//# sourceMappingURL=separator-CsoRs1aX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator-
|
|
1
|
+
{"version":3,"file":"separator-CsoRs1aX.js","names":[],"sources":["../src/components/display/separator.ts"],"sourcesContent":["import { SeparatorBuilder, SeparatorComponentData } from 'discord.js';\n\n/**\n * Represents the properties for a separator component.\n */\nexport interface SeparatorProps extends Omit<SeparatorComponentData, 'type'> {}\n\n/**\n * The components v2 separator component\n * @param props The properties for the separator component.\n * @returns The separator builder instance.\n * @example ```tsx\n * import { Separator } from 'commandkit';\n *\n * const separator = <Separator />;\n * ```\n */\nexport function Separator(props: SeparatorProps) {\n const separator = new SeparatorBuilder(props);\n return separator;\n}\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAgB,UAAU,OAAuB;AAE/C,QADkB,IAAI,4BAAiB,MAAM"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_error_codes = require('./error-codes-Ds0bnPvT.js');
|
|
2
|
-
const require_EventWorkerContext = require('./EventWorkerContext-
|
|
2
|
+
const require_EventWorkerContext = require('./EventWorkerContext-yTm5vI3b.js');
|
|
3
3
|
|
|
4
4
|
//#region src/app/interrupt/signals.ts
|
|
5
5
|
/**
|
|
@@ -71,4 +71,4 @@ Object.defineProperty(exports, 'stopMiddlewares', {
|
|
|
71
71
|
return stopMiddlewares;
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
-
//# sourceMappingURL=signals-
|
|
74
|
+
//# sourceMappingURL=signals-C2Ly0wDt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals-
|
|
1
|
+
{"version":3,"file":"signals-C2Ly0wDt.js","names":[],"sources":["../src/app/interrupt/signals.ts"],"sourcesContent":["import {\n CommandKitErrorCodes,\n createCommandKitError,\n isCommandKitError,\n} from '../../utils/error-codes';\nimport { eventWorkerContext } from '../events/EventWorkerContext';\n\n/**\n * Stop upcoming middlewares and command execution.\n */\nexport function stopMiddlewares(): never {\n throw createCommandKitError(CommandKitErrorCodes.StopMiddlewares);\n}\n\n/**\n * Rethrow the error if it is a CommandKit error.\n * @param error The error to rethrow.\n * @example try {\n * doSomething();\n * } catch(e) {\n * // do something\n *\n * // throw the error if it's a commandkit error\n * rethrow(e)\n * }\n */\nexport function rethrow(error: unknown): void {\n if (isCommandKitError(error)) throw error;\n}\n\n/**\n * Stops current command assuming it has been redirected to another command.\n */\nexport function redirect(): never {\n throw createCommandKitError(CommandKitErrorCodes.ForwardedCommand);\n}\n\n/**\n * Stops event propagation. This function should be called inside an event handler\n * to prevent further event handling.\n * @example // src/app/events/messageCreate/handler.ts\n * import { stopEvents } from 'commandkit';\n *\n * export default async function messageCreateHandler() {\n * console.log('Message created');\n * // Stop further event propagation\n * stopEvents();\n * }\n */\nexport function stopEvents(): never {\n if (!eventWorkerContext.getStore()) {\n throw new Error('stopEvents() may only be called inside an event handler');\n }\n\n throw createCommandKitError(CommandKitErrorCodes.StopEvents);\n}\n"],"mappings":";;;;;;;AAUA,SAAgB,kBAAyB;AACvC,OAAM,0CAAsB,yCAAqB,gBAAgB;;;;;;;;;;;;;;AAenE,SAAgB,QAAQ,OAAsB;AAC5C,KAAI,sCAAkB,MAAM,CAAE,OAAM;;;;;AAMtC,SAAgB,WAAkB;AAChC,OAAM,0CAAsB,yCAAqB,iBAAiB;;;;;;;;;;;;;;AAepE,SAAgB,aAAoB;AAClC,KAAI,CAAC,8CAAmB,UAAU,CAChC,OAAM,IAAI,MAAM,0DAA0D;AAG5E,OAAM,0CAAsB,yCAAqB,WAAW"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
let discord_js = require("discord.js");
|
|
3
|
-
discord_js = require_chunk.__toESM(discord_js);
|
|
4
3
|
|
|
5
4
|
//#region src/flags/store.ts
|
|
6
5
|
/**
|
|
@@ -16,4 +15,4 @@ Object.defineProperty(exports, 'FlagStore', {
|
|
|
16
15
|
return FlagStore;
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
|
-
//# sourceMappingURL=store-
|
|
18
|
+
//# sourceMappingURL=store-GrsErvli.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-
|
|
1
|
+
{"version":3,"file":"store-GrsErvli.js","names":[],"sources":["../src/flags/store.ts"],"sourcesContent":["import type { FeatureFlag } from './feature-flags';\nimport { Collection } from 'discord.js';\n\n/**\n * Represents a store for feature flags.\n * This store extends the Collection class to manage feature flags by their keys.\n */\nexport class FlagStore extends Collection<string, FeatureFlag<any, any>> {}\n"],"mappings":";;;;;;;;AAOA,IAAa,YAAb,cAA+B,sBAA0C"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
let discord_js = require("discord.js");
|
|
3
|
-
discord_js = require_chunk.__toESM(discord_js);
|
|
4
3
|
|
|
5
4
|
//#region src/components/display/text-display.ts
|
|
6
5
|
/**
|
|
@@ -29,4 +28,4 @@ Object.defineProperty(exports, 'TextDisplay', {
|
|
|
29
28
|
return TextDisplay;
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
|
-
//# sourceMappingURL=text-display-
|
|
31
|
+
//# sourceMappingURL=text-display-C0oSz5y0.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-display-
|
|
1
|
+
{"version":3,"file":"text-display-C0oSz5y0.js","names":[],"sources":["../src/components/display/text-display.ts"],"sourcesContent":["import { TextDisplayBuilder, TextDisplayComponentData } from 'discord.js';\n\n/**\n * Represents a type that can be encoded as a string.\n */\nexport type StringEncodable = string | number | boolean;\n\n/**\n * Represents the properties for a text display component.\n * This interface extends the TextDisplayComponentData type from discord.js,\n * excluding the 'type' and 'content' properties.\n */\nexport interface TextDisplayProps\n extends Omit<TextDisplayComponentData, 'type' | 'content'> {\n children?: StringEncodable | StringEncodable[];\n content?: string;\n}\n\n/**\n * The components v2 text display component\n * @param props The properties for the text display component.\n * @returns The text display builder instance.\n * @example ```tsx\n * import { TextDisplay } from 'commandkit';\n *\n * const textDisplay = <TextDisplay content=\"Hello, world!\" />;\n * // or\n * const textDisplay = <TextDisplay>Some text content</TextDisplay>;\n * ```\n */\nexport function TextDisplay(props: TextDisplayProps) {\n const textDisplay = new TextDisplayBuilder(props);\n\n if (!props.content && props.children) {\n if (Array.isArray(props.children)) {\n textDisplay.setContent(props.children.join(' '));\n } else {\n textDisplay.setContent(\n typeof props.children === 'string'\n ? props.children\n : String(props.children),\n );\n }\n }\n\n return textDisplay;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,SAAgB,YAAY,OAAyB;CACnD,MAAM,cAAc,IAAI,8BAAmB,MAAM;AAEjD,KAAI,CAAC,MAAM,WAAW,MAAM,SAC1B,KAAI,MAAM,QAAQ,MAAM,SAAS,CAC/B,aAAY,WAAW,MAAM,SAAS,KAAK,IAAI,CAAC;KAEhD,aAAY,WACV,OAAO,MAAM,aAAa,WAC1B,MAAM,WACN,OAAO,MAAM,SAAS,CACvB;AAIL,QAAO"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
|
-
const require_colors = require('./colors-
|
|
3
|
-
const require_common = require('./common-
|
|
2
|
+
const require_colors = require('./colors-CLmBiP9I.js');
|
|
3
|
+
const require_common = require('./common-B2-sF49Q.js');
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
|
-
node_fs = require_chunk.__toESM(node_fs);
|
|
6
5
|
let node_path = require("node:path");
|
|
7
|
-
node_path = require_chunk.__toESM(node_path);
|
|
8
6
|
|
|
9
7
|
//#region src/cli/type-checker.ts
|
|
10
8
|
const TS_NOT_FOUND_ERR = `TypeScript must be installed in order to use the type checker. Please install it using \`npm install typescript\` or \`yarn add typescript\``;
|
|
@@ -87,4 +85,4 @@ Object.defineProperty(exports, 'performTypeCheck', {
|
|
|
87
85
|
return performTypeCheck;
|
|
88
86
|
}
|
|
89
87
|
});
|
|
90
|
-
//# sourceMappingURL=type-checker-
|
|
88
|
+
//# sourceMappingURL=type-checker-CEt5Inbw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-checker-
|
|
1
|
+
{"version":3,"file":"type-checker-CEt5Inbw.js","names":[],"sources":["../src/cli/type-checker.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { loadTypeScript } from './common';\nimport { join, relative } from 'node:path';\nimport colors from '../utils/colors';\n\nconst TS_NOT_FOUND_ERR = `TypeScript must be installed in order to use the type checker. Please install it using \\`npm install typescript\\` or \\`yarn add typescript\\``;\n\n/**\n * Formats a TypeScript diagnostic message in a pretty, readable format\n * @private\n * @internal\n */\nfunction formatDiagnostic(\n ts: typeof import('typescript'),\n diagnostic: import('typescript').Diagnostic,\n cwd: string,\n): string {\n const messageText = ts.flattenDiagnosticMessageText(\n diagnostic.messageText,\n '\\n',\n );\n\n if (!diagnostic.file) {\n return `${colors.red('error')}: ${messageText}`;\n }\n\n const { line, character } = ts.getLineAndCharacterOfPosition(\n diagnostic.file,\n diagnostic.start!,\n );\n const fileName = relative(cwd, diagnostic.file.fileName);\n const position = `${line + 1}:${character + 1}`;\n const errorCode = diagnostic.code ? `TS${diagnostic.code}` : '';\n\n // Format the error message nicely\n return [\n `${colors.bold(colors.cyan(fileName))}:${colors.bold(colors.yellow(position))} - ${colors.red('error')} ${colors.gray(errorCode)}`,\n `${messageText}`,\n ].join('\\n');\n}\n\n/**\n * Performs a type check on the project using TypeScript.\n * @param path The project root or cwd\n * @private\n * @internal\n */\nexport async function performTypeCheck(path: string) {\n const tsconfigPath = join(path, 'tsconfig.json');\n\n if (!existsSync(tsconfigPath)) return;\n\n const ts = await loadTypeScript(TS_NOT_FOUND_ERR);\n\n // Format host for error reporting\n const formatHost = {\n getCanonicalFileName: (path: string) => path,\n getCurrentDirectory: ts.sys.getCurrentDirectory,\n getNewLine: () => ts.sys.newLine,\n };\n\n // Read tsconfig.json\n const configFile = ts.readConfigFile(tsconfigPath, ts.sys.readFile);\n\n if (configFile.error) {\n console.error(\n colors.red(\n `Error reading tsconfig.json: ${ts.formatDiagnostic(configFile.error, formatHost)}`,\n ),\n );\n process.exit(1);\n }\n\n // Parse the config file\n const parsedConfig = ts.parseJsonConfigFileContent(\n configFile.config,\n ts.sys,\n path,\n );\n\n // Force noEmit to true as we only want type checking\n parsedConfig.options.noEmit = true;\n\n // Create a program\n const program = ts.createProgram({\n rootNames: parsedConfig.fileNames,\n options: parsedConfig.options,\n projectReferences: parsedConfig.projectReferences,\n });\n\n // Get the diagnostics\n const diagnostics = [\n ...program.getOptionsDiagnostics(),\n ...program.getGlobalDiagnostics(),\n ...program.getSyntacticDiagnostics(),\n ...program.getSemanticDiagnostics(),\n ];\n\n // Report any errors\n if (diagnostics.length > 0) {\n console.log('');\n console.error(\n colors.bold(\n colors.red('Type checking failed with the following errors:'),\n ),\n );\n console.log('');\n\n // Group diagnostics by file for better readability\n const byFile = new Map<string, import('typescript').Diagnostic[]>();\n\n for (const diagnostic of diagnostics) {\n const fileName = diagnostic.file ? diagnostic.file.fileName : 'Global';\n if (!byFile.has(fileName)) {\n byFile.set(fileName, []);\n }\n byFile.get(fileName)!.push(diagnostic);\n }\n\n // Pretty-print each diagnostic\n const totalErrors = diagnostics.length;\n let counter = 0;\n\n for (const [_, fileDiags] of byFile) {\n for (const diagnostic of fileDiags) {\n counter++;\n console.log(formatDiagnostic(ts, diagnostic, path));\n // Add separator between errors for better readability, except for the last one\n if (counter < totalErrors) {\n console.log('');\n }\n }\n }\n\n console.log('');\n console.error(\n colors.bold(\n colors.red(`Found ${totalErrors} error${totalErrors > 1 ? 's' : ''}`),\n ),\n );\n console.log('');\n\n process.exit(1);\n }\n\n console.log(colors.green('✓ Type checking completed successfully.'));\n}\n"],"mappings":";;;;;;;AAKA,MAAM,mBAAmB;;;;;;AAOzB,SAAS,iBACT,IACA,YACA,KACS;CACP,MAAM,cAAc,GAAG,6BACrB,WAAW,aACX,KACD;AAED,KAAI,CAAC,WAAW,KACd,QAAO,GAAG,8BAAO,IAAI,QAAQ,CAAC,IAAI;CAGpC,MAAM,EAAE,MAAM,cAAc,GAAG,8BAC7B,WAAW,MACX,WAAW,MACZ;CACD,MAAM,mCAAoB,KAAK,WAAW,KAAK,SAAS;CACxD,MAAM,WAAW,GAAG,OAAO,EAAE,GAAG,YAAY;CAC5C,MAAM,YAAY,WAAW,OAAO,KAAK,WAAW,SAAS;AAG7D,QAAO,CACP,GAAG,8BAAO,KAAK,8BAAO,KAAK,SAAS,CAAC,CAAC,GAAG,8BAAO,KAAK,8BAAO,OAAO,SAAS,CAAC,CAAC,KAAK,8BAAO,IAAI,QAAQ,CAAC,GAAG,8BAAO,KAAK,UAAU,IAChI,GAAG,cAAc,CACjB,KAAK,KAAK;;;;;;;;AASZ,eAAsB,iBAAiB,MAAc;CACnD,MAAM,mCAAoB,MAAM,gBAAgB;AAEhD,KAAI,yBAAY,aAAa,CAAE;CAE/B,MAAM,KAAK,MAAM,8BAAe,iBAAiB;CAGjD,MAAM,aAAa;EACjB,uBAAuB,WAAiB;EACxC,qBAAqB,GAAG,IAAI;EAC5B,kBAAkB,GAAG,IAAI;EAC1B;CAGD,MAAM,aAAa,GAAG,eAAe,cAAc,GAAG,IAAI,SAAS;AAEnE,KAAI,WAAW,OAAO;AACpB,UAAQ,MACN,8BAAO,IACL,gCAAgC,GAAG,iBAAiB,WAAW,OAAO,WAAW,GAClF,CACF;AACD,UAAQ,KAAK,EAAE;;CAIjB,MAAM,eAAe,GAAG,2BACtB,WAAW,QACX,GAAG,KACH,KACD;AAGD,cAAa,QAAQ,SAAS;CAG9B,MAAM,UAAU,GAAG,cAAc;EAC/B,WAAW,aAAa;EACxB,SAAS,aAAa;EACtB,mBAAmB,aAAa;EACjC,CAAC;CAGF,MAAM,cAAc;EACpB,GAAG,QAAQ,uBAAuB;EAClC,GAAG,QAAQ,sBAAsB;EACjC,GAAG,QAAQ,yBAAyB;EACpC,GAAG,QAAQ,wBAAwB;EAAC;AAIpC,KAAI,YAAY,SAAS,GAAG;AAC1B,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI,kDAAkD,CAC9D,CACF;AACD,UAAQ,IAAI,GAAG;EAGf,MAAM,yBAAS,IAAI,KAAgD;AAEnE,OAAK,MAAM,cAAc,aAAa;GACpC,MAAM,WAAW,WAAW,OAAO,WAAW,KAAK,WAAW;AAC9D,OAAI,CAAC,OAAO,IAAI,SAAS,CACvB,QAAO,IAAI,UAAU,EAAE,CAAC;AAE1B,UAAO,IAAI,SAAS,CAAE,KAAK,WAAW;;EAIxC,MAAM,cAAc,YAAY;EAChC,IAAI,UAAU;AAEd,OAAK,MAAM,CAAC,GAAG,cAAc,OAC3B,MAAK,MAAM,cAAc,WAAW;AAClC;AACA,WAAQ,IAAI,iBAAiB,IAAI,YAAY,KAAK,CAAC;AAEnD,OAAI,UAAU,YACZ,SAAQ,IAAI,GAAG;;AAKrB,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI,SAAS,YAAY,QAAQ,cAAc,IAAI,MAAM,KAAK,CACtE,CACF;AACD,UAAQ,IAAI,GAAG;AAEf,UAAQ,KAAK,EAAE;;AAGjB,SAAQ,IAAI,8BAAO,MAAM,0CAA0C,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
const require_constants = require('./constants-CxkFFZ7p.js');
|
|
3
3
|
let node_fs = require("node:fs");
|
|
4
|
-
node_fs = require_chunk.__toESM(node_fs);
|
|
5
4
|
let node_path = require("node:path");
|
|
6
|
-
node_path = require_chunk.__toESM(node_path);
|
|
7
5
|
let node_fs_promises = require("node:fs/promises");
|
|
8
|
-
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
9
6
|
|
|
10
7
|
//#region src/utils/types-package.ts
|
|
11
8
|
/**
|
|
@@ -71,4 +68,4 @@ Object.defineProperty(exports, 'rewriteCommandDeclaration', {
|
|
|
71
68
|
return rewriteCommandDeclaration;
|
|
72
69
|
}
|
|
73
70
|
});
|
|
74
|
-
//# sourceMappingURL=types-package-
|
|
71
|
+
//# sourceMappingURL=types-package-BxIhhZgZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-package-
|
|
1
|
+
{"version":3,"file":"types-package-BxIhhZgZ.js","names":[],"sources":["../src/utils/types-package.ts"],"sourcesContent":["import { mkdir, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { COMMANDKIT_CWD, COMMANDKIT_IS_DEV } from './constants';\nimport { existsSync } from 'node:fs';\n\n/**\n * @private\n */\nexport async function generateTypesPackage(force = false) {\n const location = join(COMMANDKIT_CWD, 'node_modules', 'commandkit-types');\n if (!COMMANDKIT_IS_DEV && !force) return location;\n const packageJSON = join(location, 'package.json');\n const index = join(location, 'index.js');\n const types = join(location, 'index.d.ts');\n const command = join(location, 'command.d.ts');\n\n const packageJSONContent = {\n name: 'commandkit-types',\n version: '1.0.0',\n description: 'CommandKit types package',\n type: 'commonjs',\n main: 'index.js',\n types: 'index.d.ts',\n };\n\n const indexContent = `module.exports = {};`;\n\n // Restructuring the type declarations to properly extend rather than replace types\n const typesContent = `// Main types index file - imports all type declarations\nimport './command';\nexport {};\n`;\n\n // Properly set up command types to extend the CommandTypeData interface\n const commandTypesContent = `// Auto-generated command types\n export {};\ndeclare module 'commandkit' {\n type CommandTypeData = string\n}`;\n\n await mkdir(location, { recursive: true }).catch(() => {});\n await writeFile(packageJSON, JSON.stringify(packageJSONContent, null, 2));\n await writeFile(index, indexContent);\n await writeFile(types, typesContent);\n await writeFile(command, commandTypesContent);\n\n return location;\n}\n\n/**\n * @private\n */\nexport async function rewriteCommandDeclaration(data: string) {\n const commandTypesContent = `// Auto-generated command types\n declare module 'commandkit' {\n ${data}\n}\n export {};\n`;\n\n const location = join(COMMANDKIT_CWD, 'node_modules', 'commandkit-types');\n\n if (!existsSync(location)) return;\n\n const type = join(location, 'command.d.ts');\n\n await writeFile(type, commandTypesContent, { encoding: 'utf-8' });\n}\n"],"mappings":";;;;;;;;;;AAQA,eAAsB,qBAAqB,QAAQ,OAAO;CACxD,MAAM,+BAAgB,kCAAgB,gBAAgB,mBAAmB;AACzE,KAAI,CAAC,uCAAqB,CAAC,MAAO,QAAO;CACzC,MAAM,kCAAmB,UAAU,eAAe;CAClD,MAAM,4BAAa,UAAU,WAAW;CACxC,MAAM,4BAAa,UAAU,aAAa;CAC1C,MAAM,8BAAe,UAAU,eAAe;CAE9C,MAAM,qBAAqB;EACzB,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,MAAM;EACN,OAAO;EACR;CAED,MAAM,eAAe;CAGrB,MAAM,eAAe;;;;CAMrB,MAAM,sBAAsB;;;;;AAM5B,mCAAY,UAAU,EAAE,WAAW,MAAM,CAAC,CAAC,YAAY,GAAG;AAC1D,uCAAgB,aAAa,KAAK,UAAU,oBAAoB,MAAM,EAAE,CAAC;AACzE,uCAAgB,OAAO,aAAa;AACpC,uCAAgB,OAAO,aAAa;AACpC,uCAAgB,SAAS,oBAAoB;AAE7C,QAAO;;;;;AAMT,eAAsB,0BAA0B,MAAc;CAC5D,MAAM,sBAAsB;;MAExB,KAAI;;;;CAKR,MAAM,+BAAgB,kCAAgB,gBAAgB,mBAAmB;AAEzE,KAAI,yBAAY,SAAS,CAAE;AAI3B,2DAFkB,UAAU,eAAe,EAErB,qBAAqB,EAAE,UAAU,SAAS,CAAC"}
|
package/dist/utils/colors.js
CHANGED
package/dist/utils/dev-hooks.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
require('../colors-
|
|
2
|
-
require('../ActionRow-
|
|
1
|
+
require('../colors-CLmBiP9I.js');
|
|
2
|
+
require('../ActionRow-D6knpVd6.js');
|
|
3
3
|
require('../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
4
|
+
const require_commandkit = require('../commandkit-Dc56U1Ri.js');
|
|
5
5
|
require('../warning-CszH8HeS.js');
|
|
6
6
|
require('../common-CEordwf3.js');
|
|
7
7
|
require('../common-C2jAjX4U.js');
|
|
8
|
-
require('../container-
|
|
9
|
-
require('../file-
|
|
10
|
-
require('../media-gallery-
|
|
11
|
-
require('../section-
|
|
12
|
-
require('../separator-
|
|
13
|
-
require('../text-display-
|
|
14
|
-
require('../label-
|
|
15
|
-
require('../poll-
|
|
8
|
+
require('../container-C319x4cG.js');
|
|
9
|
+
require('../file-DgEXJx3x.js');
|
|
10
|
+
require('../media-gallery-DdU7o9Cf.js');
|
|
11
|
+
require('../section-C4qfgzOQ.js');
|
|
12
|
+
require('../separator-CsoRs1aX.js');
|
|
13
|
+
require('../text-display-C0oSz5y0.js');
|
|
14
|
+
require('../label-CCHbfQW8.js');
|
|
15
|
+
require('../poll-6lSMoohv.js');
|
|
16
16
|
require('../display-WDb9wMCv.js');
|
|
17
17
|
require('../element-DibzzA5L.js');
|
|
18
18
|
require('../types-TC4g3w91.js');
|
|
19
19
|
require('../EventInterceptor-BWoEJMHZ.js');
|
|
20
20
|
require('../constants-CxkFFZ7p.js');
|
|
21
|
-
require('../PluginCommon-
|
|
22
|
-
require('../CompilerPlugin-
|
|
23
|
-
require('../RuntimePlugin-
|
|
21
|
+
require('../PluginCommon-Bp5T3ubs.js');
|
|
22
|
+
require('../CompilerPlugin-DbN5-ls3.js');
|
|
23
|
+
require('../RuntimePlugin-Bq6z-Upz.js');
|
|
24
24
|
require('../types-Cdh4uaFR.js');
|
|
25
25
|
require('../resolve-file-url-CJoD0FAn.js');
|
|
26
26
|
require('../runtime-Skt5NiOc.js');
|
|
27
27
|
require('../utils-Br3eenD1.js');
|
|
28
|
-
require('../types-package-
|
|
29
|
-
require('../constants-
|
|
30
|
-
require('../EventWorkerContext-
|
|
31
|
-
require('../signals-
|
|
32
|
-
require('../helpers-
|
|
33
|
-
require('../MessageCommandParser-
|
|
34
|
-
require('../CommandsRouter-
|
|
35
|
-
require('../EventsRouter-
|
|
28
|
+
require('../types-package-BxIhhZgZ.js');
|
|
29
|
+
require('../constants-BqrEmoih.js');
|
|
30
|
+
require('../EventWorkerContext-yTm5vI3b.js');
|
|
31
|
+
require('../signals-C2Ly0wDt.js');
|
|
32
|
+
require('../helpers-0FUA42u8.js');
|
|
33
|
+
require('../MessageCommandParser-CD7ynlBO.js');
|
|
34
|
+
require('../CommandsRouter-NAgpWzTJ.js');
|
|
35
|
+
require('../EventsRouter-D4_vBMhl.js');
|
|
36
36
|
require('../router-BvamdzoF.js');
|
|
37
|
-
require('../common-
|
|
37
|
+
require('../common-B2-sF49Q.js');
|
|
38
38
|
require('../CommandKitEventsChannel-2l9Za-le.js');
|
|
39
|
-
require('../store-
|
|
39
|
+
require('../store-GrsErvli.js');
|
|
40
40
|
|
|
41
41
|
exports.registerDevHooks = require_commandkit.registerDevHooks;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require('../constants-CxkFFZ7p.js');
|
|
2
|
-
const require_types_package = require('../types-package-
|
|
2
|
+
const require_types_package = require('../types-package-BxIhhZgZ.js');
|
|
3
3
|
|
|
4
4
|
exports.generateTypesPackage = require_types_package.generateTypesPackage;
|
|
5
5
|
exports.rewriteCommandDeclaration = require_types_package.rewriteCommandDeclaration;
|
package/dist/utils/utilities.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
require('../colors-
|
|
2
|
-
require('../ActionRow-
|
|
1
|
+
require('../colors-CLmBiP9I.js');
|
|
2
|
+
require('../ActionRow-D6knpVd6.js');
|
|
3
3
|
require('../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
4
|
+
const require_commandkit = require('../commandkit-Dc56U1Ri.js');
|
|
5
5
|
require('../warning-CszH8HeS.js');
|
|
6
6
|
require('../common-CEordwf3.js');
|
|
7
7
|
require('../common-C2jAjX4U.js');
|
|
8
|
-
require('../container-
|
|
9
|
-
require('../file-
|
|
10
|
-
require('../media-gallery-
|
|
11
|
-
require('../section-
|
|
12
|
-
require('../separator-
|
|
13
|
-
require('../text-display-
|
|
14
|
-
require('../label-
|
|
15
|
-
require('../poll-
|
|
8
|
+
require('../container-C319x4cG.js');
|
|
9
|
+
require('../file-DgEXJx3x.js');
|
|
10
|
+
require('../media-gallery-DdU7o9Cf.js');
|
|
11
|
+
require('../section-C4qfgzOQ.js');
|
|
12
|
+
require('../separator-CsoRs1aX.js');
|
|
13
|
+
require('../text-display-C0oSz5y0.js');
|
|
14
|
+
require('../label-CCHbfQW8.js');
|
|
15
|
+
require('../poll-6lSMoohv.js');
|
|
16
16
|
require('../display-WDb9wMCv.js');
|
|
17
17
|
require('../element-DibzzA5L.js');
|
|
18
18
|
require('../types-TC4g3w91.js');
|
|
19
19
|
require('../EventInterceptor-BWoEJMHZ.js');
|
|
20
20
|
require('../constants-CxkFFZ7p.js');
|
|
21
|
-
require('../PluginCommon-
|
|
22
|
-
require('../CompilerPlugin-
|
|
23
|
-
require('../RuntimePlugin-
|
|
21
|
+
require('../PluginCommon-Bp5T3ubs.js');
|
|
22
|
+
require('../CompilerPlugin-DbN5-ls3.js');
|
|
23
|
+
require('../RuntimePlugin-Bq6z-Upz.js');
|
|
24
24
|
require('../types-Cdh4uaFR.js');
|
|
25
25
|
require('../resolve-file-url-CJoD0FAn.js');
|
|
26
26
|
require('../runtime-Skt5NiOc.js');
|
|
27
27
|
require('../utils-Br3eenD1.js');
|
|
28
|
-
require('../types-package-
|
|
29
|
-
require('../constants-
|
|
30
|
-
require('../EventWorkerContext-
|
|
31
|
-
require('../signals-
|
|
32
|
-
require('../helpers-
|
|
33
|
-
require('../MessageCommandParser-
|
|
34
|
-
require('../CommandsRouter-
|
|
35
|
-
require('../EventsRouter-
|
|
28
|
+
require('../types-package-BxIhhZgZ.js');
|
|
29
|
+
require('../constants-BqrEmoih.js');
|
|
30
|
+
require('../EventWorkerContext-yTm5vI3b.js');
|
|
31
|
+
require('../signals-C2Ly0wDt.js');
|
|
32
|
+
require('../helpers-0FUA42u8.js');
|
|
33
|
+
require('../MessageCommandParser-CD7ynlBO.js');
|
|
34
|
+
require('../CommandsRouter-NAgpWzTJ.js');
|
|
35
|
+
require('../EventsRouter-D4_vBMhl.js');
|
|
36
36
|
require('../router-BvamdzoF.js');
|
|
37
|
-
require('../common-
|
|
37
|
+
require('../common-B2-sF49Q.js');
|
|
38
38
|
require('../CommandKitEventsChannel-2l9Za-le.js');
|
|
39
|
-
require('../store-
|
|
39
|
+
require('../store-GrsErvli.js');
|
|
40
40
|
|
|
41
41
|
exports.JsonSerialize = require_commandkit.JsonSerialize;
|
|
42
42
|
exports.buildOnly = require_commandkit.buildOnly;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* The current version of CommandKit.
|
|
8
8
|
*/
|
|
9
|
-
const version = "1.2.0-dev.
|
|
9
|
+
const version = "1.2.0-dev.20251108015252";
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
12
|
Object.defineProperty(exports, 'version', {
|
|
@@ -15,4 +15,4 @@ Object.defineProperty(exports, 'version', {
|
|
|
15
15
|
return version;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
//# sourceMappingURL=version-
|
|
18
|
+
//# sourceMappingURL=version-De1NA7Vn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-De1NA7Vn.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["/**\n * @private\n */\nfunction $version(): string {\n 'use macro';\n return require('../package.json').version;\n}\n\n/**\n * The current version of CommandKit.\n */\nexport const version: string = $version();\n"],"mappings":";;;;;;;;AAWA,MAAa,UAA4B"}
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commandkit",
|
|
3
3
|
"description": "Beginner friendly command & event handler for Discord.js",
|
|
4
|
-
"version": "1.2.0-dev.
|
|
4
|
+
"version": "1.2.0-dev.20251108015252",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"tsx": "^4.19.2",
|
|
188
188
|
"typescript": "^5.7.3",
|
|
189
189
|
"vitest": "^3.0.5",
|
|
190
|
-
"tsconfig": "0.0.0-dev.
|
|
190
|
+
"tsconfig": "0.0.0-dev.20251108015252"
|
|
191
191
|
},
|
|
192
192
|
"engines": {
|
|
193
193
|
"node": ">=24"
|