meocord 1.0.3 → 1.0.4
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.
|
@@ -16,11 +16,9 @@
|
|
|
16
16
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
import 'reflect-metadata';
|
|
19
|
-
import { type
|
|
19
|
+
import { type ServiceIdentifier } from 'inversify';
|
|
20
20
|
import { MeoCordApp } from '../core/meocord.app.js';
|
|
21
|
-
type ServiceIdentifier = interfaces.ServiceIdentifier;
|
|
22
21
|
export declare class MeoCordFactory {
|
|
23
22
|
private static logger;
|
|
24
23
|
static create(target: ServiceIdentifier): MeoCordApp;
|
|
25
24
|
}
|
|
26
|
-
export {};
|
|
@@ -16,9 +16,8 @@
|
|
|
16
16
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
import 'reflect-metadata';
|
|
19
|
-
import { Container, type
|
|
19
|
+
import { Container, type ServiceIdentifier } from 'inversify';
|
|
20
20
|
import { type ActivityOptions, type ClientOptions } from 'discord.js';
|
|
21
|
-
type ServiceIdentifier = interfaces.ServiceIdentifier;
|
|
22
21
|
/** The main Inversify container for managing dependencies. */
|
|
23
22
|
export declare const mainContainer: Container;
|
|
24
23
|
/**
|
|
@@ -60,4 +59,3 @@ export declare function MeoCord(options: {
|
|
|
60
59
|
activities?: ActivityOptions[];
|
|
61
60
|
services?: ServiceIdentifier[];
|
|
62
61
|
}): (target: any) => void;
|
|
63
|
-
export {};
|
|
@@ -78,4 +78,4 @@ var b=Reflect.getMetadata("design:paramtypes",a)||[];b.forEach(function(a){mainC
|
|
|
78
78
|
* ```
|
|
79
79
|
*/export function UseGuard(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c,d){var e=d.value;// TypeScript: Enforce that the first argument is an Interaction
|
|
80
80
|
// Store guard metadata for later access (if needed)
|
|
81
|
-
d.value=/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var a,d,f,g,h,i,j,k,l,m,n,o=arguments;return _regeneratorRuntime().wrap(function _callee$(p){for(;1;)switch(p.prev=p.next){case 0:for(a=o.length,d=Array(a),f=0;f<a;f++)d[f]=o[f];if(d[0]instanceof BaseInteraction){p.next=3;break}throw new Error("The first argument of ".concat(c+""," must be an instance of Interaction."));case 3:g=0,h=b;case 4:if(!(g<h.length)){p.next=18;break}if(j=h[g],k=void 0,isGuardWithParams(j)?(l=j.provide,m=j.params,k=mainContainer.
|
|
81
|
+
d.value=/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var a,d,f,g,h,i,j,k,l,m,n,o=arguments;return _regeneratorRuntime().wrap(function _callee$(p){for(;1;)switch(p.prev=p.next){case 0:for(a=o.length,d=Array(a),f=0;f<a;f++)d[f]=o[f];if(d[0]instanceof BaseInteraction){p.next=3;break}throw new Error("The first argument of ".concat(c+""," must be an instance of Interaction."));case 3:g=0,h=b;case 4:if(!(g<h.length)){p.next=18;break}if(j=h[g],k=void 0,isGuardWithParams(j)?(l=j.provide,m=j.params,k=mainContainer.get(l,{autobind:!0}),Object.assign(k,m)):k=mainContainer.get(j,{autobind:!0}),k.canActivate){p.next=10;break}throw new Error("Guard ".concat(j.constructor.name," applied to ").concat(c+""," does not have a valid canActivate method."));case 10:return p.next=12,(i=k).canActivate.apply(i,d);case 12:if(n=p.sent,n){p.next=15;break}return p.abrupt("return");case 15:g++,p.next=4;break;case 18:return p.abrupt("return",e.apply(this,d));case 19:case"end":return p.stop()}},_callee,this)})),Reflect.defineMetadata("guards",b,a,c)}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meocord",
|
|
3
3
|
"description": "MeoCord is a lightweight and modular framework for building scalable Discord bots using TypeScript and Discord.js. It simplifies bot development with an extensible architecture, TypeScript-first approach, and powerful CLI tools.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"packageManager": "yarn@4.7.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
@@ -59,29 +59,29 @@
|
|
|
59
59
|
],
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@babel/cli": "^7.26.4",
|
|
62
|
-
"@babel/core": "^7.26.
|
|
62
|
+
"@babel/core": "^7.26.10",
|
|
63
63
|
"@babel/preset-env": "^7.26.9",
|
|
64
64
|
"@babel/preset-typescript": "^7.26.0",
|
|
65
|
-
"@eslint/js": "^9.
|
|
65
|
+
"@eslint/js": "^9.22.0",
|
|
66
66
|
"@types/copyfiles": "^2.4.4",
|
|
67
67
|
"@types/lodash-es": "^4.17.12",
|
|
68
68
|
"@types/webpack-node-externals": "^3.0.4",
|
|
69
|
-
"@typescript-eslint/parser": "^8.
|
|
69
|
+
"@typescript-eslint/parser": "^8.27.0",
|
|
70
70
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
71
71
|
"babel-preset-minify": "^0.5.2",
|
|
72
72
|
"copyfiles": "^2.4.1",
|
|
73
|
-
"eslint": "^9.
|
|
74
|
-
"eslint-config-prettier": "^10.
|
|
73
|
+
"eslint": "^9.22.0",
|
|
74
|
+
"eslint-config-prettier": "^10.1.1",
|
|
75
75
|
"eslint-plugin-headers": "^1.2.1",
|
|
76
76
|
"eslint-plugin-import": "^2.31.0",
|
|
77
77
|
"eslint-plugin-prettier": "^5.2.3",
|
|
78
78
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
79
79
|
"globals": "^16.0.0",
|
|
80
80
|
"husky": "^9.1.7",
|
|
81
|
-
"prettier": "^3.5.
|
|
82
|
-
"tsc-alias": "^1.8.
|
|
83
|
-
"typescript": "^5.
|
|
84
|
-
"typescript-eslint": "^8.
|
|
81
|
+
"prettier": "^3.5.3",
|
|
82
|
+
"tsc-alias": "^1.8.11",
|
|
83
|
+
"typescript": "^5.8.2",
|
|
84
|
+
"typescript-eslint": "^8.27.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"discord.js": "^14.17.3",
|
|
@@ -95,13 +95,13 @@
|
|
|
95
95
|
"discord.js": "^14.18.0",
|
|
96
96
|
"dotenv": "^16.4.7",
|
|
97
97
|
"file-loader": "^6.2.0",
|
|
98
|
-
"inversify": "^
|
|
98
|
+
"inversify": "^7.1.0",
|
|
99
99
|
"lodash-es": "^4.17.21",
|
|
100
100
|
"nodemon": "^3.1.9",
|
|
101
101
|
"raw-loader": "^4.0.2",
|
|
102
102
|
"reflect-metadata": "^0.2.2",
|
|
103
103
|
"simple-git": "^3.27.0",
|
|
104
|
-
"terser-webpack-plugin": "^5.3.
|
|
104
|
+
"terser-webpack-plugin": "^5.3.14",
|
|
105
105
|
"ts-loader": "^9.5.2",
|
|
106
106
|
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
|
107
107
|
"webpack": "^5.98.0",
|