commandkit 1.2.0-dev.20250818125640 → 1.2.0-dev.20250819125017
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/{CommandsRouter-Ci1Pe8Vd.js → CommandsRouter-tMAivEfv.js} +10 -7
- package/dist/{CommandsRouter-Ci1Pe8Vd.js.map → CommandsRouter-tMAivEfv.js.map} +1 -1
- package/dist/{EventWorkerContext-DJUi1W3T.d.ts → EventWorkerContext-DiMpRt1P.d.ts} +2 -2
- package/dist/analytics/analytics-engine.d.ts +1 -1
- package/dist/analytics/analytics-engine.js +2 -2
- package/dist/analytics/analytics-provider.d.ts +1 -1
- package/dist/analytics/utils.js +2 -2
- package/dist/{analytics-engine-vA4MaJYx.d.ts → analytics-engine-Ddw9axi4.d.ts} +83 -11
- package/dist/app/commands/AppCommandRunner.d.ts +1 -1
- package/dist/app/commands/AppCommandRunner.js +2 -2
- package/dist/app/commands/Context.d.ts +1 -1
- package/dist/app/commands/Context.js +2 -2
- package/dist/app/events/EventWorkerContext.d.ts +2 -2
- package/dist/app/handlers/AppCommandHandler.d.ts +1 -1
- package/dist/app/handlers/AppCommandHandler.js +2 -2
- package/dist/app/handlers/AppEventsHandler.d.ts +1 -1
- package/dist/app/handlers/AppEventsHandler.js +2 -2
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.js +2 -2
- package/dist/app/middlewares/permissions.d.ts +42 -0
- package/dist/app/middlewares/permissions.js +38 -0
- package/dist/app/register/CommandRegistrar.d.ts +1 -1
- package/dist/app/register/CommandRegistrar.js +2 -2
- package/dist/app/router/CommandsRouter.js +1 -1
- package/dist/app/router/index.js +1 -1
- package/dist/{app-process-CjMovpoZ.js → app-process-COBre_uT.js} +2 -2
- package/dist/{app-process-CjMovpoZ.js.map → app-process-COBre_uT.js.map} +1 -1
- package/dist/{build-DXl8uEv4.js → build-n8Om7nnR.js} +4 -4
- package/dist/{build-DXl8uEv4.js.map → build-n8Om7nnR.js.map} +1 -1
- package/dist/cli/app-process.js +2 -2
- package/dist/cli/build.d.ts +1 -1
- package/dist/cli/build.js +5 -5
- package/dist/cli/common.d.ts +1 -1
- package/dist/cli/development.js +6 -6
- package/dist/cli/env.js +1 -1
- package/dist/cli/information.js +1 -1
- package/dist/cli/init.js +3 -3
- package/dist/cli/production.js +7 -7
- package/dist/cli/type-checker.js +1 -1
- package/dist/cli/utils.js +1 -1
- package/dist/{commandkit-DMEW0kJg.js → commandkit-C0BuNRSN.js} +188 -32
- package/dist/commandkit-C0BuNRSN.js.map +1 -0
- package/dist/commandkit.d.ts +1 -1
- package/dist/commandkit.js +2 -2
- package/dist/components/index.js +2 -2
- package/dist/components/v1/button/Button.js +2 -2
- package/dist/components/v1/button/ButtonKit.js +2 -2
- package/dist/components/v1/modal/Modal.js +2 -2
- package/dist/components/v1/modal/ModalKit.js +2 -2
- package/dist/components/v1/select-menu/ChannelSelectMenuKit.js +2 -2
- package/dist/components/v1/select-menu/MentionableSelectMenuKit.js +2 -2
- package/dist/components/v1/select-menu/RoleSelectMenuKit.js +2 -2
- package/dist/components/v1/select-menu/SelectMenu.js +2 -2
- package/dist/components/v1/select-menu/StringSelectMenuKit.js +2 -2
- package/dist/components/v1/select-menu/UserSelectMenuKit.js +2 -2
- package/dist/config/config.d.ts +2 -2
- package/dist/config/config.js +2 -2
- package/dist/config/default.d.ts +1 -1
- package/dist/config/default.js +2 -2
- package/dist/config/loader.d.ts +1 -1
- package/dist/config/loader.js +2 -2
- package/dist/config/types.d.ts +1 -1
- package/dist/config/utils.d.ts +1 -1
- package/dist/{config-CcWJ-vz5.d.ts → config-C4nHXErw.d.ts} +2 -2
- package/dist/{constants-DrjIvQd6.d.ts → constants-D8PMA9on.d.ts} +1 -1
- package/dist/{constants-4oxxvaJA.js → constants-_QEzyskw.js} +1 -1
- package/dist/{constants-4oxxvaJA.js.map → constants-_QEzyskw.js.map} +1 -1
- package/dist/context/async-context.d.ts +1 -1
- package/dist/context/async-context.js +2 -2
- package/dist/context/environment.d.ts +1 -1
- package/dist/context/environment.js +2 -2
- package/dist/{dotprops-C_4L7RPD.js → dotprops-HH5qmrql.js} +1 -1
- package/dist/{dotprops-C_4L7RPD.js.map → dotprops-HH5qmrql.js.map} +1 -1
- package/dist/{env-_68PRRoA.js → env-8yY-6pbC.js} +1 -1
- package/dist/{env-_68PRRoA.js.map → env-8yY-6pbC.js.map} +1 -1
- package/dist/error-codes-BzoEctmD.d.ts +54 -0
- package/dist/events/CommandKitEventsChannel.d.ts +1 -1
- package/dist/{feature-flags-Cxl9JtVG.js → feature-flags-BZMExGfA.js} +2 -2
- package/dist/{feature-flags-Cxl9JtVG.js.map → feature-flags-BZMExGfA.js.map} +1 -1
- package/dist/flags/FlagProvider.d.ts +1 -1
- package/dist/flags/feature-flags.d.ts +1 -1
- package/dist/flags/feature-flags.js +3 -3
- package/dist/flags/store.d.ts +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +8 -6
- package/dist/{init-DTBFphOg.js → init-D20FhDjn.js} +2 -2
- package/dist/{init-DTBFphOg.js.map → init-D20FhDjn.js.map} +1 -1
- package/dist/kv/constants.d.ts +1 -1
- package/dist/kv/constants.js +1 -1
- package/dist/kv/dotprops.js +1 -1
- package/dist/kv/kv.d.ts +2 -2
- package/dist/kv/kv.js +3 -3
- package/dist/kv/serde.d.ts +2 -2
- package/dist/kv/serde.js +2 -2
- package/dist/logger/DefaultLogger.js +2 -2
- package/dist/logger/Logger.js +2 -2
- package/dist/plugins/CompilerPlugin.d.ts +1 -1
- package/dist/plugins/PluginCommon.d.ts +1 -1
- package/dist/plugins/RuntimePlugin.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +2 -2
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -1
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +2 -2
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -1
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +2 -2
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -1
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +2 -2
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -1
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +2 -2
- package/dist/plugins/plugin-runtime/runtime.d.ts +1 -1
- package/dist/plugins/types.d.ts +1 -1
- package/dist/{serde-BUDI03pX.d.ts → serde-BYaKrsOV.d.ts} +2 -2
- package/dist/{serde-CHySNpFr.js → serde-CrxRqj3u.js} +2 -2
- package/dist/{serde-CHySNpFr.js.map → serde-CrxRqj3u.js.map} +1 -1
- package/dist/{type-checker-1Iu1jJcy.js → type-checker-BIOeyY9g.js} +1 -1
- package/dist/{type-checker-1Iu1jJcy.js.map → type-checker-BIOeyY9g.js.map} +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/utils/dev-hooks.d.ts +1 -1
- package/dist/utils/dev-hooks.js +2 -2
- package/dist/utils/error-codes.d.ts +2 -54
- package/dist/utils/utilities.js +2 -2
- package/dist/{utils-DCSnVAZ6.js → utils-Bf-3Eevb.js} +1 -1
- package/dist/{utils-DCSnVAZ6.js.map → utils-Bf-3Eevb.js.map} +1 -1
- package/dist/{version-C1IgTOgS.js → version-CXwQ7AXt.js} +2 -2
- package/dist/{version-C1IgTOgS.js.map → version-CXwQ7AXt.js.map} +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/commandkit-DMEW0kJg.js.map +0 -1
|
@@ -1,54 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* The error codes used by CommandKit.
|
|
4
|
-
*/
|
|
5
|
-
declare const CommandKitErrorCodes: {
|
|
6
|
-
/**
|
|
7
|
-
* Error code for exiting middleware.
|
|
8
|
-
*/
|
|
9
|
-
readonly ExitMiddleware: symbol;
|
|
10
|
-
/**
|
|
11
|
-
* Error code for forwarded commands.
|
|
12
|
-
*/
|
|
13
|
-
readonly ForwardedCommand: symbol;
|
|
14
|
-
/**
|
|
15
|
-
* Error code for invalid command prefix.
|
|
16
|
-
*/
|
|
17
|
-
readonly InvalidCommandPrefix: symbol;
|
|
18
|
-
/**
|
|
19
|
-
* Error code for plugin capture handle.
|
|
20
|
-
*/
|
|
21
|
-
readonly PluginCaptureHandle: symbol;
|
|
22
|
-
/**
|
|
23
|
-
* Error code for event interruption signal
|
|
24
|
-
*/
|
|
25
|
-
readonly StopEvents: symbol;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* The type for CommandKit errors.
|
|
29
|
-
*/
|
|
30
|
-
type CommandKitError = Error & {
|
|
31
|
-
code: symbol;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Creates a new CommandKit error with the specified code.
|
|
35
|
-
* @param code The error code to assign to the error.
|
|
36
|
-
* @returns A new CommandKit error instance.
|
|
37
|
-
*/
|
|
38
|
-
declare function createCommandKitError(code: symbol): CommandKitError;
|
|
39
|
-
/**
|
|
40
|
-
* Checks if the given error is a CommandKit error.
|
|
41
|
-
* @param error The error to check.
|
|
42
|
-
* @returns True if the error is a CommandKit error, false otherwise.
|
|
43
|
-
*/
|
|
44
|
-
declare function isCommandKitError(error: unknown): error is CommandKitError;
|
|
45
|
-
/**
|
|
46
|
-
* Checks if the given error is of a specific CommandKit error type.
|
|
47
|
-
* @param error The error to check.
|
|
48
|
-
* @param code The error code or an array of error codes to check against.
|
|
49
|
-
* @returns True if the error matches the specified code(s), false otherwise.
|
|
50
|
-
*/
|
|
51
|
-
declare function isErrorType(error: unknown, code: symbol | symbol[]): boolean;
|
|
52
|
-
//#endregion
|
|
53
|
-
export { CommandKitError, CommandKitErrorCodes, createCommandKitError, isCommandKitError, isErrorType };
|
|
54
|
-
//# sourceMappingURL=error-codes.d.ts.map
|
|
1
|
+
import { CommandKitError, CommandKitErrorCodes, createCommandKitError, isCommandKitError, isErrorType } from "../error-codes-BzoEctmD.js";
|
|
2
|
+
export { CommandKitError, CommandKitErrorCodes, createCommandKitError, isCommandKitError, isErrorType };
|
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-ViHyu-.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
4
|
+
const require_commandkit = require('../commandkit-C0BuNRSN.js');
|
|
5
5
|
require('../common-CcfjYnPG.js');
|
|
6
6
|
require('../common-vnMIelAE.js');
|
|
7
7
|
require('../container-z621KfH5.js');
|
|
@@ -27,7 +27,7 @@ require('../EventWorkerContext-CSlD9rbx.js');
|
|
|
27
27
|
require('../signals-DHdYrd-n.js');
|
|
28
28
|
require('../constants-CUND8XkG.js');
|
|
29
29
|
require('../MessageCommandParser-B_BEQ3p8.js');
|
|
30
|
-
require('../CommandsRouter-
|
|
30
|
+
require('../CommandsRouter-tMAivEfv.js');
|
|
31
31
|
require('../EventsRouter-C_J0M3uO.js');
|
|
32
32
|
require('../router-DHnFRADH.js');
|
|
33
33
|
require('../common-DNADUU3_.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-
|
|
1
|
+
{"version":3,"file":"utils-Bf-3Eevb.js","names":[],"sources":["../src/cli/utils.ts"],"sourcesContent":["import type { Ora } from 'ora';\n\nlet ora: typeof import('ora') | undefined;\n\n/**\n * @private\n * @internal\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;;;;;AAMJ,eAAsB,cAAc,MAA4B;AAC9D,KAAI,CAAC,IACH,OAAM,MAAM,OAAO;AAGrB,SAAQ,IAAI,WAAW,KAAK;EAC1B;EACA,OAAO;EACR;AACH"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* The current version of CommandKit.
|
|
8
8
|
*/
|
|
9
|
-
const version = "1.2.0-dev.
|
|
9
|
+
const version = "1.2.0-dev.20250819125017";
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
12
|
Object.defineProperty(exports, 'version', {
|
|
@@ -15,4 +15,4 @@ Object.defineProperty(exports, 'version', {
|
|
|
15
15
|
return version;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
//# sourceMappingURL=version-
|
|
18
|
+
//# sourceMappingURL=version-CXwQ7AXt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-CXwQ7AXt.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["/**\n * @private\n */\nfunction $version(): string {\n 'use macro';\n return require('../package.json').version;\n}\n\n/**\n * The current version of CommandKit.\n */\nexport const version: string = $version();\n"],"mappings":";;;;;;;;AAWA,MAAa,UAA4B"}
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commandkit",
|
|
3
3
|
"description": "Beginner friendly command & event handler for Discord.js",
|
|
4
|
-
"version": "1.2.0-dev.
|
|
4
|
+
"version": "1.2.0-dev.20250819125017",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"tsx": "^4.19.2",
|
|
179
179
|
"typescript": "^5.7.3",
|
|
180
180
|
"vitest": "^3.0.5",
|
|
181
|
-
"tsconfig": "0.0.0-dev.
|
|
181
|
+
"tsconfig": "0.0.0-dev.20250819125017"
|
|
182
182
|
},
|
|
183
183
|
"engines": {
|
|
184
184
|
"node": ">=24"
|