reciple 10.0.44 → 10.1.1

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,6 @@
7
7
  "./config/**/*"
8
8
  ],
9
9
  "compilerOptions": {
10
- "baseUrl": "./",
11
10
  "rootDir": "./src",
12
11
  "outDir": "./modules",
13
12
  "allowJs": true,
@@ -24,6 +23,7 @@
24
23
  "skipLibCheck": true,
25
24
  "sourceMap": true,
26
25
  "strict": true,
27
- "verbatimModuleSyntax": true
26
+ "verbatimModuleSyntax": true,
27
+ "types": ["node"]
28
28
  }
29
29
  }
@@ -7,7 +7,6 @@
7
7
  "./config/**/*"
8
8
  ],
9
9
  "compilerOptions": {
10
- "baseUrl": "./",
11
10
  "rootDir": "./src",
12
11
  "outDir": "./modules",
13
12
  "allowJs": true,
@@ -24,6 +23,7 @@
24
23
  "skipLibCheck": true,
25
24
  "sourceMap": true,
26
25
  "strict": true,
27
- "verbatimModuleSyntax": true
26
+ "verbatimModuleSyntax": true,
27
+ "types": ["node"]
28
28
  }
29
29
  }
@@ -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.44";
97
+ _CLI.version = "10.1.1";
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, this.content, { flag: overwrite === false ? "wx" : void 0 });
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({ silent: true })), new ModuleTemplateBuilder({
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({ silent: true }))]),
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"
@@ -74,8 +74,6 @@ declare class CommandModuleValidator extends Validator {
74
74
  execute: Function;
75
75
  }>>;
76
76
  static resolvable: _$_sapphire_shapeshift0.UnionValidator<_$_sapphire_shapeshift0.UndefinedToOptional<{
77
- toJSON: Function;
78
- }> | _$_sapphire_shapeshift0.UndefinedToOptional<{
79
77
  id: string | undefined;
80
78
  moduleType: ModuleType | undefined;
81
79
  onEnable: Function | undefined;
@@ -108,6 +106,8 @@ declare class CommandModuleValidator extends Validator {
108
106
  disabledPreconditions: string[] | undefined;
109
107
  disabledPostconditions: string[] | undefined;
110
108
  execute: Function;
109
+ }> | _$_sapphire_shapeshift0.UndefinedToOptional<{
110
+ toJSON: Function;
111
111
  }>>;
112
112
  static isValid(value: unknown): asserts value is AnyCommandModuleData;
113
113
  }
@@ -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;
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.44",
4
+ version: "10.1.1",
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.1.0",
40
- "@dotenvx/dotenvx": "^1.58.0",
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.12",
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.44",
3
+ "version": "10.1.1",
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.1.0",
39
- "@dotenvx/dotenvx": "^1.58.0",
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.6"
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.0",
58
+ "@types/node": "^25.5.2",
59
59
  "nodemon": "^3.1.14",
60
- "rolldown": "^1.0.0-rc.12",
60
+ "rolldown": "^1.0.0-rc.13",
61
61
  "typescript": "^6.0.2"
62
62
  },
63
63
  "peerDependencies": {
64
- "@reciple/core": "^10.0.6",
65
- "discord.js": "^14.25.1"
64
+ "@reciple/core": "^10.1.0",
65
+ "discord.js": "^14.26.2"
66
66
  },
67
67
  "peerDependenciesMeta": {
68
68
  "@reciple/core": {