necord 6.1.6 → 6.1.7-dev.1695862427.44ff91d
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.
|
@@ -7,7 +7,7 @@ function createOptionDecorator(type, resolver) {
|
|
|
7
7
|
// @ts-ignore
|
|
8
8
|
return (data) => {
|
|
9
9
|
return (target, propertyKey) => {
|
|
10
|
-
let metadata = Reflect.
|
|
10
|
+
let metadata = Reflect.getOwnMetadata(exports.OPTIONS_METADATA, target);
|
|
11
11
|
if (!metadata) {
|
|
12
12
|
metadata = {};
|
|
13
13
|
}
|
|
@@ -17,8 +17,13 @@ exports.Options = (0, common_1.createParamDecorator)((_, context) => {
|
|
|
17
17
|
}, [
|
|
18
18
|
(target, propertyKey, parameterIndex) => {
|
|
19
19
|
const paramTypes = Reflect.getMetadata('design:paramtypes', target, propertyKey);
|
|
20
|
-
|
|
21
|
-
const options =
|
|
20
|
+
let { prototype } = paramTypes[parameterIndex];
|
|
21
|
+
const options = {};
|
|
22
|
+
do {
|
|
23
|
+
const metadata = Reflect.getOwnMetadata(option_util_1.OPTIONS_METADATA, prototype);
|
|
24
|
+
Object.assign(options, metadata);
|
|
25
|
+
} while ((prototype = Reflect.getPrototypeOf(prototype)) &&
|
|
26
|
+
prototype !== Object.prototype);
|
|
22
27
|
Reflect.defineMetadata(option_util_1.OPTIONS_METADATA, options, target[propertyKey]);
|
|
23
28
|
}
|
|
24
29
|
]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "necord",
|
|
3
3
|
"description": "A module for creating Discord bots using NestJS, based on Discord.js",
|
|
4
|
-
"version": "6.1.
|
|
4
|
+
"version": "6.1.7-dev.1695862427.44ff91d",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "rimraf dist && tsc -p tsconfig.build.json",
|
|
7
7
|
"prepublish:npm": "npm run build",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@nestjs/common": "10.2.6",
|
|
62
62
|
"@nestjs/core": "10.2.6",
|
|
63
63
|
"@types/node": "20.7.0",
|
|
64
|
-
"@typescript-eslint/eslint-plugin": "6.7.
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "6.7.3",
|
|
65
65
|
"@typescript-eslint/parser": "6.7.3",
|
|
66
66
|
"discord-api-types": "0.37.58",
|
|
67
67
|
"discord.js": "14.13.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"prettier": "3.0.3",
|
|
74
74
|
"reflect-metadata": "0.1.13",
|
|
75
75
|
"release-it": "16.2.0",
|
|
76
|
-
"rimraf": "5.0.
|
|
76
|
+
"rimraf": "5.0.5",
|
|
77
77
|
"rxjs": "7.8.1",
|
|
78
78
|
"ts-node": "10.9.1",
|
|
79
79
|
"typescript": "5.2.2"
|