commandkit 0.1.5-dev.20231004064050 → 0.1.5
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/index.js +5 -9
- package/dist/index.mjs +5 -9
- package/package.json +47 -47
package/dist/index.js
CHANGED
|
@@ -512,21 +512,17 @@ var CommandHandler = class {
|
|
|
512
512
|
const modulePath = toFileURL(commandFilePath);
|
|
513
513
|
let importedObj = await import(`${modulePath}?t=${Date.now()}`);
|
|
514
514
|
let commandObj = clone(importedObj);
|
|
515
|
-
if (importedObj.default) {
|
|
516
|
-
commandObj.data = importedObj.default.data;
|
|
517
|
-
} else {
|
|
518
|
-
commandObj.data = importedObj.data;
|
|
519
|
-
}
|
|
520
|
-
try {
|
|
521
|
-
commandObj.data = commandObj.data.toJSON();
|
|
522
|
-
} catch (error) {
|
|
523
|
-
}
|
|
524
515
|
if (typeof module !== "undefined" && typeof require !== "undefined") {
|
|
525
516
|
delete require.cache[require.resolve(commandFilePath)];
|
|
526
517
|
}
|
|
527
518
|
const compactFilePath = commandFilePath.split(process.cwd())[1] || commandFilePath;
|
|
528
519
|
if (commandObj.default)
|
|
529
520
|
commandObj = commandObj.default;
|
|
521
|
+
if (importedObj.default) {
|
|
522
|
+
commandObj.data = importedObj.default.data;
|
|
523
|
+
} else {
|
|
524
|
+
commandObj.data = importedObj.data;
|
|
525
|
+
}
|
|
530
526
|
if (!commandObj.data) {
|
|
531
527
|
console.log(
|
|
532
528
|
colors_default.yellow(
|
package/dist/index.mjs
CHANGED
|
@@ -482,21 +482,17 @@ var CommandHandler = class {
|
|
|
482
482
|
const modulePath = toFileURL(commandFilePath);
|
|
483
483
|
let importedObj = await import(`${modulePath}?t=${Date.now()}`);
|
|
484
484
|
let commandObj = clone(importedObj);
|
|
485
|
-
if (importedObj.default) {
|
|
486
|
-
commandObj.data = importedObj.default.data;
|
|
487
|
-
} else {
|
|
488
|
-
commandObj.data = importedObj.data;
|
|
489
|
-
}
|
|
490
|
-
try {
|
|
491
|
-
commandObj.data = commandObj.data.toJSON();
|
|
492
|
-
} catch (error) {
|
|
493
|
-
}
|
|
494
485
|
if (typeof module !== "undefined" && typeof __require !== "undefined") {
|
|
495
486
|
delete __require.cache[__require.resolve(commandFilePath)];
|
|
496
487
|
}
|
|
497
488
|
const compactFilePath = commandFilePath.split(process.cwd())[1] || commandFilePath;
|
|
498
489
|
if (commandObj.default)
|
|
499
490
|
commandObj = commandObj.default;
|
|
491
|
+
if (importedObj.default) {
|
|
492
|
+
commandObj.data = importedObj.default.data;
|
|
493
|
+
} else {
|
|
494
|
+
commandObj.data = importedObj.data;
|
|
495
|
+
}
|
|
500
496
|
if (!commandObj.data) {
|
|
501
497
|
console.log(
|
|
502
498
|
colors_default.yellow(
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
"name": "commandkit",
|
|
3
|
+
"description": "Beginner friendly command & event handler for Discord.js",
|
|
4
|
+
"version": "0.1.5",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"lint": "tsc",
|
|
18
|
+
"dev": "tsup --watch",
|
|
19
|
+
"build": "tsup",
|
|
20
|
+
"deploy": "npm publish",
|
|
21
|
+
"deploy-dev": "npm publish --access public --tag dev",
|
|
22
|
+
"test": "tsx tests/index.ts",
|
|
23
|
+
"test:watch": "tsx watch tests/index.ts"
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"url": "git+https://github.com/underctrl-io/commandkit.git"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://commandkit.js.org",
|
|
29
|
+
"keywords": [
|
|
30
|
+
"discord.js",
|
|
31
|
+
"command handler",
|
|
32
|
+
"event handler"
|
|
33
|
+
],
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"rfdc": "^1.3.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^20.5.9",
|
|
39
|
+
"discord.js": "^14.13.0",
|
|
40
|
+
"dotenv": "^16.3.1",
|
|
41
|
+
"tsconfig": "workspace:*",
|
|
42
|
+
"tsup": "^7.2.0",
|
|
43
|
+
"tsx": "^3.12.8",
|
|
44
|
+
"typescript": "^5.1.6"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"discord.js": "^14"
|
|
14
48
|
}
|
|
15
|
-
|
|
16
|
-
"scripts": {
|
|
17
|
-
"lint": "tsc",
|
|
18
|
-
"dev": "tsup --watch",
|
|
19
|
-
"build": "tsup",
|
|
20
|
-
"deploy": "npm publish",
|
|
21
|
-
"deploy-dev": "npm publish --access public --tag dev",
|
|
22
|
-
"test": "tsx tests/index.ts",
|
|
23
|
-
"test:watch": "tsx watch tests/index.ts"
|
|
24
|
-
},
|
|
25
|
-
"repository": {
|
|
26
|
-
"url": "git+https://github.com/underctrl-io/commandkit.git"
|
|
27
|
-
},
|
|
28
|
-
"homepage": "https://commandkit.js.org",
|
|
29
|
-
"keywords": [
|
|
30
|
-
"discord.js",
|
|
31
|
-
"command handler",
|
|
32
|
-
"event handler"
|
|
33
|
-
],
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"rfdc": "^1.3.0"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@types/node": "^20.5.9",
|
|
39
|
-
"discord.js": "^14.13.0",
|
|
40
|
-
"dotenv": "^16.3.1",
|
|
41
|
-
"tsconfig": "workspace:*",
|
|
42
|
-
"tsup": "^7.2.0",
|
|
43
|
-
"tsx": "^3.12.8",
|
|
44
|
-
"typescript": "^5.1.6"
|
|
45
|
-
},
|
|
46
|
-
"peerDependencies": {
|
|
47
|
-
"discord.js": "^14"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
49
|
+
}
|