reciple 10.0.1-dev.8 → 10.0.2
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 +69 -0
- package/assets/config/reciple.config.js +7 -0
- package/assets/config/reciple.config.ts +5 -0
- package/assets/global/nodemon.json +1 -0
- package/assets/templates/javascript/jsconfig.json +4 -0
- package/assets/templates/typescript/tsconfig.json +4 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.99.0 → _@oxc-project_runtime@0.110.0}/helpers/decorate.mjs +1 -1
- package/dist/bin/commands/build.mjs +1 -1
- package/dist/bin/commands/build.mjs.map +1 -1
- package/dist/bin/commands/create.mjs +3 -2
- package/dist/bin/commands/create.mjs.map +1 -1
- package/dist/bin/commands/createModule.mjs +2 -2
- package/dist/bin/commands/createModule.mjs.map +1 -1
- package/dist/bin/commands/start.mjs +27 -26
- package/dist/bin/commands/start.mjs.map +1 -1
- package/dist/bin/commands/startSharding.d.mts +18 -0
- package/dist/bin/commands/startSharding.mjs +101 -0
- package/dist/bin/commands/startSharding.mjs.map +1 -0
- package/dist/bin/reciple.mjs +0 -0
- package/dist/classes/cli/CLI.d.mts +1 -1
- package/dist/classes/cli/CLI.mjs +6 -5
- package/dist/classes/cli/CLI.mjs.map +1 -1
- package/dist/classes/cli/ConfigReader.d.mts +24 -29
- package/dist/classes/cli/ConfigReader.mjs +46 -61
- package/dist/classes/cli/ConfigReader.mjs.map +1 -1
- package/dist/classes/cli/RuntimeEnvironment.mjs +1 -1
- package/dist/classes/cli/RuntimeEnvironment.mjs.map +1 -1
- package/dist/classes/client/EventListeners.mjs +3 -2
- package/dist/classes/client/EventListeners.mjs.map +1 -1
- package/dist/classes/client/ModuleLoader.d.mts +3 -3
- package/dist/classes/client/ModuleLoader.mjs +27 -25
- package/dist/classes/client/ModuleLoader.mjs.map +1 -1
- package/dist/classes/managers/ModuleManager.mjs +5 -5
- package/dist/classes/managers/ModuleManager.mjs.map +1 -1
- package/dist/classes/modules/BaseModule.d.mts +0 -3
- package/dist/classes/modules/BaseModule.mjs +2 -4
- package/dist/classes/modules/BaseModule.mjs.map +1 -1
- package/dist/classes/modules/PostconditionModule.d.mts +1 -1
- package/dist/classes/modules/PostconditionModule.mjs +5 -5
- package/dist/classes/modules/PostconditionModule.mjs.map +1 -1
- package/dist/classes/modules/PreconditionModule.d.mts +1 -1
- package/dist/classes/modules/PreconditionModule.mjs +5 -5
- package/dist/classes/modules/PreconditionModule.mjs.map +1 -1
- package/dist/classes/modules/commands/ContextMenuCommandModule.d.mts +1 -1
- package/dist/classes/modules/commands/ContextMenuCommandModule.mjs +5 -5
- package/dist/classes/modules/commands/ContextMenuCommandModule.mjs.map +1 -1
- package/dist/classes/modules/commands/MessageCommandModule.d.mts +1 -1
- package/dist/classes/modules/commands/MessageCommandModule.mjs +5 -5
- package/dist/classes/modules/commands/MessageCommandModule.mjs.map +1 -1
- package/dist/classes/modules/commands/SlashCommandModule.d.mts +1 -1
- package/dist/classes/modules/commands/SlashCommandModule.mjs +5 -5
- package/dist/classes/modules/commands/SlashCommandModule.mjs.map +1 -1
- package/dist/classes/modules/events/EventModule.d.mts +3 -4
- package/dist/classes/modules/events/EventModule.mjs +3 -4
- package/dist/classes/modules/events/EventModule.mjs.map +1 -1
- package/dist/classes/templates/ModuleTemplateBuilder.d.mts +1 -1
- package/dist/classes/templates/ModuleTemplateBuilder.mjs +22 -22
- package/dist/classes/templates/ModuleTemplateBuilder.mjs.map +1 -1
- package/dist/classes/templates/TemplateBuilder.mjs +31 -27
- package/dist/classes/templates/TemplateBuilder.mjs.map +1 -1
- package/dist/classes/validation/BaseModuleValidator.d.mts +11 -11
- package/dist/classes/validation/CommandModuleValidator.d.mts +17 -17
- package/dist/classes/validation/EventModuleValidator.d.mts +28 -12
- package/dist/classes/validation/PostconditionModule.d.mts +9 -9
- package/dist/classes/validation/PreconditionModule.d.mts +7 -7
- package/dist/helpers/constants.d.mts +2 -4
- package/dist/helpers/constants.mjs +8 -8
- package/dist/helpers/constants.mjs.map +1 -1
- package/dist/helpers/types.d.mts +3 -1
- package/dist/index.d.mts +4 -5
- package/dist/index.mjs +3 -4
- package/dist/index.mjs.map +1 -1
- package/dist/package.mjs +18 -16
- package/dist/package.mjs.map +1 -1
- package/package.json +16 -14
- package/LICENSE +0 -155
|
@@ -3,11 +3,11 @@ import { AnyCommandModuleData } from "../../helpers/types.mjs";
|
|
|
3
3
|
import "../../index.mjs";
|
|
4
4
|
import * as _reciple_core0 from "@reciple/core";
|
|
5
5
|
import { Validator } from "@reciple/core";
|
|
6
|
-
import * as
|
|
6
|
+
import * as _sapphire_shapeshift9 from "@sapphire/shapeshift";
|
|
7
7
|
|
|
8
8
|
//#region src/classes/validation/CommandModuleValidator.d.ts
|
|
9
9
|
declare class CommandModuleValidator extends Validator {
|
|
10
|
-
static object:
|
|
10
|
+
static object: _sapphire_shapeshift9.ObjectValidator<{
|
|
11
11
|
id: string | undefined;
|
|
12
12
|
moduleType: ModuleType | undefined;
|
|
13
13
|
onEnable: Function | undefined;
|
|
@@ -16,23 +16,23 @@ declare class CommandModuleValidator extends Validator {
|
|
|
16
16
|
} & {
|
|
17
17
|
id: string;
|
|
18
18
|
type: _reciple_core0.CommandType;
|
|
19
|
-
data:
|
|
19
|
+
data: _sapphire_shapeshift9.UndefinedToOptional<{
|
|
20
20
|
name: any;
|
|
21
21
|
description: any;
|
|
22
22
|
aliases: any;
|
|
23
23
|
options: any;
|
|
24
24
|
flags: any;
|
|
25
|
-
}> |
|
|
25
|
+
}> | _sapphire_shapeshift9.UndefinedToOptional<{
|
|
26
26
|
type: any;
|
|
27
27
|
name: any;
|
|
28
28
|
}>;
|
|
29
29
|
cooldown: number | undefined;
|
|
30
|
-
preconditions:
|
|
30
|
+
preconditions: _sapphire_shapeshift9.UndefinedToOptional<{
|
|
31
31
|
id: any;
|
|
32
32
|
scope: any;
|
|
33
33
|
execute: any;
|
|
34
34
|
}>[] | undefined;
|
|
35
|
-
postconditions:
|
|
35
|
+
postconditions: _sapphire_shapeshift9.UndefinedToOptional<{
|
|
36
36
|
id: any;
|
|
37
37
|
scope: any;
|
|
38
38
|
execute: any;
|
|
@@ -40,7 +40,7 @@ declare class CommandModuleValidator extends Validator {
|
|
|
40
40
|
disabledPreconditions: string[] | undefined;
|
|
41
41
|
disabledPostconditions: string[] | undefined;
|
|
42
42
|
execute: Function;
|
|
43
|
-
},
|
|
43
|
+
}, _sapphire_shapeshift9.UndefinedToOptional<{
|
|
44
44
|
id: string | undefined;
|
|
45
45
|
moduleType: ModuleType | undefined;
|
|
46
46
|
onEnable: Function | undefined;
|
|
@@ -49,23 +49,23 @@ declare class CommandModuleValidator extends Validator {
|
|
|
49
49
|
} & {
|
|
50
50
|
id: string;
|
|
51
51
|
type: _reciple_core0.CommandType;
|
|
52
|
-
data:
|
|
52
|
+
data: _sapphire_shapeshift9.UndefinedToOptional<{
|
|
53
53
|
name: any;
|
|
54
54
|
description: any;
|
|
55
55
|
aliases: any;
|
|
56
56
|
options: any;
|
|
57
57
|
flags: any;
|
|
58
|
-
}> |
|
|
58
|
+
}> | _sapphire_shapeshift9.UndefinedToOptional<{
|
|
59
59
|
type: any;
|
|
60
60
|
name: any;
|
|
61
61
|
}>;
|
|
62
62
|
cooldown: number | undefined;
|
|
63
|
-
preconditions:
|
|
63
|
+
preconditions: _sapphire_shapeshift9.UndefinedToOptional<{
|
|
64
64
|
id: any;
|
|
65
65
|
scope: any;
|
|
66
66
|
execute: any;
|
|
67
67
|
}>[] | undefined;
|
|
68
|
-
postconditions:
|
|
68
|
+
postconditions: _sapphire_shapeshift9.UndefinedToOptional<{
|
|
69
69
|
id: any;
|
|
70
70
|
scope: any;
|
|
71
71
|
execute: any;
|
|
@@ -74,9 +74,9 @@ declare class CommandModuleValidator extends Validator {
|
|
|
74
74
|
disabledPostconditions: string[] | undefined;
|
|
75
75
|
execute: Function;
|
|
76
76
|
}>>;
|
|
77
|
-
static resolvable:
|
|
77
|
+
static resolvable: _sapphire_shapeshift9.UnionValidator<_sapphire_shapeshift9.UndefinedToOptional<{
|
|
78
78
|
toJSON: Function;
|
|
79
|
-
}> |
|
|
79
|
+
}> | _sapphire_shapeshift9.UndefinedToOptional<{
|
|
80
80
|
id: string | undefined;
|
|
81
81
|
moduleType: ModuleType | undefined;
|
|
82
82
|
onEnable: Function | undefined;
|
|
@@ -85,23 +85,23 @@ declare class CommandModuleValidator extends Validator {
|
|
|
85
85
|
} & {
|
|
86
86
|
id: string;
|
|
87
87
|
type: _reciple_core0.CommandType;
|
|
88
|
-
data:
|
|
88
|
+
data: _sapphire_shapeshift9.UndefinedToOptional<{
|
|
89
89
|
name: any;
|
|
90
90
|
description: any;
|
|
91
91
|
aliases: any;
|
|
92
92
|
options: any;
|
|
93
93
|
flags: any;
|
|
94
|
-
}> |
|
|
94
|
+
}> | _sapphire_shapeshift9.UndefinedToOptional<{
|
|
95
95
|
type: any;
|
|
96
96
|
name: any;
|
|
97
97
|
}>;
|
|
98
98
|
cooldown: number | undefined;
|
|
99
|
-
preconditions:
|
|
99
|
+
preconditions: _sapphire_shapeshift9.UndefinedToOptional<{
|
|
100
100
|
id: any;
|
|
101
101
|
scope: any;
|
|
102
102
|
execute: any;
|
|
103
103
|
}>[] | undefined;
|
|
104
|
-
postconditions:
|
|
104
|
+
postconditions: _sapphire_shapeshift9.UndefinedToOptional<{
|
|
105
105
|
id: any;
|
|
106
106
|
scope: any;
|
|
107
107
|
execute: any;
|
|
@@ -3,47 +3,63 @@ import { EventModule } from "../modules/events/EventModule.mjs";
|
|
|
3
3
|
import "../../index.mjs";
|
|
4
4
|
import { Validator } from "@reciple/core";
|
|
5
5
|
import { EventEmitter } from "node:events";
|
|
6
|
-
import * as
|
|
6
|
+
import * as _sapphire_shapeshift26 from "@sapphire/shapeshift";
|
|
7
7
|
|
|
8
8
|
//#region src/classes/validation/EventModuleValidator.d.ts
|
|
9
9
|
declare class EventModuleValidator extends Validator {
|
|
10
|
-
static emitter:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
static emitter: _sapphire_shapeshift26.InstanceValidator<EventEmitter<{
|
|
11
|
+
[x: string]: any[];
|
|
12
|
+
[x: number]: any[];
|
|
13
|
+
[x: symbol]: any[];
|
|
14
|
+
}>>;
|
|
15
|
+
static event: _sapphire_shapeshift26.StringValidator<string>;
|
|
16
|
+
static once: _sapphire_shapeshift26.UnionValidator<boolean | undefined>;
|
|
17
|
+
static onEvent: _sapphire_shapeshift26.InstanceValidator<Function>;
|
|
18
|
+
static object: _sapphire_shapeshift26.ObjectValidator<{
|
|
15
19
|
id: string | undefined;
|
|
16
20
|
moduleType: ModuleType | undefined;
|
|
17
21
|
onEnable: Function | undefined;
|
|
18
22
|
onReady: Function | undefined;
|
|
19
23
|
onDisable: Function | undefined;
|
|
20
24
|
} & {
|
|
21
|
-
emitter: EventEmitter<
|
|
25
|
+
emitter: EventEmitter<{
|
|
26
|
+
[x: string]: any[];
|
|
27
|
+
[x: number]: any[];
|
|
28
|
+
[x: symbol]: any[];
|
|
29
|
+
}>;
|
|
22
30
|
event: string;
|
|
23
31
|
once: boolean | undefined;
|
|
24
32
|
onEvent: Function;
|
|
25
|
-
},
|
|
33
|
+
}, _sapphire_shapeshift26.UndefinedToOptional<{
|
|
26
34
|
id: string | undefined;
|
|
27
35
|
moduleType: ModuleType | undefined;
|
|
28
36
|
onEnable: Function | undefined;
|
|
29
37
|
onReady: Function | undefined;
|
|
30
38
|
onDisable: Function | undefined;
|
|
31
39
|
} & {
|
|
32
|
-
emitter: EventEmitter<
|
|
40
|
+
emitter: EventEmitter<{
|
|
41
|
+
[x: string]: any[];
|
|
42
|
+
[x: number]: any[];
|
|
43
|
+
[x: symbol]: any[];
|
|
44
|
+
}>;
|
|
33
45
|
event: string;
|
|
34
46
|
once: boolean | undefined;
|
|
35
47
|
onEvent: Function;
|
|
36
48
|
}>>;
|
|
37
|
-
static resolvable:
|
|
49
|
+
static resolvable: _sapphire_shapeshift26.UnionValidator<_sapphire_shapeshift26.UndefinedToOptional<{
|
|
38
50
|
toJSON: Function;
|
|
39
|
-
}> |
|
|
51
|
+
}> | _sapphire_shapeshift26.UndefinedToOptional<{
|
|
40
52
|
id: string | undefined;
|
|
41
53
|
moduleType: ModuleType | undefined;
|
|
42
54
|
onEnable: Function | undefined;
|
|
43
55
|
onReady: Function | undefined;
|
|
44
56
|
onDisable: Function | undefined;
|
|
45
57
|
} & {
|
|
46
|
-
emitter: EventEmitter<
|
|
58
|
+
emitter: EventEmitter<{
|
|
59
|
+
[x: string]: any[];
|
|
60
|
+
[x: number]: any[];
|
|
61
|
+
[x: symbol]: any[];
|
|
62
|
+
}>;
|
|
47
63
|
event: string;
|
|
48
64
|
once: boolean | undefined;
|
|
49
65
|
onEvent: Function;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { PostconditionModule } from "../modules/PostconditionModule.mjs";
|
|
2
2
|
import { CommandPostconditionReason, CommandType, Validator } from "@reciple/core";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _sapphire_shapeshift35 from "@sapphire/shapeshift";
|
|
4
4
|
|
|
5
5
|
//#region src/classes/validation/PostconditionModule.d.ts
|
|
6
6
|
declare class PostconditionModuleValidator extends Validator {
|
|
7
|
-
static scope:
|
|
8
|
-
static accepts:
|
|
9
|
-
static execute:
|
|
10
|
-
static object:
|
|
7
|
+
static scope: _sapphire_shapeshift35.UnionValidator<CommandType[] | undefined>;
|
|
8
|
+
static accepts: _sapphire_shapeshift35.UnionValidator<CommandPostconditionReason[] | undefined>;
|
|
9
|
+
static execute: _sapphire_shapeshift35.InstanceValidator<Function>;
|
|
10
|
+
static object: _sapphire_shapeshift35.ObjectValidator<{
|
|
11
11
|
scope: CommandType[] | undefined;
|
|
12
12
|
execute: Function;
|
|
13
|
-
},
|
|
13
|
+
}, _sapphire_shapeshift35.UndefinedToOptional<{
|
|
14
14
|
scope: CommandType[] | undefined;
|
|
15
15
|
execute: Function;
|
|
16
16
|
}>>;
|
|
17
|
-
static resolvable:
|
|
17
|
+
static resolvable: _sapphire_shapeshift35.UnionValidator<_sapphire_shapeshift35.UndefinedToOptional<{
|
|
18
|
+
toJSON: Function;
|
|
19
|
+
}> | _sapphire_shapeshift35.UndefinedToOptional<{
|
|
18
20
|
scope: CommandType[] | undefined;
|
|
19
21
|
execute: Function;
|
|
20
|
-
}> | _sapphire_shapeshift0.UndefinedToOptional<{
|
|
21
|
-
toJSON: Function;
|
|
22
22
|
}>>;
|
|
23
23
|
static isValidScope(scope: unknown): asserts scope is CommandType[];
|
|
24
24
|
static isValidAccepts(accepts: unknown): asserts accepts is CommandPostconditionReason[];
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { PreconditionModule } from "../modules/PreconditionModule.mjs";
|
|
2
2
|
import { CommandType, Validator } from "@reciple/core";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _sapphire_shapeshift43 from "@sapphire/shapeshift";
|
|
4
4
|
|
|
5
5
|
//#region src/classes/validation/PreconditionModule.d.ts
|
|
6
6
|
declare class PreconditionModuleValidator extends Validator {
|
|
7
|
-
static scope:
|
|
8
|
-
static execute:
|
|
9
|
-
static object:
|
|
7
|
+
static scope: _sapphire_shapeshift43.UnionValidator<CommandType[] | undefined>;
|
|
8
|
+
static execute: _sapphire_shapeshift43.InstanceValidator<Function>;
|
|
9
|
+
static object: _sapphire_shapeshift43.ObjectValidator<{
|
|
10
10
|
scope: CommandType[] | undefined;
|
|
11
11
|
execute: Function;
|
|
12
|
-
},
|
|
12
|
+
}, _sapphire_shapeshift43.UndefinedToOptional<{
|
|
13
13
|
scope: CommandType[] | undefined;
|
|
14
14
|
execute: Function;
|
|
15
15
|
}>>;
|
|
16
|
-
static resolvable:
|
|
16
|
+
static resolvable: _sapphire_shapeshift43.UnionValidator<_sapphire_shapeshift43.UndefinedToOptional<{
|
|
17
17
|
toJSON: Function;
|
|
18
|
-
}> |
|
|
18
|
+
}> | _sapphire_shapeshift43.UndefinedToOptional<{
|
|
19
19
|
scope: CommandType[] | undefined;
|
|
20
20
|
execute: Function;
|
|
21
21
|
}>>;
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { CLI } from "../classes/cli/CLI.mjs";
|
|
2
|
-
import { PackageJson } from "@reciple/utils";
|
|
3
2
|
|
|
4
3
|
//#region src/helpers/constants.d.ts
|
|
5
|
-
|
|
6
4
|
/**
|
|
7
5
|
* @private
|
|
8
6
|
*/
|
|
9
|
-
declare const packageJSON:
|
|
7
|
+
declare const packageJSON: any;
|
|
10
8
|
declare const cli: CLI;
|
|
11
9
|
declare enum ModuleType {
|
|
12
10
|
Base = 1,
|
|
13
11
|
Command = 2,
|
|
14
12
|
Event = 3,
|
|
15
13
|
Precondition = 4,
|
|
16
|
-
Postcondition = 5
|
|
14
|
+
Postcondition = 5
|
|
17
15
|
}
|
|
18
16
|
//#endregion
|
|
19
17
|
export { ModuleType, cli, packageJSON };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CLI } from "../classes/cli/CLI.mjs";
|
|
2
|
-
import { logger } from "
|
|
2
|
+
import { logger } from "@prtty/print";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
5
|
//#region src/helpers/constants.ts
|
|
@@ -14,13 +14,13 @@ const cli = new CLI({
|
|
|
14
14
|
subcommandsDir: path.join(path.dirname(CLI.bin), "./commands"),
|
|
15
15
|
logger
|
|
16
16
|
});
|
|
17
|
-
let ModuleType = /* @__PURE__ */ function(ModuleType
|
|
18
|
-
ModuleType
|
|
19
|
-
ModuleType
|
|
20
|
-
ModuleType
|
|
21
|
-
ModuleType
|
|
22
|
-
ModuleType
|
|
23
|
-
return ModuleType
|
|
17
|
+
let ModuleType = /* @__PURE__ */ function(ModuleType) {
|
|
18
|
+
ModuleType[ModuleType["Base"] = 1] = "Base";
|
|
19
|
+
ModuleType[ModuleType["Command"] = 2] = "Command";
|
|
20
|
+
ModuleType[ModuleType["Event"] = 3] = "Event";
|
|
21
|
+
ModuleType[ModuleType["Precondition"] = 4] = "Precondition";
|
|
22
|
+
ModuleType[ModuleType["Postcondition"] = 5] = "Postcondition";
|
|
23
|
+
return ModuleType;
|
|
24
24
|
}({});
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","names":[],"sources":["../../src/helpers/constants.ts"],"sourcesContent":["import { CLI } from '../classes/cli/CLI.js';\nimport path from 'node:path';\nimport { logger } from '
|
|
1
|
+
{"version":3,"file":"constants.mjs","names":[],"sources":["../../src/helpers/constants.ts"],"sourcesContent":["import { CLI } from '../classes/cli/CLI.js';\nimport path from 'node:path';\nimport { logger } from '@prtty/print';\nimport type { PackageJson } from '@reciple/utils';\n\n/**\n * @private\n */\nexport const packageJSON = await import('../../package.json', { with: { type: 'json' } }).then(m => m.default as PackageJson);\n\nexport const cli = new CLI({\n name: packageJSON.name ?? 'reciple',\n description: packageJSON.description ?? '',\n build: packageJSON.version ?? '0.0.0',\n subcommandsDir: path.join(path.dirname(CLI.bin), './commands'),\n logger\n});\n\nexport enum ModuleType {\n Base = 1,\n Command,\n Event,\n Precondition,\n Postcondition\n}\n"],"mappings":";;;;;;;;AAQA,MAAa,cAAc,MAAM,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,QAAQ,EAAE,EAAE,MAAK,MAAK,EAAE,QAAuB;AAE7H,MAAa,MAAM,IAAI,IAAI;CACvB,MAAM,YAAY,QAAQ;CAC1B,aAAa,YAAY,eAAe;CACxC,OAAO,YAAY,WAAW;CAC9B,gBAAgB,KAAK,KAAK,KAAK,QAAQ,IAAI,IAAI,EAAE,aAAa;CAC9D;CACH,CAAC;AAEF,IAAY,kDAAL;AACH;AACA;AACA;AACA;AACA"}
|
package/dist/helpers/types.d.mts
CHANGED
|
@@ -6,6 +6,7 @@ import { PostconditionModule } from "../classes/modules/PostconditionModule.mjs"
|
|
|
6
6
|
import { PreconditionModule } from "../classes/modules/PreconditionModule.mjs";
|
|
7
7
|
import { SlashCommandModule } from "../classes/modules/commands/SlashCommandModule.mjs";
|
|
8
8
|
import { CommandType } from "@reciple/core";
|
|
9
|
+
import { ShardingManagerOptions } from "discord.js";
|
|
9
10
|
import { UserConfig } from "tsdown";
|
|
10
11
|
|
|
11
12
|
//#region src/helpers/types.d.ts
|
|
@@ -15,6 +16,7 @@ type AnyModuleData = BaseModule.Data | AnyCommandModuleData | PreconditionModule
|
|
|
15
16
|
type AnyCommandModule<T extends CommandType = CommandType> = T extends CommandType.Message ? MessageCommandModule : T extends CommandType.Slash ? SlashCommandModule : T extends CommandType.ContextMenu ? ContextMenuCommandModule : MessageCommandModule | SlashCommandModule | ContextMenuCommandModule;
|
|
16
17
|
type AnyCommandModuleData<T extends CommandType = CommandType> = T extends CommandType.Message ? MessageCommandModule.Data : T extends CommandType.Slash ? SlashCommandModule.Data : T extends CommandType.ContextMenu ? ContextMenuCommandModule.Data : MessageCommandModule.Data | SlashCommandModule.Data | ContextMenuCommandModule.Data;
|
|
17
18
|
type BuildConfig = Omit<UserConfig, 'watch' | 'skipNodeModulesBundle' | 'platform' | 'format' | 'unbundle' | 'skipNodeModulesBundle' | 'cjsDefault' | 'workspace' | 'customLogger' | 'logLevel'>;
|
|
19
|
+
type ShardingConfig = Omit<ShardingManagerOptions, 'shardArgs' | 'token' | 'execArgv'>;
|
|
18
20
|
//#endregion
|
|
19
|
-
export { AnyCommandBuilderMethods, AnyCommandModule, AnyCommandModuleData, AnyModule, AnyModuleData, BuildConfig };
|
|
21
|
+
export { AnyCommandBuilderMethods, AnyCommandModule, AnyCommandModuleData, AnyModule, AnyModuleData, BuildConfig, ShardingConfig };
|
|
20
22
|
//# sourceMappingURL=types.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { CLI } from "./classes/cli/CLI.mjs";
|
|
2
2
|
import { CLISubcommand } from "./classes/cli/CLISubcommand.mjs";
|
|
3
3
|
import { NotAnError } from "./classes/NotAnError.mjs";
|
|
4
|
-
import { ModuleType, cli, packageJSON } from "./helpers/constants.mjs";
|
|
5
4
|
import { BaseModule } from "./classes/modules/BaseModule.mjs";
|
|
5
|
+
import { ModuleType, cli, packageJSON } from "./helpers/constants.mjs";
|
|
6
6
|
import { ContextMenuCommandModule } from "./classes/modules/commands/ContextMenuCommandModule.mjs";
|
|
7
7
|
import { EventModule } from "./classes/modules/events/EventModule.mjs";
|
|
8
8
|
import { MessageCommandModule } from "./classes/modules/commands/MessageCommandModule.mjs";
|
|
9
9
|
import { PostconditionModule } from "./classes/modules/PostconditionModule.mjs";
|
|
10
10
|
import { PreconditionModule } from "./classes/modules/PreconditionModule.mjs";
|
|
11
11
|
import { SlashCommandModule } from "./classes/modules/commands/SlashCommandModule.mjs";
|
|
12
|
-
import { AnyCommandBuilderMethods, AnyCommandModule, AnyCommandModuleData, AnyModule, AnyModuleData, BuildConfig } from "./helpers/types.mjs";
|
|
12
|
+
import { AnyCommandBuilderMethods, AnyCommandModule, AnyCommandModuleData, AnyModule, AnyModuleData, BuildConfig, ShardingConfig } from "./helpers/types.mjs";
|
|
13
13
|
import { ModuleLoader } from "./classes/client/ModuleLoader.mjs";
|
|
14
14
|
import { ModuleManager } from "./classes/managers/ModuleManager.mjs";
|
|
15
15
|
import { EventListeners } from "./classes/client/EventListeners.mjs";
|
|
@@ -24,8 +24,7 @@ import { EventModuleValidator } from "./classes/validation/EventModuleValidator.
|
|
|
24
24
|
import { PostconditionModuleValidator } from "./classes/validation/PostconditionModule.mjs";
|
|
25
25
|
import { PreconditionModuleValidator } from "./classes/validation/PreconditionModule.mjs";
|
|
26
26
|
import { CommandModuleValidator } from "./classes/validation/CommandModuleValidator.mjs";
|
|
27
|
-
import
|
|
28
|
-
import { Logger } from "prtyprnt";
|
|
27
|
+
import { Logger } from "@prtty/print";
|
|
29
28
|
import { Client } from "@reciple/core";
|
|
30
29
|
export * from "@reciple/core";
|
|
31
30
|
|
|
@@ -35,5 +34,5 @@ declare global {
|
|
|
35
34
|
var useLogger: () => Logger;
|
|
36
35
|
}
|
|
37
36
|
//#endregion
|
|
38
|
-
export { AnyCommandBuilderMethods, AnyCommandModule, AnyCommandModuleData, AnyModule, AnyModuleData, BaseModule, BaseModuleValidator, BuildConfig, CLI, CLISubcommand, ClientEventModule, CommandModuleValidator, ConfigReader, ContextMenuCommandModule, EventListeners, EventModule, EventModuleValidator, MessageCommandModule, ModuleLoader, ModuleManager, ModuleTemplateBuilder, ModuleType, NotAnError, PostconditionModule, PostconditionModuleValidator, PreconditionModule, PreconditionModuleValidator,
|
|
37
|
+
export { AnyCommandBuilderMethods, AnyCommandModule, AnyCommandModuleData, AnyModule, AnyModuleData, BaseModule, BaseModuleValidator, BuildConfig, CLI, CLISubcommand, ClientEventModule, CommandModuleValidator, ConfigReader, ContextMenuCommandModule, EventListeners, EventModule, EventModuleValidator, MessageCommandModule, ModuleLoader, ModuleManager, ModuleTemplateBuilder, ModuleType, NotAnError, PostconditionModule, PostconditionModuleValidator, PreconditionModule, PreconditionModuleValidator, RESTEventModule, RuntimeEnvironment, ShardingConfig, SlashCommandModule, TemplateBuilder, cli, packageJSON };
|
|
39
38
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import { CLISubcommand } from "./classes/cli/CLISubcommand.mjs";
|
|
|
3
3
|
import { CLI } from "./classes/cli/CLI.mjs";
|
|
4
4
|
import { ConfigReader } from "./classes/cli/ConfigReader.mjs";
|
|
5
5
|
import { RuntimeEnvironment } from "./classes/cli/RuntimeEnvironment.mjs";
|
|
6
|
-
import { ModuleType, cli, packageJSON } from "./helpers/constants.mjs";
|
|
7
6
|
import { BaseModule } from "./classes/modules/BaseModule.mjs";
|
|
8
7
|
import { EventListeners } from "./classes/client/EventListeners.mjs";
|
|
8
|
+
import { ModuleType, cli, packageJSON } from "./helpers/constants.mjs";
|
|
9
9
|
import { BaseModuleValidator } from "./classes/validation/BaseModuleValidator.mjs";
|
|
10
10
|
import { PostconditionModule } from "./classes/modules/PostconditionModule.mjs";
|
|
11
11
|
import { PreconditionModule } from "./classes/modules/PreconditionModule.mjs";
|
|
@@ -23,8 +23,7 @@ import { ClientEventModule } from "./classes/modules/events/ClientEventModule.mj
|
|
|
23
23
|
import { RESTEventModule } from "./classes/modules/events/RESTEventModule.mjs";
|
|
24
24
|
import { ModuleTemplateBuilder } from "./classes/templates/ModuleTemplateBuilder.mjs";
|
|
25
25
|
import { TemplateBuilder } from "./classes/templates/TemplateBuilder.mjs";
|
|
26
|
-
import
|
|
27
|
-
import { logger } from "prtyprnt";
|
|
26
|
+
import { logger } from "@prtty/print";
|
|
28
27
|
|
|
29
28
|
export * from "@reciple/core"
|
|
30
29
|
|
|
@@ -35,5 +34,5 @@ globalThis.useClient = () => {
|
|
|
35
34
|
globalThis.useLogger = () => logger;
|
|
36
35
|
|
|
37
36
|
//#endregion
|
|
38
|
-
export { BaseModule, BaseModuleValidator, CLI, CLISubcommand, ClientEventModule, CommandModuleValidator, ConfigReader, ContextMenuCommandModule, EventListeners, EventModule, EventModuleValidator, MessageCommandModule, ModuleLoader, ModuleManager, ModuleTemplateBuilder, ModuleType, NotAnError, PostconditionModule, PostconditionModuleValidator, PreconditionModule, PreconditionModuleValidator,
|
|
37
|
+
export { BaseModule, BaseModuleValidator, CLI, CLISubcommand, ClientEventModule, CommandModuleValidator, ConfigReader, ContextMenuCommandModule, EventListeners, EventModule, EventModuleValidator, MessageCommandModule, ModuleLoader, ModuleManager, ModuleTemplateBuilder, ModuleType, NotAnError, PostconditionModule, PostconditionModuleValidator, PreconditionModule, PreconditionModuleValidator, RESTEventModule, RuntimeEnvironment, SlashCommandModule, TemplateBuilder, cli, packageJSON };
|
|
39
38
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { Client } from '@reciple/core';\nimport { logger, type Logger } from '
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { Client } from '@reciple/core';\nimport { logger, type Logger } from '@prtty/print';\n\nexport * from './classes/NotAnError.js';\n\nexport * from './classes/cli/CLI.js';\nexport * from './classes/cli/CLISubcommand.js';\nexport * from './classes/cli/ConfigReader.js';\nexport * from './classes/cli/RuntimeEnvironment.js';\n\nexport * from './classes/client/EventListeners.js';\nexport * from './classes/client/ModuleLoader.js';\n\nexport * from './classes/managers/ModuleManager.js';\n\nexport * from './classes/modules/BaseModule.js';\nexport * from './classes/modules/commands/ContextMenuCommandModule.js';\nexport * from './classes/modules/commands/MessageCommandModule.js';\nexport * from './classes/modules/commands/SlashCommandModule.js';\nexport * from './classes/modules/events/ClientEventModule.js';\nexport * from './classes/modules/events/EventModule.js';\nexport * from './classes/modules/events/RESTEventModule.js';\nexport * from './classes/modules/PostconditionModule.js';\nexport * from './classes/modules/PreconditionModule.js';\n\nexport * from './classes/templates/ModuleTemplateBuilder.js';\nexport * from './classes/templates/TemplateBuilder.js';\n\nexport * from './classes/validation/BaseModuleValidator.js';\nexport * from './classes/validation/CommandModuleValidator.js';\nexport * from './classes/validation/EventModuleValidator.js';\nexport * from './classes/validation/PostconditionModule.js';\nexport * from './classes/validation/PreconditionModule.js';\n\nexport * from './helpers/constants.js';\nexport * from './helpers/types.js';\n\nexport * from '@reciple/core';\n\nglobalThis.useClient = () => {\n throw new Error('Client is not yet loaded.');\n};\n\nglobalThis.useLogger = () => logger;\n\ndeclare global {\n var useClient: () => Client;\n var useLogger: () => Logger;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,WAAW,kBAAkB;AACzB,OAAM,IAAI,MAAM,4BAA4B;;AAGhD,WAAW,kBAAkB"}
|
package/dist/package.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "reciple",
|
|
4
|
-
version: "10.0.
|
|
4
|
+
version: "10.0.2",
|
|
5
5
|
license: "LGPL-3.0-only",
|
|
6
6
|
description: "The CLI for reciple",
|
|
7
7
|
module: "./dist/index.mjs",
|
|
@@ -26,8 +26,9 @@ var package_default = {
|
|
|
26
26
|
scripts: {
|
|
27
27
|
"clean": "rimraf ./dist",
|
|
28
28
|
"build": "tsdown --config-loader unrun",
|
|
29
|
+
"docs": "deno doc --json --sloppy-imports ./src/index.ts > docs.json",
|
|
29
30
|
"check": "tsc --noEmit",
|
|
30
|
-
"prepack": "
|
|
31
|
+
"prepack": "bun run build"
|
|
31
32
|
},
|
|
32
33
|
repository: {
|
|
33
34
|
"type": "git",
|
|
@@ -36,40 +37,41 @@ var package_default = {
|
|
|
36
37
|
},
|
|
37
38
|
dependencies: {
|
|
38
39
|
"@clack/prompts": "^0.11.0",
|
|
39
|
-
"@dotenvx/dotenvx": "^1.
|
|
40
|
-
"@
|
|
40
|
+
"@dotenvx/dotenvx": "^1.52.0",
|
|
41
|
+
"@prtty/print": "^1.1.0",
|
|
42
|
+
"@prtty/prtty": "^1.1.0",
|
|
43
|
+
"@reciple/utils": "^10.0.1",
|
|
41
44
|
"@sapphire/shapeshift": "^4.0.0",
|
|
42
45
|
"@sapphire/snowflake": "^3.5.5",
|
|
43
46
|
"commander": "^14.0.2",
|
|
44
47
|
"github-slugger": "^2.0.0",
|
|
45
|
-
"globby": "^16.
|
|
48
|
+
"globby": "^16.1.0",
|
|
46
49
|
"micromatch": "^4.0.8",
|
|
50
|
+
"nypm": "^0.6.4",
|
|
47
51
|
"pkg-types": "^2.3.0",
|
|
48
|
-
"prtyprnt": "^2.0.2",
|
|
49
52
|
"semver": "^7.7.3",
|
|
50
53
|
"ts-mixer": "^6.0.4",
|
|
51
|
-
"tsdown": "^0.
|
|
52
|
-
"unrun": "^0.2.
|
|
54
|
+
"tsdown": "^0.20.1",
|
|
55
|
+
"unrun": "^0.2.26"
|
|
53
56
|
},
|
|
54
57
|
devDependencies: {
|
|
55
|
-
"@reciple/jsx": "^10.0.1
|
|
58
|
+
"@reciple/jsx": "^10.0.1",
|
|
56
59
|
"@types/micromatch": "^4.0.10",
|
|
57
|
-
"@types/node": "
|
|
60
|
+
"@types/node": "catalog:",
|
|
58
61
|
"@types/semver": "^7.7.1",
|
|
59
62
|
"nodemon": "^3.1.11",
|
|
60
|
-
"rolldown": "^1.0.0-
|
|
61
|
-
"typescript": "
|
|
63
|
+
"rolldown": "^1.0.0-rc.1",
|
|
64
|
+
"typescript": "catalog:"
|
|
62
65
|
},
|
|
63
66
|
peerDependencies: {
|
|
64
|
-
"@reciple/core": "
|
|
65
|
-
"discord.js": "
|
|
67
|
+
"@reciple/core": "workspace:^",
|
|
68
|
+
"discord.js": "catalog:"
|
|
66
69
|
},
|
|
67
70
|
peerDependenciesMeta: {
|
|
68
71
|
"@reciple/core": { "optional": false },
|
|
69
72
|
"discord.js": { "optional": false }
|
|
70
73
|
},
|
|
71
|
-
publishConfig: { "access": "public" }
|
|
72
|
-
gitHead: "fd84f35bfab28ab163d11542dbcc2d27064910a9"
|
|
74
|
+
publishConfig: { "access": "public" }
|
|
73
75
|
};
|
|
74
76
|
|
|
75
77
|
//#endregion
|
package/dist/package.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.mjs","names":[],"sources":["../package.json"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"package.mjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reciple",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"license": "LGPL-3.0-only",
|
|
5
5
|
"description": "The CLI for reciple",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"clean": "rimraf ./dist",
|
|
27
27
|
"build": "tsdown --config-loader unrun",
|
|
28
|
+
"docs": "deno doc --json --sloppy-imports ./src/index.ts > docs.json",
|
|
28
29
|
"check": "tsc --noEmit",
|
|
29
|
-
"prepack": "
|
|
30
|
+
"prepack": "bun run build"
|
|
30
31
|
},
|
|
31
32
|
"repository": {
|
|
32
33
|
"type": "git",
|
|
@@ -35,32 +36,34 @@
|
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@clack/prompts": "^0.11.0",
|
|
38
|
-
"@dotenvx/dotenvx": "^1.
|
|
39
|
-
"@
|
|
39
|
+
"@dotenvx/dotenvx": "^1.52.0",
|
|
40
|
+
"@prtty/print": "^1.1.0",
|
|
41
|
+
"@prtty/prtty": "^1.1.0",
|
|
42
|
+
"@reciple/utils": "^10.0.1",
|
|
40
43
|
"@sapphire/shapeshift": "^4.0.0",
|
|
41
44
|
"@sapphire/snowflake": "^3.5.5",
|
|
42
45
|
"commander": "^14.0.2",
|
|
43
46
|
"github-slugger": "^2.0.0",
|
|
44
|
-
"globby": "^16.
|
|
47
|
+
"globby": "^16.1.0",
|
|
45
48
|
"micromatch": "^4.0.8",
|
|
49
|
+
"nypm": "^0.6.4",
|
|
46
50
|
"pkg-types": "^2.3.0",
|
|
47
|
-
"prtyprnt": "^2.0.2",
|
|
48
51
|
"semver": "^7.7.3",
|
|
49
52
|
"ts-mixer": "^6.0.4",
|
|
50
|
-
"tsdown": "^0.
|
|
51
|
-
"unrun": "^0.2.
|
|
53
|
+
"tsdown": "^0.20.1",
|
|
54
|
+
"unrun": "^0.2.26"
|
|
52
55
|
},
|
|
53
56
|
"devDependencies": {
|
|
54
|
-
"@reciple/jsx": "^10.0.1
|
|
57
|
+
"@reciple/jsx": "^10.0.1",
|
|
55
58
|
"@types/micromatch": "^4.0.10",
|
|
56
|
-
"@types/node": "^
|
|
59
|
+
"@types/node": "^25.0.9",
|
|
57
60
|
"@types/semver": "^7.7.1",
|
|
58
61
|
"nodemon": "^3.1.11",
|
|
59
|
-
"rolldown": "^1.0.0-
|
|
62
|
+
"rolldown": "^1.0.0-rc.1",
|
|
60
63
|
"typescript": "^5.9.3"
|
|
61
64
|
},
|
|
62
65
|
"peerDependencies": {
|
|
63
|
-
"@reciple/core": "^10.0.
|
|
66
|
+
"@reciple/core": "^10.0.1",
|
|
64
67
|
"discord.js": "^14.25.1"
|
|
65
68
|
},
|
|
66
69
|
"peerDependenciesMeta": {
|
|
@@ -73,6 +76,5 @@
|
|
|
73
76
|
},
|
|
74
77
|
"publishConfig": {
|
|
75
78
|
"access": "public"
|
|
76
|
-
}
|
|
77
|
-
"gitHead": "fd84f35bfab28ab163d11542dbcc2d27064910a9"
|
|
79
|
+
}
|
|
78
80
|
}
|