commandkit 1.0.0-dev.20250530015910 → 1.0.0-dev.20250530135418
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/cache.cjs +13 -0
- package/cache.d.ts +1 -0
- package/config.cjs +1 -1
- package/dist/{CommandKit-CDlCsGCx.d.ts → CommandKit-DDSUNOAe.d.ts} +9 -2
- package/dist/{CommandKit-DDrQtQns.js → CommandKit-L7X8fflj.js} +11 -11
- package/dist/{CommandKit-DDrQtQns.js.map → CommandKit-L7X8fflj.js.map} +1 -1
- package/dist/CommandKit.d.ts +1 -2
- package/dist/CommandKit.js +14 -15
- package/dist/{CommandKitEventsChannel-B6LKgxmv.js → CommandKitEventsChannel-BnSPcFdq.js} +1 -1
- package/dist/{CommandKitEventsChannel-B6LKgxmv.js.map → CommandKitEventsChannel-BnSPcFdq.js.map} +1 -1
- package/dist/{CommandsRouter-BHaPno8o.js → CommandsRouter-B91EHi6O.js} +1 -1
- package/dist/{CommandsRouter-BHaPno8o.js.map → CommandsRouter-B91EHi6O.js.map} +1 -1
- package/dist/CompilerPlugin-XzuGixkC.js.map +1 -1
- package/dist/CompilerPluginRuntime-BWLDMYQl.js +113 -0
- package/dist/CompilerPluginRuntime-BWLDMYQl.js.map +1 -0
- package/dist/{DefaultLogger-D3G0rGnV.d.ts → DefaultLogger-CcW-Fuq5.d.ts} +2 -2
- package/dist/{EventWorkerContext-XZGSHn5F.js → EventWorkerContext-BAKiTqJz.js} +1 -1
- package/dist/{EventWorkerContext-XZGSHn5F.js.map → EventWorkerContext-BAKiTqJz.js.map} +1 -1
- package/dist/{EventWorkerContext-C0e23GNY.d.ts → EventWorkerContext-CjU5wt-a.d.ts} +2 -2
- package/dist/{EventsRouter-CqnrlbjN.js → EventsRouter-C_J0M3uO.js} +1 -1
- package/dist/{EventsRouter-CqnrlbjN.js.map → EventsRouter-C_J0M3uO.js.map} +1 -1
- package/dist/{ILogger-BTMQuall.d.ts → ILogger-kqwb2kUu.d.ts} +1 -1
- package/dist/{Logger-A3wjB7L1.d.ts → Logger-B4B_URL-.d.ts} +2 -2
- package/dist/{MessageCommandParser-B13Pkwo9.js → MessageCommandParser-D02-wpZN.js} +1 -1
- package/dist/{MessageCommandParser-B13Pkwo9.js.map → MessageCommandParser-D02-wpZN.js.map} +1 -1
- package/dist/app/commands/AppCommandRunner.d.ts +1 -2
- package/dist/app/commands/AppCommandRunner.js +14 -15
- package/dist/app/commands/Context.d.ts +1 -2
- package/dist/app/commands/Context.js +14 -15
- package/dist/app/commands/MessageCommandParser.js +1 -1
- package/dist/app/commands/helpers.js +1 -1
- package/dist/app/events/EventWorkerContext.d.ts +2 -3
- package/dist/app/events/EventWorkerContext.js +1 -1
- package/dist/app/handlers/AppCommandHandler.d.ts +1 -2
- package/dist/app/handlers/AppCommandHandler.js +14 -15
- package/dist/app/handlers/AppEventsHandler.d.ts +1 -2
- package/dist/app/handlers/AppEventsHandler.js +14 -15
- package/dist/app/index.d.ts +1 -2
- package/dist/app/index.js +16 -17
- package/dist/app/middleware/signals.js +1 -1
- package/dist/app/register/CommandRegistrar.d.ts +1 -2
- package/dist/app/register/CommandRegistrar.js +14 -15
- package/dist/app/router/CommandsRouter.js +1 -1
- package/dist/app/router/EventsRouter.js +1 -1
- package/dist/app/router/index.js +3 -3
- package/dist/{app-process-uCX52YaE.js → app-process-juzsCZp9.js} +3 -3
- package/dist/{app-process-uCX52YaE.js.map → app-process-juzsCZp9.js.map} +1 -1
- package/dist/{build-Bkb5t3XA.js → build-DSm40c6Y.js} +6 -6
- package/dist/{build-Bkb5t3XA.js.map → build-DSm40c6Y.js.map} +1 -1
- package/dist/cli/app-process.js +4 -4
- package/dist/cli/build.d.ts +1 -2
- package/dist/cli/build.js +17 -18
- package/dist/cli/common.d.ts +3 -4
- package/dist/cli/common.js +2 -2
- package/dist/cli/development.js +18 -19
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/env.js +1 -1
- package/dist/cli/generators.js +2 -2
- package/dist/cli/information.js +8 -8
- package/dist/cli/information.js.map +1 -1
- package/dist/cli/init.d.ts +1 -1
- package/dist/cli/init.js +35 -2
- package/dist/cli/production.js +19 -20
- package/dist/cli/production.js.map +1 -1
- package/dist/cli/type-checker.js +3 -3
- package/dist/cli/utils.js +1 -1
- package/dist/{common-DirpDCa6.js → common-CtMBxAf-.js} +2 -2
- package/dist/{common-DirpDCa6.js.map → common-CtMBxAf-.js.map} +1 -1
- package/dist/components/index.js +14 -15
- package/dist/components/v1/button/Button.js +14 -15
- package/dist/components/v1/button/ButtonKit.js +14 -15
- package/dist/components/v1/modal/Modal.js +14 -15
- package/dist/components/v1/modal/ModalKit.js +14 -15
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +14 -15
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +14 -15
- package/dist/components/v1/select-menu/RoleSelectMenuKit.js +14 -15
- package/dist/components/v1/select-menu/SelectMenu.js +14 -15
- package/dist/components/v1/select-menu/StringSelectMenuKit.js +14 -15
- package/dist/components/v1/select-menu/UserSelectMenuKit.js +14 -15
- package/dist/config/config.d.ts +4 -5
- package/dist/config/config.js +14 -15
- package/dist/config/default.d.ts +3 -4
- package/dist/config/default.js +14 -15
- package/dist/config/loader.d.ts +3 -4
- package/dist/config/loader.js +14 -15
- package/dist/config/types.d.ts +2 -3
- package/dist/config/utils.d.ts +3 -4
- package/dist/{config-Dyb-zl9w.d.ts → config-LPxTebft.d.ts} +3 -3
- package/dist/context/async-context.d.ts +1 -2
- package/dist/context/async-context.js +14 -15
- package/dist/context/environment.d.ts +1 -2
- package/dist/context/environment.js +14 -15
- package/dist/{env-DKFSgEcR.js → env-DXL8PZiG.js} +1 -1
- package/dist/{env-DKFSgEcR.js.map → env-DXL8PZiG.js.map} +1 -1
- package/dist/events/CommandKitEventsChannel.d.ts +1 -2
- package/dist/events/CommandKitEventsChannel.js +1 -1
- package/dist/{feature-flags-BJp6kYmi.js → feature-flags-BtOkZJxW.js} +3 -3
- package/dist/{feature-flags-BJp6kYmi.js.map → feature-flags-BtOkZJxW.js.map} +1 -1
- package/dist/flags/feature-flags.d.ts +1 -2
- package/dist/flags/feature-flags.js +15 -16
- package/dist/flags/store.d.ts +1 -2
- package/dist/flags/store.js +1 -1
- package/dist/{helpers-CswC9gKF.js → helpers-blGYXnUH.js} +1 -1
- package/dist/{helpers-CswC9gKF.js.map → helpers-blGYXnUH.js.map} +1 -1
- package/dist/index.d.ts +12 -13
- package/dist/index.js +20 -21
- package/dist/index.js.map +1 -1
- package/dist/{init-D2me-V0n.js → init-CakfOuYm.js} +38 -6
- package/dist/init-CakfOuYm.js.map +1 -0
- package/dist/{init--p1nl1NO.d.ts → init-_e3eZTUb.d.ts} +1 -1
- package/dist/logger/DefaultLogger.d.ts +2 -2
- package/dist/logger/DefaultLogger.js +14 -15
- package/dist/logger/ILogger.d.ts +1 -1
- package/dist/logger/ILogger.js +1 -1
- package/dist/logger/Logger.d.ts +2 -2
- package/dist/logger/Logger.js +14 -15
- package/dist/plugins/CompilerPlugin.d.ts +1 -2
- package/dist/plugins/PluginCommon.d.ts +1 -2
- package/dist/plugins/RuntimePlugin.d.ts +1 -2
- package/dist/plugins/index.d.ts +2 -3
- package/dist/plugins/index.js +14 -15
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -2
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +14 -15
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -2
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +1 -1
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -2
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +14 -15
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -2
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +14 -15
- package/dist/plugins/plugin-runtime/runtime.d.ts +1 -2
- package/dist/plugins/plugin-runtime/runtime.js +1 -1
- package/dist/plugins/types.d.ts +2 -3
- package/dist/{resolve-file-url-pO9_rLft.js → resolve-file-url-ifwdwqmq.js} +1 -1
- package/dist/{resolve-file-url-pO9_rLft.js.map → resolve-file-url-ifwdwqmq.js.map} +1 -1
- package/dist/{signals-Bp0bzjE6.js → signals-scJdEbly.js} +1 -1
- package/dist/{signals-Bp0bzjE6.js.map → signals-scJdEbly.js.map} +1 -1
- package/dist/{store-Ci6ib2C9.js → store-B9bo6On8.js} +1 -1
- package/dist/{store-Ci6ib2C9.js.map → store-B9bo6On8.js.map} +1 -1
- package/dist/{type-checker-FOYNSGX0.js → type-checker-DodpF2I2.js} +2 -2
- package/dist/{type-checker-FOYNSGX0.js.map → type-checker-DodpF2I2.js.map} +1 -1
- package/dist/{types-package-DRhFn59I.js → types-package-BrES1tNq.js} +1 -1
- package/dist/{types-package-DRhFn59I.js.map → types-package-BrES1tNq.js.map} +1 -1
- package/dist/{types-0ADL_reY.d.ts → types-w2bWHUve.d.ts} +2 -2
- package/dist/types.d.ts +1 -2
- package/dist/{utilities-5Jw5BdE1.d.ts → utilities-oDL3vjhR.d.ts} +1 -1
- package/dist/utils/colors.d.ts +2 -2
- package/dist/utils/dev-hooks.d.ts +1 -2
- package/dist/utils/dev-hooks.js +14 -15
- package/dist/utils/resolve-file-url.js +1 -1
- package/dist/utils/types-package.js +1 -1
- package/dist/utils/utilities.d.ts +1 -1
- package/dist/utils/utilities.js +14 -15
- package/dist/{utils-IYtoeTur.js → utils-CU2bkxji.js} +1 -1
- package/dist/{utils-IYtoeTur.js.map → utils-CU2bkxji.js.map} +1 -1
- package/dist/{utils-C0V7zD7R.d.ts → utils-Dprjd7Oz.d.ts} +2 -2
- package/dist/{version-DnRxh8U8.js → version-BDY5RKTk.js} +2 -2
- package/dist/{version-DnRxh8U8.js.map → version-BDY5RKTk.js.map} +1 -1
- package/dist/{version-SMsmj3M1.d.ts → version-DggMfP_1.d.ts} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/events.cjs +6 -0
- package/events.d.ts +7 -0
- package/flag.cjs +3 -3
- package/hooks.cjs +36 -26
- package/i18n.cjs +6 -0
- package/i18n.d.ts +1 -0
- package/logger.cjs +11 -0
- package/logger.d.ts +8 -0
- package/package.json +31 -3
- package/plugin.cjs +14 -7
- package/dist/CompilerPluginRuntime-zFCCw1kM.js +0 -70
- package/dist/CompilerPluginRuntime-zFCCw1kM.js.map +0 -1
- package/dist/cli/parse-env.d.ts +0 -5
- package/dist/cli/parse-env.js +0 -54
- package/dist/cli/parse-env.js.map +0 -1
- package/dist/init-D2me-V0n.js.map +0 -1
- package/dist/plugins/plugin-runtime/types.d.ts +0 -2
- package/dist/plugins/plugin-runtime/types.js +0 -1
- package/dist/types-BDwNROY2.d.ts +0 -74
- package/dist/types-Cdh4uaFR.js +0 -0
- /package/dist/{ILogger-DucYb0bG.js → ILogger-dQ7Y9X1f.js} +0 -0
- /package/dist/{app-CXCbKsPz.js → app-HN1cVg8J.js} +0 -0
- /package/dist/{router-Dn35v30f.js → router-DHnFRADH.js} +0 -0
- /package/dist/{runtime-ByJtSXs_.js → runtime-D0JnztkU.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../../../colors-Cd4Oz-r-.js');
|
|
2
2
|
require('../../../ActionRow-CmTHbo2t.js');
|
|
3
3
|
require('../../../error-codes-C_UO39jz.js');
|
|
4
|
-
const require_CommandKit = require('../../../CommandKit-
|
|
4
|
+
const require_CommandKit = require('../../../CommandKit-L7X8fflj.js');
|
|
5
5
|
require('../../../common-CcfjYnPG.js');
|
|
6
6
|
require('../../../common-CeO-vn8Y.js');
|
|
7
7
|
require('../../../container-CpuiLsZM.js');
|
|
@@ -20,19 +20,18 @@ require('../../../PluginCommon-DPqnQngK.js');
|
|
|
20
20
|
require('../../../CompilerPlugin-XzuGixkC.js');
|
|
21
21
|
require('../../../RuntimePlugin-CKsd83M3.js');
|
|
22
22
|
require('../../../types-Bq0EWaM3.js');
|
|
23
|
-
require('../../../CompilerPluginRuntime-
|
|
24
|
-
require('../../../
|
|
25
|
-
require('../../../
|
|
26
|
-
require('../../../
|
|
27
|
-
require('../../../
|
|
28
|
-
require('../../../
|
|
29
|
-
require('../../../
|
|
30
|
-
require('../../../
|
|
31
|
-
require('../../../
|
|
32
|
-
require('../../../
|
|
33
|
-
require('../../../
|
|
34
|
-
require('../../../
|
|
35
|
-
require('../../../
|
|
36
|
-
require('../../../store-Ci6ib2C9.js');
|
|
23
|
+
require('../../../CompilerPluginRuntime-BWLDMYQl.js');
|
|
24
|
+
require('../../../runtime-D0JnztkU.js');
|
|
25
|
+
require('../../../EventWorkerContext-BAKiTqJz.js');
|
|
26
|
+
require('../../../resolve-file-url-ifwdwqmq.js');
|
|
27
|
+
require('../../../MessageCommandParser-D02-wpZN.js');
|
|
28
|
+
require('../../../signals-scJdEbly.js');
|
|
29
|
+
require('../../../types-package-BrES1tNq.js');
|
|
30
|
+
require('../../../CommandsRouter-B91EHi6O.js');
|
|
31
|
+
require('../../../EventsRouter-C_J0M3uO.js');
|
|
32
|
+
require('../../../router-DHnFRADH.js');
|
|
33
|
+
require('../../../common-CtMBxAf-.js');
|
|
34
|
+
require('../../../CommandKitEventsChannel-BnSPcFdq.js');
|
|
35
|
+
require('../../../store-B9bo6On8.js');
|
|
37
36
|
|
|
38
37
|
exports.CommonDirectiveTransformer = require_CommandKit.CommonDirectiveTransformer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompilerPlugin, MaybeFalsey, PluginTransformParameters, TransformedResult } from "../../../CommandKit-
|
|
1
|
+
import { CompilerPlugin, MaybeFalsey, PluginTransformParameters, TransformedResult } from "../../../CommandKit-DDSUNOAe.js";
|
|
2
2
|
import "../../../EventInterceptor-D_oEWSnF.js";
|
|
3
3
|
import "../../../ButtonKit-BSI7lCI0.js";
|
|
4
4
|
import "../../../ModalKit-CKtQ8eXW.js";
|
|
@@ -29,7 +29,6 @@ import "../../../CommandsRouter-C7X-eXE2.js";
|
|
|
29
29
|
import "../../../EventsRouter-BacqK6z3.js";
|
|
30
30
|
import "../../../index-CUPkUUOR.js";
|
|
31
31
|
import "../../../constants-Ce6w4OFe.js";
|
|
32
|
-
import "../../../types-BDwNROY2.js";
|
|
33
32
|
|
|
34
33
|
//#region src/plugins/plugin-runtime/builtin/MacroPlugin.d.ts
|
|
35
34
|
declare class MacroPlugin extends CompilerPlugin {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../../../colors-Cd4Oz-r-.js');
|
|
2
2
|
require('../../../ActionRow-CmTHbo2t.js');
|
|
3
3
|
require('../../../error-codes-C_UO39jz.js');
|
|
4
|
-
const require_CommandKit = require('../../../CommandKit-
|
|
4
|
+
const require_CommandKit = require('../../../CommandKit-L7X8fflj.js');
|
|
5
5
|
require('../../../common-CcfjYnPG.js');
|
|
6
6
|
require('../../../common-CeO-vn8Y.js');
|
|
7
7
|
require('../../../container-CpuiLsZM.js');
|
|
@@ -20,19 +20,18 @@ require('../../../PluginCommon-DPqnQngK.js');
|
|
|
20
20
|
require('../../../CompilerPlugin-XzuGixkC.js');
|
|
21
21
|
require('../../../RuntimePlugin-CKsd83M3.js');
|
|
22
22
|
require('../../../types-Bq0EWaM3.js');
|
|
23
|
-
require('../../../CompilerPluginRuntime-
|
|
24
|
-
require('../../../
|
|
25
|
-
require('../../../
|
|
26
|
-
require('../../../
|
|
27
|
-
require('../../../
|
|
28
|
-
require('../../../
|
|
29
|
-
require('../../../
|
|
30
|
-
require('../../../
|
|
31
|
-
require('../../../
|
|
32
|
-
require('../../../
|
|
33
|
-
require('../../../
|
|
34
|
-
require('../../../
|
|
35
|
-
require('../../../
|
|
36
|
-
require('../../../store-Ci6ib2C9.js');
|
|
23
|
+
require('../../../CompilerPluginRuntime-BWLDMYQl.js');
|
|
24
|
+
require('../../../runtime-D0JnztkU.js');
|
|
25
|
+
require('../../../EventWorkerContext-BAKiTqJz.js');
|
|
26
|
+
require('../../../resolve-file-url-ifwdwqmq.js');
|
|
27
|
+
require('../../../MessageCommandParser-D02-wpZN.js');
|
|
28
|
+
require('../../../signals-scJdEbly.js');
|
|
29
|
+
require('../../../types-package-BrES1tNq.js');
|
|
30
|
+
require('../../../CommandsRouter-B91EHi6O.js');
|
|
31
|
+
require('../../../EventsRouter-C_J0M3uO.js');
|
|
32
|
+
require('../../../router-DHnFRADH.js');
|
|
33
|
+
require('../../../common-CtMBxAf-.js');
|
|
34
|
+
require('../../../CommandKitEventsChannel-BnSPcFdq.js');
|
|
35
|
+
require('../../../store-B9bo6On8.js');
|
|
37
36
|
|
|
38
37
|
exports.MacroPlugin = require_CommandKit.MacroPlugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonPluginRuntime } from "../../CommandKit-
|
|
1
|
+
import { CommonPluginRuntime } from "../../CommandKit-DDSUNOAe.js";
|
|
2
2
|
import "../../EventInterceptor-D_oEWSnF.js";
|
|
3
3
|
import "../../ButtonKit-BSI7lCI0.js";
|
|
4
4
|
import "../../ModalKit-CKtQ8eXW.js";
|
|
@@ -29,5 +29,4 @@ import "../../CommandsRouter-C7X-eXE2.js";
|
|
|
29
29
|
import "../../EventsRouter-BacqK6z3.js";
|
|
30
30
|
import "../../index-CUPkUUOR.js";
|
|
31
31
|
import "../../constants-Ce6w4OFe.js";
|
|
32
|
-
import "../../types-BDwNROY2.js";
|
|
33
32
|
export { CommonPluginRuntime };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require('../../runtime-
|
|
1
|
+
require('../../runtime-D0JnztkU.js');
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitEventDispatch, CommandKitPlugin, MaybeFalsey } from "../CommandKit-
|
|
1
|
+
import { CommandKitEventDispatch, CommandKitPlugin, MaybeFalsey, TemplateHandler } from "../CommandKit-DDSUNOAe.js";
|
|
2
2
|
import "../EventInterceptor-D_oEWSnF.js";
|
|
3
3
|
import "../ButtonKit-BSI7lCI0.js";
|
|
4
4
|
import "../ModalKit-CKtQ8eXW.js";
|
|
@@ -29,5 +29,4 @@ import "../CommandsRouter-C7X-eXE2.js";
|
|
|
29
29
|
import "../EventsRouter-BacqK6z3.js";
|
|
30
30
|
import "../index-CUPkUUOR.js";
|
|
31
31
|
import "../constants-Ce6w4OFe.js";
|
|
32
|
-
|
|
33
|
-
export { CommandKitEventDispatch, CommandKitPlugin, MaybeFalsey };
|
|
32
|
+
export { CommandKitEventDispatch, CommandKitPlugin, MaybeFalsey, TemplateHandler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-file-url-
|
|
1
|
+
{"version":3,"file":"resolve-file-url-ifwdwqmq.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,SAAS;AAC3C,SAAQ,EAAE,YAAY,aAAa,QAAQ,YAAY,IAAI,CAAC,EAAE,UAAU,MAAM,KAAK,KAAK,CAAC,IAAI,GAAG;AAClG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals-
|
|
1
|
+
{"version":3,"file":"signals-scJdEbly.js","names":[],"sources":["../src/app/middleware/signals.ts"],"sourcesContent":["import {\n CommandKitErrorCodes,\n createCommandKitError,\n isCommandKitError,\n} from '../../utils/error-codes';\n\n/**\n * Cancel upcoming middleware execution.\n * If this is called inside pre-stage middleware, the next run will be the actual command, skipping all other pre-stage middlewares.\n * If this is called inside a command itself, it will skip all post-stage middlewares.\n * If this is called inside post-stage middleware, it will skip all other post-stage middlewares.\n */\nexport function exitMiddleware(): never {\n throw createCommandKitError(CommandKitErrorCodes.ExitMiddleware);\n}\n\n/**\n * Rethrow the error if it is a CommandKit error.\n * @param error The error to rethrow.\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"],"mappings":";;;;;;;;;AAYA,SAAgB,iBAAwB;AACtC,OAAM,0CAAsB,yCAAqB,eAAe;AAClE;;;;;AAMA,SAAgB,QAAQ,OAAsB;AAC5C,KAAI,sCAAkB,MAAM,CAAE,OAAM;AACtC;;;;AAKA,SAAgB,WAAkB;AAChC,OAAM,0CAAsB,yCAAqB,iBAAiB;AACpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-
|
|
1
|
+
{"version":3,"file":"store-B9bo6On8.js","names":[],"sources":["../src/flags/store.ts"],"sourcesContent":["import type { FeatureFlag } from './feature-flags';\nimport { Collection } from 'discord.js';\n\nexport class FlagStore extends Collection<string, FeatureFlag<any, any>> {}\n"],"mappings":";;;;AAGA,IAAa,YAAb,cAA+B,sBAA0C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
const require_colors = require('./colors-Cd4Oz-r-.js');
|
|
3
|
-
const require_common = require('./common-
|
|
3
|
+
const require_common = require('./common-CtMBxAf-.js');
|
|
4
4
|
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
5
5
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
6
6
|
|
|
@@ -81,4 +81,4 @@ Object.defineProperty(exports, 'performTypeCheck', {
|
|
|
81
81
|
return performTypeCheck;
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
//# sourceMappingURL=type-checker-
|
|
84
|
+
//# sourceMappingURL=type-checker-DodpF2I2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-checker-
|
|
1
|
+
{"version":3,"file":"type-checker-DodpF2I2.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 */\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 */\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,oBAAoB;;;;AAK1B,SAAS,iBACT,IACA,YACA,KACS;CACP,MAAM,cAAc,GAAG,6BACrB,WAAW,aACX,KACD;AAED,MAAK,WAAW,KACd,SAAQ,EAAE,8BAAO,IAAI,QAAQ,CAAC,IAAI,YAAY;CAGhD,MAAM,EAAE,MAAM,WAAW,GAAG,GAAG,8BAC7B,WAAW,MACX,WAAW,MACZ;CACD,MAAM,WAAW,wBAAS,KAAK,WAAW,KAAK,SAAS;CACxD,MAAM,YAAY,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE;CAC9C,MAAM,YAAY,WAAW,QAAQ,IAAI,WAAW,KAAK,IAAI;AAG7D,QAAO,EACN,EAAE,8BAAO,KAAK,8BAAO,KAAK,SAAS,CAAC,CAAC,GAAG,8BAAO,KAAK,8BAAO,OAAO,SAAS,CAAC,CAAC,KAAK,8BAAO,IAAI,QAAQ,CAAC,GAAG,8BAAO,KAAK,UAAU,CAAC,IAChI,EAAE,YAAY,CAAE,EACjB,KAAK,KAAK;AACZ;;;;;AAMA,eAAsB,iBAAiB,MAAc;CACnD,MAAM,eAAe,oBAAK,MAAM,gBAAgB;AAEhD,MAAK,wBAAW,aAAa,CAAE;CAE/B,MAAM,KAAK,MAAM,8BAAe,iBAAiB;CAGjD,MAAM,aAAa;EACjB,sBAAsB,CAAC,WAAiB;EACxC,qBAAqB,GAAG,IAAI;EAC5B,YAAY,MAAM,GAAG,IAAI;CAC1B;CAGD,MAAM,aAAa,GAAG,eAAe,cAAc,GAAG,IAAI,SAAS;AAEnE,KAAI,WAAW,OAAO;AACpB,UAAQ,MACN,8BAAO,KACJ,+BAA+B,GAAG,iBAAiB,WAAW,OAAO,WAAW,CAAC,EACnF,CACF;AACD,UAAQ,KAAK,EAAE;CACjB;CAGA,MAAM,eAAe,GAAG,2BACtB,WAAW,QACX,GAAG,KACH,KACD;AAGD,cAAa,QAAQ,SAAS;CAG9B,MAAM,UAAU,GAAG,cAAc;EAC/B,WAAW,aAAa;EACxB,SAAS,aAAa;EACtB,mBAAmB,aAAa;CACjC,EAAC;CAGF,MAAM,cAAc;EACpB,GAAG,QAAQ,uBAAuB;EAClC,GAAG,QAAQ,sBAAsB;EACjC,GAAG,QAAQ,yBAAyB;EACpC,GAAG,QAAQ,wBAAwB;CAAC;AAIpC,KAAI,YAAY,SAAS,GAAG;AAC1B,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI,kDAAkD,CAC9D,CACF;AACD,UAAQ,IAAI,GAAG;EAGf,MAAM,SAAS,IAAI;AAEnB,OAAK,MAAM,cAAc,aAAa;GACpC,MAAM,WAAW,WAAW,OAAO,WAAW,KAAK,WAAW;AAC9D,QAAK,OAAO,IAAI,SAAS,CACvB,QAAO,IAAI,UAAU,CAAE,EAAC;AAE1B,UAAO,IAAI,SAAS,CAAE,KAAK,WAAW;EACxC;EAGA,MAAM,cAAc,YAAY;EAChC,IAAI,UAAU;AAEd,OAAK,MAAM,CAAC,GAAG,UAAU,IAAI,OAC3B,MAAK,MAAM,cAAc,WAAW;AAClC;AACA,WAAQ,IAAI,iBAAiB,IAAI,YAAY,KAAK,CAAC;AAEnD,OAAI,UAAU,YACZ,SAAQ,IAAI,GAAG;EAEnB;AAGF,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,KAAK,QAAQ,YAAY,QAAQ,cAAc,IAAI,MAAM,GAAG,EAAE,CACtE,CACF;AACD,UAAQ,IAAI,GAAG;AAEf,UAAQ,KAAK,EAAE;CACjB;AAEA,SAAQ,IAAI,8BAAO,MAAM,0CAA0C,CAAC;AACtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-package-
|
|
1
|
+
{"version":3,"file":"types-package-BrES1tNq.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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitPlugin } from "./CommandKit-
|
|
1
|
+
import { CommandKitPlugin } from "./CommandKit-DDSUNOAe.js";
|
|
2
2
|
import { MaybeArray } from "./types-CJ-XvOFN.js";
|
|
3
3
|
|
|
4
4
|
//#region src/config/types.d.ts
|
|
@@ -70,4 +70,4 @@ interface CommandKitConfig {
|
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
export { CommandKitConfig };
|
|
73
|
-
//# sourceMappingURL=types-
|
|
73
|
+
//# sourceMappingURL=types-w2bWHUve.d.ts.map
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandContext, CommandData, CommandKitOptions } from "./CommandKit-
|
|
1
|
+
import { CommandContext, CommandData, CommandKitOptions } from "./CommandKit-DDSUNOAe.js";
|
|
2
2
|
import "./EventInterceptor-D_oEWSnF.js";
|
|
3
3
|
import "./ButtonKit-BSI7lCI0.js";
|
|
4
4
|
import "./ModalKit-CKtQ8eXW.js";
|
|
@@ -29,5 +29,4 @@ import "./CommandsRouter-C7X-eXE2.js";
|
|
|
29
29
|
import "./EventsRouter-BacqK6z3.js";
|
|
30
30
|
import "./index-CUPkUUOR.js";
|
|
31
31
|
import "./constants-Ce6w4OFe.js";
|
|
32
|
-
import "./types-BDwNROY2.js";
|
|
33
32
|
export { CommandContext, CommandData, CommandKitOptions };
|
|
@@ -39,4 +39,4 @@ declare class StopEventPropagationError extends Error {
|
|
|
39
39
|
declare function stopEvents(): never;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { StopEventPropagationError, debounce, devOnly, findAppDirectory, getCurrentDirectory, getSourceDirectories, stopEvents };
|
|
42
|
-
//# sourceMappingURL=utilities-
|
|
42
|
+
//# sourceMappingURL=utilities-oDL3vjhR.d.ts.map
|
package/dist/utils/colors.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as picocolors_types5 from "picocolors/types";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/colors.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: picocolors_types5.Colors;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { _default as default };
|
|
7
7
|
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitHMREvent, registerDevHooks } from "../CommandKit-
|
|
1
|
+
import { CommandKitHMREvent, registerDevHooks } from "../CommandKit-DDSUNOAe.js";
|
|
2
2
|
import "../EventInterceptor-D_oEWSnF.js";
|
|
3
3
|
import "../ButtonKit-BSI7lCI0.js";
|
|
4
4
|
import "../ModalKit-CKtQ8eXW.js";
|
|
@@ -29,5 +29,4 @@ import "../CommandsRouter-C7X-eXE2.js";
|
|
|
29
29
|
import "../EventsRouter-BacqK6z3.js";
|
|
30
30
|
import "../index-CUPkUUOR.js";
|
|
31
31
|
import "../constants-Ce6w4OFe.js";
|
|
32
|
-
import "../types-BDwNROY2.js";
|
|
33
32
|
export { CommandKitHMREvent, registerDevHooks };
|
package/dist/utils/dev-hooks.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../colors-Cd4Oz-r-.js');
|
|
2
2
|
require('../ActionRow-CmTHbo2t.js');
|
|
3
3
|
require('../error-codes-C_UO39jz.js');
|
|
4
|
-
const require_CommandKit = require('../CommandKit-
|
|
4
|
+
const require_CommandKit = require('../CommandKit-L7X8fflj.js');
|
|
5
5
|
require('../common-CcfjYnPG.js');
|
|
6
6
|
require('../common-CeO-vn8Y.js');
|
|
7
7
|
require('../container-CpuiLsZM.js');
|
|
@@ -20,19 +20,18 @@ require('../PluginCommon-DPqnQngK.js');
|
|
|
20
20
|
require('../CompilerPlugin-XzuGixkC.js');
|
|
21
21
|
require('../RuntimePlugin-CKsd83M3.js');
|
|
22
22
|
require('../types-Bq0EWaM3.js');
|
|
23
|
-
require('../CompilerPluginRuntime-
|
|
24
|
-
require('../
|
|
25
|
-
require('../
|
|
26
|
-
require('../
|
|
27
|
-
require('../
|
|
28
|
-
require('../
|
|
29
|
-
require('../
|
|
30
|
-
require('../
|
|
31
|
-
require('../
|
|
32
|
-
require('../
|
|
33
|
-
require('../
|
|
34
|
-
require('../
|
|
35
|
-
require('../
|
|
36
|
-
require('../store-Ci6ib2C9.js');
|
|
23
|
+
require('../CompilerPluginRuntime-BWLDMYQl.js');
|
|
24
|
+
require('../runtime-D0JnztkU.js');
|
|
25
|
+
require('../EventWorkerContext-BAKiTqJz.js');
|
|
26
|
+
require('../resolve-file-url-ifwdwqmq.js');
|
|
27
|
+
require('../MessageCommandParser-D02-wpZN.js');
|
|
28
|
+
require('../signals-scJdEbly.js');
|
|
29
|
+
require('../types-package-BrES1tNq.js');
|
|
30
|
+
require('../CommandsRouter-B91EHi6O.js');
|
|
31
|
+
require('../EventsRouter-C_J0M3uO.js');
|
|
32
|
+
require('../router-DHnFRADH.js');
|
|
33
|
+
require('../common-CtMBxAf-.js');
|
|
34
|
+
require('../CommandKitEventsChannel-BnSPcFdq.js');
|
|
35
|
+
require('../store-B9bo6On8.js');
|
|
37
36
|
|
|
38
37
|
exports.registerDevHooks = require_CommandKit.registerDevHooks;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require('../constants-DOPSzXI0.js');
|
|
2
|
-
const require_types_package = require('../types-package-
|
|
2
|
+
const require_types_package = require('../types-package-BrES1tNq.js');
|
|
3
3
|
|
|
4
4
|
exports.generateTypesPackage = require_types_package.generateTypesPackage;
|
|
5
5
|
exports.rewriteCommandDeclaration = require_types_package.rewriteCommandDeclaration;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StopEventPropagationError, debounce, devOnly, findAppDirectory, getCurrentDirectory, getSourceDirectories, stopEvents } from "../utilities-
|
|
1
|
+
import { StopEventPropagationError, debounce, devOnly, findAppDirectory, getCurrentDirectory, getSourceDirectories, stopEvents } from "../utilities-oDL3vjhR.js";
|
|
2
2
|
export { StopEventPropagationError, debounce, devOnly, findAppDirectory, getCurrentDirectory, getSourceDirectories, stopEvents };
|
package/dist/utils/utilities.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../colors-Cd4Oz-r-.js');
|
|
2
2
|
require('../ActionRow-CmTHbo2t.js');
|
|
3
3
|
require('../error-codes-C_UO39jz.js');
|
|
4
|
-
const require_CommandKit = require('../CommandKit-
|
|
4
|
+
const require_CommandKit = require('../CommandKit-L7X8fflj.js');
|
|
5
5
|
require('../common-CcfjYnPG.js');
|
|
6
6
|
require('../common-CeO-vn8Y.js');
|
|
7
7
|
require('../container-CpuiLsZM.js');
|
|
@@ -20,20 +20,19 @@ require('../PluginCommon-DPqnQngK.js');
|
|
|
20
20
|
require('../CompilerPlugin-XzuGixkC.js');
|
|
21
21
|
require('../RuntimePlugin-CKsd83M3.js');
|
|
22
22
|
require('../types-Bq0EWaM3.js');
|
|
23
|
-
require('../CompilerPluginRuntime-
|
|
24
|
-
require('../
|
|
25
|
-
require('../
|
|
26
|
-
require('../
|
|
27
|
-
require('../
|
|
28
|
-
require('../
|
|
29
|
-
require('../
|
|
30
|
-
require('../
|
|
31
|
-
require('../
|
|
32
|
-
require('../
|
|
33
|
-
require('../
|
|
34
|
-
require('../
|
|
35
|
-
require('../
|
|
36
|
-
require('../store-Ci6ib2C9.js');
|
|
23
|
+
require('../CompilerPluginRuntime-BWLDMYQl.js');
|
|
24
|
+
require('../runtime-D0JnztkU.js');
|
|
25
|
+
require('../EventWorkerContext-BAKiTqJz.js');
|
|
26
|
+
require('../resolve-file-url-ifwdwqmq.js');
|
|
27
|
+
require('../MessageCommandParser-D02-wpZN.js');
|
|
28
|
+
require('../signals-scJdEbly.js');
|
|
29
|
+
require('../types-package-BrES1tNq.js');
|
|
30
|
+
require('../CommandsRouter-B91EHi6O.js');
|
|
31
|
+
require('../EventsRouter-C_J0M3uO.js');
|
|
32
|
+
require('../router-DHnFRADH.js');
|
|
33
|
+
require('../common-CtMBxAf-.js');
|
|
34
|
+
require('../CommandKitEventsChannel-BnSPcFdq.js');
|
|
35
|
+
require('../store-B9bo6On8.js');
|
|
37
36
|
|
|
38
37
|
exports.StopEventPropagationError = require_CommandKit.StopEventPropagationError;
|
|
39
38
|
exports.debounce = require_CommandKit.debounce;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-
|
|
1
|
+
{"version":3,"file":"utils-CU2bkxji.js","names":[],"sources":["../src/cli/utils.ts"],"sourcesContent":["import type { Ora } from 'ora';\n\nlet ora: typeof import('ora') | undefined;\n\nexport async function createSpinner(text: string): Promise<Ora> {\n if (!ora) {\n ora = await import('ora');\n }\n\n return (ora.default || ora)({\n text,\n color: 'cyan',\n });\n}\n"],"mappings":";;AAEA,IAAI;AAEJ,eAAsB,cAAc,MAA4B;AAC9D,MAAK,IACH,OAAM,MAAM,OAAO;AAGrB,QAAO,CAAC,IAAI,WAAW,KAAK;EAC1B;EACA,OAAO;CACR,EAAC;AACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitConfig } from "./types-
|
|
1
|
+
import { CommandKitConfig } from "./types-w2bWHUve.js";
|
|
2
2
|
|
|
3
3
|
//#region src/config/utils.d.ts
|
|
4
4
|
type DeepRequired<T> = { [P in keyof T]-?: DeepRequired<T[P]> };
|
|
@@ -7,4 +7,4 @@ declare const mergeDeep: <T extends Record<string, any>>(target: T, source: T) =
|
|
|
7
7
|
type ResolvedCommandKitConfig = DeepRequired<CommandKitConfig>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { DeepPartial, DeepRequired, ResolvedCommandKitConfig, mergeDeep };
|
|
10
|
-
//# sourceMappingURL=utils-
|
|
10
|
+
//# sourceMappingURL=utils-Dprjd7Oz.d.ts.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* The current version of CommandKit.
|
|
5
5
|
*/
|
|
6
|
-
const version = "1.0.0-dev.
|
|
6
|
+
const version = "1.0.0-dev.20250530135418";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
Object.defineProperty(exports, 'version', {
|
|
@@ -12,4 +12,4 @@ Object.defineProperty(exports, 'version', {
|
|
|
12
12
|
return version;
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
//# sourceMappingURL=version-
|
|
15
|
+
//# sourceMappingURL=version-BDY5RKTk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-BDY5RKTk.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["function $version(): string {\n 'use macro';\n return require('../package.json').version;\n}\n\n/**\n * The current version of CommandKit.\n */\nexport const version: string = $version();\n"],"mappings":";;;;;AAQA,MAAa,UAA4B"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { version } from "./version-
|
|
1
|
+
import { version } from "./version-DggMfP_1.js";
|
|
2
2
|
export { version };
|
package/dist/version.js
CHANGED
package/events.cjs
ADDED
package/events.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommandKitEventsChannel } from './dist/events/CommandKitEventsChannel';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @returns the events channel of the current CommandKit instance.
|
|
5
|
+
* @throws error if CommandKit is not initialized.
|
|
6
|
+
*/
|
|
7
|
+
export function useEvents(): CommandKitEventsChannel;
|
package/flag.cjs
CHANGED
package/hooks.cjs
CHANGED
|
@@ -1,48 +1,58 @@
|
|
|
1
|
-
const {
|
|
2
|
-
|
|
1
|
+
const {
|
|
2
|
+
useEnvironment,
|
|
3
|
+
getContext,
|
|
4
|
+
getCommandKit,
|
|
5
|
+
} = require('./dist/context/async-context.js');
|
|
6
|
+
const {
|
|
7
|
+
getEventWorkerContext,
|
|
8
|
+
} = require('./dist/app/events/EventWorkerContext.js');
|
|
3
9
|
|
|
4
10
|
function useAnyEnvironment() {
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
const commandCtx = getContext();
|
|
12
|
+
if (commandCtx) return commandCtx;
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
const eventWorkerCtx = getEventWorkerContext();
|
|
15
|
+
if (eventWorkerCtx) return eventWorkerCtx;
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
throw new Error(
|
|
18
|
+
'No environment found. This hook must be used within a CommandKit environment.',
|
|
19
|
+
);
|
|
12
20
|
}
|
|
13
21
|
|
|
14
22
|
function useClient() {
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
const { client } = useAnyEnvironment().commandkit;
|
|
24
|
+
return client;
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
function useCommandKit() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
try {
|
|
29
|
+
const { commandkit } = useAnyEnvironment();
|
|
30
|
+
return commandkit;
|
|
31
|
+
} catch {
|
|
32
|
+
return getCommandKit(true);
|
|
33
|
+
}
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
function useCommand() {
|
|
29
|
-
|
|
37
|
+
return useEnvironment().context.command;
|
|
30
38
|
}
|
|
31
39
|
|
|
32
40
|
function useEvent() {
|
|
33
|
-
|
|
41
|
+
const eventCtx = getEventWorkerContext();
|
|
34
42
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
if (!eventCtx) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
'No event context found. This hook must be used within an event worker environment.',
|
|
46
|
+
);
|
|
47
|
+
}
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
return eventCtx.data;
|
|
40
50
|
}
|
|
41
51
|
|
|
42
52
|
module.exports = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
useAnyEnvironment,
|
|
54
|
+
useClient,
|
|
55
|
+
useCommandKit,
|
|
56
|
+
useCommand,
|
|
57
|
+
useEvent,
|
|
48
58
|
};
|
package/i18n.cjs
ADDED
package/i18n.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { locale, getI18n, CommandLocalizationContext } from '@commandkit/i18n';
|