commandkit 1.0.0-dev.20250529125116 → 1.0.0-dev.20250530125137
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-CmTHbo2t.js +25 -0
- package/dist/ActionRow-CmTHbo2t.js.map +1 -0
- package/dist/ActionRow-D0wafJhZ.d.ts +16 -0
- package/dist/Button-Bl5nbwTS.d.ts +32 -0
- package/dist/ButtonKit-BSI7lCI0.d.ts +68 -0
- package/dist/ChannelSelectMenuKit-L15A2jpT.d.ts +51 -0
- package/dist/CommandKit-DDrQtQns.js +3281 -0
- package/dist/CommandKit-DDrQtQns.js.map +1 -0
- package/dist/CommandKit-DHRwL4K_.d.ts +926 -0
- package/dist/CommandKit.d.ts +33 -13
- package/dist/CommandKit.js +46 -16
- package/dist/CommandKitEventsChannel-B6LKgxmv.js +44 -0
- package/dist/CommandKitEventsChannel-B6LKgxmv.js.map +1 -0
- package/dist/CommandsRouter-BHaPno8o.js +127 -0
- package/dist/CommandsRouter-BHaPno8o.js.map +1 -0
- package/dist/CommandsRouter-C7X-eXE2.d.ts +67 -0
- package/dist/CompilerPlugin-XzuGixkC.js +32 -0
- package/dist/CompilerPlugin-XzuGixkC.js.map +1 -0
- package/dist/CompilerPluginRuntime-zFCCw1kM.js +70 -0
- package/dist/CompilerPluginRuntime-zFCCw1kM.js.map +1 -0
- package/dist/DefaultLogger-D3G0rGnV.d.ts +30 -0
- package/dist/EventInterceptor-D_oEWSnF.d.ts +84 -0
- package/dist/EventInterceptor-DtRINyTP.js +140 -0
- package/dist/EventInterceptor-DtRINyTP.js.map +1 -0
- package/dist/EventWorkerContext-Bt96B-EK.d.ts +19 -0
- package/dist/EventWorkerContext-XZGSHn5F.js +45 -0
- package/dist/EventWorkerContext-XZGSHn5F.js.map +1 -0
- package/dist/EventsRouter-BacqK6z3.d.ts +90 -0
- package/dist/EventsRouter-CqnrlbjN.js +133 -0
- package/dist/EventsRouter-CqnrlbjN.js.map +1 -0
- package/dist/ILogger-BTMQuall.d.ts +11 -0
- package/dist/ILogger-DucYb0bG.js +0 -0
- package/dist/Logger-A3wjB7L1.d.ts +17 -0
- package/dist/MentionableSelectMenuKit-BiUSKUtZ.d.ts +51 -0
- package/dist/MessageCommandParser-B13Pkwo9.js +200 -0
- package/dist/MessageCommandParser-B13Pkwo9.js.map +1 -0
- package/dist/MessageCommandParser-tzroBwij.d.ts +62 -0
- package/dist/Modal-Cxm6cs5c.d.ts +58 -0
- package/dist/ModalKit-CKtQ8eXW.d.ts +66 -0
- package/dist/PluginCommon-DPqnQngK.js +48 -0
- package/dist/PluginCommon-DPqnQngK.js.map +1 -0
- package/dist/RoleSelectMenuKit-BSMKkru2.d.ts +51 -0
- package/dist/RuntimePlugin-CKsd83M3.js +130 -0
- package/dist/RuntimePlugin-CKsd83M3.js.map +1 -0
- package/dist/SelectMenu-b7jgrkjO.d.ts +36 -0
- package/dist/StringSelectMenuKit-B9FHTe48.d.ts +51 -0
- package/dist/UserSelectMenuKit-DiP0imyo.d.ts +51 -0
- package/dist/app/commands/AppCommandRunner.d.ts +33 -13
- package/dist/app/commands/AppCommandRunner.js +38 -3
- package/dist/app/commands/Context.d.ts +33 -13
- package/dist/app/commands/Context.js +40 -3
- package/dist/app/commands/MessageCommandParser.d.ts +2 -60
- package/dist/app/commands/MessageCommandParser.js +5 -2
- package/dist/app/commands/helpers.d.ts +2 -7
- package/dist/app/commands/helpers.js +4 -2
- package/dist/app/events/EventWorkerContext.d.ts +34 -28
- package/dist/app/events/EventWorkerContext.js +6 -2
- package/dist/app/handlers/AppCommandHandler.d.ts +33 -13
- package/dist/app/handlers/AppCommandHandler.js +38 -8
- package/dist/app/handlers/AppEventsHandler.d.ts +33 -13
- package/dist/app/handlers/AppEventsHandler.js +38 -3
- package/dist/app/index.d.ts +33 -15
- package/dist/app/index.js +51 -8
- package/dist/app/middleware/signals.d.ts +2 -18
- package/dist/app/middleware/signals.js +6 -2
- package/dist/app/register/CommandRegistrar.d.ts +33 -13
- package/dist/app/register/CommandRegistrar.js +38 -3
- package/dist/app/router/CommandsRouter.d.ts +2 -65
- package/dist/app/router/CommandsRouter.js +3 -2
- package/dist/app/router/EventsRouter.d.ts +2 -88
- package/dist/app/router/EventsRouter.js +3 -2
- package/dist/app/router/index.d.ts +4 -3
- package/dist/app/router/index.js +6 -2
- package/dist/app-CXCbKsPz.js +0 -0
- package/dist/app-process-uCX52YaE.js +48 -0
- package/dist/app-process-uCX52YaE.js.map +1 -0
- package/dist/build-Bkb5t3XA.js +122 -0
- package/dist/build-Bkb5t3XA.js.map +1 -0
- package/dist/chunk-nOFOJqeH.js +30 -0
- package/dist/cli/app-process.d.ts +5 -3
- package/dist/cli/app-process.js +8 -3
- package/dist/cli/build.d.ts +46 -21
- package/dist/cli/build.js +40 -48
- package/dist/cli/common.d.ts +39 -19
- package/dist/cli/common.js +13 -10
- package/dist/cli/development.d.ts +3 -1
- package/dist/cli/development.js +185 -50
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/env.d.ts +7 -5
- package/dist/cli/env.js +9 -2
- package/dist/cli/generators.d.ts +3 -1
- package/dist/cli/generators.js +64 -15
- package/dist/cli/generators.js.map +1 -1
- package/dist/cli/information.d.ts +3 -1
- package/dist/cli/information.js +110 -5
- package/dist/cli/information.js.map +1 -1
- package/dist/cli/init.d.ts +2 -10
- package/dist/cli/init.js +4 -99
- package/dist/cli/parse-env.d.ts +3 -1
- package/dist/cli/parse-env.js +53 -1
- package/dist/cli/parse-env.js.map +1 -1
- package/dist/cli/production.d.ts +5 -3
- package/dist/cli/production.js +68 -46
- package/dist/cli/production.js.map +1 -1
- package/dist/cli/type-checker.d.ts +3 -1
- package/dist/cli/type-checker.js +7 -5
- package/dist/cli/utils.d.ts +4 -2
- package/dist/cli/utils.js +3 -2
- package/dist/colors-Cd4Oz-r-.js +14 -0
- package/dist/colors-Cd4Oz-r-.js.map +1 -0
- package/dist/common-CcfjYnPG.js +0 -0
- package/dist/common-CeO-vn8Y.js +14 -0
- package/dist/common-CeO-vn8Y.js.map +1 -0
- package/dist/common-DirpDCa6.js +182 -0
- package/dist/common-DirpDCa6.js.map +1 -0
- package/dist/common-pvPJVTfe.d.ts +25 -0
- package/dist/components/common/EventInterceptor.d.ts +2 -82
- package/dist/components/common/EventInterceptor.js +3 -2
- package/dist/components/common/element.d.ts +5 -29
- package/dist/components/common/element.js +10 -2
- package/dist/components/common/types.d.ts +2 -3
- package/dist/components/common/types.js +1 -2
- package/dist/components/index.d.ts +24 -22
- package/dist/components/index.js +72 -16
- package/dist/components/v1/action-row/ActionRow.d.ts +6 -18
- package/dist/components/v1/action-row/ActionRow.js +3 -2
- package/dist/components/v1/button/Button.d.ts +7 -31
- package/dist/components/v1/button/Button.js +38 -16
- package/dist/components/v1/button/ButtonKit.d.ts +3 -66
- package/dist/components/v1/button/ButtonKit.js +38 -16
- package/dist/components/v1/modal/Modal.d.ts +7 -57
- package/dist/components/v1/modal/Modal.js +41 -16
- package/dist/components/v1/modal/ModalKit.d.ts +3 -64
- package/dist/components/v1/modal/ModalKit.js +38 -16
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.d.ts +4 -49
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +38 -16
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.d.ts +4 -49
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +38 -16
- package/dist/components/v1/select-menu/RoleSelectMenuKit.d.ts +4 -49
- package/dist/components/v1/select-menu/RoleSelectMenuKit.js +38 -16
- package/dist/components/v1/select-menu/SelectMenu.d.ts +10 -40
- package/dist/components/v1/select-menu/SelectMenu.js +43 -16
- package/dist/components/v1/select-menu/StringSelectMenuKit.d.ts +4 -49
- package/dist/components/v1/select-menu/StringSelectMenuKit.js +38 -16
- package/dist/components/v1/select-menu/UserSelectMenuKit.d.ts +4 -49
- package/dist/components/v1/select-menu/UserSelectMenuKit.js +38 -16
- package/dist/components/v1/select-menu/common.d.ts +3 -23
- package/dist/components/v1/select-menu/common.js +1 -2
- package/dist/components/v2/common.d.ts +5 -3
- package/dist/components/v2/common.js +3 -2
- package/dist/components/v2/container.d.ts +2 -8
- package/dist/components/v2/container.js +4 -2
- package/dist/components/v2/file.d.ts +2 -8
- package/dist/components/v2/file.js +3 -2
- package/dist/components/v2/index.d.ts +8 -7
- package/dist/components/v2/index.js +17 -2
- package/dist/components/v2/media-gallery.d.ts +2 -15
- package/dist/components/v2/media-gallery.js +5 -2
- package/dist/components/v2/section.d.ts +2 -16
- package/dist/components/v2/section.js +5 -2
- package/dist/components/v2/separator.d.ts +2 -7
- package/dist/components/v2/separator.js +3 -2
- package/dist/components/v2/text-display.d.ts +2 -10
- package/dist/components/v2/text-display.js +3 -2
- package/dist/config/config.d.ts +36 -28
- package/dist/config/config.js +39 -3
- package/dist/config/default.d.ts +37 -17
- package/dist/config/default.js +38 -3
- package/dist/config/loader.d.ts +37 -17
- package/dist/config/loader.js +39 -11
- package/dist/config/types.d.ts +34 -83
- package/dist/config/types.js +0 -2
- package/dist/config/utils.d.ts +35 -26
- package/dist/config/utils.js +15 -1
- package/dist/config/utils.js.map +1 -1
- package/dist/config-elWHycDV.d.ts +17 -0
- package/dist/constants-Ce6w4OFe.d.ts +17 -0
- package/dist/constants-DOPSzXI0.js +47 -0
- package/dist/constants-DOPSzXI0.js.map +1 -0
- package/dist/container-CpuiLsZM.js +33 -0
- package/dist/container-CpuiLsZM.js.map +1 -0
- package/dist/container-CwEATQy2.d.ts +10 -0
- package/dist/context/async-context.d.ts +33 -13
- package/dist/context/async-context.js +44 -16
- package/dist/context/environment.d.ts +33 -13
- package/dist/context/environment.js +41 -3
- package/dist/element-D_nyVwgB.d.ts +30 -0
- package/dist/element-hdSqnIpC.js +62 -0
- package/dist/element-hdSqnIpC.js.map +1 -0
- package/dist/env-DKFSgEcR.js +68 -0
- package/dist/env-DKFSgEcR.js.map +1 -0
- package/dist/error-codes-C_UO39jz.js +53 -0
- package/dist/error-codes-C_UO39jz.js.map +1 -0
- package/dist/events/CommandKitEventsChannel.d.ts +33 -13
- package/dist/events/CommandKitEventsChannel.js +3 -2
- package/dist/feature-flags-BJp6kYmi.js +85 -0
- package/dist/feature-flags-BJp6kYmi.js.map +1 -0
- package/dist/file-BdyYwkaI.d.ts +10 -0
- package/dist/file-DE69SSOP.js +18 -0
- package/dist/file-DE69SSOP.js.map +1 -0
- package/dist/flags/feature-flags.d.ts +33 -13
- package/dist/flags/feature-flags.js +40 -16
- package/dist/flags/store.d.ts +33 -13
- package/dist/flags/store.js +3 -2
- package/dist/helpers-CswC9gKF.js +25 -0
- package/dist/helpers-CswC9gKF.js.map +1 -0
- package/dist/helpers-DAmE106r.d.ts +9 -0
- package/dist/index-CUPkUUOR.d.ts +1 -0
- package/dist/index-Dw5cCt-A.d.ts +1 -0
- package/dist/index-E7Wvm5uX.d.ts +1 -0
- package/dist/index.d.ts +43 -51
- package/dist/index.js +147 -102
- package/dist/index.js.map +1 -1
- package/dist/init--p1nl1NO.d.ts +13 -0
- package/dist/init-D2me-V0n.js +67 -0
- package/dist/init-D2me-V0n.js.map +1 -0
- package/dist/logger/DefaultLogger.d.ts +3 -28
- package/dist/logger/DefaultLogger.js +38 -3
- package/dist/logger/ILogger.d.ts +2 -9
- package/dist/logger/ILogger.js +1 -2
- package/dist/logger/Logger.d.ts +3 -15
- package/dist/logger/Logger.js +39 -3
- package/dist/media-gallery-DCu02VXc.d.ts +17 -0
- package/dist/media-gallery-nUEHqKVF.js +36 -0
- package/dist/media-gallery-nUEHqKVF.js.map +1 -0
- package/dist/plugins/CompilerPlugin.d.ts +33 -13
- package/dist/plugins/CompilerPlugin.js +5 -2
- package/dist/plugins/PluginCommon.d.ts +33 -13
- package/dist/plugins/PluginCommon.js +5 -2
- package/dist/plugins/RuntimePlugin.d.ts +33 -13
- package/dist/plugins/RuntimePlugin.js +5 -2
- package/dist/plugins/index.d.ts +33 -15
- package/dist/plugins/index.js +44 -3
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +33 -13
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +38 -3
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +33 -13
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +3 -3
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +33 -26
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +38 -3
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +40 -19
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +38 -3
- package/dist/plugins/plugin-runtime/runtime.d.ts +33 -13
- package/dist/plugins/plugin-runtime/runtime.js +1 -2
- package/dist/plugins/plugin-runtime/types.d.ts +2 -72
- package/dist/plugins/plugin-runtime/types.js +1 -2
- package/dist/plugins/types.d.ts +33 -13
- package/dist/plugins/types.js +1 -2
- package/dist/resolve-file-url-pO9_rLft.js +23 -0
- package/dist/resolve-file-url-pO9_rLft.js.map +1 -0
- package/dist/router-Dn35v30f.js +0 -0
- package/dist/runtime-ByJtSXs_.js +0 -0
- package/dist/section-D6t7tyEZ.js +40 -0
- package/dist/section-D6t7tyEZ.js.map +1 -0
- package/dist/section-fktaECHL.d.ts +18 -0
- package/dist/separator-CuesaLrC.d.ts +8 -0
- package/dist/separator-DYAFK-Jj.js +17 -0
- package/dist/separator-DYAFK-Jj.js.map +1 -0
- package/dist/signals-Bp0bzjE6.js +46 -0
- package/dist/signals-Bp0bzjE6.js.map +1 -0
- package/dist/signals-DUoWkeZ7.d.ts +20 -0
- package/dist/store-Ci6ib2C9.js +14 -0
- package/dist/store-Ci6ib2C9.js.map +1 -0
- package/dist/text-display-DNMwmGHJ.d.ts +12 -0
- package/dist/text-display-Dy6JHB5X.js +19 -0
- package/dist/text-display-Dy6JHB5X.js.map +1 -0
- package/dist/type-checker-FOYNSGX0.js +84 -0
- package/dist/type-checker-FOYNSGX0.js.map +1 -0
- package/dist/types-B5VPP9ig.js +0 -0
- package/dist/types-BDwNROY2.d.ts +74 -0
- package/dist/types-Bq0EWaM3.js +0 -0
- package/dist/types-CJ-XvOFN.d.ts +5 -0
- package/dist/types-CL3C7RSa.d.ts +73 -0
- package/dist/types-Cdh4uaFR.js +0 -0
- package/dist/types-package-DRhFn59I.js +66 -0
- package/dist/types-package-DRhFn59I.js.map +1 -0
- package/dist/types.d.ts +33 -13
- package/dist/types.js +0 -2
- package/dist/utilities-5Jw5BdE1.d.ts +42 -0
- package/dist/utils/clone.d.ts +3 -1
- package/dist/utils/clone.js +8 -1
- package/dist/utils/clone.js.map +1 -1
- package/dist/utils/colors.d.ts +5 -3
- package/dist/utils/colors.js +4 -2
- package/dist/utils/constants.d.ts +2 -15
- package/dist/utils/constants.js +7 -2
- package/dist/utils/dev-hooks.d.ts +33 -13
- package/dist/utils/dev-hooks.js +38 -3
- package/dist/utils/error-codes.d.ts +9 -7
- package/dist/utils/error-codes.js +6 -2
- package/dist/utils/get-paths.d.ts +3 -1
- package/dist/utils/get-paths.js +33 -1
- package/dist/utils/get-paths.js.map +1 -1
- package/dist/utils/resolve-file-url.d.ts +3 -1
- package/dist/utils/resolve-file-url.js +3 -2
- package/dist/utils/types-package.d.ts +3 -1
- package/dist/utils/types-package.js +5 -14
- package/dist/utils/utilities.d.ts +2 -40
- package/dist/utils/utilities.js +44 -3
- package/dist/utils/warn-unstable.d.ts +3 -1
- package/dist/utils/warn-unstable.js +4 -2
- package/dist/utils-1_rHMeek.d.ts +10 -0
- package/dist/utils-IYtoeTur.js +19 -0
- package/dist/utils-IYtoeTur.js.map +1 -0
- package/dist/v2-DofkPKHs.js +0 -0
- package/dist/version-DRFi8ntI.js +15 -0
- package/dist/version-DRFi8ntI.js.map +1 -0
- package/dist/version-SMsmj3M1.d.ts +8 -0
- package/dist/version.d.ts +2 -6
- package/dist/version.js +3 -2
- package/dist/warn-unstable-V20WCBDd.js +26 -0
- package/dist/warn-unstable-V20WCBDd.js.map +1 -0
- package/package.json +5 -4
- package/dist/CommandKit-jZCy9fZX.d.ts +0 -914
- package/dist/CommandKit.js.map +0 -1
- package/dist/app/commands/AppCommandRunner.js.map +0 -1
- package/dist/app/commands/Context.js.map +0 -1
- package/dist/app/commands/MessageCommandParser.js.map +0 -1
- package/dist/app/commands/helpers.js.map +0 -1
- package/dist/app/events/EventWorkerContext.js.map +0 -1
- package/dist/app/handlers/AppCommandHandler.js.map +0 -1
- package/dist/app/handlers/AppEventsHandler.js.map +0 -1
- package/dist/app/index.js.map +0 -1
- package/dist/app/middleware/signals.js.map +0 -1
- package/dist/app/register/CommandRegistrar.js.map +0 -1
- package/dist/app/router/CommandsRouter.js.map +0 -1
- package/dist/app/router/EventsRouter.js.map +0 -1
- package/dist/app/router/index.js.map +0 -1
- package/dist/cli/app-process.js.map +0 -1
- package/dist/cli/build.js.map +0 -1
- package/dist/cli/common.js.map +0 -1
- package/dist/cli/env.js.map +0 -1
- package/dist/cli/init.js.map +0 -1
- package/dist/cli/type-checker.js.map +0 -1
- package/dist/cli/utils.js.map +0 -1
- package/dist/components/common/EventInterceptor.js.map +0 -1
- package/dist/components/common/element.js.map +0 -1
- package/dist/components/common/types.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/v1/action-row/ActionRow.js.map +0 -1
- package/dist/components/v1/button/Button.js.map +0 -1
- package/dist/components/v1/button/ButtonKit.js.map +0 -1
- package/dist/components/v1/modal/Modal.js.map +0 -1
- package/dist/components/v1/modal/ModalKit.js.map +0 -1
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.js.map +0 -1
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.js.map +0 -1
- package/dist/components/v1/select-menu/RoleSelectMenuKit.js.map +0 -1
- package/dist/components/v1/select-menu/SelectMenu.js.map +0 -1
- package/dist/components/v1/select-menu/StringSelectMenuKit.js.map +0 -1
- package/dist/components/v1/select-menu/UserSelectMenuKit.js.map +0 -1
- package/dist/components/v1/select-menu/common.js.map +0 -1
- package/dist/components/v2/common.js.map +0 -1
- package/dist/components/v2/container.js.map +0 -1
- package/dist/components/v2/file.js.map +0 -1
- package/dist/components/v2/index.js.map +0 -1
- package/dist/components/v2/media-gallery.js.map +0 -1
- package/dist/components/v2/section.js.map +0 -1
- package/dist/components/v2/separator.js.map +0 -1
- package/dist/components/v2/text-display.js.map +0 -1
- package/dist/config/config.js.map +0 -1
- package/dist/config/default.js.map +0 -1
- package/dist/config/loader.js.map +0 -1
- package/dist/config/types.js.map +0 -1
- package/dist/context/async-context.js.map +0 -1
- package/dist/context/environment.js.map +0 -1
- package/dist/events/CommandKitEventsChannel.js.map +0 -1
- package/dist/flags/feature-flags.js.map +0 -1
- package/dist/flags/store.js.map +0 -1
- package/dist/logger/DefaultLogger.js.map +0 -1
- package/dist/logger/ILogger.js.map +0 -1
- package/dist/logger/Logger.js.map +0 -1
- package/dist/plugins/CompilerPlugin.js.map +0 -1
- package/dist/plugins/PluginCommon.js.map +0 -1
- package/dist/plugins/RuntimePlugin.js.map +0 -1
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js.map +0 -1
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js.map +0 -1
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js.map +0 -1
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js.map +0 -1
- package/dist/plugins/plugin-runtime/runtime.js.map +0 -1
- package/dist/plugins/plugin-runtime/types.js.map +0 -1
- package/dist/plugins/types.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils/colors.js.map +0 -1
- package/dist/utils/constants.js.map +0 -1
- package/dist/utils/dev-hooks.js.map +0 -1
- package/dist/utils/error-codes.js.map +0 -1
- package/dist/utils/resolve-file-url.js.map +0 -1
- package/dist/utils/types-package.js.map +0 -1
- package/dist/utils/utilities.js.map +0 -1
- package/dist/utils/warn-unstable.js.map +0 -1
- package/dist/version.js.map +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { CommandKitPlugin } from "./CommandKit-DHRwL4K_.js";
|
|
2
|
+
import { MaybeArray } from "./types-CJ-XvOFN.js";
|
|
3
|
+
|
|
4
|
+
//#region src/config/types.d.ts
|
|
5
|
+
interface CommandKitConfig {
|
|
6
|
+
/**
|
|
7
|
+
* The plugins to use with CommandKit.
|
|
8
|
+
* Can be a single plugin, an array of plugins, or a nested array of plugins.
|
|
9
|
+
*/
|
|
10
|
+
plugins?: MaybeArray<CommandKitPlugin>[] | Array<CommandKitPlugin>;
|
|
11
|
+
/**
|
|
12
|
+
* The rolldown plugins to use with CommandKit.
|
|
13
|
+
*/
|
|
14
|
+
rolldownPlugins?: any[];
|
|
15
|
+
/**
|
|
16
|
+
* The compiler options to use with CommandKit.
|
|
17
|
+
*/
|
|
18
|
+
compilerOptions?: {
|
|
19
|
+
/**
|
|
20
|
+
* Macro compiler configuration.
|
|
21
|
+
*/
|
|
22
|
+
macro?: {
|
|
23
|
+
/**
|
|
24
|
+
* Whether to enable macro function compilation in development mode.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
development?: boolean;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The typescript configuration to use with CommandKit.
|
|
32
|
+
*/
|
|
33
|
+
typescript?: {
|
|
34
|
+
/**
|
|
35
|
+
* Whether to ignore type checking during builds.
|
|
36
|
+
*/
|
|
37
|
+
ignoreBuildErrors?: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Whether to generate static command handler data in production builds.
|
|
41
|
+
*/
|
|
42
|
+
static?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Statically define the environment variables to use.
|
|
45
|
+
*/
|
|
46
|
+
env?: Record<string, string>;
|
|
47
|
+
/**
|
|
48
|
+
* The custom build directory name to use.
|
|
49
|
+
* @default `dist`
|
|
50
|
+
*/
|
|
51
|
+
distDir?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Whether or not to enable the source map generation.
|
|
54
|
+
*/
|
|
55
|
+
sourceMap?: {
|
|
56
|
+
/**
|
|
57
|
+
* Whether to enable source map generation in development mode.
|
|
58
|
+
*/
|
|
59
|
+
development?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Whether to enable source map generation in production mode.
|
|
62
|
+
*/
|
|
63
|
+
production?: boolean;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Whether or not to enable the typed commands.
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
typedCommands?: boolean;
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { CommandKitConfig };
|
|
73
|
+
//# sourceMappingURL=types-CL3C7RSa.d.ts.map
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
|
+
const require_constants = require('./constants-DOPSzXI0.js');
|
|
3
|
+
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
4
|
+
const node_path = require_chunk.__toESM(require("node:path"));
|
|
5
|
+
const node_fs_promises = require_chunk.__toESM(require("node:fs/promises"));
|
|
6
|
+
|
|
7
|
+
//#region src/utils/types-package.ts
|
|
8
|
+
async function generateTypesPackage(force = false) {
|
|
9
|
+
const location = (0, node_path.join)(process.cwd(), "node_modules", "commandkit-types");
|
|
10
|
+
if (!require_constants.COMMANDKIT_IS_DEV && !force) return location;
|
|
11
|
+
const packageJSON = (0, node_path.join)(location, "package.json");
|
|
12
|
+
const index = (0, node_path.join)(location, "index.js");
|
|
13
|
+
const types = (0, node_path.join)(location, "index.d.ts");
|
|
14
|
+
const command = (0, node_path.join)(location, "command.d.ts");
|
|
15
|
+
const packageJSONContent = {
|
|
16
|
+
name: "commandkit-types",
|
|
17
|
+
version: "1.0.0",
|
|
18
|
+
description: "CommandKit types package",
|
|
19
|
+
type: "commonjs",
|
|
20
|
+
main: "index.js",
|
|
21
|
+
types: "index.d.ts"
|
|
22
|
+
};
|
|
23
|
+
const indexContent = `module.exports = {};`;
|
|
24
|
+
const typesContent = `// Main types index file - imports all type declarations
|
|
25
|
+
import './command';
|
|
26
|
+
export {};
|
|
27
|
+
`;
|
|
28
|
+
const commandTypesContent = `// Auto-generated command types
|
|
29
|
+
export {};
|
|
30
|
+
declare module 'commandkit' {
|
|
31
|
+
type CommandTypeData = string
|
|
32
|
+
}`;
|
|
33
|
+
await (0, node_fs_promises.mkdir)(location, { recursive: true }).catch(() => {});
|
|
34
|
+
await (0, node_fs_promises.writeFile)(packageJSON, JSON.stringify(packageJSONContent, null, 2));
|
|
35
|
+
await (0, node_fs_promises.writeFile)(index, indexContent);
|
|
36
|
+
await (0, node_fs_promises.writeFile)(types, typesContent);
|
|
37
|
+
await (0, node_fs_promises.writeFile)(command, commandTypesContent);
|
|
38
|
+
return location;
|
|
39
|
+
}
|
|
40
|
+
async function rewriteCommandDeclaration(data) {
|
|
41
|
+
const commandTypesContent = `// Auto-generated command types
|
|
42
|
+
declare module 'commandkit' {
|
|
43
|
+
${data}
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
46
|
+
`;
|
|
47
|
+
const location = (0, node_path.join)(process.cwd(), "node_modules", "commandkit-types");
|
|
48
|
+
if (!(0, node_fs.existsSync)(location)) return;
|
|
49
|
+
const type = (0, node_path.join)(location, "command.d.ts");
|
|
50
|
+
await (0, node_fs_promises.writeFile)(type, commandTypesContent, { encoding: "utf-8" });
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
Object.defineProperty(exports, 'generateTypesPackage', {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return generateTypesPackage;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, 'rewriteCommandDeclaration', {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return rewriteCommandDeclaration;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=types-package-DRhFn59I.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-package-DRhFn59I.js","names":[],"sources":["../src/utils/types-package.ts"],"sourcesContent":["import { mkdir, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { COMMANDKIT_IS_DEV } from './constants';\nimport { existsSync } from 'node:fs';\n\nexport async function generateTypesPackage(force = false) {\n const location = join(process.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\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(process.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":";;;;;;;AAKA,eAAsB,qBAAqB,QAAQ,OAAO;CACxD,MAAM,WAAW,oBAAK,QAAQ,KAAK,EAAE,gBAAgB,mBAAmB;AACxE,MAAK,wCAAsB,MAAO,QAAO;CACzC,MAAM,cAAc,oBAAK,UAAU,eAAe;CAClD,MAAM,QAAQ,oBAAK,UAAU,WAAW;CACxC,MAAM,QAAQ,oBAAK,UAAU,aAAa;CAC1C,MAAM,UAAU,oBAAK,UAAU,eAAe;CAE9C,MAAM,qBAAqB;EACzB,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,MAAM;EACN,OAAO;CACR;CAED,MAAM,gBAAgB;CAGtB,MAAM,gBAAgB;;;;CAMtB,MAAM,uBAAuB;;;;;AAM7B,OAAM,4BAAM,UAAU,EAAE,WAAW,KAAM,EAAC,CAAC,MAAM,MAAM,CAAE,EAAC;AAC1D,OAAM,gCAAU,aAAa,KAAK,UAAU,oBAAoB,MAAM,EAAE,CAAC;AACzE,OAAM,gCAAU,OAAO,aAAa;AACpC,OAAM,gCAAU,OAAO,aAAa;AACpC,OAAM,gCAAU,SAAS,oBAAoB;AAE7C,QAAO;AACT;AAEA,eAAsB,0BAA0B,MAAc;CAC5D,MAAM,uBAAuB;;MAEzB,KAAI;;;;CAKR,MAAM,WAAW,oBAAK,QAAQ,KAAK,EAAE,gBAAgB,mBAAmB;AAExE,MAAK,wBAAW,SAAS,CAAE;CAE3B,MAAM,OAAO,oBAAK,UAAU,eAAe;AAE3C,OAAM,gCAAU,MAAM,qBAAqB,EAAE,UAAU,QAAS,EAAC;AACnE"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,13 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
1
|
+
import { CommandContext, CommandData, CommandKitOptions } from "./CommandKit-DHRwL4K_.js";
|
|
2
|
+
import "./EventInterceptor-D_oEWSnF.js";
|
|
3
|
+
import "./ButtonKit-BSI7lCI0.js";
|
|
4
|
+
import "./ModalKit-CKtQ8eXW.js";
|
|
5
|
+
import "./element-D_nyVwgB.js";
|
|
6
|
+
import "./ActionRow-D0wafJhZ.js";
|
|
7
|
+
import "./types-CJ-XvOFN.js";
|
|
8
|
+
import "./Button-Bl5nbwTS.js";
|
|
9
|
+
import "./Modal-Cxm6cs5c.js";
|
|
10
|
+
import "./common-pvPJVTfe.js";
|
|
11
|
+
import "./StringSelectMenuKit-B9FHTe48.js";
|
|
12
|
+
import "./ChannelSelectMenuKit-L15A2jpT.js";
|
|
13
|
+
import "./MentionableSelectMenuKit-BiUSKUtZ.js";
|
|
14
|
+
import "./UserSelectMenuKit-DiP0imyo.js";
|
|
15
|
+
import "./RoleSelectMenuKit-BSMKkru2.js";
|
|
16
|
+
import "./SelectMenu-b7jgrkjO.js";
|
|
17
|
+
import "./container-CwEATQy2.js";
|
|
18
|
+
import "./file-BdyYwkaI.js";
|
|
19
|
+
import "./media-gallery-DCu02VXc.js";
|
|
20
|
+
import "./section-fktaECHL.js";
|
|
21
|
+
import "./separator-CuesaLrC.js";
|
|
22
|
+
import "./text-display-DNMwmGHJ.js";
|
|
23
|
+
import "./index-Dw5cCt-A.js";
|
|
24
|
+
import "./index-E7Wvm5uX.js";
|
|
25
|
+
import "./MessageCommandParser-tzroBwij.js";
|
|
26
|
+
import "./signals-DUoWkeZ7.js";
|
|
27
|
+
import "./helpers-DAmE106r.js";
|
|
28
|
+
import "./CommandsRouter-C7X-eXE2.js";
|
|
29
|
+
import "./EventsRouter-BacqK6z3.js";
|
|
30
|
+
import "./index-CUPkUUOR.js";
|
|
31
|
+
import "./constants-Ce6w4OFe.js";
|
|
32
|
+
import "./types-BDwNROY2.js";
|
|
33
|
+
export { CommandContext, CommandData, CommandKitOptions };
|
package/dist/types.js
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of C(t))!d.call(e,n)&&n!==a&&i(e,n,{get:()=>t[n],enumerable:!(o=m(t,n))||o.enumerable});return e};var r=e=>p(i({},"__esModule",{value:!0}),e);var c={};module.exports=r(c);
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//#region src/utils/utilities.d.ts
|
|
2
|
+
declare function getCurrentDirectory(): string;
|
|
3
|
+
declare function getSourceDirectories(): string[];
|
|
4
|
+
/**
|
|
5
|
+
* Returns the path to the app directory.
|
|
6
|
+
* @returns The path to the app directory or `null` if not found.
|
|
7
|
+
*/
|
|
8
|
+
declare function findAppDirectory(): string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Debounces a function.
|
|
11
|
+
* @param fn The function to debounce.
|
|
12
|
+
* @param ms The debounce time in milliseconds.
|
|
13
|
+
* @returns The debounced function.
|
|
14
|
+
*/
|
|
15
|
+
declare function debounce<R, F extends (...args: any[]) => R>(fn: F, ms: number): F;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a function from the given function that runs only in development mode.
|
|
18
|
+
* @param fn The function to run in development mode.
|
|
19
|
+
* @returns The function that runs only in development mode.
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const devOnlyFn = devOnly(() => {
|
|
23
|
+
* console.log('This function runs only in development mode');
|
|
24
|
+
* });
|
|
25
|
+
* devOnlyFn(); // This will log the message only in development mode
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare function devOnly<T extends (...args: any[]) => any>(fn: T): T;
|
|
29
|
+
/**
|
|
30
|
+
* Custom error for stopping event propagation.
|
|
31
|
+
*/
|
|
32
|
+
declare class StopEventPropagationError extends Error {
|
|
33
|
+
constructor();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Stops event propagation.
|
|
37
|
+
* @throws {StopEventPropagationError}
|
|
38
|
+
*/
|
|
39
|
+
declare function stopEvents(): never;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { StopEventPropagationError, debounce, devOnly, findAppDirectory, getCurrentDirectory, getSourceDirectories, stopEvents };
|
|
42
|
+
//# sourceMappingURL=utilities-5Jw5BdE1.d.ts.map
|
package/dist/utils/clone.d.ts
CHANGED
package/dist/utils/clone.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
const require_chunk = require('../chunk-nOFOJqeH.js');
|
|
2
|
+
const rfdc = require_chunk.__toESM(require("rfdc"));
|
|
3
|
+
|
|
4
|
+
//#region src/utils/clone.ts
|
|
5
|
+
const clone = (0, rfdc.default)();
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
exports.clone = clone;
|
|
2
9
|
//# sourceMappingURL=clone.js.map
|
package/dist/utils/clone.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/clone.ts"],"sourcesContent":["import rfdc from 'rfdc';\n\nexport const clone = rfdc()
|
|
1
|
+
{"version":3,"file":"clone.js","names":[],"sources":["../../src/utils/clone.ts"],"sourcesContent":["import rfdc from 'rfdc';\n\nexport const clone = rfdc();\n"],"mappings":";;;;AAEA,MAAa,QAAQ,mBAAM"}
|
package/dist/utils/colors.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
declare const _default: picocolors_types.Colors;
|
|
1
|
+
import * as picocolors_types7 from "picocolors/types";
|
|
4
2
|
|
|
3
|
+
//#region src/utils/colors.d.ts
|
|
4
|
+
declare const _default: picocolors_types7.Colors;
|
|
5
|
+
//#endregion
|
|
5
6
|
export { _default as default };
|
|
7
|
+
//# sourceMappingURL=colors.d.ts.map
|
package/dist/utils/colors.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
const require_colors = require('../colors-Cd4Oz-r-.js');
|
|
3
|
+
|
|
4
|
+
exports.default = require_colors.colors_default;
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare const COMMANDKIT_IS_TEST: boolean;
|
|
4
|
-
declare const COMMANDKIT_BOOTSTRAP_MODE: "development" | "production";
|
|
5
|
-
/**
|
|
6
|
-
* Types of Hot Module Replacement events
|
|
7
|
-
*/
|
|
8
|
-
declare const HMREventType: {
|
|
9
|
-
readonly ReloadCommands: "reload-commands";
|
|
10
|
-
readonly ReloadEvents: "reload-events";
|
|
11
|
-
readonly Unknown: "unknown";
|
|
12
|
-
};
|
|
13
|
-
type HMREventType = (typeof HMREventType)[keyof typeof HMREventType];
|
|
14
|
-
|
|
15
|
-
export { COMMANDKIT_BOOTSTRAP_MODE, COMMANDKIT_CACHE_TAG, COMMANDKIT_IS_DEV, COMMANDKIT_IS_TEST, HMREventType };
|
|
1
|
+
import { COMMANDKIT_BOOTSTRAP_MODE, COMMANDKIT_CACHE_TAG, COMMANDKIT_IS_DEV, COMMANDKIT_IS_TEST, HMREventType } from "../constants-Ce6w4OFe.js";
|
|
2
|
+
export { COMMANDKIT_BOOTSTRAP_MODE, COMMANDKIT_CACHE_TAG, COMMANDKIT_IS_DEV, COMMANDKIT_IS_TEST, HMREventType };
|
package/dist/utils/constants.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const require_constants = require('../constants-DOPSzXI0.js');
|
|
2
|
+
|
|
3
|
+
exports.COMMANDKIT_BOOTSTRAP_MODE = require_constants.COMMANDKIT_BOOTSTRAP_MODE;
|
|
4
|
+
exports.COMMANDKIT_CACHE_TAG = require_constants.COMMANDKIT_CACHE_TAG;
|
|
5
|
+
exports.COMMANDKIT_IS_DEV = require_constants.COMMANDKIT_IS_DEV;
|
|
6
|
+
exports.COMMANDKIT_IS_TEST = require_constants.COMMANDKIT_IS_TEST;
|
|
7
|
+
exports.HMREventType = require_constants.HMREventType;
|
|
@@ -1,13 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
1
|
+
import { CommandKitHMREvent, registerDevHooks } from "../CommandKit-DHRwL4K_.js";
|
|
2
|
+
import "../EventInterceptor-D_oEWSnF.js";
|
|
3
|
+
import "../ButtonKit-BSI7lCI0.js";
|
|
4
|
+
import "../ModalKit-CKtQ8eXW.js";
|
|
5
|
+
import "../element-D_nyVwgB.js";
|
|
6
|
+
import "../ActionRow-D0wafJhZ.js";
|
|
7
|
+
import "../types-CJ-XvOFN.js";
|
|
8
|
+
import "../Button-Bl5nbwTS.js";
|
|
9
|
+
import "../Modal-Cxm6cs5c.js";
|
|
10
|
+
import "../common-pvPJVTfe.js";
|
|
11
|
+
import "../StringSelectMenuKit-B9FHTe48.js";
|
|
12
|
+
import "../ChannelSelectMenuKit-L15A2jpT.js";
|
|
13
|
+
import "../MentionableSelectMenuKit-BiUSKUtZ.js";
|
|
14
|
+
import "../UserSelectMenuKit-DiP0imyo.js";
|
|
15
|
+
import "../RoleSelectMenuKit-BSMKkru2.js";
|
|
16
|
+
import "../SelectMenu-b7jgrkjO.js";
|
|
17
|
+
import "../container-CwEATQy2.js";
|
|
18
|
+
import "../file-BdyYwkaI.js";
|
|
19
|
+
import "../media-gallery-DCu02VXc.js";
|
|
20
|
+
import "../section-fktaECHL.js";
|
|
21
|
+
import "../separator-CuesaLrC.js";
|
|
22
|
+
import "../text-display-DNMwmGHJ.js";
|
|
23
|
+
import "../index-Dw5cCt-A.js";
|
|
24
|
+
import "../index-E7Wvm5uX.js";
|
|
25
|
+
import "../MessageCommandParser-tzroBwij.js";
|
|
26
|
+
import "../signals-DUoWkeZ7.js";
|
|
27
|
+
import "../helpers-DAmE106r.js";
|
|
28
|
+
import "../CommandsRouter-C7X-eXE2.js";
|
|
29
|
+
import "../EventsRouter-BacqK6z3.js";
|
|
30
|
+
import "../index-CUPkUUOR.js";
|
|
31
|
+
import "../constants-Ce6w4OFe.js";
|
|
32
|
+
import "../types-BDwNROY2.js";
|
|
33
|
+
export { CommandKitHMREvent, registerDevHooks };
|
package/dist/utils/dev-hooks.js
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
require('../colors-Cd4Oz-r-.js');
|
|
2
|
+
require('../ActionRow-CmTHbo2t.js');
|
|
3
|
+
require('../error-codes-C_UO39jz.js');
|
|
4
|
+
const require_CommandKit = require('../CommandKit-DDrQtQns.js');
|
|
5
|
+
require('../common-CcfjYnPG.js');
|
|
6
|
+
require('../common-CeO-vn8Y.js');
|
|
7
|
+
require('../container-CpuiLsZM.js');
|
|
8
|
+
require('../file-DE69SSOP.js');
|
|
9
|
+
require('../media-gallery-nUEHqKVF.js');
|
|
10
|
+
require('../section-D6t7tyEZ.js');
|
|
11
|
+
require('../separator-DYAFK-Jj.js');
|
|
12
|
+
require('../text-display-Dy6JHB5X.js');
|
|
13
|
+
require('../v2-DofkPKHs.js');
|
|
14
|
+
require('../warn-unstable-V20WCBDd.js');
|
|
15
|
+
require('../element-hdSqnIpC.js');
|
|
16
|
+
require('../types-B5VPP9ig.js');
|
|
17
|
+
require('../EventInterceptor-DtRINyTP.js');
|
|
18
|
+
require('../constants-DOPSzXI0.js');
|
|
19
|
+
require('../PluginCommon-DPqnQngK.js');
|
|
20
|
+
require('../CompilerPlugin-XzuGixkC.js');
|
|
21
|
+
require('../RuntimePlugin-CKsd83M3.js');
|
|
22
|
+
require('../types-Bq0EWaM3.js');
|
|
23
|
+
require('../CompilerPluginRuntime-zFCCw1kM.js');
|
|
24
|
+
require('../types-Cdh4uaFR.js');
|
|
25
|
+
require('../runtime-ByJtSXs_.js');
|
|
26
|
+
require('../EventWorkerContext-XZGSHn5F.js');
|
|
27
|
+
require('../resolve-file-url-pO9_rLft.js');
|
|
28
|
+
require('../MessageCommandParser-B13Pkwo9.js');
|
|
29
|
+
require('../signals-Bp0bzjE6.js');
|
|
30
|
+
require('../types-package-DRhFn59I.js');
|
|
31
|
+
require('../CommandsRouter-BHaPno8o.js');
|
|
32
|
+
require('../EventsRouter-CqnrlbjN.js');
|
|
33
|
+
require('../router-Dn35v30f.js');
|
|
34
|
+
require('../common-DirpDCa6.js');
|
|
35
|
+
require('../CommandKitEventsChannel-B6LKgxmv.js');
|
|
36
|
+
require('../store-Ci6ib2C9.js');
|
|
37
|
+
|
|
38
|
+
exports.registerDevHooks = require_CommandKit.registerDevHooks;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
//#region src/utils/error-codes.d.ts
|
|
1
2
|
declare const CommandKitErrorCodes: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
readonly ExitMiddleware: symbol;
|
|
4
|
+
readonly ForwardedCommand: symbol;
|
|
5
|
+
readonly InvalidCommandPrefix: symbol;
|
|
6
|
+
readonly PluginCaptureHandle: symbol;
|
|
6
7
|
};
|
|
7
8
|
type CommandKitError = Error & {
|
|
8
|
-
|
|
9
|
+
code: symbol;
|
|
9
10
|
};
|
|
10
11
|
declare function createCommandKitError(code: symbol): CommandKitError;
|
|
11
12
|
declare function isCommandKitError(error: unknown): error is CommandKitError;
|
|
12
13
|
declare function isErrorType(error: unknown, code: symbol | symbol[]): boolean;
|
|
13
|
-
|
|
14
|
-
export {
|
|
14
|
+
//#endregion
|
|
15
|
+
export { CommandKitError, CommandKitErrorCodes, createCommandKitError, isCommandKitError, isErrorType };
|
|
16
|
+
//# sourceMappingURL=error-codes.d.ts.map
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const require_error_codes = require('../error-codes-C_UO39jz.js');
|
|
2
|
+
|
|
3
|
+
exports.CommandKitErrorCodes = require_error_codes.CommandKitErrorCodes;
|
|
4
|
+
exports.createCommandKitError = require_error_codes.createCommandKitError;
|
|
5
|
+
exports.isCommandKitError = require_error_codes.isCommandKitError;
|
|
6
|
+
exports.isErrorType = require_error_codes.isErrorType;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
//#region src/utils/get-paths.d.ts
|
|
1
2
|
declare function getFilePaths(directory: string, nesting?: boolean): Promise<string[]>;
|
|
2
3
|
declare function getFolderPaths(directory: string, nesting?: boolean): Promise<string[]>;
|
|
3
|
-
|
|
4
|
+
//#endregion
|
|
4
5
|
export { getFilePaths, getFolderPaths };
|
|
6
|
+
//# sourceMappingURL=get-paths.d.ts.map
|
package/dist/utils/get-paths.js
CHANGED
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
const require_chunk = require('../chunk-nOFOJqeH.js');
|
|
2
|
+
const path = require_chunk.__toESM(require("path"));
|
|
3
|
+
const fs_promises = require_chunk.__toESM(require("fs/promises"));
|
|
4
|
+
|
|
5
|
+
//#region src/utils/get-paths.ts
|
|
6
|
+
async function getFilePaths(directory, nesting) {
|
|
7
|
+
let filePaths = [];
|
|
8
|
+
if (!directory) return filePaths;
|
|
9
|
+
const files = await fs_promises.default.readdir(directory, { withFileTypes: true });
|
|
10
|
+
for (const file of files) {
|
|
11
|
+
const filePath = path.default.join(directory, file.name);
|
|
12
|
+
if (file.isFile()) filePaths.push(filePath);
|
|
13
|
+
if (nesting && file.isDirectory()) filePaths = [...filePaths, ...await getFilePaths(filePath, true)];
|
|
14
|
+
}
|
|
15
|
+
return filePaths;
|
|
16
|
+
}
|
|
17
|
+
async function getFolderPaths(directory, nesting) {
|
|
18
|
+
let folderPaths = [];
|
|
19
|
+
if (!directory) return folderPaths;
|
|
20
|
+
const folders = await fs_promises.default.readdir(directory, { withFileTypes: true });
|
|
21
|
+
for (const folder of folders) {
|
|
22
|
+
const folderPath = path.default.join(directory, folder.name);
|
|
23
|
+
if (folder.isDirectory()) {
|
|
24
|
+
folderPaths.push(folderPath);
|
|
25
|
+
if (nesting) folderPaths = [...folderPaths, ...await getFolderPaths(folderPath, true)];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return folderPaths;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.getFilePaths = getFilePaths;
|
|
33
|
+
exports.getFolderPaths = getFolderPaths;
|
|
2
34
|
//# sourceMappingURL=get-paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/get-paths.ts"],"sourcesContent":["import path from 'path';\nimport fs from 'fs/promises';\n\nexport async function getFilePaths(\
|
|
1
|
+
{"version":3,"file":"get-paths.js","names":[],"sources":["../../src/utils/get-paths.ts"],"sourcesContent":["import path from 'path';\nimport fs from 'fs/promises';\n\nexport async function getFilePaths(\n directory: string,\n nesting?: boolean,\n): Promise<string[]> {\n let filePaths: string[] = [];\n\n if (!directory) return filePaths;\n\n const files = await fs.readdir(directory, { withFileTypes: true });\n\n for (const file of files) {\n const filePath = path.join(directory, file.name);\n\n if (file.isFile()) {\n filePaths.push(filePath);\n }\n\n if (nesting && file.isDirectory()) {\n filePaths = [...filePaths, ...(await getFilePaths(filePath, true))];\n }\n }\n\n return filePaths;\n}\n\nexport async function getFolderPaths(\n directory: string,\n nesting?: boolean,\n): Promise<string[]> {\n let folderPaths: string[] = [];\n\n if (!directory) return folderPaths;\n\n const folders = await fs.readdir(directory, { withFileTypes: true });\n\n for (const folder of folders) {\n const folderPath = path.join(directory, folder.name);\n\n if (folder.isDirectory()) {\n folderPaths.push(folderPath);\n\n if (nesting) {\n folderPaths = [\n ...folderPaths,\n ...(await getFolderPaths(folderPath, true)),\n ];\n }\n }\n }\n\n return folderPaths;\n}\n"],"mappings":";;;;;AAGA,eAAsB,aACtB,WACA,SACoB;CAClB,IAAI,YAAsB,CAAE;AAE5B,MAAK,UAAW,QAAO;CAEvB,MAAM,QAAQ,MAAM,oBAAG,QAAQ,WAAW,EAAE,eAAe,KAAM,EAAC;AAElE,MAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,WAAW,aAAK,KAAK,WAAW,KAAK,KAAK;AAEhD,MAAI,KAAK,QAAQ,CACf,WAAU,KAAK,SAAS;AAG1B,MAAI,WAAW,KAAK,aAAa,CAC/B,aAAY,CAAC,GAAG,WAAW,GAAI,MAAM,aAAa,UAAU,KAAK,AAAE;CAEvE;AAEA,QAAO;AACT;AAEA,eAAsB,eACtB,WACA,SACoB;CAClB,IAAI,cAAwB,CAAE;AAE9B,MAAK,UAAW,QAAO;CAEvB,MAAM,UAAU,MAAM,oBAAG,QAAQ,WAAW,EAAE,eAAe,KAAM,EAAC;AAEpE,MAAK,MAAM,UAAU,SAAS;EAC5B,MAAM,aAAa,aAAK,KAAK,WAAW,OAAO,KAAK;AAEpD,MAAI,OAAO,aAAa,EAAE;AACxB,eAAY,KAAK,WAAW;AAE5B,OAAI,QACF,eAAc,CACd,GAAG,aACH,GAAI,MAAM,eAAe,YAAY,KAAK,AAAE;EAGhD;CACF;AAEA,QAAO;AACT"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/utils/resolve-file-url.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Convert a local file path to a file URL.
|
|
3
4
|
* @param filePath - The local file's path.
|
|
@@ -5,5 +6,6 @@
|
|
|
5
6
|
* @returns - The converted file URL.
|
|
6
7
|
*/
|
|
7
8
|
declare function toFileURL(filePath: string, withTs?: boolean): string;
|
|
8
|
-
|
|
9
|
+
//#endregion
|
|
9
10
|
export { toFileURL };
|
|
11
|
+
//# sourceMappingURL=resolve-file-url.d.ts.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const require_resolve_file_url = require('../resolve-file-url-pO9_rLft.js');
|
|
2
|
+
|
|
3
|
+
exports.toFileURL = require_resolve_file_url.toFileURL;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
//#region src/utils/types-package.d.ts
|
|
1
2
|
declare function generateTypesPackage(force?: boolean): Promise<string>;
|
|
2
3
|
declare function rewriteCommandDeclaration(data: string): Promise<void>;
|
|
3
|
-
|
|
4
|
+
//#endregion
|
|
4
5
|
export { generateTypesPackage, rewriteCommandDeclaration };
|
|
6
|
+
//# sourceMappingURL=types-package.d.ts.map
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare module 'commandkit' {
|
|
7
|
-
type CommandTypeData = string
|
|
8
|
-
}`;return await(0,s.mkdir)(e,{recursive:!0}).catch(()=>{}),await(0,s.writeFile)(o,JSON.stringify(y,null,2)),await(0,s.writeFile)(c,T),await(0,s.writeFile)(a,l),await(0,s.writeFile)(i,M),e}r(D,"generateTypesPackage");async function A(t){let e=`// Auto-generated command types
|
|
9
|
-
declare module 'commandkit' {
|
|
10
|
-
${t}
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
13
|
-
`,o=(0,n.join)(process.cwd(),"node_modules","commandkit-types");if(!(0,d.existsSync)(o))return;let c=(0,n.join)(o,"command.d.ts");await(0,s.writeFile)(c,e,{encoding:"utf-8"})}r(A,"rewriteCommandDeclaration");0&&(module.exports={generateTypesPackage,rewriteCommandDeclaration});
|
|
14
|
-
//# sourceMappingURL=types-package.js.map
|
|
1
|
+
require('../constants-DOPSzXI0.js');
|
|
2
|
+
const require_types_package = require('../types-package-DRhFn59I.js');
|
|
3
|
+
|
|
4
|
+
exports.generateTypesPackage = require_types_package.generateTypesPackage;
|
|
5
|
+
exports.rewriteCommandDeclaration = require_types_package.rewriteCommandDeclaration;
|