commandkit 1.2.0-rc.3 → 1.2.0-rc.5
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/README.md +4 -12
- package/dist/ActionRow-CmTHbo2t.js.map +1 -1
- package/dist/CommandKitEventsChannel-Bgw0XCOl.js.map +1 -1
- package/dist/CommandsRouter-tMAivEfv.js.map +1 -1
- package/dist/CompilerPlugin-CjoZAAR8.js.map +1 -1
- package/dist/{DefaultLogger-Cy55-uPl.d.ts → DefaultLogger-XCOl5nLd.d.ts} +19 -12
- package/dist/EventInterceptor-CQ4PBpBJ.js.map +1 -1
- package/dist/{EventWorkerContext-C7CG7hIP.d.ts → EventWorkerContext-D9frVhVe.d.ts} +2 -2
- package/dist/{EventWorkerContext-CSlD9rbx.js → EventWorkerContext-TZIKxVCu.js} +1 -1
- package/dist/{EventWorkerContext-CSlD9rbx.js.map → EventWorkerContext-TZIKxVCu.js.map} +1 -1
- package/dist/EventsRouter-C_J0M3uO.js.map +1 -1
- package/dist/ILogger-BW8GM-YZ.d.ts +64 -0
- package/dist/{Logger-iSjA-DWN.d.ts → Logger-DyfkPk7u.d.ts} +2 -2
- package/dist/{MessageCommandParser-B_BEQ3p8.js → MessageCommandParser-TPEPhjvx.js} +2 -2
- package/dist/{MessageCommandParser-B_BEQ3p8.js.map → MessageCommandParser-TPEPhjvx.js.map} +1 -1
- package/dist/PluginCommon-Di1xIa8d.js.map +1 -1
- package/dist/{RuntimePlugin-CBgBLXTG.js → RuntimePlugin-eTdFJwGd.js} +2 -1
- package/dist/RuntimePlugin-eTdFJwGd.js.map +1 -0
- package/dist/analytics/analytics-engine.d.ts +2 -2
- package/dist/analytics/analytics-engine.js +10 -10
- package/dist/analytics/analytics-provider.d.ts +2 -2
- package/dist/analytics/constants.js +1 -1
- package/dist/analytics/utils.js +10 -10
- package/dist/{analytics-engine-nkyqvYAE.d.ts → analytics-engine-CtMbeudW.d.ts} +89 -26
- package/dist/app/commands/AppCommandRunner.d.ts +2 -2
- package/dist/app/commands/AppCommandRunner.js +10 -10
- package/dist/app/commands/Context.d.ts +2 -2
- package/dist/app/commands/Context.js +10 -10
- package/dist/app/commands/MessageCommandParser.js +2 -2
- package/dist/app/events/EventWorkerContext.d.ts +3 -3
- package/dist/app/events/EventWorkerContext.js +1 -1
- package/dist/app/handlers/AppCommandHandler.d.ts +2 -2
- package/dist/app/handlers/AppCommandHandler.js +10 -10
- package/dist/app/handlers/AppEventsHandler.d.ts +2 -2
- package/dist/app/handlers/AppEventsHandler.js +10 -10
- package/dist/app/index.d.ts +3 -3
- package/dist/app/index.js +12 -12
- package/dist/app/interrupt/signals.d.ts +2 -2
- package/dist/app/interrupt/signals.js +5 -5
- package/dist/app/middlewares/permissions.d.ts +42 -0
- package/dist/app/middlewares/permissions.js +38 -0
- package/dist/app/register/CommandRegistrar.d.ts +2 -2
- package/dist/app/register/CommandRegistrar.js +10 -10
- package/dist/app-process-CjMovpoZ.js.map +1 -1
- package/dist/{build-BoGqWPIS.js → build-D52II1qS.js} +4 -3
- package/dist/build-D52II1qS.js.map +1 -0
- package/dist/cli/build.d.ts +2 -2
- package/dist/cli/build.js +11 -11
- package/dist/cli/common.d.ts +2 -2
- package/dist/cli/development.js +12 -12
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/generators.js +33 -5
- package/dist/cli/generators.js.map +1 -1
- package/dist/cli/information.js +1 -1
- package/dist/cli/information.js.map +1 -1
- package/dist/cli/init.js +11 -11
- package/dist/cli/production.js +11 -11
- package/dist/cli/production.js.map +1 -1
- package/dist/{commandkit-5VMG2thU.js → commandkit-BPtNCbV8.js} +363 -202
- package/dist/commandkit-BPtNCbV8.js.map +1 -0
- package/dist/commandkit.d.ts +2 -2
- package/dist/commandkit.js +10 -10
- package/dist/common-DNADUU3_.js.map +1 -1
- package/dist/common-vnMIelAE.js.map +1 -1
- package/dist/components/index.js +10 -10
- package/dist/components/v1/button/Button.js +10 -10
- package/dist/components/v1/button/ButtonKit.js +10 -10
- package/dist/components/v1/modal/Modal.js +10 -10
- package/dist/components/v1/modal/ModalKit.js +10 -10
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +10 -10
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +10 -10
- package/dist/components/v1/select-menu/RoleSelectMenuKit.js +10 -10
- package/dist/components/v1/select-menu/SelectMenu.js +10 -10
- package/dist/components/v1/select-menu/StringSelectMenuKit.js +10 -10
- package/dist/components/v1/select-menu/UserSelectMenuKit.js +10 -10
- package/dist/config/config.d.ts +3 -3
- package/dist/config/config.js +10 -10
- package/dist/config/default.d.ts +2 -2
- package/dist/config/default.js +10 -10
- package/dist/config/loader.d.ts +2 -2
- package/dist/config/loader.js +10 -10
- package/dist/config/types.d.ts +2 -2
- package/dist/config/utils.d.ts +2 -2
- package/dist/config/utils.js +1 -1
- package/dist/{config-C1msSu1G.d.ts → config-E42bG1RK.d.ts} +2 -2
- package/dist/constants-4oxxvaJA.js.map +1 -1
- package/dist/constants-B5_Ta7PR.js.map +1 -1
- package/dist/{constants-CUND8XkG.js → constants-DxfYtA6t.js} +1 -1
- package/dist/{constants-CUND8XkG.js.map → constants-DxfYtA6t.js.map} +1 -1
- package/dist/container-z621KfH5.js.map +1 -1
- package/dist/context/async-context.d.ts +2 -2
- package/dist/context/async-context.js +10 -10
- package/dist/context/environment.d.ts +2 -2
- package/dist/context/environment.js +10 -10
- package/dist/dotprops-C_4L7RPD.js.map +1 -1
- package/dist/element-Bak9llw_.js.map +1 -1
- package/dist/env-_68PRRoA.js.map +1 -1
- package/dist/{error-codes-BzoEctmD.d.ts → error-codes-B4TyW4Ct.d.ts} +2 -2
- package/dist/{error-codes-C-ViHyu-.js → error-codes-Ds0bnPvT.js} +2 -2
- package/dist/error-codes-Ds0bnPvT.js.map +1 -0
- package/dist/events/CommandKitEventsChannel.d.ts +2 -2
- package/dist/{feature-flags-C44dggkN.js → feature-flags-BZ3mW1xe.js} +5 -5
- package/dist/{feature-flags-C44dggkN.js.map → feature-flags-BZ3mW1xe.js.map} +1 -1
- package/dist/file-DVZC0QXI.js.map +1 -1
- package/dist/flags/FlagProvider.d.ts +2 -2
- package/dist/flags/FlagProvider.js.map +1 -1
- package/dist/flags/feature-flags.d.ts +2 -2
- package/dist/flags/feature-flags.js +11 -11
- package/dist/flags/store.d.ts +2 -2
- package/dist/helpers-BUlN3lIz.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +23 -18
- package/dist/index.js.map +1 -0
- package/dist/{init-ZjceQTSt.js → init-BjFLN5XX.js} +2 -2
- package/dist/{init-ZjceQTSt.js.map → init-BjFLN5XX.js.map} +1 -1
- package/dist/kv/kv.js.map +1 -1
- package/dist/logger/DefaultLogger.d.ts +2 -2
- package/dist/logger/DefaultLogger.js +10 -10
- package/dist/logger/ILogger.d.ts +1 -1
- package/dist/logger/Logger.d.ts +2 -2
- package/dist/logger/Logger.js +10 -10
- package/dist/logger/NoopLogger.d.ts +41 -11
- package/dist/logger/NoopLogger.js +5 -25
- package/dist/logger/NoopLogger.js.map +1 -1
- package/dist/media-gallery-CIKypjbJ.js.map +1 -1
- package/dist/plugins/CompilerPlugin.d.ts +2 -2
- package/dist/plugins/PluginCommon.d.ts +2 -2
- package/dist/plugins/RuntimePlugin.d.ts +2 -2
- package/dist/plugins/RuntimePlugin.js +1 -1
- package/dist/plugins/index.d.ts +2 -2
- package/dist/plugins/index.js +10 -10
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +2 -2
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +10 -10
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +2 -2
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +10 -10
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +2 -2
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +10 -10
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +2 -2
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +10 -10
- package/dist/plugins/plugin-runtime/runtime.d.ts +2 -2
- package/dist/plugins/plugin-runtime/runtime.js +1 -1
- package/dist/plugins/types.d.ts +2 -2
- package/dist/{resolve-file-url-DHTQj2mU.js → resolve-file-url-DYjaxg_S.js} +1 -1
- package/dist/{resolve-file-url-DHTQj2mU.js.map → resolve-file-url-DYjaxg_S.js.map} +1 -1
- package/dist/section-CuYr0Inu.js.map +1 -1
- package/dist/separator-DLdWBjSN.js.map +1 -1
- package/dist/serde-CHySNpFr.js.map +1 -1
- package/dist/{signals-BQbEfy3X.d.ts → signals-SHg7J1U_.d.ts} +4 -7
- package/dist/{signals-DHdYrd-n.js → signals-r7qPAvOR.js} +12 -15
- package/dist/signals-r7qPAvOR.js.map +1 -0
- package/dist/store-CiqLHedg.js.map +1 -1
- package/dist/text-display--p2-BoUa.js.map +1 -1
- package/dist/type-checker-1Iu1jJcy.js.map +1 -1
- package/dist/types-package-DrnIdWLg.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/utils/dev-hooks.d.ts +2 -2
- package/dist/utils/dev-hooks.js +10 -10
- package/dist/utils/error-codes.d.ts +1 -1
- package/dist/utils/error-codes.js +1 -1
- package/dist/utils/resolve-file-url.js +1 -1
- package/dist/utils/useful-stuff/async-queue.js.map +1 -1
- package/dist/utils/useful-stuff/mutex.js.map +1 -1
- package/dist/utils/useful-stuff/ratelimiter.js.map +1 -1
- package/dist/utils/useful-stuff/semaphore.js.map +1 -1
- package/dist/utils/utilities.js +10 -10
- package/dist/utils/warn-unstable.js.map +1 -1
- package/dist/utils-DCSnVAZ6.js.map +1 -1
- package/dist/{utils-BnXM4eKk.js → utils-KsNof0Xz.js} +1 -1
- package/dist/{utils-BnXM4eKk.js.map → utils-KsNof0Xz.js.map} +1 -1
- package/dist/{version-D8HlFOxx.js → version-DBXZ4wRb.js} +2 -2
- package/dist/{version-D8HlFOxx.js.map → version-DBXZ4wRb.js.map} +1 -1
- package/dist/version.js +1 -1
- package/package.json +60 -59
- package/dist/ILogger-DBGON5wx.d.ts +0 -34
- package/dist/RuntimePlugin-CBgBLXTG.js.map +0 -1
- package/dist/build-BoGqWPIS.js.map +0 -1
- package/dist/commandkit-5VMG2thU.js.map +0 -1
- package/dist/error-codes-C-ViHyu-.js.map +0 -1
- package/dist/signals-DHdYrd-n.js.map +0 -1
- /package/dist/{runtime-5fxB4uhe.js → runtime-DB9CiPfe.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginCommon, PluginOptions, PluginType, isPlugin } from "../analytics-engine-
|
|
1
|
+
import { PluginCommon, PluginOptions, PluginType, isPlugin } from "../analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "../ModalKit-Btz58KYn.js";
|
|
@@ -23,7 +23,7 @@ import "../text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "../index-DSBMRX9A.js";
|
|
24
24
|
import "../index-DdqikUQD.js";
|
|
25
25
|
import "../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../signals-
|
|
26
|
+
import "../signals-SHg7J1U_.js";
|
|
27
27
|
import "../helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "../CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "../EventsRouter-BacqK6z3.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RuntimePlugin, isRuntimePlugin } from "../analytics-engine-
|
|
1
|
+
import { RuntimePlugin, isRuntimePlugin } from "../analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "../ModalKit-Btz58KYn.js";
|
|
@@ -23,7 +23,7 @@ import "../text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "../index-DSBMRX9A.js";
|
|
24
24
|
import "../index-DdqikUQD.js";
|
|
25
25
|
import "../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../signals-
|
|
26
|
+
import "../signals-SHg7J1U_.js";
|
|
27
27
|
import "../helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "../CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "../EventsRouter-BacqK6z3.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require('../PluginCommon-Di1xIa8d.js');
|
|
2
|
-
const require_RuntimePlugin = require('../RuntimePlugin-
|
|
2
|
+
const require_RuntimePlugin = require('../RuntimePlugin-eTdFJwGd.js');
|
|
3
3
|
|
|
4
4
|
exports.RuntimePlugin = require_RuntimePlugin.RuntimePlugin;
|
|
5
5
|
exports.isRuntimePlugin = require_RuntimePlugin.isRuntimePlugin;
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitEventDispatch, CommandKitPlugin, CommandKitPluginRuntime, CommonDirectiveTransformer, CommonDirectiveTransformerOptions, CommonPluginRuntime, CompilerPlugin, CompilerPluginRuntime, MaybeFalsey, PluginTransformParameters, RuntimePlugin, TemplateHandler, TransformedResult, isCompilerPlugin, isRuntimePlugin } from "../analytics-engine-
|
|
1
|
+
import { CommandKitEventDispatch, CommandKitPlugin, CommandKitPluginRuntime, CommonDirectiveTransformer, CommonDirectiveTransformerOptions, CommonPluginRuntime, CompilerPlugin, CompilerPluginRuntime, MaybeFalsey, PluginTransformParameters, RuntimePlugin, TemplateHandler, TransformedResult, isCompilerPlugin, isRuntimePlugin } from "../analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "../ModalKit-Btz58KYn.js";
|
|
@@ -23,7 +23,7 @@ import "../text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "../index-DSBMRX9A.js";
|
|
24
24
|
import "../index-DdqikUQD.js";
|
|
25
25
|
import "../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../signals-
|
|
26
|
+
import "../signals-SHg7J1U_.js";
|
|
27
27
|
import "../helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "../CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "../EventsRouter-BacqK6z3.js";
|
package/dist/plugins/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../colors-Cd4Oz-r-.js');
|
|
2
2
|
require('../ActionRow-CmTHbo2t.js');
|
|
3
|
-
require('../error-codes-
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
3
|
+
require('../error-codes-Ds0bnPvT.js');
|
|
4
|
+
const require_commandkit = require('../commandkit-BPtNCbV8.js');
|
|
5
5
|
require('../common-CcfjYnPG.js');
|
|
6
6
|
require('../common-vnMIelAE.js');
|
|
7
7
|
require('../container-z621KfH5.js');
|
|
@@ -17,16 +17,16 @@ require('../EventInterceptor-CQ4PBpBJ.js');
|
|
|
17
17
|
require('../constants-B5_Ta7PR.js');
|
|
18
18
|
require('../PluginCommon-Di1xIa8d.js');
|
|
19
19
|
const require_CompilerPlugin = require('../CompilerPlugin-CjoZAAR8.js');
|
|
20
|
-
const require_RuntimePlugin = require('../RuntimePlugin-
|
|
20
|
+
const require_RuntimePlugin = require('../RuntimePlugin-eTdFJwGd.js');
|
|
21
21
|
require('../types-q0Nm882H.js');
|
|
22
|
-
require('../
|
|
23
|
-
require('../
|
|
24
|
-
require('../
|
|
22
|
+
require('../resolve-file-url-DYjaxg_S.js');
|
|
23
|
+
require('../runtime-DB9CiPfe.js');
|
|
24
|
+
require('../utils-KsNof0Xz.js');
|
|
25
25
|
require('../types-package-DrnIdWLg.js');
|
|
26
|
-
require('../
|
|
27
|
-
require('../
|
|
28
|
-
require('../
|
|
29
|
-
require('../MessageCommandParser-
|
|
26
|
+
require('../constants-DxfYtA6t.js');
|
|
27
|
+
require('../EventWorkerContext-TZIKxVCu.js');
|
|
28
|
+
require('../signals-r7qPAvOR.js');
|
|
29
|
+
require('../MessageCommandParser-TPEPhjvx.js');
|
|
30
30
|
require('../CommandsRouter-tMAivEfv.js');
|
|
31
31
|
require('../EventsRouter-C_J0M3uO.js');
|
|
32
32
|
require('../router-DHnFRADH.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitPluginRuntime } from "../../analytics-engine-
|
|
1
|
+
import { CommandKitPluginRuntime } from "../../analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "../../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../../ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "../../ModalKit-Btz58KYn.js";
|
|
@@ -23,7 +23,7 @@ import "../../text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "../../index-DSBMRX9A.js";
|
|
24
24
|
import "../../index-DdqikUQD.js";
|
|
25
25
|
import "../../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../../signals-
|
|
26
|
+
import "../../signals-SHg7J1U_.js";
|
|
27
27
|
import "../../helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "../../CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "../../EventsRouter-BacqK6z3.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../../colors-Cd4Oz-r-.js');
|
|
2
2
|
require('../../ActionRow-CmTHbo2t.js');
|
|
3
|
-
require('../../error-codes-
|
|
4
|
-
const require_commandkit = require('../../commandkit-
|
|
3
|
+
require('../../error-codes-Ds0bnPvT.js');
|
|
4
|
+
const require_commandkit = require('../../commandkit-BPtNCbV8.js');
|
|
5
5
|
require('../../common-CcfjYnPG.js');
|
|
6
6
|
require('../../common-vnMIelAE.js');
|
|
7
7
|
require('../../container-z621KfH5.js');
|
|
@@ -17,16 +17,16 @@ require('../../EventInterceptor-CQ4PBpBJ.js');
|
|
|
17
17
|
require('../../constants-B5_Ta7PR.js');
|
|
18
18
|
require('../../PluginCommon-Di1xIa8d.js');
|
|
19
19
|
require('../../CompilerPlugin-CjoZAAR8.js');
|
|
20
|
-
require('../../RuntimePlugin-
|
|
20
|
+
require('../../RuntimePlugin-eTdFJwGd.js');
|
|
21
21
|
require('../../types-q0Nm882H.js');
|
|
22
|
-
require('../../
|
|
23
|
-
require('../../
|
|
24
|
-
require('../../
|
|
22
|
+
require('../../resolve-file-url-DYjaxg_S.js');
|
|
23
|
+
require('../../runtime-DB9CiPfe.js');
|
|
24
|
+
require('../../utils-KsNof0Xz.js');
|
|
25
25
|
require('../../types-package-DrnIdWLg.js');
|
|
26
|
-
require('../../
|
|
27
|
-
require('../../
|
|
28
|
-
require('../../
|
|
29
|
-
require('../../MessageCommandParser-
|
|
26
|
+
require('../../constants-DxfYtA6t.js');
|
|
27
|
+
require('../../EventWorkerContext-TZIKxVCu.js');
|
|
28
|
+
require('../../signals-r7qPAvOR.js');
|
|
29
|
+
require('../../MessageCommandParser-TPEPhjvx.js');
|
|
30
30
|
require('../../CommandsRouter-tMAivEfv.js');
|
|
31
31
|
require('../../EventsRouter-C_J0M3uO.js');
|
|
32
32
|
require('../../router-DHnFRADH.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompilerPluginRuntime } from "../../analytics-engine-
|
|
1
|
+
import { CompilerPluginRuntime } from "../../analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "../../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../../ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "../../ModalKit-Btz58KYn.js";
|
|
@@ -23,7 +23,7 @@ import "../../text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "../../index-DSBMRX9A.js";
|
|
24
24
|
import "../../index-DdqikUQD.js";
|
|
25
25
|
import "../../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../../signals-
|
|
26
|
+
import "../../signals-SHg7J1U_.js";
|
|
27
27
|
import "../../helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "../../CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "../../EventsRouter-BacqK6z3.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../../colors-Cd4Oz-r-.js');
|
|
2
2
|
require('../../ActionRow-CmTHbo2t.js');
|
|
3
|
-
require('../../error-codes-
|
|
4
|
-
const require_commandkit = require('../../commandkit-
|
|
3
|
+
require('../../error-codes-Ds0bnPvT.js');
|
|
4
|
+
const require_commandkit = require('../../commandkit-BPtNCbV8.js');
|
|
5
5
|
require('../../common-CcfjYnPG.js');
|
|
6
6
|
require('../../common-vnMIelAE.js');
|
|
7
7
|
require('../../container-z621KfH5.js');
|
|
@@ -17,16 +17,16 @@ require('../../EventInterceptor-CQ4PBpBJ.js');
|
|
|
17
17
|
require('../../constants-B5_Ta7PR.js');
|
|
18
18
|
require('../../PluginCommon-Di1xIa8d.js');
|
|
19
19
|
require('../../CompilerPlugin-CjoZAAR8.js');
|
|
20
|
-
require('../../RuntimePlugin-
|
|
20
|
+
require('../../RuntimePlugin-eTdFJwGd.js');
|
|
21
21
|
require('../../types-q0Nm882H.js');
|
|
22
|
-
require('../../
|
|
23
|
-
require('../../
|
|
24
|
-
require('../../
|
|
22
|
+
require('../../resolve-file-url-DYjaxg_S.js');
|
|
23
|
+
require('../../runtime-DB9CiPfe.js');
|
|
24
|
+
require('../../utils-KsNof0Xz.js');
|
|
25
25
|
require('../../types-package-DrnIdWLg.js');
|
|
26
|
-
require('../../
|
|
27
|
-
require('../../
|
|
28
|
-
require('../../
|
|
29
|
-
require('../../MessageCommandParser-
|
|
26
|
+
require('../../constants-DxfYtA6t.js');
|
|
27
|
+
require('../../EventWorkerContext-TZIKxVCu.js');
|
|
28
|
+
require('../../signals-r7qPAvOR.js');
|
|
29
|
+
require('../../MessageCommandParser-TPEPhjvx.js');
|
|
30
30
|
require('../../CommandsRouter-tMAivEfv.js');
|
|
31
31
|
require('../../EventsRouter-C_J0M3uO.js');
|
|
32
32
|
require('../../router-DHnFRADH.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonDirectiveTransformer, CommonDirectiveTransformerOptions } from "../../../analytics-engine-
|
|
1
|
+
import { CommonDirectiveTransformer, CommonDirectiveTransformerOptions } from "../../../analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "../../../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../../../ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "../../../ModalKit-Btz58KYn.js";
|
|
@@ -23,7 +23,7 @@ import "../../../text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "../../../index-DSBMRX9A.js";
|
|
24
24
|
import "../../../index-DdqikUQD.js";
|
|
25
25
|
import "../../../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../../../signals-
|
|
26
|
+
import "../../../signals-SHg7J1U_.js";
|
|
27
27
|
import "../../../helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "../../../CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "../../../EventsRouter-BacqK6z3.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../../../colors-Cd4Oz-r-.js');
|
|
2
2
|
require('../../../ActionRow-CmTHbo2t.js');
|
|
3
|
-
require('../../../error-codes-
|
|
4
|
-
const require_commandkit = require('../../../commandkit-
|
|
3
|
+
require('../../../error-codes-Ds0bnPvT.js');
|
|
4
|
+
const require_commandkit = require('../../../commandkit-BPtNCbV8.js');
|
|
5
5
|
require('../../../common-CcfjYnPG.js');
|
|
6
6
|
require('../../../common-vnMIelAE.js');
|
|
7
7
|
require('../../../container-z621KfH5.js');
|
|
@@ -17,16 +17,16 @@ require('../../../EventInterceptor-CQ4PBpBJ.js');
|
|
|
17
17
|
require('../../../constants-B5_Ta7PR.js');
|
|
18
18
|
require('../../../PluginCommon-Di1xIa8d.js');
|
|
19
19
|
require('../../../CompilerPlugin-CjoZAAR8.js');
|
|
20
|
-
require('../../../RuntimePlugin-
|
|
20
|
+
require('../../../RuntimePlugin-eTdFJwGd.js');
|
|
21
21
|
require('../../../types-q0Nm882H.js');
|
|
22
|
-
require('../../../
|
|
23
|
-
require('../../../
|
|
24
|
-
require('../../../
|
|
22
|
+
require('../../../resolve-file-url-DYjaxg_S.js');
|
|
23
|
+
require('../../../runtime-DB9CiPfe.js');
|
|
24
|
+
require('../../../utils-KsNof0Xz.js');
|
|
25
25
|
require('../../../types-package-DrnIdWLg.js');
|
|
26
|
-
require('../../../
|
|
27
|
-
require('../../../
|
|
28
|
-
require('../../../
|
|
29
|
-
require('../../../MessageCommandParser-
|
|
26
|
+
require('../../../constants-DxfYtA6t.js');
|
|
27
|
+
require('../../../EventWorkerContext-TZIKxVCu.js');
|
|
28
|
+
require('../../../signals-r7qPAvOR.js');
|
|
29
|
+
require('../../../MessageCommandParser-TPEPhjvx.js');
|
|
30
30
|
require('../../../CommandsRouter-tMAivEfv.js');
|
|
31
31
|
require('../../../EventsRouter-C_J0M3uO.js');
|
|
32
32
|
require('../../../router-DHnFRADH.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompilerPlugin, MaybeFalsey, PluginTransformParameters, TransformedResult } from "../../../analytics-engine-
|
|
1
|
+
import { CompilerPlugin, MaybeFalsey, PluginTransformParameters, TransformedResult } from "../../../analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "../../../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../../../ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "../../../ModalKit-Btz58KYn.js";
|
|
@@ -23,7 +23,7 @@ import "../../../text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "../../../index-DSBMRX9A.js";
|
|
24
24
|
import "../../../index-DdqikUQD.js";
|
|
25
25
|
import "../../../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../../../signals-
|
|
26
|
+
import "../../../signals-SHg7J1U_.js";
|
|
27
27
|
import "../../../helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "../../../CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "../../../EventsRouter-BacqK6z3.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../../../colors-Cd4Oz-r-.js');
|
|
2
2
|
require('../../../ActionRow-CmTHbo2t.js');
|
|
3
|
-
require('../../../error-codes-
|
|
4
|
-
const require_commandkit = require('../../../commandkit-
|
|
3
|
+
require('../../../error-codes-Ds0bnPvT.js');
|
|
4
|
+
const require_commandkit = require('../../../commandkit-BPtNCbV8.js');
|
|
5
5
|
require('../../../common-CcfjYnPG.js');
|
|
6
6
|
require('../../../common-vnMIelAE.js');
|
|
7
7
|
require('../../../container-z621KfH5.js');
|
|
@@ -17,16 +17,16 @@ require('../../../EventInterceptor-CQ4PBpBJ.js');
|
|
|
17
17
|
require('../../../constants-B5_Ta7PR.js');
|
|
18
18
|
require('../../../PluginCommon-Di1xIa8d.js');
|
|
19
19
|
require('../../../CompilerPlugin-CjoZAAR8.js');
|
|
20
|
-
require('../../../RuntimePlugin-
|
|
20
|
+
require('../../../RuntimePlugin-eTdFJwGd.js');
|
|
21
21
|
require('../../../types-q0Nm882H.js');
|
|
22
|
-
require('../../../
|
|
23
|
-
require('../../../
|
|
24
|
-
require('../../../
|
|
22
|
+
require('../../../resolve-file-url-DYjaxg_S.js');
|
|
23
|
+
require('../../../runtime-DB9CiPfe.js');
|
|
24
|
+
require('../../../utils-KsNof0Xz.js');
|
|
25
25
|
require('../../../types-package-DrnIdWLg.js');
|
|
26
|
-
require('../../../
|
|
27
|
-
require('../../../
|
|
28
|
-
require('../../../
|
|
29
|
-
require('../../../MessageCommandParser-
|
|
26
|
+
require('../../../constants-DxfYtA6t.js');
|
|
27
|
+
require('../../../EventWorkerContext-TZIKxVCu.js');
|
|
28
|
+
require('../../../signals-r7qPAvOR.js');
|
|
29
|
+
require('../../../MessageCommandParser-TPEPhjvx.js');
|
|
30
30
|
require('../../../CommandsRouter-tMAivEfv.js');
|
|
31
31
|
require('../../../EventsRouter-C_J0M3uO.js');
|
|
32
32
|
require('../../../router-DHnFRADH.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonPluginRuntime } from "../../analytics-engine-
|
|
1
|
+
import { CommonPluginRuntime } from "../../analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "../../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../../ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "../../ModalKit-Btz58KYn.js";
|
|
@@ -23,7 +23,7 @@ import "../../text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "../../index-DSBMRX9A.js";
|
|
24
24
|
import "../../index-DdqikUQD.js";
|
|
25
25
|
import "../../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../../signals-
|
|
26
|
+
import "../../signals-SHg7J1U_.js";
|
|
27
27
|
import "../../helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "../../CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "../../EventsRouter-BacqK6z3.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require('../../runtime-
|
|
1
|
+
require('../../runtime-DB9CiPfe.js');
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitEventDispatch, CommandKitPlugin, MaybeFalsey, TemplateHandler } from "../analytics-engine-
|
|
1
|
+
import { CommandKitEventDispatch, CommandKitPlugin, MaybeFalsey, TemplateHandler } from "../analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "../ModalKit-Btz58KYn.js";
|
|
@@ -23,7 +23,7 @@ import "../text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "../index-DSBMRX9A.js";
|
|
24
24
|
import "../index-DdqikUQD.js";
|
|
25
25
|
import "../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../signals-
|
|
26
|
+
import "../signals-SHg7J1U_.js";
|
|
27
27
|
import "../helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "../CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "../EventsRouter-BacqK6z3.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-file-url-
|
|
1
|
+
{"version":3,"file":"resolve-file-url-DYjaxg_S.js","names":[],"sources":["../src/utils/resolve-file-url.ts"],"sourcesContent":["import path from 'path';\n\n/**\n * Convert a local file path to a file URL.\n * @param filePath - The local file's path.\n * @param withTs - Whether to append a timestamp to the URL.\n * @returns - The converted file URL.\n */\nexport function toFileURL(filePath: string, withTs = false) {\n const resolvedPath = path.resolve(filePath);\n return `${'file://' + resolvedPath.replace(/\\\\\\\\|\\\\/g, '/')}${withTs ? `?ts=${Date.now()}` : ''}`;\n}\n"],"mappings":";;;;;;;;;;AAQA,SAAgB,UAAU,UAAkB,SAAS,OAAO;CAC1D,MAAM,eAAe,aAAK,QAAQ;AAClC,QAAO,GAAG,YAAY,aAAa,QAAQ,YAAY,OAAO,SAAS,OAAO,KAAK,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-CuYr0Inu.js","names":[],"sources":["../src/components/v2/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;AAEpB,wBAAQ,OAAO;AAEf,KAAI,MAAM,YAAY,MAAM;AAC1B,MAAI,CAAC,MAAM,QAAQ,MAAM,UAAW,OAAM,WAAW,CAAC,MAAM
|
|
1
|
+
{"version":3,"file":"section-CuYr0Inu.js","names":[],"sources":["../src/components/v2/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;AAEpB,wBAAQ,OAAO;AAEf,KAAI,MAAM,YAAY,MAAM;AAC1B,MAAI,CAAC,MAAM,QAAQ,MAAM,UAAW,OAAM,WAAW,CAAC,MAAM;AAC5D,OAAK,MAAM,aAAa,MAAM,SAAS,OACrC,KAAI,qBAAqB,4BACvB,SAAQ,sBAAsB;WACrB,qBAAqB,yBAC9B,SAAQ,mBAAmB;WAClB,qBAAqB,8BAC9B,SAAQ,yBAAyB;;AAKvC,QAAO;;;;;;;;;;;;AAuBT,SAAgB,UAAU,OAAuB;CAC/C,MAAM,YAAY,IAAI,4BAAiB;EACrC,aAAa,MAAM;EACnB,SAAS,MAAM;EACf,IAAI,MAAM;EACV,OAAO,EAAE,KAAK,MAAM;;AAGtB,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator-DLdWBjSN.js","names":[],"sources":["../src/components/v2/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;CAC/C,MAAM,YAAY,IAAI,4BAAiB;AACvC,QAAO
|
|
1
|
+
{"version":3,"file":"separator-DLdWBjSN.js","names":[],"sources":["../src/components/v2/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;CAC/C,MAAM,YAAY,IAAI,4BAAiB;AACvC,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serde-CHySNpFr.js","names":[],"sources":["../src/kv/serde.ts"],"sourcesContent":["import { SerializerType } from './constants';\n\nexport interface SerializedValue {\n t: SerializerType;\n v: any;\n}\n\nexport function serializer(value: any): SerializedValue {\n if (value === null) {\n return { t: SerializerType.Null, v: null };\n }\n\n if (value === undefined) {\n return { t: SerializerType.Undefined, v: undefined };\n }\n\n if (typeof value === 'string') {\n return { t: SerializerType.String, v: value };\n }\n\n if (typeof value === 'number') {\n return { t: SerializerType.Number, v: value };\n }\n\n if (typeof value === 'boolean') {\n return { t: SerializerType.Boolean, v: value };\n }\n\n if (typeof value === 'bigint') {\n return { t: SerializerType.BigInt, v: value.toString() };\n }\n\n if (value instanceof Date) {\n return { t: SerializerType.Date, v: value.toISOString() };\n }\n\n if (Array.isArray(value)) {\n return { t: SerializerType.Array, v: value };\n }\n\n if (value instanceof Map) {\n return { t: SerializerType.Map, v: Array.from(value.entries()) };\n }\n\n if (value instanceof Set) {\n return { t: SerializerType.Set, v: Array.from(value) };\n }\n\n if (Buffer.isBuffer(value)) {\n return { t: SerializerType.Buffer, v: value.toString('base64') };\n }\n\n if (value instanceof RegExp) {\n return {\n t: SerializerType.RegExp,\n v: { source: value.source, flags: value.flags },\n };\n }\n\n if (typeof value === 'object') {\n return { t: SerializerType.Object, v: value };\n }\n\n // Fallback to string\n return { t: SerializerType.String, v: String(value) };\n}\n\nexport function deserializer(serialized: SerializedValue): any {\n switch (serialized.t) {\n case SerializerType.Null:\n return null;\n case SerializerType.Undefined:\n return undefined;\n case SerializerType.String:\n return serialized.v;\n case SerializerType.Number:\n return serialized.v;\n case SerializerType.Boolean:\n return serialized.v;\n case SerializerType.BigInt:\n return BigInt(serialized.v);\n case SerializerType.Date:\n return new Date(serialized.v);\n case SerializerType.Array:\n return serialized.v;\n case SerializerType.Map:\n return new Map(serialized.v);\n case SerializerType.Set:\n return new Set(serialized.v);\n case SerializerType.Buffer:\n return Buffer.from(serialized.v, 'base64');\n case SerializerType.RegExp:\n return new RegExp(serialized.v.source, serialized.v.flags);\n case SerializerType.Object:\n return serialized.v;\n default:\n return serialized.v;\n }\n}\n"],"mappings":";;;AAOA,SAAgB,WAAW,OAA6B;AACtD,KAAI,UAAU,KACZ,QAAO;EAAE,GAAG,iCAAe;EAAM,GAAG
|
|
1
|
+
{"version":3,"file":"serde-CHySNpFr.js","names":[],"sources":["../src/kv/serde.ts"],"sourcesContent":["import { SerializerType } from './constants';\n\nexport interface SerializedValue {\n t: SerializerType;\n v: any;\n}\n\nexport function serializer(value: any): SerializedValue {\n if (value === null) {\n return { t: SerializerType.Null, v: null };\n }\n\n if (value === undefined) {\n return { t: SerializerType.Undefined, v: undefined };\n }\n\n if (typeof value === 'string') {\n return { t: SerializerType.String, v: value };\n }\n\n if (typeof value === 'number') {\n return { t: SerializerType.Number, v: value };\n }\n\n if (typeof value === 'boolean') {\n return { t: SerializerType.Boolean, v: value };\n }\n\n if (typeof value === 'bigint') {\n return { t: SerializerType.BigInt, v: value.toString() };\n }\n\n if (value instanceof Date) {\n return { t: SerializerType.Date, v: value.toISOString() };\n }\n\n if (Array.isArray(value)) {\n return { t: SerializerType.Array, v: value };\n }\n\n if (value instanceof Map) {\n return { t: SerializerType.Map, v: Array.from(value.entries()) };\n }\n\n if (value instanceof Set) {\n return { t: SerializerType.Set, v: Array.from(value) };\n }\n\n if (Buffer.isBuffer(value)) {\n return { t: SerializerType.Buffer, v: value.toString('base64') };\n }\n\n if (value instanceof RegExp) {\n return {\n t: SerializerType.RegExp,\n v: { source: value.source, flags: value.flags },\n };\n }\n\n if (typeof value === 'object') {\n return { t: SerializerType.Object, v: value };\n }\n\n // Fallback to string\n return { t: SerializerType.String, v: String(value) };\n}\n\nexport function deserializer(serialized: SerializedValue): any {\n switch (serialized.t) {\n case SerializerType.Null:\n return null;\n case SerializerType.Undefined:\n return undefined;\n case SerializerType.String:\n return serialized.v;\n case SerializerType.Number:\n return serialized.v;\n case SerializerType.Boolean:\n return serialized.v;\n case SerializerType.BigInt:\n return BigInt(serialized.v);\n case SerializerType.Date:\n return new Date(serialized.v);\n case SerializerType.Array:\n return serialized.v;\n case SerializerType.Map:\n return new Map(serialized.v);\n case SerializerType.Set:\n return new Set(serialized.v);\n case SerializerType.Buffer:\n return Buffer.from(serialized.v, 'base64');\n case SerializerType.RegExp:\n return new RegExp(serialized.v.source, serialized.v.flags);\n case SerializerType.Object:\n return serialized.v;\n default:\n return serialized.v;\n }\n}\n"],"mappings":";;;AAOA,SAAgB,WAAW,OAA6B;AACtD,KAAI,UAAU,KACZ,QAAO;EAAE,GAAG,iCAAe;EAAM,GAAG;;AAGtC,KAAI,UAAU,OACZ,QAAO;EAAE,GAAG,iCAAe;EAAW,GAAG;;AAG3C,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG;;AAGxC,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG;;AAGxC,KAAI,OAAO,UAAU,UACnB,QAAO;EAAE,GAAG,iCAAe;EAAS,GAAG;;AAGzC,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG,MAAM;;AAG9C,KAAI,iBAAiB,KACnB,QAAO;EAAE,GAAG,iCAAe;EAAM,GAAG,MAAM;;AAG5C,KAAI,MAAM,QAAQ,OAChB,QAAO;EAAE,GAAG,iCAAe;EAAO,GAAG;;AAGvC,KAAI,iBAAiB,IACnB,QAAO;EAAE,GAAG,iCAAe;EAAK,GAAG,MAAM,KAAK,MAAM;;AAGtD,KAAI,iBAAiB,IACnB,QAAO;EAAE,GAAG,iCAAe;EAAK,GAAG,MAAM,KAAK;;AAGhD,KAAI,OAAO,SAAS,OAClB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG,MAAM,SAAS;;AAGvD,KAAI,iBAAiB,OACnB,QAAO;EACL,GAAG,iCAAe;EAClB,GAAG;GAAE,QAAQ,MAAM;GAAQ,OAAO,MAAM;;;AAI5C,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG;;AAIxC,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG,OAAO;;;AAG/C,SAAgB,aAAa,YAAkC;AAC7D,SAAQ,WAAW,GAAnB;EACE,KAAK,iCAAe,KAClB,QAAO;EACT,KAAK,iCAAe,UAClB,QAAO;EACT,KAAK,iCAAe,OAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,OAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,QAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,OAClB,QAAO,OAAO,WAAW;EAC3B,KAAK,iCAAe,KAClB,QAAO,IAAI,KAAK,WAAW;EAC7B,KAAK,iCAAe,MAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,IAClB,QAAO,IAAI,IAAI,WAAW;EAC5B,KAAK,iCAAe,IAClB,QAAO,IAAI,IAAI,WAAW;EAC5B,KAAK,iCAAe,OAClB,QAAO,OAAO,KAAK,WAAW,GAAG;EACnC,KAAK,iCAAe,OAClB,QAAO,IAAI,OAAO,WAAW,EAAE,QAAQ,WAAW,EAAE;EACtD,KAAK,iCAAe,OAClB,QAAO,WAAW;EACpB,QACE,QAAO,WAAW"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
//#region src/app/interrupt/signals.d.ts
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* If this is called inside pre-stage middleware, the next run will be the actual command, skipping all other pre-stage middlewares.
|
|
5
|
-
* If this is called inside a command itself, it will skip all post-stage middlewares.
|
|
6
|
-
* If this is called inside post-stage middleware, it will skip all other post-stage middlewares.
|
|
3
|
+
* Stop upcoming middlewares and command execution.
|
|
7
4
|
*/
|
|
8
|
-
declare function
|
|
5
|
+
declare function stopMiddlewares(): never;
|
|
9
6
|
/**
|
|
10
7
|
* Rethrow the error if it is a CommandKit error.
|
|
11
8
|
* @param error The error to rethrow.
|
|
@@ -37,5 +34,5 @@ declare function redirect(): never;
|
|
|
37
34
|
*/
|
|
38
35
|
declare function stopEvents(): never;
|
|
39
36
|
//#endregion
|
|
40
|
-
export {
|
|
41
|
-
//# sourceMappingURL=signals-
|
|
37
|
+
export { redirect, rethrow, stopEvents, stopMiddlewares };
|
|
38
|
+
//# sourceMappingURL=signals-SHg7J1U_.d.ts.map
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
const require_error_codes = require('./error-codes-
|
|
2
|
-
const require_EventWorkerContext = require('./EventWorkerContext-
|
|
1
|
+
const require_error_codes = require('./error-codes-Ds0bnPvT.js');
|
|
2
|
+
const require_EventWorkerContext = require('./EventWorkerContext-TZIKxVCu.js');
|
|
3
3
|
|
|
4
4
|
//#region src/app/interrupt/signals.ts
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* If this is called inside pre-stage middleware, the next run will be the actual command, skipping all other pre-stage middlewares.
|
|
8
|
-
* If this is called inside a command itself, it will skip all post-stage middlewares.
|
|
9
|
-
* If this is called inside post-stage middleware, it will skip all other post-stage middlewares.
|
|
6
|
+
* Stop upcoming middlewares and command execution.
|
|
10
7
|
*/
|
|
11
|
-
function
|
|
12
|
-
throw require_error_codes.createCommandKitError(require_error_codes.CommandKitErrorCodes.
|
|
8
|
+
function stopMiddlewares() {
|
|
9
|
+
throw require_error_codes.createCommandKitError(require_error_codes.CommandKitErrorCodes.StopMiddlewares);
|
|
13
10
|
}
|
|
14
11
|
/**
|
|
15
12
|
* Rethrow the error if it is a CommandKit error.
|
|
@@ -50,12 +47,6 @@ function stopEvents() {
|
|
|
50
47
|
}
|
|
51
48
|
|
|
52
49
|
//#endregion
|
|
53
|
-
Object.defineProperty(exports, 'exitMiddleware', {
|
|
54
|
-
enumerable: true,
|
|
55
|
-
get: function () {
|
|
56
|
-
return exitMiddleware;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
50
|
Object.defineProperty(exports, 'redirect', {
|
|
60
51
|
enumerable: true,
|
|
61
52
|
get: function () {
|
|
@@ -74,4 +65,10 @@ Object.defineProperty(exports, 'stopEvents', {
|
|
|
74
65
|
return stopEvents;
|
|
75
66
|
}
|
|
76
67
|
});
|
|
77
|
-
|
|
68
|
+
Object.defineProperty(exports, 'stopMiddlewares', {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () {
|
|
71
|
+
return stopMiddlewares;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=signals-r7qPAvOR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signals-r7qPAvOR.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;;;;;;;;;;;;;;AAenD,SAAgB,QAAQ,OAAsB;AAC5C,KAAI,sCAAkB,OAAQ,OAAM;;;;;AAMtC,SAAgB,WAAkB;AAChC,OAAM,0CAAsB,yCAAqB;;;;;;;;;;;;;;AAenD,SAAgB,aAAoB;AAClC,KAAI,CAAC,8CAAmB,WACtB,OAAM,IAAI,MAAM;AAGlB,OAAM,0CAAsB,yCAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-CiqLHedg.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
|
+
{"version":3,"file":"store-CiqLHedg.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-display--p2-BoUa.js","names":[],"sources":["../src/components/v2/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;AAE3C,KAAI,CAAC,MAAM,WAAW,MAAM,SAC1B,KAAI,MAAM,QAAQ,MAAM,UACtB,aAAY,WAAW,MAAM,SAAS,KAAK;KAE3C,aAAY,WACV,OAAO,MAAM,aAAa,WAC1B,MAAM,WACN,OAAO,MAAM;AAKnB,QAAO
|
|
1
|
+
{"version":3,"file":"text-display--p2-BoUa.js","names":[],"sources":["../src/components/v2/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;AAE3C,KAAI,CAAC,MAAM,WAAW,MAAM,SAC1B,KAAI,MAAM,QAAQ,MAAM,UACtB,aAAY,WAAW,MAAM,SAAS,KAAK;KAE3C,aAAY,WACV,OAAO,MAAM,aAAa,WAC1B,MAAM,WACN,OAAO,MAAM;AAKnB,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-checker-1Iu1jJcy.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;AAGF,KAAI,CAAC,WAAW,KACd,QAAO,GAAG,8BAAO,IAAI,SAAS,IAAI;CAGpC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"type-checker-1Iu1jJcy.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;AAGF,KAAI,CAAC,WAAW,KACd,QAAO,GAAG,8BAAO,IAAI,SAAS,IAAI;CAGpC,MAAM,EAAE,MAAM,cAAc,GAAG,8BAC7B,WAAW,MACX,WAAW;CAEb,MAAM,mCAAoB,KAAK,WAAW,KAAK;CAC/C,MAAM,WAAW,GAAG,OAAO,EAAE,GAAG,YAAY;CAC5C,MAAM,YAAY,WAAW,OAAO,KAAK,WAAW,SAAS;AAG7D,QAAO,CACP,GAAG,8BAAO,KAAK,8BAAO,KAAK,WAAW,GAAG,8BAAO,KAAK,8BAAO,OAAO,WAAW,KAAK,8BAAO,IAAI,SAAS,GAAG,8BAAO,KAAK,cACtH,GAAG,eACH,KAAK;;;;;;;;AASP,eAAsB,iBAAiB,MAAc;CACnD,MAAM,mCAAoB,MAAM;AAEhC,KAAI,yBAAY,cAAe;CAE/B,MAAM,KAAK,MAAM,8BAAe;CAGhC,MAAM,aAAa;EACjB,uBAAuB,WAAiB;EACxC,qBAAqB,GAAG,IAAI;EAC5B,kBAAkB,GAAG,IAAI;;CAI3B,MAAM,aAAa,GAAG,eAAe,cAAc,GAAG,IAAI;AAE1D,KAAI,WAAW,OAAO;AACpB,UAAQ,MACN,8BAAO,IACL,gCAAgC,GAAG,iBAAiB,WAAW,OAAO;AAG1E,UAAQ,KAAK;;CAIf,MAAM,eAAe,GAAG,2BACtB,WAAW,QACX,GAAG,KACH;AAIF,cAAa,QAAQ,SAAS;CAG9B,MAAM,UAAU,GAAG,cAAc;EAC/B,WAAW,aAAa;EACxB,SAAS,aAAa;EACtB,mBAAmB,aAAa;;CAIlC,MAAM,cAAc;EACpB,GAAG,QAAQ;EACX,GAAG,QAAQ;EACX,GAAG,QAAQ;EACX,GAAG,QAAQ;;AAIX,KAAI,YAAY,SAAS,GAAG;AAC1B,UAAQ,IAAI;AACZ,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI;AAGf,UAAQ,IAAI;EAGZ,MAAM,yBAAS,IAAI;AAEnB,OAAK,MAAM,cAAc,aAAa;GACpC,MAAM,WAAW,WAAW,OAAO,WAAW,KAAK,WAAW;AAC9D,OAAI,CAAC,OAAO,IAAI,UACd,QAAO,IAAI,UAAU;AAEvB,UAAO,IAAI,UAAW,KAAK;;EAI7B,MAAM,cAAc,YAAY;EAChC,IAAI,UAAU;AAEd,OAAK,MAAM,CAAC,GAAG,cAAc,OAC3B,MAAK,MAAM,cAAc,WAAW;AAClC;AACA,WAAQ,IAAI,iBAAiB,IAAI,YAAY;AAE7C,OAAI,UAAU,YACZ,SAAQ,IAAI;;AAKlB,UAAQ,IAAI;AACZ,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI,SAAS,YAAY,QAAQ,cAAc,IAAI,MAAM;AAGpE,UAAQ,IAAI;AAEZ,UAAQ,KAAK;;AAGf,SAAQ,IAAI,8BAAO,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-package-DrnIdWLg.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;AACtD,KAAI,CAAC,uCAAqB,CAAC,MAAO,QAAO;CACzC,MAAM,kCAAmB,UAAU;CACnC,MAAM,4BAAa,UAAU;CAC7B,MAAM,4BAAa,UAAU;CAC7B,MAAM,8BAAe,UAAU;CAE/B,MAAM,qBAAqB;EACzB,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,MAAM;EACN,OAAO
|
|
1
|
+
{"version":3,"file":"types-package-DrnIdWLg.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;AACtD,KAAI,CAAC,uCAAqB,CAAC,MAAO,QAAO;CACzC,MAAM,kCAAmB,UAAU;CACnC,MAAM,4BAAa,UAAU;CAC7B,MAAM,4BAAa,UAAU;CAC7B,MAAM,8BAAe,UAAU;CAE/B,MAAM,qBAAqB;EACzB,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,MAAM;EACN,OAAO;;CAGT,MAAM,eAAe;CAGrB,MAAM,eAAe;;;;CAMrB,MAAM,sBAAsB;;;;;AAM5B,mCAAY,UAAU,EAAE,WAAW,QAAQ,YAAY;AACvD,uCAAgB,aAAa,KAAK,UAAU,oBAAoB,MAAM;AACtE,uCAAgB,OAAO;AACvB,uCAAgB,OAAO;AACvB,uCAAgB,SAAS;AAEzB,QAAO;;;;;AAMT,eAAsB,0BAA0B,MAAc;CAC5D,MAAM,sBAAsB;;MAExB,KAAI;;;;CAKR,MAAM,+BAAgB,kCAAgB,gBAAgB;AAEtD,KAAI,yBAAY,UAAW;CAE3B,MAAM,2BAAY,UAAU;AAE5B,uCAAgB,MAAM,qBAAqB,EAAE,UAAU"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandContext, CommandData, CommandKitOptions, EventHandler } from "./analytics-engine-
|
|
1
|
+
import { CommandContext, CommandData, CommandKitOptions, CommandMetadata, CommandMetadataFunction, EventHandler, LegacyCommandMetadata } from "./analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "./EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "./ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "./ModalKit-Btz58KYn.js";
|
|
@@ -23,10 +23,10 @@ import "./text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "./index-DSBMRX9A.js";
|
|
24
24
|
import "./index-DdqikUQD.js";
|
|
25
25
|
import "./MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "./signals-
|
|
26
|
+
import "./signals-SHg7J1U_.js";
|
|
27
27
|
import "./helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "./CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "./EventsRouter-BacqK6z3.js";
|
|
30
30
|
import "./index-DKcmsWXw.js";
|
|
31
31
|
import "./constants-MKu-Q1jh.js";
|
|
32
|
-
export { CommandContext, CommandData, CommandKitOptions, EventHandler };
|
|
32
|
+
export { CommandContext, CommandData, CommandKitOptions, CommandMetadata, CommandMetadataFunction, EventHandler, LegacyCommandMetadata };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitHMREvent, IpcMessageCommand, registerDevHooks } from "../analytics-engine-
|
|
1
|
+
import { CommandKitHMREvent, IpcMessageCommand, registerDevHooks } from "../analytics-engine-CtMbeudW.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-C7r7RPNf.js";
|
|
4
4
|
import "../ModalKit-Btz58KYn.js";
|
|
@@ -23,7 +23,7 @@ import "../text-display-DRw3r_lK.js";
|
|
|
23
23
|
import "../index-DSBMRX9A.js";
|
|
24
24
|
import "../index-DdqikUQD.js";
|
|
25
25
|
import "../MessageCommandParser-ROLibZPX.js";
|
|
26
|
-
import "../signals-
|
|
26
|
+
import "../signals-SHg7J1U_.js";
|
|
27
27
|
import "../helpers-Wg6P5fRQ.js";
|
|
28
28
|
import "../CommandsRouter-CoOA7hkf.js";
|
|
29
29
|
import "../EventsRouter-BacqK6z3.js";
|