commandkit 1.2.1-dev.20260411010608 → 1.2.1-dev.20260411144916
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-BYA0ongA.d.ts} +124 -18
- 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/app-process.d.ts +2 -1
- package/dist/cli/app-process.js +15 -3
- package/dist/cli/app-process.js.map +1 -1
- package/dist/cli/build.d.ts +1 -1
- package/dist/cli/build.js +4 -2
- package/dist/cli/build.js.map +1 -1
- package/dist/cli/common.d.ts +1 -1
- package/dist/cli/development.d.ts +3 -3
- package/dist/cli/development.js +2 -2
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/init.js +1 -1
- package/dist/cli/production.js +4 -3
- package/dist/cli/production.js.map +1 -1
- package/dist/{commandkit-DNln6BAJ.js → commandkit-DTqT800J.js} +555 -111
- package/dist/commandkit-DTqT800J.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 +2 -2
- 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-BYA0ongA.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-DTqT800J.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-BYA0ongA.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-DTqT800J.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
|
|
@@ -1855,6 +1947,10 @@ declare function flag<Returns = boolean, Entity = Record<any, any>>(options: Fea
|
|
|
1855
1947
|
declare class FlagStore extends Collection<string, FeatureFlag<any, any>> {}
|
|
1856
1948
|
//#endregion
|
|
1857
1949
|
//#region src/config/types.d.ts
|
|
1950
|
+
/**
|
|
1951
|
+
* The JavaScript runtime to use for the development server.
|
|
1952
|
+
*/
|
|
1953
|
+
type CommandKitJsRuntime = 'node' | 'bun' | 'deno' | 'auto';
|
|
1858
1954
|
interface CommandKitCompilerOptions {
|
|
1859
1955
|
/**
|
|
1860
1956
|
* The macro compiler options to use with CommandKit.
|
|
@@ -1971,6 +2067,16 @@ interface CommandKitConfig {
|
|
|
1971
2067
|
* @default true
|
|
1972
2068
|
*/
|
|
1973
2069
|
jsxDefaultOptionalComponents?: boolean;
|
|
2070
|
+
/**
|
|
2071
|
+
* Experimental features configuration. These features are not stable and may be removed or changed without a major version bump. Use with caution.
|
|
2072
|
+
*/
|
|
2073
|
+
experimental?: {
|
|
2074
|
+
/**
|
|
2075
|
+
* The runtime to use for the development server. This is an experimental feature and may be removed or changed without a major version bump. Use with caution.
|
|
2076
|
+
* @default null
|
|
2077
|
+
*/
|
|
2078
|
+
devServerRuntime?: CommandKitJsRuntime | null;
|
|
2079
|
+
};
|
|
1974
2080
|
}
|
|
1975
2081
|
//#endregion
|
|
1976
2082
|
//#region src/config/utils.d.ts
|
|
@@ -2280,5 +2386,5 @@ declare class AnalyticsEngine {
|
|
|
2280
2386
|
track(event: AnalyticsEvent): Promise<void>;
|
|
2281
2387
|
}
|
|
2282
2388
|
//#endregion
|
|
2283
|
-
export {
|
|
2284
|
-
//# sourceMappingURL=analytics-engine-
|
|
2389
|
+
export { RuntimePlugin as $, InteractionCommandMiddlewareContext as $t, MaybePromise as A, isCommandWorkerContext as At, isPlugin as B, CommandRegistrar as Bt, DecideFunction as C, AppCommandRunner as Ct, FeatureFlagDefinition as D, exitContext as Dt, FeatureFlag as E, GenericFunction as Et, JsonFlagProvider as F, CommandKitEnvironment as Ft, CompilerPlugin as G, AutocompleteCommandMiddlewareContext as Gt, CompilerPluginRuntime as H, AnyCommandExecute as Ht, CommandKitPluginRuntime as I, CommandKitEnvironmentInternalData as It, isCompilerPlugin as J, CommandContextOptions as Jt, PluginTransformParameters as K, ChatInputCommand as Kt, PluginCommon as L, CommandKitEnvironmentType as Lt, setFlagProvider as M, provideContext as Mt, FlagConfiguration as N, useEnvironment as Nt, FlagRunner as O, getCommandKit as Ot, FlagProvider as P, useStore as Pt, TemplateHandler as Q, InteractionCommandContext as Qt, PluginOptions as R, after as Rt, CustomEvaluationFunction as S, RunCommand as St, EventFlagContext as T, AsyncFunction as Tt, CommonDirectiveTransformer as U, AutocompleteCommand as Ut, CommonPluginRuntime as V, PreRegisterCommandsEvent as Vt, CommonDirectiveTransformerOptions as W, AutocompleteCommandContext as Wt, CommandKitPlugin as X, Context as Xt, CommandKitEventDispatch as Y, CommandExecutionMode as Yt, MaybeFalsey as Z, ContextParameters as Zt, CommandKitConfig as _, EventHandler as _n, CommandTypeData as _t, IdentifyEvent as a, MessageContextMenuCommandMiddlewareContext as an, AppEventsHandlerLoadedData as at, CommandFlagContext as b, PreparedAppCommandExecution as bt, CommandKitConfiguration as c, SlashCommandMiddlewareContext as cn, CommandKitEventsChannel as ct, onBootstrap as d, UserContextMenuCommandMiddlewareContext as dn, AppCommandHandler as dt, MessageCommand as en, isRuntimePlugin as et, DeepPartial as f, CommandContext as fn, AppCommandNative as ft, CommandKitCompilerOptions as g, CommandMetadataFunction as gn, CommandDataSchemaValue as gt, mergeDeep as h, CommandMetadata as hn, CommandDataSchemaKey as ht, AnalyticsProvider as i, MessageContextMenuCommandContext as in, AppEventsHandler as it, flag as j, makeContextAwareFunction as jt, IdentifyFunction as k, getContext as kt, commandkit as l, UserContextMenuCommand as ln, ListenerFunction as lt, ResolvedCommandKitConfig as m, CommandKitOptions as mn, CommandDataSchema as mt, FilterFunction as n, MessageCommandMiddlewareContext as nn, IpcMessageCommand as nt, BootstrapFunction as o, MiddlewareContext as on, EventListener as ot, DeepRequired as p, CommandData as pn, CommandBuilderLike as pt, TransformedResult as q, ChatInputCommandContext as qt, AnalyticsEvent as r, MessageContextMenuCommand as rn, registerDevHooks as rt, CommandKit as s, MiddlewareContextArgs as sn, LoadedEvent as st, AnalyticsEngine as t, MessageCommandContext as tn, CommandKitHMREvent as tt, onApplicationBootstrap as u, UserContextMenuCommandContext as un, AppCommand as ut, CommandKitJsRuntime as v, CustomAppCommandProps as vt, EvaluationContext as w, RunCommandOptions as wt, CustomEvaluationContext as x, ResolvableCommand as xt, FlagStore as y, LoadedCommand as yt, PluginType as z, cancelAfter as zt };
|
|
2390
|
+
//# sourceMappingURL=analytics-engine-BYA0ongA.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ct as
|
|
1
|
+
import { Ct as AppCommandRunner, wt as RunCommandOptions } from "../../analytics-engine-BYA0ongA.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-DTqT800J.js');
|
|
3
3
|
|
|
4
4
|
exports.AppCommandRunner = require_commandkit.AppCommandRunner;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as
|
|
1
|
+
import { $t as InteractionCommandMiddlewareContext, Gt as AutocompleteCommandMiddlewareContext, Ht as AnyCommandExecute, Jt as CommandContextOptions, Kt as ChatInputCommand, Qt as InteractionCommandContext, Ut as AutocompleteCommand, Wt as AutocompleteCommandContext, Xt as Context, Yt as CommandExecutionMode, Zt as ContextParameters, an as MessageContextMenuCommandMiddlewareContext, cn as SlashCommandMiddlewareContext, dn as UserContextMenuCommandMiddlewareContext, en as MessageCommand, in as MessageContextMenuCommandContext, ln as UserContextMenuCommand, nn as MessageCommandMiddlewareContext, on as MiddlewareContext, qt as ChatInputCommandContext, rn as MessageContextMenuCommand, sn as MiddlewareContextArgs, tn as MessageCommandContext, un as UserContextMenuCommandContext } from "../../analytics-engine-BYA0ongA.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-DTqT800J.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 };
|