commandkit 1.2.1-dev.20260310005506 → 1.2.1-dev.20260311005547
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/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-DnRsHBId.d.ts → analytics-engine-uBNaD2CQ.d.ts} +9 -3
- 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/events/EventWorkerContext.d.ts +1 -1
- 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 +1 -1
- package/dist/app/index.js +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/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.js +1 -1
- package/dist/cli/init.js +1 -1
- package/dist/cli/production.js +1 -1
- package/dist/{commandkit-Bh7C1_c7.js → commandkit-DNln6BAJ.js} +90 -26
- package/dist/commandkit-DNln6BAJ.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.js +1 -1
- package/dist/components/display/index.js +1 -1
- package/dist/components/display/label.js +1 -1
- package/dist/components/display/media-gallery.js +1 -1
- package/dist/components/display/section.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/interactive/button/Button.js +1 -1
- package/dist/components/interactive/button/ButtonKit.js +1 -1
- package/dist/components/interactive/modal/Modal.js +1 -1
- package/dist/components/interactive/modal/ModalKit.js +1 -1
- 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/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/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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/logger/DefaultLogger.js +1 -1
- package/dist/logger/Logger.js +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/types.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 +2 -2
- package/dist/commandkit-Bh7C1_c7.js.map +0 -1
|
@@ -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-uBNaD2CQ.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-DNln6BAJ.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-uBNaD2CQ.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-DNln6BAJ.js');
|
|
3
3
|
|
|
4
4
|
exports.getDoNotTrack = require_commandkit.getDoNotTrack;
|
|
5
5
|
exports.noAnalytics = require_commandkit.noAnalytics;
|
|
@@ -375,7 +375,7 @@ declare class CommandRegistrar {
|
|
|
375
375
|
*/
|
|
376
376
|
constructor(commandkit: CommandKit);
|
|
377
377
|
/**
|
|
378
|
-
* Gets the commands data.
|
|
378
|
+
* Gets the commands data, consuming pre-generated context menu entries when available.
|
|
379
379
|
*/
|
|
380
380
|
getCommandsData(): (CommandData & {
|
|
381
381
|
__metadata?: CommandMetadata;
|
|
@@ -850,7 +850,7 @@ declare class AppCommandHandler {
|
|
|
850
850
|
*/
|
|
851
851
|
printBanner(): void;
|
|
852
852
|
/**
|
|
853
|
-
* Gets an array of all loaded commands.
|
|
853
|
+
* Gets an array of all loaded commands, including pre-generated context menu entries.
|
|
854
854
|
* @returns Array of loaded commands
|
|
855
855
|
*/
|
|
856
856
|
getCommandsArray(): LoadedCommand[];
|
|
@@ -918,6 +918,12 @@ declare class AppCommandHandler {
|
|
|
918
918
|
* @returns The command metadata or null if not found
|
|
919
919
|
*/
|
|
920
920
|
getMetadataFor(command: string, hint?: 'user' | 'message'): CommandMetadata | null;
|
|
921
|
+
/**
|
|
922
|
+
* Generates context menu commands for the loaded command.
|
|
923
|
+
* @private
|
|
924
|
+
* @internal
|
|
925
|
+
*/
|
|
926
|
+
private generateContextMenuCommands;
|
|
921
927
|
}
|
|
922
928
|
//#endregion
|
|
923
929
|
//#region src/events/CommandKitEventsChannel.d.ts
|
|
@@ -2275,4 +2281,4 @@ declare class AnalyticsEngine {
|
|
|
2275
2281
|
}
|
|
2276
2282
|
//#endregion
|
|
2277
2283
|
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 };
|
|
2278
|
-
//# sourceMappingURL=analytics-engine-
|
|
2284
|
+
//# sourceMappingURL=analytics-engine-uBNaD2CQ.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-uBNaD2CQ.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-DNln6BAJ.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-uBNaD2CQ.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-DNln6BAJ.js');
|
|
3
3
|
|
|
4
4
|
exports.CommandExecutionMode = require_commandkit.CommandExecutionMode;
|
|
5
5
|
exports.Context = require_commandkit.Context;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _t as CustomAppCommandProps, bt as ResolvableCommand, dt as AppCommandNative, ft as CommandBuilderLike, gt as CommandTypeData, ht as CommandDataSchemaValue, lt as AppCommand, mt as CommandDataSchemaKey, pt as CommandDataSchema, ut as AppCommandHandler, vt as LoadedCommand, xt as RunCommand, yt as PreparedAppCommandExecution } from "../../analytics-engine-
|
|
1
|
+
import { _t as CustomAppCommandProps, bt as ResolvableCommand, dt as AppCommandNative, ft as CommandBuilderLike, gt as CommandTypeData, ht as CommandDataSchemaValue, lt as AppCommand, mt as CommandDataSchemaKey, pt as CommandDataSchema, ut as AppCommandHandler, vt as LoadedCommand, xt as RunCommand, yt as PreparedAppCommandExecution } from "../../analytics-engine-uBNaD2CQ.js";
|
|
2
2
|
export { AppCommand, AppCommandHandler, AppCommandNative, CommandBuilderLike, CommandDataSchema, CommandDataSchemaKey, CommandDataSchemaValue, CommandTypeData, CustomAppCommandProps, LoadedCommand, PreparedAppCommandExecution, ResolvableCommand, RunCommand };
|
|
@@ -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-DNln6BAJ.js');
|
|
3
3
|
|
|
4
4
|
exports.AppCommandHandler = require_commandkit.AppCommandHandler;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { at as EventListener, it as AppEventsHandlerLoadedData, ot as LoadedEvent, rt as AppEventsHandler } from "../../analytics-engine-
|
|
1
|
+
import { at as EventListener, it as AppEventsHandlerLoadedData, ot as LoadedEvent, rt as AppEventsHandler } from "../../analytics-engine-uBNaD2CQ.js";
|
|
2
2
|
export { AppEventsHandler, AppEventsHandlerLoadedData, EventListener, LoadedEvent };
|
|
@@ -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-DNln6BAJ.js');
|
|
3
3
|
|
|
4
4
|
exports.AppEventsHandler = require_commandkit.AppEventsHandler;
|
package/dist/app/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as MessageCommand, Bt as PreRegisterCommandsEvent, 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, _t as CustomAppCommandProps, an as MiddlewareContext, bt as ResolvableCommand, cn as UserContextMenuCommand, dt as AppCommandNative, en as MessageCommandContext, ft as CommandBuilderLike, gt as CommandTypeData, ht as CommandDataSchemaValue, in as MessageContextMenuCommandMiddlewareContext, ln as UserContextMenuCommandContext, lt as AppCommand, mt as CommandDataSchemaKey, nn as MessageContextMenuCommand, on as MiddlewareContextArgs, pt as CommandDataSchema, qt as CommandContextOptions, rn as MessageContextMenuCommandContext, sn as SlashCommandMiddlewareContext, tn as MessageCommandMiddlewareContext, un as UserContextMenuCommandMiddlewareContext, ut as AppCommandHandler, vt as LoadedCommand, xt as RunCommand, yt as PreparedAppCommandExecution, zt as CommandRegistrar } from "../analytics-engine-
|
|
1
|
+
import { $t as MessageCommand, Bt as PreRegisterCommandsEvent, 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, _t as CustomAppCommandProps, an as MiddlewareContext, bt as ResolvableCommand, cn as UserContextMenuCommand, dt as AppCommandNative, en as MessageCommandContext, ft as CommandBuilderLike, gt as CommandTypeData, ht as CommandDataSchemaValue, in as MessageContextMenuCommandMiddlewareContext, ln as UserContextMenuCommandContext, lt as AppCommand, mt as CommandDataSchemaKey, nn as MessageContextMenuCommand, on as MiddlewareContextArgs, pt as CommandDataSchema, qt as CommandContextOptions, rn as MessageContextMenuCommandContext, sn as SlashCommandMiddlewareContext, tn as MessageCommandMiddlewareContext, un as UserContextMenuCommandMiddlewareContext, ut as AppCommandHandler, vt as LoadedCommand, xt as RunCommand, yt as PreparedAppCommandExecution, zt as CommandRegistrar } from "../analytics-engine-uBNaD2CQ.js";
|
|
2
2
|
import { i as ParsedMessageCommand, n as MessageCommandOptionsSchema, r as MessageCommandParser, t as MessageCommandOptions } from "../MessageCommandParser-DPCbHXCS.js";
|
|
3
3
|
import { i as stopMiddlewares, n as rethrow, r as stopEvents, t as redirect } from "../signals-CBXwugBW.js";
|
|
4
4
|
import { n as isInteractionSource, r as isMessageSource, t as CommandSource } from "../helpers-zmC44Mcu.js";
|
package/dist/app/index.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-DNln6BAJ.js');
|
|
3
3
|
const require_app_interrupt_signals = require('./interrupt/signals.js');
|
|
4
4
|
const require_app_commands_helpers = require('./commands/helpers.js');
|
|
5
5
|
const require_app_commands_MessageCommandParser = require('./commands/MessageCommandParser.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { an as MiddlewareContext } from "../../analytics-engine-
|
|
1
|
+
import { an as MiddlewareContext } from "../../analytics-engine-uBNaD2CQ.js";
|
|
2
2
|
|
|
3
3
|
//#region src/app/middlewares/permissions.d.ts
|
|
4
4
|
declare const middlewareId: `${string}-${string}-${string}-${string}-${string}`;
|
|
@@ -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-DNln6BAJ.js');
|
|
3
3
|
|
|
4
4
|
exports.beforeExecute = require_commandkit.beforeExecute;
|
|
5
5
|
exports.middlewareId = require_commandkit.middlewareId;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bt as PreRegisterCommandsEvent, zt as CommandRegistrar } from "../../analytics-engine-
|
|
1
|
+
import { Bt as PreRegisterCommandsEvent, zt as CommandRegistrar } from "../../analytics-engine-uBNaD2CQ.js";
|
|
2
2
|
export { CommandRegistrar, PreRegisterCommandsEvent };
|
|
@@ -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-DNln6BAJ.js');
|
|
3
3
|
|
|
4
4
|
exports.CommandRegistrar = require_commandkit.CommandRegistrar;
|
package/dist/cli/build.d.ts
CHANGED
package/dist/cli/build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_chunk = require('../chunk-BE-pF4vm.js');
|
|
3
|
-
const require_commandkit = require('../commandkit-
|
|
3
|
+
const require_commandkit = require('../commandkit-DNln6BAJ.js');
|
|
4
4
|
const require_utils_constants = require('../utils/constants.js');
|
|
5
5
|
const require_config_utils = require('../config/utils.js');
|
|
6
6
|
const require_cli_common = require('./common.js');
|
package/dist/cli/common.d.ts
CHANGED
package/dist/cli/development.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_chunk = require('../chunk-BE-pF4vm.js');
|
|
3
3
|
const require_utils_colors = require('../utils/colors.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
4
|
+
const require_commandkit = require('../commandkit-DNln6BAJ.js');
|
|
5
5
|
const require_plugins_CompilerPlugin = require('../plugins/CompilerPlugin.js');
|
|
6
6
|
const require_utils_constants = require('../utils/constants.js');
|
|
7
7
|
const require_cli_common = require('./common.js');
|
package/dist/cli/init.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_chunk = require('../chunk-BE-pF4vm.js');
|
|
3
|
-
const require_commandkit = require('../commandkit-
|
|
3
|
+
const require_commandkit = require('../commandkit-DNln6BAJ.js');
|
|
4
4
|
const require_plugins_CompilerPlugin = require('../plugins/CompilerPlugin.js');
|
|
5
5
|
const require_utils_constants = require('../utils/constants.js');
|
|
6
6
|
const require_utils_types_package = require('../utils/types-package.js');
|
package/dist/cli/production.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_chunk = require('../chunk-BE-pF4vm.js');
|
|
3
|
-
const require_commandkit = require('../commandkit-
|
|
3
|
+
const require_commandkit = require('../commandkit-DNln6BAJ.js');
|
|
4
4
|
const require_plugins_CompilerPlugin = require('../plugins/CompilerPlugin.js');
|
|
5
5
|
const require_utils_constants = require('../utils/constants.js');
|
|
6
6
|
const require_cli_common = require('./common.js');
|
|
@@ -24,6 +24,7 @@ node_events = require_chunk.__toESM(node_events);
|
|
|
24
24
|
let discord_js = require("discord.js");
|
|
25
25
|
let node_async_hooks = require("node:async_hooks");
|
|
26
26
|
let node_crypto = require("node:crypto");
|
|
27
|
+
let node_console = require("node:console");
|
|
27
28
|
let util = require("util");
|
|
28
29
|
let node_fs = require("node:fs");
|
|
29
30
|
let node_path = require("node:path");
|
|
@@ -439,7 +440,7 @@ var DefaultLogger = class {
|
|
|
439
440
|
constructor(stdout = process.stdout, stderr = process.stderr) {
|
|
440
441
|
this.stdout = stdout;
|
|
441
442
|
this.stderr = stderr;
|
|
442
|
-
this.logger = new
|
|
443
|
+
this.logger = new node_console.Console(this.stdout, this.stderr);
|
|
443
444
|
}
|
|
444
445
|
_formatTime(date) {
|
|
445
446
|
return `${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}:${date.getSeconds().toString().padStart(2, "0")}.${date.getMilliseconds().toString().padStart(3, "0")}`;
|
|
@@ -2020,23 +2021,35 @@ var CommandRegistrar = class {
|
|
|
2020
2021
|
this.api.setToken(this.commandkit.client.token ?? process.env.DISCORD_TOKEN ?? process.env.TOKEN ?? "");
|
|
2021
2022
|
}
|
|
2022
2023
|
/**
|
|
2023
|
-
* Gets the commands data.
|
|
2024
|
+
* Gets the commands data, consuming pre-generated context menu entries when available.
|
|
2024
2025
|
*/
|
|
2025
2026
|
getCommandsData() {
|
|
2026
|
-
|
|
2027
|
+
const commands = this.commandkit.commandHandler.getCommandsArray();
|
|
2028
|
+
const commandIds = new Set(commands.map((command) => command.command.id));
|
|
2029
|
+
return commands.flatMap((cmd) => {
|
|
2030
|
+
const isPreGeneratedCtx = cmd.command.id.endsWith("::user-ctx") || cmd.command.id.endsWith("::message-ctx");
|
|
2027
2031
|
const json = "toJSON" in cmd.data.command ? cmd.data.command.toJSON() : cmd.data.command;
|
|
2028
2032
|
const __metadata = cmd.metadata ?? cmd.data.metadata;
|
|
2033
|
+
const isContextMenuType = json.type === discord_js.ApplicationCommandType.User || json.type === discord_js.ApplicationCommandType.Message;
|
|
2034
|
+
const applyId = (id) => {
|
|
2035
|
+
cmd.discordId = id;
|
|
2036
|
+
};
|
|
2037
|
+
if (isPreGeneratedCtx || isContextMenuType) return [{
|
|
2038
|
+
...json,
|
|
2039
|
+
__metadata,
|
|
2040
|
+
__applyId: applyId
|
|
2041
|
+
}];
|
|
2029
2042
|
const collections = [];
|
|
2043
|
+
const hasPreGeneratedUserContextMenu = commandIds.has(`${cmd.command.id}::user-ctx`);
|
|
2044
|
+
const hasPreGeneratedMessageContextMenu = commandIds.has(`${cmd.command.id}::message-ctx`);
|
|
2030
2045
|
if (cmd.data.chatInput) collections.push({
|
|
2031
2046
|
...json,
|
|
2032
2047
|
type: discord_js.ApplicationCommandType.ChatInput,
|
|
2033
2048
|
description: json.description ?? "No command description set.",
|
|
2034
2049
|
__metadata,
|
|
2035
|
-
__applyId:
|
|
2036
|
-
cmd.discordId = id;
|
|
2037
|
-
}
|
|
2050
|
+
__applyId: applyId
|
|
2038
2051
|
});
|
|
2039
|
-
if (cmd.data.userContextMenu) {
|
|
2052
|
+
if (cmd.data.userContextMenu && !hasPreGeneratedUserContextMenu) {
|
|
2040
2053
|
var _metadata$nameAliases;
|
|
2041
2054
|
collections.push({
|
|
2042
2055
|
...json,
|
|
@@ -2046,12 +2059,10 @@ var CommandRegistrar = class {
|
|
|
2046
2059
|
description_localizations: void 0,
|
|
2047
2060
|
description: void 0,
|
|
2048
2061
|
__metadata,
|
|
2049
|
-
__applyId:
|
|
2050
|
-
cmd.discordId = id;
|
|
2051
|
-
}
|
|
2062
|
+
__applyId: applyId
|
|
2052
2063
|
});
|
|
2053
2064
|
}
|
|
2054
|
-
if (cmd.data.messageContextMenu) {
|
|
2065
|
+
if (cmd.data.messageContextMenu && !hasPreGeneratedMessageContextMenu) {
|
|
2055
2066
|
var _metadata$nameAliases2;
|
|
2056
2067
|
collections.push({
|
|
2057
2068
|
...json,
|
|
@@ -2061,9 +2072,7 @@ var CommandRegistrar = class {
|
|
|
2061
2072
|
description: void 0,
|
|
2062
2073
|
options: void 0,
|
|
2063
2074
|
__metadata,
|
|
2064
|
-
__applyId:
|
|
2065
|
-
cmd.discordId = id;
|
|
2066
|
-
}
|
|
2075
|
+
__applyId: applyId
|
|
2067
2076
|
});
|
|
2068
2077
|
}
|
|
2069
2078
|
return collections;
|
|
@@ -2353,7 +2362,7 @@ var AppCommandHandler = class {
|
|
|
2353
2362
|
});
|
|
2354
2363
|
}
|
|
2355
2364
|
/**
|
|
2356
|
-
* Gets an array of all loaded commands.
|
|
2365
|
+
* Gets an array of all loaded commands, including pre-generated context menu entries.
|
|
2357
2366
|
* @returns Array of loaded commands
|
|
2358
2367
|
*/
|
|
2359
2368
|
getCommandsArray() {
|
|
@@ -2626,24 +2635,22 @@ var AppCommandHandler = class {
|
|
|
2626
2635
|
});
|
|
2627
2636
|
const commandJson = "toJSON" in lastUpdated && typeof lastUpdated.toJSON === "function" ? lastUpdated.toJSON() : lastUpdated;
|
|
2628
2637
|
if ("guilds" in commandJson || "aliases" in commandJson) Logger.warn(`Command \`${command.name}\` uses deprecated metadata properties. Please update to use the new \`metadata\` object or \`generateMetadata\` function.`);
|
|
2638
|
+
const resolvedMetadata = {
|
|
2639
|
+
guilds: commandJson.guilds,
|
|
2640
|
+
aliases: commandJson.aliases,
|
|
2641
|
+
...metadata
|
|
2642
|
+
};
|
|
2629
2643
|
this.loadedCommands.set(id, {
|
|
2630
2644
|
discordId: null,
|
|
2631
2645
|
command,
|
|
2632
|
-
metadata:
|
|
2633
|
-
guilds: commandJson.guilds,
|
|
2634
|
-
aliases: commandJson.aliases,
|
|
2635
|
-
...metadata
|
|
2636
|
-
},
|
|
2646
|
+
metadata: resolvedMetadata,
|
|
2637
2647
|
data: {
|
|
2638
2648
|
...commandFileData,
|
|
2639
|
-
metadata:
|
|
2640
|
-
guilds: commandJson.guilds,
|
|
2641
|
-
aliases: commandJson.aliases,
|
|
2642
|
-
...metadata
|
|
2643
|
-
},
|
|
2649
|
+
metadata: resolvedMetadata,
|
|
2644
2650
|
command: commandJson
|
|
2645
2651
|
}
|
|
2646
2652
|
});
|
|
2653
|
+
this.generateContextMenuCommands(id, command, commandFileData, commandJson, resolvedMetadata);
|
|
2647
2654
|
} catch (error) {
|
|
2648
2655
|
Logger.error`Failed to load command ${command.name} (${id}): ${error}`;
|
|
2649
2656
|
}
|
|
@@ -2664,6 +2671,63 @@ var AppCommandHandler = class {
|
|
|
2664
2671
|
botPermissions: []
|
|
2665
2672
|
};
|
|
2666
2673
|
}
|
|
2674
|
+
/**
|
|
2675
|
+
* Generates context menu commands for the loaded command.
|
|
2676
|
+
* @private
|
|
2677
|
+
* @internal
|
|
2678
|
+
*/
|
|
2679
|
+
generateContextMenuCommands(id, command, commandFileData, commandJson, metadata) {
|
|
2680
|
+
if (commandFileData.userContextMenu) {
|
|
2681
|
+
var _metadata$nameAliases;
|
|
2682
|
+
const userCtxId = `${id}::user-ctx`;
|
|
2683
|
+
const userCtxName = ((_metadata$nameAliases = metadata.nameAliases) === null || _metadata$nameAliases === void 0 ? void 0 : _metadata$nameAliases.user) ?? commandJson.name;
|
|
2684
|
+
this.loadedCommands.set(userCtxId, {
|
|
2685
|
+
discordId: null,
|
|
2686
|
+
command: {
|
|
2687
|
+
...command,
|
|
2688
|
+
id: userCtxId,
|
|
2689
|
+
name: userCtxName
|
|
2690
|
+
},
|
|
2691
|
+
metadata,
|
|
2692
|
+
data: {
|
|
2693
|
+
...commandFileData,
|
|
2694
|
+
metadata,
|
|
2695
|
+
command: {
|
|
2696
|
+
...commandJson,
|
|
2697
|
+
name: userCtxName,
|
|
2698
|
+
type: discord_js.ApplicationCommandType.User,
|
|
2699
|
+
description: void 0,
|
|
2700
|
+
options: void 0
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
});
|
|
2704
|
+
}
|
|
2705
|
+
if (commandFileData.messageContextMenu) {
|
|
2706
|
+
var _metadata$nameAliases2;
|
|
2707
|
+
const messageCtxId = `${id}::message-ctx`;
|
|
2708
|
+
const messageCtxName = ((_metadata$nameAliases2 = metadata.nameAliases) === null || _metadata$nameAliases2 === void 0 ? void 0 : _metadata$nameAliases2.message) ?? commandJson.name;
|
|
2709
|
+
this.loadedCommands.set(messageCtxId, {
|
|
2710
|
+
discordId: null,
|
|
2711
|
+
command: {
|
|
2712
|
+
...command,
|
|
2713
|
+
id: messageCtxId,
|
|
2714
|
+
name: messageCtxName
|
|
2715
|
+
},
|
|
2716
|
+
metadata,
|
|
2717
|
+
data: {
|
|
2718
|
+
...commandFileData,
|
|
2719
|
+
metadata,
|
|
2720
|
+
command: {
|
|
2721
|
+
...commandJson,
|
|
2722
|
+
name: messageCtxName,
|
|
2723
|
+
type: discord_js.ApplicationCommandType.Message,
|
|
2724
|
+
description: void 0,
|
|
2725
|
+
options: void 0
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2728
|
+
});
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2667
2731
|
};
|
|
2668
2732
|
|
|
2669
2733
|
//#endregion
|
|
@@ -5080,4 +5144,4 @@ Object.defineProperty(exports, 'useStore', {
|
|
|
5080
5144
|
return useStore;
|
|
5081
5145
|
}
|
|
5082
5146
|
});
|
|
5083
|
-
//# sourceMappingURL=commandkit-
|
|
5147
|
+
//# sourceMappingURL=commandkit-DNln6BAJ.js.map
|