commandkit 1.2.1-dev.20260411010608 → 1.2.1-dev.20260411122819
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CommandTree-DwfiCsOl.d.ts +55 -0
- package/dist/{CommandsRouter-DiNoF0dq.d.ts → CommandsRouter-D-b3xv38.d.ts} +102 -25
- package/dist/{EventsRouter-EuuSu6NH.d.ts → EventsRouter-Dyr_oJJD.d.ts} +1 -1
- package/dist/{MessageCommandParser-DPCbHXCS.d.ts → MessageCommandParser-UTKsRvb9.d.ts} +7 -1
- package/dist/analytics/analytics-engine.d.ts +1 -1
- package/dist/analytics/analytics-engine.js +1 -1
- package/dist/analytics/analytics-provider.d.ts +1 -1
- package/dist/analytics/utils.js +1 -1
- package/dist/{analytics-engine-uBNaD2CQ.d.ts → analytics-engine-BimOLPwO.d.ts} +109 -17
- package/dist/app/commands/AppCommandRunner.d.ts +1 -1
- package/dist/app/commands/AppCommandRunner.js +1 -1
- package/dist/app/commands/Context.d.ts +1 -1
- package/dist/app/commands/Context.js +1 -1
- package/dist/app/commands/MessageCommandParser.d.ts +1 -1
- package/dist/app/commands/MessageCommandParser.js +75 -70
- package/dist/app/commands/MessageCommandParser.js.map +1 -1
- package/dist/app/commands/helpers.d.ts +1 -1
- package/dist/app/events/EventWorkerContext.d.ts +2 -2
- package/dist/app/handlers/AppCommandHandler.d.ts +1 -1
- package/dist/app/handlers/AppCommandHandler.js +1 -1
- package/dist/app/handlers/AppEventsHandler.d.ts +1 -1
- package/dist/app/handlers/AppEventsHandler.js +1 -1
- package/dist/app/index.d.ts +4 -4
- package/dist/app/index.js +1 -1
- package/dist/app/interrupt/signals.d.ts +1 -1
- package/dist/app/middlewares/permissions.d.ts +1 -1
- package/dist/app/middlewares/permissions.js +1 -1
- package/dist/app/register/CommandRegistrar.d.ts +1 -1
- package/dist/app/register/CommandRegistrar.js +1 -1
- package/dist/app/router/CommandTree.d.ts +2 -0
- package/dist/app/router/CommandTree.js +1 -0
- package/dist/app/router/CommandsRouter.d.ts +1 -1
- package/dist/app/router/CommandsRouter.js +385 -23
- package/dist/app/router/CommandsRouter.js.map +1 -1
- package/dist/app/router/EventsRouter.d.ts +1 -1
- package/dist/app/router/index.d.ts +4 -3
- package/dist/checkbox-CvQGiyRe.d.ts +28 -0
- package/dist/cli/build.d.ts +1 -1
- package/dist/cli/build.js +1 -1
- package/dist/cli/common.d.ts +1 -1
- package/dist/cli/development.d.ts +1 -1
- package/dist/cli/development.js +1 -1
- package/dist/cli/init.js +1 -1
- package/dist/cli/production.js +1 -1
- package/dist/{commandkit-DNln6BAJ.js → commandkit-D2HMPuRQ.js} +548 -109
- package/dist/commandkit-D2HMPuRQ.js.map +1 -0
- package/dist/commandkit.d.ts +1 -1
- package/dist/commandkit.js +1 -1
- package/dist/components/common/element.js +1 -1
- package/dist/components/display/common.js +1 -1
- package/dist/components/display/container.d.ts +1 -1
- package/dist/components/display/container.js +1 -1
- package/dist/components/display/file.d.ts +1 -1
- package/dist/components/display/index.d.ts +8 -8
- package/dist/components/display/index.js +1 -1
- package/dist/components/display/label.d.ts +1 -1
- package/dist/components/display/label.js +1 -1
- package/dist/components/display/media-gallery.d.ts +1 -1
- package/dist/components/display/media-gallery.js +1 -1
- package/dist/components/display/poll.d.ts +1 -1
- package/dist/components/display/section.d.ts +1 -1
- package/dist/components/display/section.js +1 -1
- package/dist/components/display/separator.d.ts +1 -1
- package/dist/components/display/text-display.d.ts +1 -1
- package/dist/components/index.d.ts +11 -9
- package/dist/components/index.js +6 -1
- package/dist/components/interactive/button/Button.js +1 -1
- package/dist/components/interactive/button/ButtonKit.js +1 -1
- package/dist/components/interactive/checkbox/checkbox.d.ts +2 -0
- package/dist/components/interactive/checkbox/checkbox.js +6 -0
- package/dist/components/interactive/modal/Modal.js +1 -1
- package/dist/components/interactive/modal/ModalKit.js +1 -1
- package/dist/components/interactive/radio/radio.d.ts +2 -0
- package/dist/components/interactive/radio/radio.js +5 -0
- package/dist/components/interactive/select-menu/ChannelSelectMenuKit.js +1 -1
- package/dist/components/interactive/select-menu/MentionableSelectMenuKit.js +1 -1
- package/dist/components/interactive/select-menu/RoleSelectMenuKit.js +1 -1
- package/dist/components/interactive/select-menu/SelectMenu.js +1 -1
- package/dist/components/interactive/select-menu/StringSelectMenuKit.js +1 -1
- package/dist/components/interactive/select-menu/UserSelectMenuKit.js +1 -1
- package/dist/config/config.d.ts +1 -1
- package/dist/config/config.js +1 -1
- package/dist/config/default.d.ts +1 -1
- package/dist/config/default.js +1 -1
- package/dist/config/loader.d.ts +1 -1
- package/dist/config/loader.js +1 -1
- package/dist/config/types.d.ts +1 -1
- package/dist/config/utils.d.ts +1 -1
- package/dist/{constants-DqtJY0t-.d.ts → constants-D_sgdBHy.d.ts} +1 -1
- package/dist/{constants-DwxpkIeH.d.ts → constants-GWSfiS4h.d.ts} +1 -1
- package/dist/{container-CYojOA9d.d.ts → container-B7Kmw__R.d.ts} +1 -1
- package/dist/context/async-context.d.ts +1 -1
- package/dist/context/async-context.js +1 -1
- package/dist/context/environment.d.ts +1 -1
- package/dist/context/environment.js +1 -1
- package/dist/events/CommandKitEventsChannel.d.ts +1 -1
- package/dist/{file-DLO1zEcH.d.ts → file-BP8aoN3A.d.ts} +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 +1 -1
- package/dist/flags/store.d.ts +1 -1
- package/dist/{helpers-zmC44Mcu.d.ts → helpers-C5jRrAM1.d.ts} +1 -1
- package/dist/index.d.ts +19 -16
- package/dist/index.js +6 -1
- package/dist/kv/constants.d.ts +1 -1
- package/dist/kv/serde.d.ts +1 -1
- package/dist/{label-DqGRqodo.d.ts → label-CqHiBMXP.d.ts} +1 -1
- package/dist/logger/DefaultLogger.js +1 -1
- package/dist/logger/Logger.js +1 -1
- package/dist/{media-gallery-Ca8es-eB.d.ts → media-gallery-hFfa57Kd.d.ts} +1 -1
- 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 +1 -1
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.d.ts +1 -1
- package/dist/plugins/plugin-runtime/CommandKitPluginRuntime.js +1 -1
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.d.ts +1 -1
- package/dist/plugins/plugin-runtime/CompilerPluginRuntime.js +1 -1
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.d.ts +1 -1
- package/dist/plugins/plugin-runtime/builtin/CommonDirectiveTransformer.js +1 -1
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.d.ts +1 -1
- package/dist/plugins/plugin-runtime/builtin/MacroPlugin.js +1 -1
- package/dist/plugins/plugin-runtime/runtime.d.ts +1 -1
- package/dist/plugins/types.d.ts +1 -1
- package/dist/{poll-DQ6DX_Tt.d.ts → poll-ElAd5Z2K.d.ts} +1 -1
- package/dist/radio-Dcd4YIZx.d.ts +21 -0
- package/dist/{section-Q8nwx_-q.d.ts → section-BqDLXlp3.d.ts} +1 -1
- package/dist/{separator-B8P-kdIK.d.ts → separator-DSaCa1Tc.d.ts} +1 -1
- package/dist/{signals-CBXwugBW.d.ts → signals-DVOXPkQK.d.ts} +1 -1
- package/dist/{text-display-CL9C2yMc.d.ts → text-display-D-0dD7bR.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/dev-hooks.d.ts +1 -1
- package/dist/utils/dev-hooks.js +1 -1
- package/dist/utils/utilities.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/commandkit-DNln6BAJ.js.map +0 -1
- /package/dist/{index-BIsCUWAs.d.ts → index-CQiOqvUC.d.ts} +0 -0
- /package/dist/{index-CwHYpK-f.d.ts → index-CTLjHn5u.d.ts} +0 -0
- /package/dist/{index-DHrsNvX1.d.ts → index-LKrIp3Oo.d.ts} +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#region src/app/router/CommandTree.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Source types for command tree nodes discovered from the filesystem.
|
|
4
|
+
*/
|
|
5
|
+
type CommandTreeNodeSource = 'root' | 'flat' | 'directory' | 'group' | 'shorthand';
|
|
6
|
+
/**
|
|
7
|
+
* Logical node kinds after tree compilation.
|
|
8
|
+
*/
|
|
9
|
+
type CommandTreeNodeKind = 'root' | 'flat' | 'command' | 'group' | 'subcommand';
|
|
10
|
+
/**
|
|
11
|
+
* Internal tree node representing either a filesystem command or a
|
|
12
|
+
* hierarchical container.
|
|
13
|
+
*/
|
|
14
|
+
interface CommandTreeNode {
|
|
15
|
+
id: string;
|
|
16
|
+
source: CommandTreeNodeSource;
|
|
17
|
+
kind: CommandTreeNodeKind;
|
|
18
|
+
token: string;
|
|
19
|
+
route: string[];
|
|
20
|
+
category: string | null;
|
|
21
|
+
parentId: string | null;
|
|
22
|
+
childIds: string[];
|
|
23
|
+
directoryPath: string;
|
|
24
|
+
definitionPath: string | null;
|
|
25
|
+
relativePath: string;
|
|
26
|
+
shorthand: boolean;
|
|
27
|
+
executable: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Executable command route produced from the internal tree.
|
|
31
|
+
*/
|
|
32
|
+
interface CompiledCommandRoute {
|
|
33
|
+
id: string;
|
|
34
|
+
key: string;
|
|
35
|
+
kind: Exclude<CommandTreeNodeKind, 'root' | 'group'>;
|
|
36
|
+
token: string;
|
|
37
|
+
route: string[];
|
|
38
|
+
category: string | null;
|
|
39
|
+
definitionPath: string;
|
|
40
|
+
relativePath: string;
|
|
41
|
+
nodeId: string;
|
|
42
|
+
middlewares: string[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Validation or compilation diagnostic emitted while building the
|
|
46
|
+
* command tree.
|
|
47
|
+
*/
|
|
48
|
+
interface CommandRouteDiagnostic {
|
|
49
|
+
code: string;
|
|
50
|
+
message: string;
|
|
51
|
+
path: string;
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { CompiledCommandRoute as a, CommandTreeNodeSource as i, CommandTreeNode as n, CommandTreeNodeKind as r, CommandRouteDiagnostic as t };
|
|
55
|
+
//# sourceMappingURL=CommandTree-DwfiCsOl.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { a as CompiledCommandRoute, n as CommandTreeNode, t as CommandRouteDiagnostic } from "./CommandTree-DwfiCsOl.js";
|
|
1
2
|
import { Collection } from "discord.js";
|
|
2
3
|
|
|
3
4
|
//#region src/app/router/CommandsRouter.d.ts
|
|
@@ -26,11 +27,14 @@ interface Middleware {
|
|
|
26
27
|
command: string | null;
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
|
-
* Data structure containing parsed commands and
|
|
30
|
+
* Data structure containing parsed commands, middleware, and tree data.
|
|
30
31
|
*/
|
|
31
32
|
interface ParsedCommandData {
|
|
32
33
|
commands: Record<string, Command>;
|
|
33
34
|
middlewares: Record<string, Middleware>;
|
|
35
|
+
treeNodes?: Record<string, CommandTreeNode>;
|
|
36
|
+
compiledRoutes?: Record<string, CompiledCommandRoute>;
|
|
37
|
+
diagnostics?: CommandRouteDiagnostic[];
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
40
|
* Configuration options for the commands router.
|
|
@@ -53,13 +57,28 @@ declare class CommandsRouter {
|
|
|
53
57
|
* @internal
|
|
54
58
|
*/
|
|
55
59
|
private middlewares;
|
|
60
|
+
/**
|
|
61
|
+
* @private
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
private treeNodes;
|
|
65
|
+
/**
|
|
66
|
+
* @private
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
private compiledRoutes;
|
|
70
|
+
/**
|
|
71
|
+
* @private
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
private diagnostics;
|
|
56
75
|
/**
|
|
57
76
|
* Creates a new CommandsRouter instance.
|
|
58
77
|
* @param options - Configuration options for the router
|
|
59
78
|
*/
|
|
60
79
|
constructor(options: CommandsRouterOptions);
|
|
61
80
|
/**
|
|
62
|
-
* Populates the router with existing command and
|
|
81
|
+
* Populates the router with existing command, middleware, and tree data.
|
|
63
82
|
* @param data - Parsed command data to populate with
|
|
64
83
|
*/
|
|
65
84
|
populate(data: ParsedCommandData): void;
|
|
@@ -84,46 +103,104 @@ declare class CommandsRouter {
|
|
|
84
103
|
*/
|
|
85
104
|
private isCategory;
|
|
86
105
|
/**
|
|
87
|
-
*
|
|
106
|
+
* @private
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
private isCommandDirectory;
|
|
110
|
+
/**
|
|
111
|
+
* @private
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
private isGroupDirectory;
|
|
115
|
+
/**
|
|
116
|
+
* @private
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
119
|
+
private isCommandDefinition;
|
|
120
|
+
/**
|
|
121
|
+
* @private
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
|
+
private isGroupDefinition;
|
|
125
|
+
/**
|
|
126
|
+
* @private
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
private isSubcommandFile;
|
|
130
|
+
/**
|
|
131
|
+
* Clears all loaded commands, middleware, and compiled tree data.
|
|
88
132
|
*/
|
|
89
133
|
clear(): void;
|
|
90
134
|
/**
|
|
91
135
|
* Scans the filesystem for commands and middleware files.
|
|
92
136
|
* @returns Parsed command data
|
|
93
137
|
*/
|
|
94
|
-
scan(): Promise<
|
|
95
|
-
commands: {
|
|
96
|
-
[k: string]: Command;
|
|
97
|
-
};
|
|
98
|
-
middlewares: {
|
|
99
|
-
[k: string]: Middleware;
|
|
100
|
-
};
|
|
101
|
-
}>;
|
|
138
|
+
scan(): Promise<ParsedCommandData>;
|
|
102
139
|
/**
|
|
103
|
-
* Gets the raw command and
|
|
104
|
-
* @returns Object containing
|
|
140
|
+
* Gets the raw command, middleware, and compiled tree collections.
|
|
141
|
+
* @returns Object containing router collections
|
|
105
142
|
*/
|
|
106
143
|
getData(): {
|
|
107
144
|
commands: Collection<string, Command>;
|
|
108
145
|
middlewares: Collection<string, Middleware>;
|
|
146
|
+
treeNodes: Collection<string, CommandTreeNode>;
|
|
147
|
+
compiledRoutes: Collection<string, CompiledCommandRoute>;
|
|
148
|
+
diagnostics: CommandRouteDiagnostic[];
|
|
109
149
|
};
|
|
110
150
|
/**
|
|
111
|
-
*
|
|
112
|
-
* @returns
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
middlewares: {
|
|
119
|
-
[k: string]: Middleware;
|
|
120
|
-
};
|
|
151
|
+
* Gets only the internal command tree and compiled route data.
|
|
152
|
+
* @returns Object containing tree data
|
|
153
|
+
*/
|
|
154
|
+
getTreeData(): {
|
|
155
|
+
treeNodes: Collection<string, CommandTreeNode>;
|
|
156
|
+
compiledRoutes: Collection<string, CompiledCommandRoute>;
|
|
157
|
+
diagnostics: CommandRouteDiagnostic[];
|
|
121
158
|
};
|
|
159
|
+
/**
|
|
160
|
+
* Converts the loaded data to a JSON-serializable format.
|
|
161
|
+
* @returns Plain object with commands, middleware, and tree data
|
|
162
|
+
*/
|
|
163
|
+
toJSON(): ParsedCommandData;
|
|
164
|
+
/**
|
|
165
|
+
* @private
|
|
166
|
+
* @internal
|
|
167
|
+
*/
|
|
168
|
+
private initializeRootNode;
|
|
169
|
+
/**
|
|
170
|
+
* @private
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
private traverseDirectory;
|
|
174
|
+
/**
|
|
175
|
+
* @private
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
178
|
+
private createFlatCommandNode;
|
|
179
|
+
/**
|
|
180
|
+
* @private
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
private createTreeNode;
|
|
184
|
+
/**
|
|
185
|
+
* @private
|
|
186
|
+
* @internal
|
|
187
|
+
*/
|
|
188
|
+
private resolveNodeKind;
|
|
189
|
+
/**
|
|
190
|
+
* @private
|
|
191
|
+
* @internal
|
|
192
|
+
*/
|
|
193
|
+
private compileTree;
|
|
194
|
+
/**
|
|
195
|
+
* @private
|
|
196
|
+
* @internal
|
|
197
|
+
*/
|
|
198
|
+
private collectCompiledMiddlewares;
|
|
122
199
|
/**
|
|
123
200
|
* @private
|
|
124
201
|
* @internal
|
|
125
202
|
*/
|
|
126
|
-
private
|
|
203
|
+
private addDiagnostic;
|
|
127
204
|
/**
|
|
128
205
|
* @private
|
|
129
206
|
* @internal
|
|
@@ -142,4 +219,4 @@ declare class CommandsRouter {
|
|
|
142
219
|
}
|
|
143
220
|
//#endregion
|
|
144
221
|
export { ParsedCommandData as a, Middleware as i, CommandsRouter as n, CommandsRouterOptions as r, Command as t };
|
|
145
|
-
//# sourceMappingURL=CommandsRouter-
|
|
222
|
+
//# sourceMappingURL=CommandsRouter-D-b3xv38.d.ts.map
|
|
@@ -13,6 +13,7 @@ interface ParsedMessageCommand {
|
|
|
13
13
|
}[];
|
|
14
14
|
subcommand?: string;
|
|
15
15
|
subcommandGroup?: string;
|
|
16
|
+
fullRoute: string[];
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Schema defining the types of options for a message command.
|
|
@@ -53,6 +54,11 @@ declare class MessageCommandParser {
|
|
|
53
54
|
* @returns The command name
|
|
54
55
|
*/
|
|
55
56
|
getCommand(): string;
|
|
57
|
+
/**
|
|
58
|
+
* Gets the full command route as an array of segments.
|
|
59
|
+
* @returns Array of command segments
|
|
60
|
+
*/
|
|
61
|
+
getFullRoute(): string[];
|
|
56
62
|
/**
|
|
57
63
|
* Gets the subcommand name if present.
|
|
58
64
|
* @returns The subcommand name or undefined
|
|
@@ -191,4 +197,4 @@ declare class MessageCommandOptions {
|
|
|
191
197
|
}
|
|
192
198
|
//#endregion
|
|
193
199
|
export { ParsedMessageCommand as i, MessageCommandOptionsSchema as n, MessageCommandParser as r, MessageCommandOptions as t };
|
|
194
|
-
//# sourceMappingURL=MessageCommandParser-
|
|
200
|
+
//# sourceMappingURL=MessageCommandParser-UTKsRvb9.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FilterFunction, t as AnalyticsEngine } from "../analytics-engine-
|
|
1
|
+
import { n as FilterFunction, t as AnalyticsEngine } from "../analytics-engine-BimOLPwO.js";
|
|
2
2
|
export { AnalyticsEngine, FilterFunction };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_commandkit = require('../commandkit-
|
|
2
|
+
const require_commandkit = require('../commandkit-D2HMPuRQ.js');
|
|
3
3
|
|
|
4
4
|
exports.AnalyticsEngine = require_commandkit.AnalyticsEngine;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as IdentifyEvent, i as AnalyticsProvider, r as AnalyticsEvent } from "../analytics-engine-
|
|
1
|
+
import { a as IdentifyEvent, i as AnalyticsProvider, r as AnalyticsEvent } from "../analytics-engine-BimOLPwO.js";
|
|
2
2
|
export { AnalyticsEvent, AnalyticsProvider, IdentifyEvent };
|
package/dist/analytics/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_commandkit = require('../commandkit-
|
|
2
|
+
const require_commandkit = require('../commandkit-D2HMPuRQ.js');
|
|
3
3
|
|
|
4
4
|
exports.getDoNotTrack = require_commandkit.getDoNotTrack;
|
|
5
5
|
exports.noAnalytics = require_commandkit.noAnalytics;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as EventInterceptor } from "./EventInterceptor-D9JKMcfi.js";
|
|
2
2
|
import { a as Fragment, c as createElement } from "./element-DeLvTMfZ.js";
|
|
3
3
|
import { t as MaybeArray } from "./types-DZy7U-Ld.js";
|
|
4
|
-
import { r as MessageCommandParser, t as MessageCommandOptions } from "./MessageCommandParser-
|
|
5
|
-
import { i as Middleware, n as CommandsRouter, t as Command } from "./CommandsRouter-
|
|
6
|
-
import { i as ParsedEvent, t as EventsRouter } from "./EventsRouter-
|
|
7
|
-
import { o as HMREventType } from "./constants-
|
|
4
|
+
import { r as MessageCommandParser, t as MessageCommandOptions } from "./MessageCommandParser-UTKsRvb9.js";
|
|
5
|
+
import { i as Middleware, n as CommandsRouter, t as Command } from "./CommandsRouter-D-b3xv38.js";
|
|
6
|
+
import { i as ParsedEvent, t as EventsRouter } from "./EventsRouter-Dyr_oJJD.js";
|
|
7
|
+
import { o as HMREventType } from "./constants-GWSfiS4h.js";
|
|
8
8
|
import EventEmitter from "node:events";
|
|
9
9
|
import { AutocompleteInteraction, Awaitable, CacheType, ChatInputCommandInteraction, Client, ClientEvents, Collection, Constructable, ContextMenuCommandBuilder, ContextMenuCommandInteraction, Guild, Interaction, Locale, Message, MessageContextMenuCommandInteraction, PermissionsString, RESTPostAPIApplicationCommandsJSONBody, SlashCommandBuilder, TextBasedChannel, UserContextMenuCommandInteraction } from "discord.js";
|
|
10
10
|
import { DirectiveTransformerOptions } from "directive-to-hof";
|
|
@@ -352,6 +352,10 @@ declare class MiddlewareContext<T extends CommandExecutionMode = CommandExecutio
|
|
|
352
352
|
}
|
|
353
353
|
//#endregion
|
|
354
354
|
//#region src/app/register/CommandRegistrar.d.ts
|
|
355
|
+
type RegistrationCommandData = CommandData & {
|
|
356
|
+
__metadata?: CommandMetadata;
|
|
357
|
+
__applyId(id: string): void;
|
|
358
|
+
};
|
|
355
359
|
/**
|
|
356
360
|
* Event object passed to plugins before command registration.
|
|
357
361
|
*/
|
|
@@ -377,10 +381,31 @@ declare class CommandRegistrar {
|
|
|
377
381
|
/**
|
|
378
382
|
* Gets the commands data, consuming pre-generated context menu entries when available.
|
|
379
383
|
*/
|
|
380
|
-
getCommandsData():
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
+
getCommandsData(): RegistrationCommandData[];
|
|
385
|
+
/**
|
|
386
|
+
* Gets flat command data, consuming pre-generated context menu entries when available.
|
|
387
|
+
*/
|
|
388
|
+
private getFlatCommandsData;
|
|
389
|
+
/**
|
|
390
|
+
* Gets hierarchical chat-input command payloads compiled from cached tree nodes.
|
|
391
|
+
*/
|
|
392
|
+
private getHierarchicalCommandsData;
|
|
393
|
+
/**
|
|
394
|
+
* Removes internal runtime-only fields before Discord registration data is emitted.
|
|
395
|
+
*/
|
|
396
|
+
private sanitizeCommandData;
|
|
397
|
+
/**
|
|
398
|
+
* Builds a top-level Discord payload for a hierarchical command root.
|
|
399
|
+
*/
|
|
400
|
+
private buildHierarchicalRootPayload;
|
|
401
|
+
/**
|
|
402
|
+
* Builds a nested subcommand or subcommand-group option from a hierarchical node.
|
|
403
|
+
*/
|
|
404
|
+
private buildHierarchicalOption;
|
|
405
|
+
/**
|
|
406
|
+
* Collects normalized guild scopes for all chat-input leaves within a hierarchical subtree.
|
|
407
|
+
*/
|
|
408
|
+
private collectHierarchicalGuildScopes;
|
|
384
409
|
/**
|
|
385
410
|
* Registers loaded commands.
|
|
386
411
|
*/
|
|
@@ -388,17 +413,11 @@ declare class CommandRegistrar {
|
|
|
388
413
|
/**
|
|
389
414
|
* Updates the global commands.
|
|
390
415
|
*/
|
|
391
|
-
updateGlobalCommands(commands:
|
|
392
|
-
__metadata?: CommandMetadata;
|
|
393
|
-
__applyId(id: string): void;
|
|
394
|
-
})[]): Promise<void>;
|
|
416
|
+
updateGlobalCommands(commands: RegistrationCommandData[]): Promise<void>;
|
|
395
417
|
/**
|
|
396
418
|
* Updates the guild commands.
|
|
397
419
|
*/
|
|
398
|
-
updateGuildCommands(commands:
|
|
399
|
-
__metadata?: CommandMetadata;
|
|
400
|
-
__applyId(id: string): void;
|
|
401
|
-
})[]): Promise<void>;
|
|
420
|
+
updateGuildCommands(commands: RegistrationCommandData[]): Promise<void>;
|
|
402
421
|
}
|
|
403
422
|
//#endregion
|
|
404
423
|
//#region src/context/environment.d.ts
|
|
@@ -809,6 +828,20 @@ declare class AppCommandHandler {
|
|
|
809
828
|
* @internal
|
|
810
829
|
*/
|
|
811
830
|
private loadedCommands;
|
|
831
|
+
/**
|
|
832
|
+
* Executable runtime commands indexed by canonical route key.
|
|
833
|
+
* This includes flat commands and hierarchical executable leaves.
|
|
834
|
+
* @private
|
|
835
|
+
* @internal
|
|
836
|
+
*/
|
|
837
|
+
private runtimeRouteIndex;
|
|
838
|
+
/**
|
|
839
|
+
* Loaded hierarchical command nodes keyed by tree node id.
|
|
840
|
+
* Container nodes are cached here for registration compilation.
|
|
841
|
+
* @private
|
|
842
|
+
* @internal
|
|
843
|
+
*/
|
|
844
|
+
private hierarchicalNodes;
|
|
812
845
|
/**
|
|
813
846
|
* @private
|
|
814
847
|
* @internal
|
|
@@ -854,10 +887,35 @@ declare class AppCommandHandler {
|
|
|
854
887
|
* @returns Array of loaded commands
|
|
855
888
|
*/
|
|
856
889
|
getCommandsArray(): LoadedCommand[];
|
|
890
|
+
/**
|
|
891
|
+
* Gets all executable runtime routes, including hierarchical leaves.
|
|
892
|
+
* @returns Array of route-indexed commands
|
|
893
|
+
*/
|
|
894
|
+
getRuntimeCommandsArray(): LoadedCommand[];
|
|
895
|
+
/**
|
|
896
|
+
* Gets loaded hierarchical command nodes, including non-executable containers.
|
|
897
|
+
* @returns Array of hierarchical node definitions
|
|
898
|
+
*/
|
|
899
|
+
getHierarchicalNodesArray(): LoadedCommand[];
|
|
857
900
|
/**
|
|
858
901
|
* Registers event handlers for Discord interactions and messages.
|
|
859
902
|
*/
|
|
860
903
|
registerCommandHandler(): void;
|
|
904
|
+
/**
|
|
905
|
+
* @private
|
|
906
|
+
* @internal
|
|
907
|
+
*/
|
|
908
|
+
private normalizeRouteKey;
|
|
909
|
+
/**
|
|
910
|
+
* @private
|
|
911
|
+
* @internal
|
|
912
|
+
*/
|
|
913
|
+
private buildInteractionRouteKey;
|
|
914
|
+
/**
|
|
915
|
+
* @private
|
|
916
|
+
* @internal
|
|
917
|
+
*/
|
|
918
|
+
private buildMessageRouteKey;
|
|
861
919
|
/**
|
|
862
920
|
* Prepares a command for execution by resolving the command and its middleware.
|
|
863
921
|
* @param source - The interaction or message that triggered the command
|
|
@@ -872,6 +930,18 @@ declare class AppCommandHandler {
|
|
|
872
930
|
* @returns The loaded command or null if not found
|
|
873
931
|
*/
|
|
874
932
|
private findCommandByName;
|
|
933
|
+
/**
|
|
934
|
+
* Finds a command by its canonical route key.
|
|
935
|
+
* @param route - The command route or command name
|
|
936
|
+
* @param allowFlatAliasFallback - Whether to check flat aliases if the route key was not found
|
|
937
|
+
* @returns The loaded command or null if not found
|
|
938
|
+
*/
|
|
939
|
+
private findCommandByRoute;
|
|
940
|
+
/**
|
|
941
|
+
* @private
|
|
942
|
+
* @internal
|
|
943
|
+
*/
|
|
944
|
+
private getRouteKeyFor;
|
|
875
945
|
resolveMessageCommandName(name: string): string;
|
|
876
946
|
/**
|
|
877
947
|
* Reloads all commands and middleware from scratch.
|
|
@@ -906,11 +976,33 @@ declare class AppCommandHandler {
|
|
|
906
976
|
* @internal
|
|
907
977
|
*/
|
|
908
978
|
private loadMiddleware;
|
|
979
|
+
/**
|
|
980
|
+
* @private
|
|
981
|
+
* @internal
|
|
982
|
+
*/
|
|
983
|
+
private shouldIndexAsRuntimeRoute;
|
|
984
|
+
/**
|
|
985
|
+
* @private
|
|
986
|
+
* @internal
|
|
987
|
+
*/
|
|
988
|
+
private registerRuntimeRoute;
|
|
989
|
+
/**
|
|
990
|
+
* @private
|
|
991
|
+
* @internal
|
|
992
|
+
*/
|
|
993
|
+
private processCommandFile;
|
|
909
994
|
/**
|
|
910
995
|
* @private
|
|
911
996
|
* @internal
|
|
912
997
|
*/
|
|
913
998
|
private loadCommand;
|
|
999
|
+
/**
|
|
1000
|
+
* Loads a hierarchical command node into the hierarchical cache.
|
|
1001
|
+
* Executable leaves are also added to the runtime route index.
|
|
1002
|
+
* @private
|
|
1003
|
+
* @internal
|
|
1004
|
+
*/
|
|
1005
|
+
private loadHierarchicalNode;
|
|
914
1006
|
/**
|
|
915
1007
|
* Gets the metadata for a command.
|
|
916
1008
|
* @param command - The command name to get metadata for
|
|
@@ -2281,4 +2373,4 @@ declare class AnalyticsEngine {
|
|
|
2281
2373
|
}
|
|
2282
2374
|
//#endregion
|
|
2283
2375
|
export { isRuntimePlugin as $, MessageCommand as $t, flag as A, makeContextAwareFunction as At, CommonPluginRuntime as B, PreRegisterCommandsEvent as Bt, EvaluationContext as C, RunCommandOptions as Ct, FlagRunner as D, getCommandKit as Dt, FeatureFlagDefinition as E, exitContext as Et, CommandKitPluginRuntime as F, CommandKitEnvironmentInternalData as Ft, PluginTransformParameters as G, ChatInputCommand as Gt, CommonDirectiveTransformer as H, AutocompleteCommand as Ht, PluginCommon as I, CommandKitEnvironmentType as It, CommandKitEventDispatch as J, CommandExecutionMode as Jt, TransformedResult as K, ChatInputCommandContext as Kt, PluginOptions as L, after as Lt, FlagConfiguration as M, useEnvironment as Mt, FlagProvider as N, useStore as Nt, IdentifyFunction as O, getContext as Ot, JsonFlagProvider as P, CommandKitEnvironment as Pt, RuntimePlugin as Q, InteractionCommandMiddlewareContext as Qt, PluginType as R, cancelAfter as Rt, DecideFunction as S, AppCommandRunner as St, FeatureFlag as T, GenericFunction as Tt, CommonDirectiveTransformerOptions as U, AutocompleteCommandContext as Ut, CompilerPluginRuntime as V, AnyCommandExecute as Vt, CompilerPlugin as W, AutocompleteCommandMiddlewareContext as Wt, MaybeFalsey as X, ContextParameters as Xt, CommandKitPlugin as Y, Context as Yt, TemplateHandler as Z, InteractionCommandContext as Zt, CommandKitConfig as _, CustomAppCommandProps as _t, IdentifyEvent as a, MiddlewareContext as an, EventListener as at, CustomEvaluationContext as b, ResolvableCommand as bt, CommandKitConfiguration as c, UserContextMenuCommand as cn, ListenerFunction as ct, onBootstrap as d, CommandContext as dn, AppCommandNative as dt, MessageCommandContext as en, CommandKitHMREvent as et, DeepPartial as f, CommandData as fn, CommandBuilderLike as ft, CommandKitCompilerOptions as g, EventHandler as gn, CommandTypeData as gt, mergeDeep as h, CommandMetadataFunction as hn, CommandDataSchemaValue as ht, AnalyticsProvider as i, MessageContextMenuCommandMiddlewareContext as in, AppEventsHandlerLoadedData as it, setFlagProvider as j, provideContext as jt, MaybePromise as k, isCommandWorkerContext as kt, commandkit as l, UserContextMenuCommandContext as ln, AppCommand as lt, ResolvedCommandKitConfig as m, CommandMetadata as mn, CommandDataSchemaKey as mt, FilterFunction as n, MessageContextMenuCommand as nn, registerDevHooks as nt, BootstrapFunction as o, MiddlewareContextArgs as on, LoadedEvent as ot, DeepRequired as p, CommandKitOptions as pn, CommandDataSchema as pt, isCompilerPlugin as q, CommandContextOptions as qt, AnalyticsEvent as r, MessageContextMenuCommandContext as rn, AppEventsHandler as rt, CommandKit as s, SlashCommandMiddlewareContext as sn, CommandKitEventsChannel as st, AnalyticsEngine as t, MessageCommandMiddlewareContext as tn, IpcMessageCommand as tt, onApplicationBootstrap as u, UserContextMenuCommandMiddlewareContext as un, AppCommandHandler as ut, FlagStore as v, LoadedCommand as vt, EventFlagContext as w, AsyncFunction as wt, CustomEvaluationFunction as x, RunCommand as xt, CommandFlagContext as y, PreparedAppCommandExecution as yt, isPlugin as z, CommandRegistrar as zt };
|
|
2284
|
-
//# sourceMappingURL=analytics-engine-
|
|
2376
|
+
//# sourceMappingURL=analytics-engine-BimOLPwO.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ct as RunCommandOptions, St as AppCommandRunner } from "../../analytics-engine-
|
|
1
|
+
import { Ct as RunCommandOptions, St as AppCommandRunner } from "../../analytics-engine-BimOLPwO.js";
|
|
2
2
|
export { AppCommandRunner, RunCommandOptions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_commandkit = require('../../commandkit-
|
|
2
|
+
const require_commandkit = require('../../commandkit-D2HMPuRQ.js');
|
|
3
3
|
|
|
4
4
|
exports.AppCommandRunner = require_commandkit.AppCommandRunner;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as MessageCommand, Gt as ChatInputCommand, Ht as AutocompleteCommand, Jt as CommandExecutionMode, Kt as ChatInputCommandContext, Qt as InteractionCommandMiddlewareContext, Ut as AutocompleteCommandContext, Vt as AnyCommandExecute, Wt as AutocompleteCommandMiddlewareContext, Xt as ContextParameters, Yt as Context, Zt as InteractionCommandContext, an as MiddlewareContext, cn as UserContextMenuCommand, en as MessageCommandContext, in as MessageContextMenuCommandMiddlewareContext, ln as UserContextMenuCommandContext, nn as MessageContextMenuCommand, on as MiddlewareContextArgs, qt as CommandContextOptions, rn as MessageContextMenuCommandContext, sn as SlashCommandMiddlewareContext, tn as MessageCommandMiddlewareContext, un as UserContextMenuCommandMiddlewareContext } from "../../analytics-engine-
|
|
1
|
+
import { $t as MessageCommand, Gt as ChatInputCommand, Ht as AutocompleteCommand, Jt as CommandExecutionMode, Kt as ChatInputCommandContext, Qt as InteractionCommandMiddlewareContext, Ut as AutocompleteCommandContext, Vt as AnyCommandExecute, Wt as AutocompleteCommandMiddlewareContext, Xt as ContextParameters, Yt as Context, Zt as InteractionCommandContext, an as MiddlewareContext, cn as UserContextMenuCommand, en as MessageCommandContext, in as MessageContextMenuCommandMiddlewareContext, ln as UserContextMenuCommandContext, nn as MessageContextMenuCommand, on as MiddlewareContextArgs, qt as CommandContextOptions, rn as MessageContextMenuCommandContext, sn as SlashCommandMiddlewareContext, tn as MessageCommandMiddlewareContext, un as UserContextMenuCommandMiddlewareContext } from "../../analytics-engine-BimOLPwO.js";
|
|
2
2
|
export { AnyCommandExecute, AutocompleteCommand, AutocompleteCommandContext, AutocompleteCommandMiddlewareContext, ChatInputCommand, ChatInputCommandContext, CommandContextOptions, CommandExecutionMode, Context, ContextParameters, InteractionCommandContext, InteractionCommandMiddlewareContext, MessageCommand, MessageCommandContext, MessageCommandMiddlewareContext, MessageContextMenuCommand, MessageContextMenuCommandContext, MessageContextMenuCommandMiddlewareContext, MiddlewareContext, MiddlewareContextArgs, SlashCommandMiddlewareContext, UserContextMenuCommand, UserContextMenuCommandContext, UserContextMenuCommandMiddlewareContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_commandkit = require('../../commandkit-
|
|
2
|
+
const require_commandkit = require('../../commandkit-D2HMPuRQ.js');
|
|
3
3
|
|
|
4
4
|
exports.CommandExecutionMode = require_commandkit.CommandExecutionMode;
|
|
5
5
|
exports.Context = require_commandkit.Context;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as ParsedMessageCommand, n as MessageCommandOptionsSchema, r as MessageCommandParser, t as MessageCommandOptions } from "../../MessageCommandParser-
|
|
1
|
+
import { i as ParsedMessageCommand, n as MessageCommandOptionsSchema, r as MessageCommandParser, t as MessageCommandOptions } from "../../MessageCommandParser-UTKsRvb9.js";
|
|
2
2
|
export { MessageCommandOptions, MessageCommandOptionsSchema, MessageCommandParser, ParsedMessageCommand };
|