reciple 10.0.44 → 10.1.0
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/classes/cli/CLI.mjs +1 -1
- package/dist/classes/templates/ModuleTemplateBuilder.d.mts +3 -1
- package/dist/classes/templates/ModuleTemplateBuilder.mjs +4 -2
- package/dist/classes/templates/TemplateBuilder.mjs +8 -2
- package/dist/classes/validation/BaseModuleValidator.d.mts +2 -2
- package/dist/classes/validation/EventModuleValidator.d.mts +2 -2
- package/dist/classes/validation/PostconditionModule.d.mts +2 -2
- package/dist/package.mjs +4 -4
- package/package.json +7 -7
package/dist/classes/cli/CLI.mjs
CHANGED
|
@@ -94,7 +94,7 @@ var CLI = class {
|
|
|
94
94
|
(function(_CLI) {
|
|
95
95
|
_CLI.root = path.join(path.dirname(fileURLToPath(import.meta.url)), "../../../");
|
|
96
96
|
_CLI.bin = path.join(CLI.root, "dist/bin/reciple.mjs");
|
|
97
|
-
_CLI.version = "10.0
|
|
97
|
+
_CLI.version = "10.1.0";
|
|
98
98
|
function stringifyFlags(flags, command, ignored = []) {
|
|
99
99
|
let arr = [];
|
|
100
100
|
for (const [key, value] of Object.entries(flags)) {
|
|
@@ -23,7 +23,8 @@ declare class ModuleTemplateBuilder {
|
|
|
23
23
|
setupFilename(options?: ModuleTemplateBuilder.SetupFilenameOptions): Promise<this>;
|
|
24
24
|
build({
|
|
25
25
|
overwrite,
|
|
26
|
-
silent
|
|
26
|
+
silent,
|
|
27
|
+
replacer
|
|
27
28
|
}?: ModuleTemplateBuilder.BuildOptions): Promise<this>;
|
|
28
29
|
}
|
|
29
30
|
declare namespace ModuleTemplateBuilder {
|
|
@@ -51,6 +52,7 @@ declare namespace ModuleTemplateBuilder {
|
|
|
51
52
|
interface BuildOptions {
|
|
52
53
|
overwrite?: boolean;
|
|
53
54
|
silent?: boolean;
|
|
55
|
+
replacer?: Record<string, string>;
|
|
54
56
|
}
|
|
55
57
|
enum Placeholder {
|
|
56
58
|
ModuleName = "$MODULE_NAME$",
|
|
@@ -195,9 +195,11 @@ var ModuleTemplateBuilder = class ModuleTemplateBuilder {
|
|
|
195
195
|
this.filename = filename;
|
|
196
196
|
return this;
|
|
197
197
|
}
|
|
198
|
-
async build({ overwrite, silent } = {}) {
|
|
198
|
+
async build({ overwrite, silent, replacer } = {}) {
|
|
199
|
+
let content = this.content;
|
|
200
|
+
if (replacer) for (const [key, value] of Object.entries(replacer)) content = content.replaceAll(key, value);
|
|
199
201
|
await mkdir(this.directory, { recursive: true });
|
|
200
|
-
await writeFile(this.filepath,
|
|
202
|
+
await writeFile(this.filepath, content, { flag: overwrite === false ? "wx" : void 0 });
|
|
201
203
|
if (!silent) outro(`Module ${colors.green(this.template?.name)} created in ${colors.cyan(path.relative(process.cwd(), this.filepath))}`);
|
|
202
204
|
return this;
|
|
203
205
|
}
|
|
@@ -282,7 +282,10 @@ var TemplateBuilder = class TemplateBuilder {
|
|
|
282
282
|
CommandName: "ping",
|
|
283
283
|
CommandDescription: "My ping command!",
|
|
284
284
|
ModuleName: "PingCommand"
|
|
285
|
-
}).then((m) => m.build({
|
|
285
|
+
}).then((m) => m.build({
|
|
286
|
+
silent: true,
|
|
287
|
+
replacer: { "// Write your code here": "await interaction.reply('Pong!');" }
|
|
288
|
+
})), new ModuleTemplateBuilder({
|
|
286
289
|
...moduleOptions,
|
|
287
290
|
directory: "src/events",
|
|
288
291
|
filename: `ClientReady.${this.typescript ? "ts" : "js"}`,
|
|
@@ -290,7 +293,10 @@ var TemplateBuilder = class TemplateBuilder {
|
|
|
290
293
|
}).setupPlaceholders({
|
|
291
294
|
EventName: "clientReady",
|
|
292
295
|
ModuleName: "ClientReadyEvent"
|
|
293
|
-
}).then((m) => m.build({
|
|
296
|
+
}).then((m) => m.build({
|
|
297
|
+
silent: true,
|
|
298
|
+
replacer: { "// Write your code here": "this.client.logger.info('Client is ready!');" }
|
|
299
|
+
}))]),
|
|
294
300
|
message: "Creating module templates",
|
|
295
301
|
successMessage: "Module templates created successfully",
|
|
296
302
|
errorMessage: "Failed to create module templates"
|
|
@@ -24,13 +24,13 @@ declare class BaseModuleValidator extends Validator {
|
|
|
24
24
|
onDisable: Function | undefined;
|
|
25
25
|
}>>;
|
|
26
26
|
static resolvable: _$_sapphire_shapeshift0.UnionValidator<_$_sapphire_shapeshift0.UndefinedToOptional<{
|
|
27
|
+
toJSON: Function;
|
|
28
|
+
}> | _$_sapphire_shapeshift0.UndefinedToOptional<{
|
|
27
29
|
id: string | undefined;
|
|
28
30
|
moduleType: ModuleType | undefined;
|
|
29
31
|
onEnable: Function | undefined;
|
|
30
32
|
onReady: Function | undefined;
|
|
31
33
|
onDisable: Function | undefined;
|
|
32
|
-
}> | _$_sapphire_shapeshift0.UndefinedToOptional<{
|
|
33
|
-
toJSON: Function;
|
|
34
34
|
}>>;
|
|
35
35
|
static isValidId(id: unknown): asserts id is string;
|
|
36
36
|
static isValidModuleType(moduleType: unknown): asserts moduleType is ModuleType;
|
|
@@ -46,6 +46,8 @@ declare class EventModuleValidator extends Validator {
|
|
|
46
46
|
onEvent: Function;
|
|
47
47
|
}>>;
|
|
48
48
|
static resolvable: _$_sapphire_shapeshift0.UnionValidator<_$_sapphire_shapeshift0.UndefinedToOptional<{
|
|
49
|
+
toJSON: Function;
|
|
50
|
+
}> | _$_sapphire_shapeshift0.UndefinedToOptional<{
|
|
49
51
|
id: string | undefined;
|
|
50
52
|
moduleType: ModuleType | undefined;
|
|
51
53
|
onEnable: Function | undefined;
|
|
@@ -60,8 +62,6 @@ declare class EventModuleValidator extends Validator {
|
|
|
60
62
|
event: string;
|
|
61
63
|
once: boolean | undefined;
|
|
62
64
|
onEvent: Function;
|
|
63
|
-
}> | _$_sapphire_shapeshift0.UndefinedToOptional<{
|
|
64
|
-
toJSON: Function;
|
|
65
65
|
}>>;
|
|
66
66
|
static isValidEmitter(emitter: unknown): asserts emitter is EventEmitter;
|
|
67
67
|
static isValidEvent(event: unknown): asserts event is string;
|
|
@@ -15,10 +15,10 @@ declare class PostconditionModuleValidator extends Validator {
|
|
|
15
15
|
execute: Function;
|
|
16
16
|
}>>;
|
|
17
17
|
static resolvable: _$_sapphire_shapeshift0.UnionValidator<_$_sapphire_shapeshift0.UndefinedToOptional<{
|
|
18
|
-
toJSON: Function;
|
|
19
|
-
}> | _$_sapphire_shapeshift0.UndefinedToOptional<{
|
|
20
18
|
scope: CommandType[] | undefined;
|
|
21
19
|
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[];
|
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.1.0",
|
|
5
5
|
license: "LGPL-3.0-only",
|
|
6
6
|
description: "The CLI for reciple",
|
|
7
7
|
module: "./dist/index.mjs",
|
|
@@ -36,8 +36,8 @@ var package_default = {
|
|
|
36
36
|
"directory": "packages/reciple"
|
|
37
37
|
},
|
|
38
38
|
dependencies: {
|
|
39
|
-
"@clack/prompts": "^1.
|
|
40
|
-
"@dotenvx/dotenvx": "^1.
|
|
39
|
+
"@clack/prompts": "^1.2.0",
|
|
40
|
+
"@dotenvx/dotenvx": "^1.59.1",
|
|
41
41
|
"@prtty/print": "catalog:",
|
|
42
42
|
"@prtty/prtty": "catalog:",
|
|
43
43
|
"@reciple/utils": "workspace:^",
|
|
@@ -58,7 +58,7 @@ var package_default = {
|
|
|
58
58
|
"@types/micromatch": "^4.0.10",
|
|
59
59
|
"@types/node": "catalog:",
|
|
60
60
|
"nodemon": "^3.1.14",
|
|
61
|
-
"rolldown": "^1.0.0-rc.
|
|
61
|
+
"rolldown": "^1.0.0-rc.13",
|
|
62
62
|
"typescript": "catalog:"
|
|
63
63
|
},
|
|
64
64
|
peerDependencies: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reciple",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"license": "LGPL-3.0-only",
|
|
5
5
|
"description": "The CLI for reciple",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"directory": "packages/reciple"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@clack/prompts": "^1.
|
|
39
|
-
"@dotenvx/dotenvx": "^1.
|
|
38
|
+
"@clack/prompts": "^1.2.0",
|
|
39
|
+
"@dotenvx/dotenvx": "^1.59.1",
|
|
40
40
|
"@prtty/print": "^1.1.3",
|
|
41
41
|
"@prtty/prtty": "^1.1.2",
|
|
42
42
|
"@reciple/utils": "^10.0.4",
|
|
@@ -50,19 +50,19 @@
|
|
|
50
50
|
"pkg-types": "^2.3.0",
|
|
51
51
|
"tinyglobby": "^0.2.15",
|
|
52
52
|
"ts-mixer": "^6.0.4",
|
|
53
|
-
"tsdown": "^0.21.
|
|
53
|
+
"tsdown": "^0.21.7"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@reciple/jsx": "^10.0.10",
|
|
57
57
|
"@types/micromatch": "^4.0.10",
|
|
58
|
-
"@types/node": "^25.5.
|
|
58
|
+
"@types/node": "^25.5.2",
|
|
59
59
|
"nodemon": "^3.1.14",
|
|
60
|
-
"rolldown": "^1.0.0-rc.
|
|
60
|
+
"rolldown": "^1.0.0-rc.13",
|
|
61
61
|
"typescript": "^6.0.2"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@reciple/core": "^10.0.6",
|
|
65
|
-
"discord.js": "^14.
|
|
65
|
+
"discord.js": "^14.26.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependenciesMeta": {
|
|
68
68
|
"@reciple/core": {
|