commandkit 1.2.0-dev.20251019124529 → 1.2.0-dev.20251020125252
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/bin/index.mjs +1 -1
- package/cli.d.ts +19 -0
- package/dist/{DefaultLogger-CHMVsizQ.d.ts → DefaultLogger-BM-HT9c2.d.ts} +2 -2
- package/dist/{EventWorkerContext-Si7O8BHF.d.ts → EventWorkerContext-BwDdoBLX.d.ts} +2 -2
- package/dist/{ILogger-BQ2ew4zR.d.ts → ILogger-CQbiGhJz.d.ts} +1 -1
- package/dist/{Logger-DyV7oli4.d.ts → Logger-KS_FDJHe.d.ts} +2 -2
- 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-Bysw_gql.d.ts → analytics-engine-CxK2wcKt.d.ts} +2 -1
- 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 +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 +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/{app-process-CjyrRAFH.js → app-process-CPsd2tOG.js} +2 -2
- package/dist/{app-process-CjyrRAFH.js.map → app-process-CPsd2tOG.js.map} +1 -1
- package/dist/{build-Cy9iGxZu.js → build-CE0tBpyz.js} +4 -4
- package/dist/{build-Cy9iGxZu.js.map → build-CE0tBpyz.js.map} +1 -1
- package/dist/cli/app-process.js +2 -2
- package/dist/cli/build.d.ts +1 -1
- package/dist/cli/build.js +4 -4
- package/dist/cli/common.d.ts +1 -1
- package/dist/cli/development.d.ts +19 -1
- package/dist/cli/development.js +14 -5
- package/dist/cli/development.js.map +1 -1
- package/dist/cli/env.js +1 -1
- package/dist/cli/information.js +1 -1
- package/dist/cli/init.d.ts +13 -2
- package/dist/cli/init.js +85 -7
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/production.js +6 -6
- package/dist/cli/type-checker.js +1 -1
- package/dist/cli/utils.js +1 -1
- package/dist/{commandkit-KwTRAgZd.js → commandkit-DogOm_48.js} +37 -6
- package/dist/{commandkit-KwTRAgZd.js.map → commandkit-DogOm_48.js.map} +1 -1
- package/dist/commandkit.d.ts +1 -1
- package/dist/commandkit.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 +2 -2
- 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/{config-B78JuOAI.d.ts → config-DTNT_4I0.d.ts} +2 -2
- package/dist/{constants-DwLQQVLy.d.ts → constants-CCFSX2NG.d.ts} +1 -1
- package/dist/{constants-AH-9qJ89.js → constants-Dy6P2veX.js} +1 -1
- package/dist/{constants-AH-9qJ89.js.map → constants-Dy6P2veX.js.map} +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/{dotprops-DvJUE8fw.js → dotprops-Dp98nRuu.js} +1 -1
- package/dist/{dotprops-DvJUE8fw.js.map → dotprops-Dp98nRuu.js.map} +1 -1
- package/dist/{env-Dd5904hf.js → env-CQJgOkQD.js} +1 -1
- package/dist/{env-Dd5904hf.js.map → env-CQJgOkQD.js.map} +1 -1
- package/dist/{error-codes-DM-Mbprh.d.ts → error-codes-BiNRVMiV.d.ts} +1 -1
- package/dist/events/CommandKitEventsChannel.d.ts +1 -1
- package/dist/{feature-flags-DJqNMI5w.js → feature-flags-BeMfD6KF.js} +2 -2
- package/dist/{feature-flags-DJqNMI5w.js.map → feature-flags-BeMfD6KF.js.map} +1 -1
- package/dist/flags/FlagProvider.d.ts +1 -1
- package/dist/flags/feature-flags.d.ts +1 -1
- package/dist/flags/feature-flags.js +2 -2
- package/dist/flags/store.d.ts +1 -1
- package/dist/index.d.ts +12 -13
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/kv/constants.d.ts +1 -1
- package/dist/kv/constants.js +1 -1
- package/dist/kv/dotprops.js +1 -1
- package/dist/kv/kv.d.ts +2 -2
- package/dist/kv/kv.js +3 -3
- package/dist/kv/serde.d.ts +2 -2
- package/dist/kv/serde.js +2 -2
- package/dist/logger/DefaultLogger.d.ts +2 -2
- package/dist/logger/DefaultLogger.js +1 -1
- package/dist/logger/ILogger.d.ts +1 -1
- package/dist/logger/Logger.d.ts +2 -2
- package/dist/logger/Logger.js +1 -1
- package/dist/logger/NoopLogger.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/{resolve-file-url-BDJud8AT.d.ts → resolve-file-url-DFtR8jRR.d.ts} +1 -1
- package/dist/{serde-DHHwhltz.js → serde-CqUxaQUh.js} +2 -2
- package/dist/{serde-DHHwhltz.js.map → serde-CqUxaQUh.js.map} +1 -1
- package/dist/{serde-BLi3Garu.d.ts → serde-D4H23l2F.d.ts} +2 -2
- package/dist/{type-checker-BGO8o3rM.js → type-checker-BckhTCQ9.js} +1 -1
- package/dist/{type-checker-BGO8o3rM.js.map → type-checker-BckhTCQ9.js.map} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{utilities-y6Wu2hdM.d.ts → utilities-DHcVgbhH.d.ts} +1 -1
- package/dist/utils/dev-hooks.d.ts +1 -1
- package/dist/utils/dev-hooks.js +1 -1
- package/dist/utils/error-codes.d.ts +1 -1
- package/dist/utils/resolve-file-url.d.ts +1 -1
- package/dist/utils/utilities.d.ts +1 -1
- package/dist/utils/utilities.js +1 -1
- package/dist/utils/warning.d.ts +1 -1
- package/dist/{utils-Bf-3Eevb.js → utils-DGovVwyA.js} +1 -1
- package/dist/{utils-Bf-3Eevb.js.map → utils-DGovVwyA.js.map} +1 -1
- package/dist/{version-DggMfP_1.d.ts → version-CUzpX6s2.d.ts} +1 -1
- package/dist/{version-Ca0591rs.js → version-D12sRXpW.js} +2 -2
- package/dist/{version-Ca0591rs.js.map → version-D12sRXpW.js.map} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/{warning-Ddig3lHP.d.ts → warning-D33CuXXQ.d.ts} +1 -1
- package/package.json +10 -3
- package/dist/init-DSYckXwx.d.ts +0 -13
- package/dist/init-hoTNDwPt.js +0 -91
- package/dist/init-hoTNDwPt.js.map +0 -1
package/dist/kv/kv.d.ts
CHANGED
package/dist/kv/kv.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-nOFOJqeH.js');
|
|
2
|
-
require('../constants-
|
|
3
|
-
const require_dotprops = require('../dotprops-
|
|
4
|
-
const require_serde = require('../serde-
|
|
2
|
+
require('../constants-Dy6P2veX.js');
|
|
3
|
+
const require_dotprops = require('../dotprops-Dp98nRuu.js');
|
|
4
|
+
const require_serde = require('../serde-CqUxaQUh.js');
|
|
5
5
|
let node_sqlite = require("node:sqlite");
|
|
6
6
|
node_sqlite = require_chunk.__toESM(node_sqlite);
|
|
7
7
|
|
package/dist/kv/serde.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../constants-
|
|
2
|
-
import { SerializedValue, deserializer, serializer } from "../serde-
|
|
1
|
+
import "../constants-CCFSX2NG.js";
|
|
2
|
+
import { SerializedValue, deserializer, serializer } from "../serde-D4H23l2F.js";
|
|
3
3
|
export { SerializedValue, deserializer, serializer };
|
package/dist/kv/serde.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
require('../constants-
|
|
2
|
-
const require_serde = require('../serde-
|
|
1
|
+
require('../constants-Dy6P2veX.js');
|
|
2
|
+
const require_serde = require('../serde-CqUxaQUh.js');
|
|
3
3
|
|
|
4
4
|
exports.deserializer = require_serde.deserializer;
|
|
5
5
|
exports.serializer = require_serde.serializer;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../ILogger-
|
|
2
|
-
import { DefaultLogger } from "../DefaultLogger-
|
|
1
|
+
import "../ILogger-CQbiGhJz.js";
|
|
2
|
+
import { DefaultLogger } from "../DefaultLogger-BM-HT9c2.js";
|
|
3
3
|
export { DefaultLogger };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../colors-DL3ucTiT.js');
|
|
2
2
|
require('../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
4
|
+
const require_commandkit = require('../commandkit-DogOm_48.js');
|
|
5
5
|
require('../warning-CszH8HeS.js');
|
|
6
6
|
require('../common-0Iw8ZeM6.js');
|
|
7
7
|
require('../common-CCx-FJI4.js');
|
package/dist/logger/ILogger.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ILogger } from "../ILogger-
|
|
1
|
+
import { ILogger } from "../ILogger-CQbiGhJz.js";
|
|
2
2
|
export { ILogger };
|
package/dist/logger/Logger.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../ILogger-
|
|
2
|
-
import { CommandKitLoggerOptions, Logger, LoggerImpl, createLogger } from "../Logger-
|
|
1
|
+
import "../ILogger-CQbiGhJz.js";
|
|
2
|
+
import { CommandKitLoggerOptions, Logger, LoggerImpl, createLogger } from "../Logger-KS_FDJHe.js";
|
|
3
3
|
export { CommandKitLoggerOptions, Logger, LoggerImpl, createLogger };
|
package/dist/logger/Logger.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../colors-DL3ucTiT.js');
|
|
2
2
|
require('../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
4
|
+
const require_commandkit = require('../commandkit-DogOm_48.js');
|
|
5
5
|
require('../warning-CszH8HeS.js');
|
|
6
6
|
require('../common-0Iw8ZeM6.js');
|
|
7
7
|
require('../common-CCx-FJI4.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompilerPlugin, PluginTransformParameters, TransformedResult, isCompilerPlugin } from "../analytics-engine-
|
|
1
|
+
import { CompilerPlugin, PluginTransformParameters, TransformedResult, isCompilerPlugin } from "../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../ModalKit-Cq2ns6jv.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginCommon, PluginOptions, PluginType, isPlugin } from "../analytics-engine-
|
|
1
|
+
import { PluginCommon, PluginOptions, PluginType, isPlugin } from "../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../ModalKit-Cq2ns6jv.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RuntimePlugin, isRuntimePlugin } from "../analytics-engine-
|
|
1
|
+
import { RuntimePlugin, isRuntimePlugin } from "../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../ModalKit-Cq2ns6jv.js";
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitEventDispatch, CommandKitPlugin, CommandKitPluginRuntime, CommonDirectiveTransformer, CommonDirectiveTransformerOptions, CommonPluginRuntime, CompilerPlugin, CompilerPluginRuntime, MaybeFalsey, PluginTransformParameters, RuntimePlugin, TemplateHandler, TransformedResult, isCompilerPlugin, isRuntimePlugin } from "../analytics-engine-
|
|
1
|
+
import { CommandKitEventDispatch, CommandKitPlugin, CommandKitPluginRuntime, CommonDirectiveTransformer, CommonDirectiveTransformerOptions, CommonPluginRuntime, CompilerPlugin, CompilerPluginRuntime, MaybeFalsey, PluginTransformParameters, RuntimePlugin, TemplateHandler, TransformedResult, isCompilerPlugin, isRuntimePlugin } from "../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../ModalKit-Cq2ns6jv.js";
|
package/dist/plugins/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../colors-DL3ucTiT.js');
|
|
2
2
|
require('../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
4
|
+
const require_commandkit = require('../commandkit-DogOm_48.js');
|
|
5
5
|
require('../warning-CszH8HeS.js');
|
|
6
6
|
require('../common-0Iw8ZeM6.js');
|
|
7
7
|
require('../common-CCx-FJI4.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitPluginRuntime } from "../../analytics-engine-
|
|
1
|
+
import { CommandKitPluginRuntime } from "../../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../../ModalKit-Cq2ns6jv.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../../colors-DL3ucTiT.js');
|
|
2
2
|
require('../../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../../commandkit-
|
|
4
|
+
const require_commandkit = require('../../commandkit-DogOm_48.js');
|
|
5
5
|
require('../../warning-CszH8HeS.js');
|
|
6
6
|
require('../../common-0Iw8ZeM6.js');
|
|
7
7
|
require('../../common-CCx-FJI4.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompilerPluginRuntime } from "../../analytics-engine-
|
|
1
|
+
import { CompilerPluginRuntime } from "../../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../../ModalKit-Cq2ns6jv.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../../colors-DL3ucTiT.js');
|
|
2
2
|
require('../../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../../commandkit-
|
|
4
|
+
const require_commandkit = require('../../commandkit-DogOm_48.js');
|
|
5
5
|
require('../../warning-CszH8HeS.js');
|
|
6
6
|
require('../../common-0Iw8ZeM6.js');
|
|
7
7
|
require('../../common-CCx-FJI4.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonDirectiveTransformer, CommonDirectiveTransformerOptions } from "../../../analytics-engine-
|
|
1
|
+
import { CommonDirectiveTransformer, CommonDirectiveTransformerOptions } from "../../../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../../../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../../../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../../../ModalKit-Cq2ns6jv.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../../../colors-DL3ucTiT.js');
|
|
2
2
|
require('../../../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../../../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../../../commandkit-
|
|
4
|
+
const require_commandkit = require('../../../commandkit-DogOm_48.js');
|
|
5
5
|
require('../../../warning-CszH8HeS.js');
|
|
6
6
|
require('../../../common-0Iw8ZeM6.js');
|
|
7
7
|
require('../../../common-CCx-FJI4.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompilerPlugin, MaybeFalsey, PluginTransformParameters, TransformedResult } from "../../../analytics-engine-
|
|
1
|
+
import { CompilerPlugin, MaybeFalsey, PluginTransformParameters, TransformedResult } from "../../../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../../../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../../../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../../../ModalKit-Cq2ns6jv.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../../../colors-DL3ucTiT.js');
|
|
2
2
|
require('../../../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../../../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../../../commandkit-
|
|
4
|
+
const require_commandkit = require('../../../commandkit-DogOm_48.js');
|
|
5
5
|
require('../../../warning-CszH8HeS.js');
|
|
6
6
|
require('../../../common-0Iw8ZeM6.js');
|
|
7
7
|
require('../../../common-CCx-FJI4.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonPluginRuntime } from "../../analytics-engine-
|
|
1
|
+
import { CommonPluginRuntime } from "../../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../../ModalKit-Cq2ns6jv.js";
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitEventDispatch, CommandKitPlugin, MaybeFalsey, TemplateHandler } from "../analytics-engine-
|
|
1
|
+
import { CommandKitEventDispatch, CommandKitPlugin, MaybeFalsey, TemplateHandler } from "../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../ModalKit-Cq2ns6jv.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_constants = require('./constants-
|
|
1
|
+
const require_constants = require('./constants-Dy6P2veX.js');
|
|
2
2
|
|
|
3
3
|
//#region src/kv/serde.ts
|
|
4
4
|
function serializer(value) {
|
|
@@ -94,4 +94,4 @@ Object.defineProperty(exports, 'serializer', {
|
|
|
94
94
|
return serializer;
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
|
-
//# sourceMappingURL=serde-
|
|
97
|
+
//# sourceMappingURL=serde-CqUxaQUh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serde-
|
|
1
|
+
{"version":3,"file":"serde-CqUxaQUh.js","names":[],"sources":["../src/kv/serde.ts"],"sourcesContent":["import { SerializerType } from './constants';\n\nexport interface SerializedValue {\n t: SerializerType;\n v: any;\n}\n\nexport function serializer(value: any): SerializedValue {\n if (value === null) {\n return { t: SerializerType.Null, v: null };\n }\n\n if (value === undefined) {\n return { t: SerializerType.Undefined, v: undefined };\n }\n\n if (typeof value === 'string') {\n return { t: SerializerType.String, v: value };\n }\n\n if (typeof value === 'number') {\n return { t: SerializerType.Number, v: value };\n }\n\n if (typeof value === 'boolean') {\n return { t: SerializerType.Boolean, v: value };\n }\n\n if (typeof value === 'bigint') {\n return { t: SerializerType.BigInt, v: value.toString() };\n }\n\n if (value instanceof Date) {\n return { t: SerializerType.Date, v: value.toISOString() };\n }\n\n if (Array.isArray(value)) {\n return { t: SerializerType.Array, v: value };\n }\n\n if (value instanceof Map) {\n return { t: SerializerType.Map, v: Array.from(value.entries()) };\n }\n\n if (value instanceof Set) {\n return { t: SerializerType.Set, v: Array.from(value) };\n }\n\n if (Buffer.isBuffer(value)) {\n return { t: SerializerType.Buffer, v: value.toString('base64') };\n }\n\n if (value instanceof RegExp) {\n return {\n t: SerializerType.RegExp,\n v: { source: value.source, flags: value.flags },\n };\n }\n\n if (typeof value === 'object') {\n return { t: SerializerType.Object, v: value };\n }\n\n // Fallback to string\n return { t: SerializerType.String, v: String(value) };\n}\n\nexport function deserializer(serialized: SerializedValue): any {\n switch (serialized.t) {\n case SerializerType.Null:\n return null;\n case SerializerType.Undefined:\n return undefined;\n case SerializerType.String:\n return serialized.v;\n case SerializerType.Number:\n return serialized.v;\n case SerializerType.Boolean:\n return serialized.v;\n case SerializerType.BigInt:\n return BigInt(serialized.v);\n case SerializerType.Date:\n return new Date(serialized.v);\n case SerializerType.Array:\n return serialized.v;\n case SerializerType.Map:\n return new Map(serialized.v);\n case SerializerType.Set:\n return new Set(serialized.v);\n case SerializerType.Buffer:\n return Buffer.from(serialized.v, 'base64');\n case SerializerType.RegExp:\n return new RegExp(serialized.v.source, serialized.v.flags);\n case SerializerType.Object:\n return serialized.v;\n default:\n return serialized.v;\n }\n}\n"],"mappings":";;;AAOA,SAAgB,WAAW,OAA6B;AACtD,KAAI,UAAU,KACZ,QAAO;EAAE,GAAG,iCAAe;EAAM,GAAG;EAAM;AAG5C,KAAI,UAAU,OACZ,QAAO;EAAE,GAAG,iCAAe;EAAW,GAAG;EAAW;AAGtD,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG;EAAO;AAG/C,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG;EAAO;AAG/C,KAAI,OAAO,UAAU,UACnB,QAAO;EAAE,GAAG,iCAAe;EAAS,GAAG;EAAO;AAGhD,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG,MAAM,UAAU;EAAE;AAG1D,KAAI,iBAAiB,KACnB,QAAO;EAAE,GAAG,iCAAe;EAAM,GAAG,MAAM,aAAa;EAAE;AAG3D,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO;EAAE,GAAG,iCAAe;EAAO,GAAG;EAAO;AAG9C,KAAI,iBAAiB,IACnB,QAAO;EAAE,GAAG,iCAAe;EAAK,GAAG,MAAM,KAAK,MAAM,SAAS,CAAC;EAAE;AAGlE,KAAI,iBAAiB,IACnB,QAAO;EAAE,GAAG,iCAAe;EAAK,GAAG,MAAM,KAAK,MAAM;EAAE;AAGxD,KAAI,OAAO,SAAS,MAAM,CACxB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG,MAAM,SAAS,SAAS;EAAE;AAGlE,KAAI,iBAAiB,OACnB,QAAO;EACL,GAAG,iCAAe;EAClB,GAAG;GAAE,QAAQ,MAAM;GAAQ,OAAO,MAAM;GAAO;EAChD;AAGH,KAAI,OAAO,UAAU,SACnB,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG;EAAO;AAI/C,QAAO;EAAE,GAAG,iCAAe;EAAQ,GAAG,OAAO,MAAM;EAAE;;AAGvD,SAAgB,aAAa,YAAkC;AAC7D,SAAQ,WAAW,GAAnB;EACE,KAAK,iCAAe,KAClB,QAAO;EACT,KAAK,iCAAe,UAClB;EACF,KAAK,iCAAe,OAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,OAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,QAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,OAClB,QAAO,OAAO,WAAW,EAAE;EAC7B,KAAK,iCAAe,KAClB,QAAO,IAAI,KAAK,WAAW,EAAE;EAC/B,KAAK,iCAAe,MAClB,QAAO,WAAW;EACpB,KAAK,iCAAe,IAClB,QAAO,IAAI,IAAI,WAAW,EAAE;EAC9B,KAAK,iCAAe,IAClB,QAAO,IAAI,IAAI,WAAW,EAAE;EAC9B,KAAK,iCAAe,OAClB,QAAO,OAAO,KAAK,WAAW,GAAG,SAAS;EAC5C,KAAK,iCAAe,OAClB,QAAO,IAAI,OAAO,WAAW,EAAE,QAAQ,WAAW,EAAE,MAAM;EAC5D,KAAK,iCAAe,OAClB,QAAO,WAAW;EACpB,QACE,QAAO,WAAW"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SerializerType } from "./constants-
|
|
1
|
+
import { SerializerType } from "./constants-CCFSX2NG.js";
|
|
2
2
|
|
|
3
3
|
//#region src/kv/serde.d.ts
|
|
4
4
|
interface SerializedValue {
|
|
@@ -9,4 +9,4 @@ declare function serializer(value: any): SerializedValue;
|
|
|
9
9
|
declare function deserializer(serialized: SerializedValue): any;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { SerializedValue, deserializer, serializer };
|
|
12
|
-
//# sourceMappingURL=serde-
|
|
12
|
+
//# sourceMappingURL=serde-D4H23l2F.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-checker-
|
|
1
|
+
{"version":3,"file":"type-checker-BckhTCQ9.js","names":[],"sources":["../src/cli/type-checker.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { loadTypeScript } from './common';\nimport { join, relative } from 'node:path';\nimport colors from '../utils/colors';\n\nconst TS_NOT_FOUND_ERR = `TypeScript must be installed in order to use the type checker. Please install it using \\`npm install typescript\\` or \\`yarn add typescript\\``;\n\n/**\n * Formats a TypeScript diagnostic message in a pretty, readable format\n * @private\n * @internal\n */\nfunction formatDiagnostic(\n ts: typeof import('typescript'),\n diagnostic: import('typescript').Diagnostic,\n cwd: string,\n): string {\n const messageText = ts.flattenDiagnosticMessageText(\n diagnostic.messageText,\n '\\n',\n );\n\n if (!diagnostic.file) {\n return `${colors.red('error')}: ${messageText}`;\n }\n\n const { line, character } = ts.getLineAndCharacterOfPosition(\n diagnostic.file,\n diagnostic.start!,\n );\n const fileName = relative(cwd, diagnostic.file.fileName);\n const position = `${line + 1}:${character + 1}`;\n const errorCode = diagnostic.code ? `TS${diagnostic.code}` : '';\n\n // Format the error message nicely\n return [\n `${colors.bold(colors.cyan(fileName))}:${colors.bold(colors.yellow(position))} - ${colors.red('error')} ${colors.gray(errorCode)}`,\n `${messageText}`,\n ].join('\\n');\n}\n\n/**\n * Performs a type check on the project using TypeScript.\n * @param path The project root or cwd\n * @private\n * @internal\n */\nexport async function performTypeCheck(path: string) {\n const tsconfigPath = join(path, 'tsconfig.json');\n\n if (!existsSync(tsconfigPath)) return;\n\n const ts = await loadTypeScript(TS_NOT_FOUND_ERR);\n\n // Format host for error reporting\n const formatHost = {\n getCanonicalFileName: (path: string) => path,\n getCurrentDirectory: ts.sys.getCurrentDirectory,\n getNewLine: () => ts.sys.newLine,\n };\n\n // Read tsconfig.json\n const configFile = ts.readConfigFile(tsconfigPath, ts.sys.readFile);\n\n if (configFile.error) {\n console.error(\n colors.red(\n `Error reading tsconfig.json: ${ts.formatDiagnostic(configFile.error, formatHost)}`,\n ),\n );\n process.exit(1);\n }\n\n // Parse the config file\n const parsedConfig = ts.parseJsonConfigFileContent(\n configFile.config,\n ts.sys,\n path,\n );\n\n // Force noEmit to true as we only want type checking\n parsedConfig.options.noEmit = true;\n\n // Create a program\n const program = ts.createProgram({\n rootNames: parsedConfig.fileNames,\n options: parsedConfig.options,\n projectReferences: parsedConfig.projectReferences,\n });\n\n // Get the diagnostics\n const diagnostics = [\n ...program.getOptionsDiagnostics(),\n ...program.getGlobalDiagnostics(),\n ...program.getSyntacticDiagnostics(),\n ...program.getSemanticDiagnostics(),\n ];\n\n // Report any errors\n if (diagnostics.length > 0) {\n console.log('');\n console.error(\n colors.bold(\n colors.red('Type checking failed with the following errors:'),\n ),\n );\n console.log('');\n\n // Group diagnostics by file for better readability\n const byFile = new Map<string, import('typescript').Diagnostic[]>();\n\n for (const diagnostic of diagnostics) {\n const fileName = diagnostic.file ? diagnostic.file.fileName : 'Global';\n if (!byFile.has(fileName)) {\n byFile.set(fileName, []);\n }\n byFile.get(fileName)!.push(diagnostic);\n }\n\n // Pretty-print each diagnostic\n const totalErrors = diagnostics.length;\n let counter = 0;\n\n for (const [_, fileDiags] of byFile) {\n for (const diagnostic of fileDiags) {\n counter++;\n console.log(formatDiagnostic(ts, diagnostic, path));\n // Add separator between errors for better readability, except for the last one\n if (counter < totalErrors) {\n console.log('');\n }\n }\n }\n\n console.log('');\n console.error(\n colors.bold(\n colors.red(`Found ${totalErrors} error${totalErrors > 1 ? 's' : ''}`),\n ),\n );\n console.log('');\n\n process.exit(1);\n }\n\n console.log(colors.green('✓ Type checking completed successfully.'));\n}\n"],"mappings":";;;;;;;;;AAKA,MAAM,mBAAmB;;;;;;AAOzB,SAAS,iBACT,IACA,YACA,KACS;CACP,MAAM,cAAc,GAAG,6BACrB,WAAW,aACX,KACD;AAED,KAAI,CAAC,WAAW,KACd,QAAO,GAAG,8BAAO,IAAI,QAAQ,CAAC,IAAI;CAGpC,MAAM,EAAE,MAAM,cAAc,GAAG,8BAC7B,WAAW,MACX,WAAW,MACZ;CACD,MAAM,mCAAoB,KAAK,WAAW,KAAK,SAAS;CACxD,MAAM,WAAW,GAAG,OAAO,EAAE,GAAG,YAAY;CAC5C,MAAM,YAAY,WAAW,OAAO,KAAK,WAAW,SAAS;AAG7D,QAAO,CACP,GAAG,8BAAO,KAAK,8BAAO,KAAK,SAAS,CAAC,CAAC,GAAG,8BAAO,KAAK,8BAAO,OAAO,SAAS,CAAC,CAAC,KAAK,8BAAO,IAAI,QAAQ,CAAC,GAAG,8BAAO,KAAK,UAAU,IAChI,GAAG,cAAc,CACjB,KAAK,KAAK;;;;;;;;AASZ,eAAsB,iBAAiB,MAAc;CACnD,MAAM,mCAAoB,MAAM,gBAAgB;AAEhD,KAAI,yBAAY,aAAa,CAAE;CAE/B,MAAM,KAAK,MAAM,8BAAe,iBAAiB;CAGjD,MAAM,aAAa;EACjB,uBAAuB,WAAiB;EACxC,qBAAqB,GAAG,IAAI;EAC5B,kBAAkB,GAAG,IAAI;EAC1B;CAGD,MAAM,aAAa,GAAG,eAAe,cAAc,GAAG,IAAI,SAAS;AAEnE,KAAI,WAAW,OAAO;AACpB,UAAQ,MACN,8BAAO,IACL,gCAAgC,GAAG,iBAAiB,WAAW,OAAO,WAAW,GAClF,CACF;AACD,UAAQ,KAAK,EAAE;;CAIjB,MAAM,eAAe,GAAG,2BACtB,WAAW,QACX,GAAG,KACH,KACD;AAGD,cAAa,QAAQ,SAAS;CAG9B,MAAM,UAAU,GAAG,cAAc;EAC/B,WAAW,aAAa;EACxB,SAAS,aAAa;EACtB,mBAAmB,aAAa;EACjC,CAAC;CAGF,MAAM,cAAc;EACpB,GAAG,QAAQ,uBAAuB;EAClC,GAAG,QAAQ,sBAAsB;EACjC,GAAG,QAAQ,yBAAyB;EACpC,GAAG,QAAQ,wBAAwB;EAAC;AAIpC,KAAI,YAAY,SAAS,GAAG;AAC1B,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI,kDAAkD,CAC9D,CACF;AACD,UAAQ,IAAI,GAAG;EAGf,MAAM,yBAAS,IAAI,KAAgD;AAEnE,OAAK,MAAM,cAAc,aAAa;GACpC,MAAM,WAAW,WAAW,OAAO,WAAW,KAAK,WAAW;AAC9D,OAAI,CAAC,OAAO,IAAI,SAAS,CACvB,QAAO,IAAI,UAAU,EAAE,CAAC;AAE1B,UAAO,IAAI,SAAS,CAAE,KAAK,WAAW;;EAIxC,MAAM,cAAc,YAAY;EAChC,IAAI,UAAU;AAEd,OAAK,MAAM,CAAC,GAAG,cAAc,OAC3B,MAAK,MAAM,cAAc,WAAW;AAClC;AACA,WAAQ,IAAI,iBAAiB,IAAI,YAAY,KAAK,CAAC;AAEnD,OAAI,UAAU,YACZ,SAAQ,IAAI,GAAG;;AAKrB,UAAQ,IAAI,GAAG;AACf,UAAQ,MACN,8BAAO,KACL,8BAAO,IAAI,SAAS,YAAY,QAAQ,cAAc,IAAI,MAAM,KAAK,CACtE,CACF;AACD,UAAQ,IAAI,GAAG;AAEf,UAAQ,KAAK,EAAE;;AAGjB,SAAQ,IAAI,8BAAO,MAAM,0CAA0C,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandContext, CommandData, CommandKitOptions, CommandMetadata, CommandMetadataFunction, EventHandler } from "./analytics-engine-
|
|
1
|
+
import { CommandContext, CommandData, CommandKitOptions, CommandMetadata, CommandMetadataFunction, EventHandler } from "./analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "./EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "./ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "./ModalKit-Cq2ns6jv.js";
|
|
@@ -110,4 +110,4 @@ interface SimpleProxy<T extends object> {
|
|
|
110
110
|
declare function createProxy<T extends object>(target: T): SimpleProxy<T>;
|
|
111
111
|
//#endregion
|
|
112
112
|
export { JsonSerialize, SimpleProxy, buildOnly, createProxy, debounce, defer, devOnly, findAppDirectory, getCurrentDirectory, getSourceDirectories, noBuildOnly };
|
|
113
|
-
//# sourceMappingURL=utilities-
|
|
113
|
+
//# sourceMappingURL=utilities-DHcVgbhH.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandKitHMREvent, IpcMessageCommand, registerDevHooks } from "../analytics-engine-
|
|
1
|
+
import { CommandKitHMREvent, IpcMessageCommand, registerDevHooks } from "../analytics-engine-CxK2wcKt.js";
|
|
2
2
|
import "../EventInterceptor-x-R2qshQ.js";
|
|
3
3
|
import "../ButtonKit-9k4yfhYD.js";
|
|
4
4
|
import "../ModalKit-Cq2ns6jv.js";
|
package/dist/utils/dev-hooks.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../colors-DL3ucTiT.js');
|
|
2
2
|
require('../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
4
|
+
const require_commandkit = require('../commandkit-DogOm_48.js');
|
|
5
5
|
require('../warning-CszH8HeS.js');
|
|
6
6
|
require('../common-0Iw8ZeM6.js');
|
|
7
7
|
require('../common-CCx-FJI4.js');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CommandKitError, CommandKitErrorCodes, createCommandKitError, isCommandKitError, isErrorType } from "../error-codes-
|
|
1
|
+
import { CommandKitError, CommandKitErrorCodes, createCommandKitError, isCommandKitError, isErrorType } from "../error-codes-BiNRVMiV.js";
|
|
2
2
|
export { CommandKitError, CommandKitErrorCodes, createCommandKitError, isCommandKitError, isErrorType };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { toFileURL } from "../resolve-file-url-
|
|
1
|
+
import { toFileURL } from "../resolve-file-url-DFtR8jRR.js";
|
|
2
2
|
export { toFileURL };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { JsonSerialize, SimpleProxy, buildOnly, createProxy, debounce, defer, devOnly, findAppDirectory, getCurrentDirectory, getSourceDirectories, noBuildOnly } from "../utilities-
|
|
1
|
+
import { JsonSerialize, SimpleProxy, buildOnly, createProxy, debounce, defer, devOnly, findAppDirectory, getCurrentDirectory, getSourceDirectories, noBuildOnly } from "../utilities-DHcVgbhH.js";
|
|
2
2
|
export { JsonSerialize, SimpleProxy, buildOnly, createProxy, debounce, defer, devOnly, findAppDirectory, getCurrentDirectory, getSourceDirectories, noBuildOnly };
|
package/dist/utils/utilities.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../colors-DL3ucTiT.js');
|
|
2
2
|
require('../ActionRow-uJxU4UGo.js');
|
|
3
3
|
require('../error-codes-Ds0bnPvT.js');
|
|
4
|
-
const require_commandkit = require('../commandkit-
|
|
4
|
+
const require_commandkit = require('../commandkit-DogOm_48.js');
|
|
5
5
|
require('../warning-CszH8HeS.js');
|
|
6
6
|
require('../common-0Iw8ZeM6.js');
|
|
7
7
|
require('../common-CCx-FJI4.js');
|
package/dist/utils/warning.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { emitWarning, warnDeprecated, warnUnstable } from "../warning-
|
|
1
|
+
import { emitWarning, warnDeprecated, warnUnstable } from "../warning-D33CuXXQ.js";
|
|
2
2
|
export { emitWarning, warnDeprecated, warnUnstable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-
|
|
1
|
+
{"version":3,"file":"utils-DGovVwyA.js","names":[],"sources":["../src/cli/utils.ts"],"sourcesContent":["import type { Ora } from 'ora';\n\nlet ora: typeof import('ora') | undefined;\n\n/**\n * @private\n * @internal\n */\nexport async function createSpinner(text: string): Promise<Ora> {\n if (!ora) {\n ora = await import('ora');\n }\n\n return (ora.default || ora)({\n text,\n color: 'cyan',\n });\n}\n"],"mappings":";;AAEA,IAAI;;;;;AAMJ,eAAsB,cAAc,MAA4B;AAC9D,KAAI,CAAC,IACH,OAAM,MAAM,OAAO;AAGrB,SAAQ,IAAI,WAAW,KAAK;EAC1B;EACA,OAAO;EACR,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* The current version of CommandKit.
|
|
8
8
|
*/
|
|
9
|
-
const version = "1.2.0-dev.
|
|
9
|
+
const version = "1.2.0-dev.20251020125252";
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
12
|
Object.defineProperty(exports, 'version', {
|
|
@@ -15,4 +15,4 @@ Object.defineProperty(exports, 'version', {
|
|
|
15
15
|
return version;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
//# sourceMappingURL=version-
|
|
18
|
+
//# sourceMappingURL=version-D12sRXpW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-D12sRXpW.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["/**\n * @private\n */\nfunction $version(): string {\n 'use macro';\n return require('../package.json').version;\n}\n\n/**\n * The current version of CommandKit.\n */\nexport const version: string = $version();\n"],"mappings":";;;;;;;;AAWA,MAAa,UAA4B"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { version } from "./version-
|
|
1
|
+
import { version } from "./version-CUzpX6s2.js";
|
|
2
2
|
export { version };
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commandkit",
|
|
3
3
|
"description": "Beginner friendly command & event handler for Discord.js",
|
|
4
|
-
"version": "1.2.0-dev.
|
|
4
|
+
"version": "1.2.0-dev.20251020125252",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -46,7 +46,9 @@
|
|
|
46
46
|
"./mutex.cjs",
|
|
47
47
|
"./mutex.d.ts",
|
|
48
48
|
"./kv.cjs",
|
|
49
|
-
"./kv.d.ts"
|
|
49
|
+
"./kv.d.ts",
|
|
50
|
+
"./cli.cjs",
|
|
51
|
+
"./cli.d.ts"
|
|
50
52
|
],
|
|
51
53
|
"exports": {
|
|
52
54
|
".": {
|
|
@@ -143,6 +145,11 @@
|
|
|
143
145
|
"require": "./semaphore.cjs",
|
|
144
146
|
"import": "./semaphore.cjs",
|
|
145
147
|
"types": "./semaphore.d.ts"
|
|
148
|
+
},
|
|
149
|
+
"./cli": {
|
|
150
|
+
"require": "./cli.cjs",
|
|
151
|
+
"import": "./cli.cjs",
|
|
152
|
+
"types": "./cli.d.ts"
|
|
146
153
|
}
|
|
147
154
|
},
|
|
148
155
|
"repository": {
|
|
@@ -180,7 +187,7 @@
|
|
|
180
187
|
"tsx": "^4.19.2",
|
|
181
188
|
"typescript": "^5.7.3",
|
|
182
189
|
"vitest": "^3.0.5",
|
|
183
|
-
"tsconfig": "0.0.0-dev.
|
|
190
|
+
"tsconfig": "0.0.0-dev.20251020125252"
|
|
184
191
|
},
|
|
185
192
|
"engines": {
|
|
186
193
|
"node": ">=24"
|
package/dist/init-DSYckXwx.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as commander0 from "commander";
|
|
2
|
-
|
|
3
|
-
//#region src/cli/init.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Creates a command line interface for CommandKit.
|
|
7
|
-
* @param argv The arguments passed to the CLI.
|
|
8
|
-
* @param options The options passed to the CLI.
|
|
9
|
-
*/
|
|
10
|
-
declare function bootstrapCommandkitCLI(argv: string[], options?: commander0.ParseOptions | undefined): Promise<void>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { bootstrapCommandkitCLI };
|
|
13
|
-
//# sourceMappingURL=init-DSYckXwx.d.ts.map
|
package/dist/init-hoTNDwPt.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
|
-
const require_commandkit = require('./commandkit-KwTRAgZd.js');
|
|
3
|
-
const require_constants = require('./constants-CxkFFZ7p.js');
|
|
4
|
-
const require_CompilerPlugin = require('./CompilerPlugin-CZ4412Zm.js');
|
|
5
|
-
const require_types_package = require('./types-package-elMCB4mL.js');
|
|
6
|
-
const require_common = require('./common-vl9iZ7Th.js');
|
|
7
|
-
let node_fs = require("node:fs");
|
|
8
|
-
node_fs = require_chunk.__toESM(node_fs);
|
|
9
|
-
let node_path = require("node:path");
|
|
10
|
-
node_path = require_chunk.__toESM(node_path);
|
|
11
|
-
let node_fs_promises = require("node:fs/promises");
|
|
12
|
-
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
13
|
-
|
|
14
|
-
//#region src/cli/init.ts
|
|
15
|
-
/**
|
|
16
|
-
* Creates a command line interface for CommandKit.
|
|
17
|
-
* @param argv The arguments passed to the CLI.
|
|
18
|
-
* @param options The options passed to the CLI.
|
|
19
|
-
*/
|
|
20
|
-
async function bootstrapCommandkitCLI(argv, options) {
|
|
21
|
-
process.title = "CommandKit CLI";
|
|
22
|
-
const { Command } = await import("commander");
|
|
23
|
-
const { bootstrapDevelopmentServer } = await Promise.resolve().then(() => require("./cli/development.js"));
|
|
24
|
-
const { bootstrapProductionServer, createProductionBuild } = await Promise.resolve().then(() => require("./cli/production.js"));
|
|
25
|
-
const { generateCommand, generateEvent } = await Promise.resolve().then(() => require("./cli/generators.js"));
|
|
26
|
-
const { version } = await Promise.resolve().then(() => require("./version.js"));
|
|
27
|
-
const { showInformation } = await Promise.resolve().then(() => require("./cli/information.js"));
|
|
28
|
-
const { setCLIEnv } = await Promise.resolve().then(() => require("./cli/env.js"));
|
|
29
|
-
const program = new Command("commandkit");
|
|
30
|
-
program.command("dev").version(version).description("Start your bot in development mode.").option("-c, --config [path]", "Path to your commandkit config file.", "./commandkit.js").action(() => {
|
|
31
|
-
bootstrapDevelopmentServer(program.opts().config);
|
|
32
|
-
});
|
|
33
|
-
program.command("info").description("Show information about the system which can be used to report bugs.").action(async () => {
|
|
34
|
-
await showInformation();
|
|
35
|
-
});
|
|
36
|
-
program.command("start").description("Start your bot in production mode after running the build command.").option("-c, --config [path]", "Path to your commandkit config file.").action(() => {
|
|
37
|
-
bootstrapProductionServer(program.opts().config);
|
|
38
|
-
});
|
|
39
|
-
program.command("build").description("Build your project for production usage.").option("-c, --config [path]", "Path to your commandkit config file.").action(() => {
|
|
40
|
-
setCLIEnv();
|
|
41
|
-
return createProductionBuild(program.opts().config);
|
|
42
|
-
});
|
|
43
|
-
program.command("create").description("Create new files using built-in templates or custom plugin templates").argument("<template>", "The template to use (e.g. command, event, or custom plugin template)").argument("[args...]", "Additional arguments for the template").action(async (template, args) => {
|
|
44
|
-
setCLIEnv();
|
|
45
|
-
const { plugins } = await require_commandkit.loadConfigFile();
|
|
46
|
-
const runtime = new require_commandkit.CompilerPluginRuntime(plugins.filter((p) => require_CompilerPlugin.isCompilerPlugin(p)));
|
|
47
|
-
try {
|
|
48
|
-
await runtime.init();
|
|
49
|
-
const templateHandler = runtime.getTemplate(template);
|
|
50
|
-
if (!templateHandler) {
|
|
51
|
-
if (template === "command") {
|
|
52
|
-
const [name] = args;
|
|
53
|
-
if (!name) require_common.panic("Command name is required");
|
|
54
|
-
await generateCommand(name);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if (template === "event") {
|
|
58
|
-
const [name] = args;
|
|
59
|
-
if (!name) require_common.panic("Event name is required");
|
|
60
|
-
await generateEvent(name);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
require_common.panic(`Template "${template}" not found. Available templates: ${Array.from(new Set([
|
|
64
|
-
"command",
|
|
65
|
-
"event",
|
|
66
|
-
...Array.from(runtime.getTemplates().keys())
|
|
67
|
-
])).map((t) => `"${t}"`).join(", ")}`);
|
|
68
|
-
}
|
|
69
|
-
await templateHandler(args);
|
|
70
|
-
} catch (e) {
|
|
71
|
-
require_common.panic(`Failed to execute template "${template}": ${(e === null || e === void 0 ? void 0 : e.message) || e}`);
|
|
72
|
-
} finally {
|
|
73
|
-
await runtime.destroy();
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const types = (0, node_path.join)(require_constants.COMMANDKIT_CWD, "node_modules", "commandkit-types");
|
|
77
|
-
if (!(0, node_fs.existsSync)(types)) {
|
|
78
|
-
await (0, node_fs_promises.mkdir)(types, { recursive: true }).catch(() => {});
|
|
79
|
-
await require_types_package.generateTypesPackage(true).catch(() => {});
|
|
80
|
-
}
|
|
81
|
-
await program.parseAsync(argv, options);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
//#endregion
|
|
85
|
-
Object.defineProperty(exports, 'bootstrapCommandkitCLI', {
|
|
86
|
-
enumerable: true,
|
|
87
|
-
get: function () {
|
|
88
|
-
return bootstrapCommandkitCLI;
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
//# sourceMappingURL=init-hoTNDwPt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-hoTNDwPt.js","names":[],"sources":["../src/cli/init.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { mkdir } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { generateTypesPackage } from '../utils/types-package';\nimport { loadConfigFile } from '../config/loader';\nimport {\n CompilerPlugin,\n CompilerPluginRuntime,\n isCompilerPlugin,\n} from '../plugins';\nimport { panic } from './common';\nimport { COMMANDKIT_CWD } from '../utils/constants';\n\n/**\n * Creates a command line interface for CommandKit.\n * @param argv The arguments passed to the CLI.\n * @param options The options passed to the CLI.\n */\nexport async function bootstrapCommandkitCLI(\n argv: string[],\n options?: import('commander').ParseOptions | undefined,\n) {\n process.title = 'CommandKit CLI';\n\n // imports are lazily loaded when the cli is used, instead of loading it with the lib itself\n const { Command } = await import('commander');\n const { bootstrapDevelopmentServer } = await import('./development');\n const { bootstrapProductionServer, createProductionBuild } = await import(\n './production'\n );\n const { generateCommand, generateEvent } = await import('./generators');\n const { version } = await import('../version');\n const { showInformation } = await import('./information');\n const { setCLIEnv } = await import('./env');\n\n const program = new Command('commandkit');\n\n program\n .command('dev')\n .version(version)\n .description('Start your bot in development mode.')\n .option(\n '-c, --config [path]',\n 'Path to your commandkit config file.',\n './commandkit.js',\n )\n .action(() => {\n const options = program.opts();\n bootstrapDevelopmentServer(options.config);\n });\n\n program\n .command('info')\n .description(\n 'Show information about the system which can be used to report bugs.',\n )\n .action(async () => {\n await showInformation();\n });\n\n program\n .command('start')\n .description(\n 'Start your bot in production mode after running the build command.',\n )\n .option('-c, --config [path]', 'Path to your commandkit config file.')\n .action(() => {\n const options = program.opts();\n bootstrapProductionServer(options.config);\n });\n\n program\n .command('build')\n .description('Build your project for production usage.')\n .option('-c, --config [path]', 'Path to your commandkit config file.')\n .action(() => {\n setCLIEnv();\n const options = program.opts();\n return createProductionBuild(options.config);\n });\n\n program\n .command('create')\n .description(\n 'Create new files using built-in templates or custom plugin templates',\n )\n .argument(\n '<template>',\n 'The template to use (e.g. command, event, or custom plugin template)',\n )\n .argument('[args...]', 'Additional arguments for the template')\n .action(async (template, args) => {\n setCLIEnv();\n\n // Handle custom plugin templates\n const { plugins } = await loadConfigFile();\n const runtime = new CompilerPluginRuntime(\n plugins.filter((p) => isCompilerPlugin(p)) as CompilerPlugin[],\n );\n\n try {\n await runtime.init();\n const templateHandler = runtime.getTemplate(template);\n\n if (!templateHandler) {\n // Handle built-in templates\n if (template === 'command') {\n const [name] = args;\n if (!name) {\n panic('Command name is required');\n }\n await generateCommand(name);\n return;\n }\n\n if (template === 'event') {\n const [name] = args;\n if (!name) {\n panic('Event name is required');\n }\n await generateEvent(name);\n return;\n }\n\n const valid = Array.from(\n new Set([\n 'command',\n 'event',\n ...Array.from(runtime.getTemplates().keys()),\n ]),\n ).map((t) => `\"${t}\"`);\n\n panic(\n `Template \"${template}\" not found. Available templates: ${valid.join(', ')}`,\n );\n }\n\n await templateHandler(args);\n } catch (e: any) {\n panic(`Failed to execute template \"${template}\": ${e?.message || e}`);\n } finally {\n await runtime.destroy();\n }\n });\n\n const types = join(COMMANDKIT_CWD, 'node_modules', 'commandkit-types');\n\n if (!existsSync(types)) {\n await mkdir(types, { recursive: true }).catch(() => {});\n await generateTypesPackage(true).catch(() => {});\n }\n\n await program.parseAsync(argv, options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,eAAsB,uBACtB,MACA,SACA;AACE,SAAQ,QAAQ;CAGhB,MAAM,EAAE,YAAY,MAAM,OAAO;CACjC,MAAM,EAAE,+BAA+B,2CAAM;CAC7C,MAAM,EAAE,2BAA2B,0BAA0B,2CAAM;CAGnE,MAAM,EAAE,iBAAiB,kBAAkB,2CAAM;CACjD,MAAM,EAAE,YAAY,2CAAM;CAC1B,MAAM,EAAE,oBAAoB,2CAAM;CAClC,MAAM,EAAE,cAAc,2CAAM;CAE5B,MAAM,UAAU,IAAI,QAAQ,aAAa;AAEzC,SACA,QAAQ,MAAM,CACd,QAAQ,QAAQ,CAChB,YAAY,sCAAsC,CAClD,OACE,uBACA,wCACA,kBACD,CACD,aAAa;AAEX,6BADgB,QAAQ,MAAM,CACK,OAAO;GAC1C;AAEF,SACA,QAAQ,OAAO,CACf,YACE,sEACD,CACD,OAAO,YAAY;AACjB,QAAM,iBAAiB;GACvB;AAEF,SACA,QAAQ,QAAQ,CAChB,YACE,qEACD,CACD,OAAO,uBAAuB,uCAAuC,CACrE,aAAa;AAEX,4BADgB,QAAQ,MAAM,CACI,OAAO;GACzC;AAEF,SACA,QAAQ,QAAQ,CAChB,YAAY,2CAA2C,CACvD,OAAO,uBAAuB,uCAAuC,CACrE,aAAa;AACX,aAAW;AAEX,SAAO,sBADS,QAAQ,MAAM,CACO,OAAO;GAC5C;AAEF,SACA,QAAQ,SAAS,CACjB,YACE,uEACD,CACD,SACE,cACA,uEACD,CACD,SAAS,aAAa,wCAAwC,CAC9D,OAAO,OAAO,UAAU,SAAS;AAC/B,aAAW;EAGX,MAAM,EAAE,YAAY,MAAM,mCAAgB;EAC1C,MAAM,UAAU,IAAI,yCAClB,QAAQ,QAAQ,MAAM,wCAAiB,EAAE,CAAC,CAC3C;AAED,MAAI;AACF,SAAM,QAAQ,MAAM;GACpB,MAAM,kBAAkB,QAAQ,YAAY,SAAS;AAErD,OAAI,CAAC,iBAAiB;AAEpB,QAAI,aAAa,WAAW;KAC1B,MAAM,CAAC,QAAQ;AACf,SAAI,CAAC,KACH,sBAAM,2BAA2B;AAEnC,WAAM,gBAAgB,KAAK;AAC3B;;AAGF,QAAI,aAAa,SAAS;KACxB,MAAM,CAAC,QAAQ;AACf,SAAI,CAAC,KACH,sBAAM,yBAAyB;AAEjC,WAAM,cAAc,KAAK;AACzB;;AAWF,yBACE,aAAa,SAAS,oCATV,MAAM,KAClB,IAAI,IAAI;KACR;KACA;KACA,GAAG,MAAM,KAAK,QAAQ,cAAc,CAAC,MAAM,CAAC;KAAC,CAC5C,CACF,CAAC,KAAK,MAAM,IAAI,EAAE,GAAG,CAG4C,KAAK,KAAK,GAC3E;;AAGH,SAAM,gBAAgB,KAAK;WACpB,GAAQ;AACf,wBAAM,+BAA+B,SAAS,4CAAK,EAAG,YAAW,IAAI;YAC7D;AACR,SAAM,QAAQ,SAAS;;GAEzB;CAEF,MAAM,4BAAa,kCAAgB,gBAAgB,mBAAmB;AAEtE,KAAI,yBAAY,MAAM,EAAE;AACtB,oCAAY,OAAO,EAAE,WAAW,MAAM,CAAC,CAAC,YAAY,GAAG;AACvD,QAAM,2CAAqB,KAAK,CAAC,YAAY,GAAG;;AAGlD,OAAM,QAAQ,WAAW,MAAM,QAAQ"}
|