zumito-framework 1.2.19 → 1.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -155,9 +155,10 @@ for link the framework to your bot, you will need to run these commands
155
155
 
156
156
  <!-- issueTable -->
157
157
 
158
- | Title | Status | Assignee | Body |
159
- | :----------------------------------------------------------------------------------------------------- | :---------------------: | :------: | :-------------------------------------------------------------------------------------------------------------------------------- |
160
- | <a href="https://github.com/ZumitoTeam/zumito-framework/issues/50">Implement scheduled task system</a> | :eight_spoked_asterisk: | | We need to implement a system that allows scheduling and automatically executing tasks at specific times or at regular intervals. |
158
+ | Title | Status | Assignee | Body |
159
+ | :------------------------------------------------------------------------------------------------------------------------------------ | :---------------------: | :------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
160
+ | <a href="https://github.com/ZumitoTeam/zumito-framework/issues/50">Implement scheduled task system</a> | :eight_spoked_asterisk: | | We need to implement a system that allows scheduling and automatically executing tasks at specific times or at regular intervals. |
161
+ | <a href="https://github.com/ZumitoTeam/zumito-framework/issues/40">[💡] Implement Dashboard for Application Monitoring and Control</a> | :eight_spoked_asterisk: | | **Problem Description:**<br />Currently, we lack a centralized system to visualize and manage the state of our application. We propose creating a dashboard that provides an intuitive web interface to monitor the bot's status, execute commands remotely, and provide detailed information about activity on the servers. This dashboard should also be scalable to add new functionalities in categories such as status, configuration, and administration options.<br /><br />... |
161
162
 
162
163
  <!-- issueTable -->
163
164
 
@@ -0,0 +1,2 @@
1
+ import 'reflect-metadata';
2
+ export declare function Injectable(): ClassDecorator;
@@ -0,0 +1,10 @@
1
+ // eslint-disable-next-line check-file/filename-naming-convention
2
+ import { ServiceContainer } from "../..";
3
+ import 'reflect-metadata';
4
+ export function Injectable() {
5
+ return function (target) {
6
+ const paramTypes = Reflect.getMetadata('design:paramtypes', target);
7
+ const paramTypeNames = paramTypes.map((paramType) => paramType.name);
8
+ ServiceContainer.addService(target, paramTypeNames);
9
+ };
10
+ }
package/dist/index.d.ts CHANGED
@@ -32,4 +32,5 @@ import { CommandManager } from './services/CommandManager.js';
32
32
  import { ErrorType } from './definitions/ErrorType.js';
33
33
  export { ModalSubmitParameters } from './definitions/parameters/ModalSubmitParameters.js';
34
34
  export { CommandBinds } from './definitions/commands/CommandBinds.js';
35
+ export { Injectable } from './definitions/decorators/Injectable.decorator.js';
35
36
  export { ZumitoFramework, FrameworkSettings, Command, Module, CommandParameters, CommandArguments, FrameworkEvent, Translation, TranslationManager, ApiResponse, SelectMenuParameters, CommandType, CommandArgDefinition, CommandChoiceDefinition, ButtonPressed, ButtonPressedParams, TextFormatter, EmojiFallback, DatabaseConfigLoader, DatabaseModel, PresenceDataRule, RuledPresenceData, StatusManagerOptions, discord, EventParameters, ServiceContainer, GuildDataGetter, SlashCommandRefresher, CommandParser, ErrorHandler, ErrorType, Route, RouteMethod, InteractionHandler, CommandManager };
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ import { Route, RouteMethod } from './definitions/Route.js';
23
23
  import { InteractionHandler } from './services/InteractionHandler.js';
24
24
  import { CommandManager } from './services/CommandManager.js';
25
25
  import { ErrorType } from './definitions/ErrorType.js';
26
+ export { Injectable } from './definitions/decorators/Injectable.decorator.js';
26
27
  ServiceContainer.addService(TextFormatter, []);
27
28
  ServiceContainer.addService(EmojiFallback, [discord.Client.name, TranslationManager.name]);
28
29
  ServiceContainer.addService(GuildDataGetter, [ZumitoFramework.name]);
@@ -2,6 +2,7 @@ import { ZumitoFramework } from "../ZumitoFramework";
2
2
  import { Command } from "../definitions/commands/Command.js";
3
3
  import { CommandLoadOptions } from "../definitions/CommandLoadOptions";
4
4
  import { ErrorHandler } from "./ErrorHandler";
5
+ import 'reflect-metadata';
5
6
  export declare class CommandManager {
6
7
  protected commands: Map<string, Command>;
7
8
  protected framework: ZumitoFramework;
@@ -8,6 +8,7 @@ import { CommandType } from "../definitions/commands/CommandType.js";
8
8
  import { ErrorHandler } from "./ErrorHandler";
9
9
  import { ServiceContainer } from "./ServiceContainer";
10
10
  import { ErrorType } from "../definitions/ErrorType";
11
+ import 'reflect-metadata';
11
12
  export class CommandManager {
12
13
  commands;
13
14
  framework;
@@ -5,6 +5,7 @@ import { TranslationManager } from "./TranslationManager";
5
5
  import { EventManager } from "./EventManager";
6
6
  import { InteractionHandlerSettings } from "@definitions/settings/InteractionHandlerSettings";
7
7
  import { ErrorHandler } from "./ErrorHandler";
8
+ import 'reflect-metadata';
8
9
  export declare class InteractionHandler {
9
10
  protected commandManager: CommandManager;
10
11
  protected guildDataGetter: GuildDataGetter;
@@ -8,6 +8,7 @@ import { TranslationManager } from "./TranslationManager";
8
8
  import { EventManager } from "./EventManager";
9
9
  import { ErrorHandler } from "./ErrorHandler";
10
10
  import { ErrorType } from "../definitions/ErrorType";
11
+ import 'reflect-metadata';
11
12
  export class InteractionHandler {
12
13
  commandManager;
13
14
  guildDataGetter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zumito-framework",
3
- "version": "1.2.19",
3
+ "version": "1.2.21",
4
4
  "description": "Discord.js bot framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,6 +33,7 @@
33
33
  "express": "^4.18.1",
34
34
  "leven": "^4.0.0",
35
35
  "mongoose": "^6.6.5",
36
+ "reflect-metadata": "^0.2.2",
36
37
  "source-fragment": "^1.1.0",
37
38
  "tingodb": "^0.6.1",
38
39
  "tseep": "^1.2.2",