meocord 1.2.6 → 1.3.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.
package/README.md CHANGED
@@ -61,7 +61,7 @@ While still growing, MeoCord provides a solid foundation for developers to creat
61
61
 
62
62
  - **Node.js**: Ensure you have version **22.14.0** or higher, as it’s the current LTS release.
63
63
  - **TypeScript**: Version **5.7** or above is required for compatibility with modern features.
64
- - **Yarn**: Version stable **4.7** (`corepack enable && yarn set version stable`) or above is strongly recommended for managing dependencies and smooth builds.
64
+ - **Bun**: Version **1.x** or above is required as the package manager.
65
65
 
66
66
  ### Module Support
67
67
 
@@ -176,14 +176,14 @@ Use the CLI to start your application.
176
176
  Run in development mode:
177
177
 
178
178
  ```shell
179
- yarn start:dev
179
+ bun start:dev
180
180
  ```
181
181
 
182
182
  - **Production Mode**:
183
183
  Run in production mode with fresh production build:
184
184
 
185
185
  ```shell
186
- yarn start:prod --build # use arg `--build` if not built yet or use `yarn build:prod` first
186
+ bun start:prod --build # use arg `--build` if not built yet or use `bun build:prod` first
187
187
  ```
188
188
 
189
189
  ---
@@ -199,7 +199,6 @@ When using MeoCord, the expected project structure is as follows:
199
199
  .
200
200
  ├── .gitignore
201
201
  ├── .prettierrc.mjs
202
- ├── .yarnrc.yml
203
202
  ├── eslint.config.mjs
204
203
  ├── meocord.config.ts
205
204
  ├── package.json
@@ -219,7 +218,7 @@ When using MeoCord, the expected project structure is as follows:
219
218
  │   └── services
220
219
  │   └── sample.service.ts
221
220
  ├── tsconfig.json
222
- └── yarn.lock
221
+ └── bun.lock
223
222
  ```
224
223
 
225
224
  This structure ensures clear separation of concerns and scalable project architecture.
@@ -363,13 +362,13 @@ The **MeoCord CLI** is designed to help you manage, build, and run your applicat
363
362
  To ensure you see the most accurate and complete list of commands and options, always refer to the help menu by running:
364
363
 
365
364
  ```shell
366
- yarn meocord --help
365
+ bun meocord --help
367
366
  ```
368
367
 
369
368
  Below is an example of the help display output:
370
369
 
371
370
  ```textmate
372
- yarn meocord --help
371
+ bun meocord --help
373
372
  MeoCord Copyright (C) 2025 Ukasyah Rahmatullah Zada
374
373
  This program comes with ABSOLUTELY NO WARRANTY; for details type `meocord show -w'.
375
374
  This is free software, and you are welcome to redistribute it
@@ -413,8 +412,8 @@ Builds the application in **production** or **development** mode.
413
412
  **Usage:**
414
413
 
415
414
  ```shell
416
- yarn meocord build --prod # Build for production
417
- yarn meocord build --dev # Build for development
415
+ bun meocord build --prod # Build for production
416
+ bun meocord build --dev # Build for development
418
417
  ```
419
418
 
420
419
  #### `meocord start`
@@ -424,8 +423,8 @@ Starts the application with options for either a **production** or **development
424
423
  **Usage:**
425
424
 
426
425
  ```shell
427
- yarn meocord start --build --prod # Start in production mode with fresh production build
428
- yarn meocord start --dev # Start in development mode (will always fresh build)
426
+ bun meocord start --build --prod # Start in production mode with fresh production build
427
+ bun meocord start --dev # Start in development mode (will always fresh build)
429
428
  ```
430
429
 
431
430
  #### `meocord generate` (Alias: `meocord g`)
@@ -435,13 +434,13 @@ Scaffolds application components such as controllers, services, and other elemen
435
434
  **Usage:**
436
435
 
437
436
  ```text
438
- yarn meocord generate|g [options] [command]
437
+ bun meocord generate|g [options] [command]
439
438
  ```
440
439
 
441
440
  **Example:**
442
441
 
443
442
  ```shell
444
- yarn meocord g co slash "user"
443
+ bun meocord g co slash "user"
445
444
  ```
446
445
 
447
446
  This command will generate a `user` slash controller.
@@ -451,7 +450,7 @@ This command will generate a `user` slash controller.
451
450
  For detailed usage of any particular command, append the `--help` flag to it. For instance:
452
451
 
453
452
  ```shell
454
- yarn meocord g --help
453
+ bun meocord g --help
455
454
  ```
456
455
 
457
456
  This will provide command-specific help and options.
@@ -465,7 +464,7 @@ This will provide command-specific help and options.
465
464
  Run the application in development mode with live-reload for a seamless coding experience:
466
465
 
467
466
  ```shell
468
- yarn meocord start --dev
467
+ bun meocord start --dev
469
468
  ```
470
469
 
471
470
  ### Building for Production
@@ -473,7 +472,7 @@ yarn meocord start --dev
473
472
  Generate an optimized and compiled production build with:
474
473
 
475
474
  ```shell
476
- yarn meocord build --prod
475
+ bun meocord build --prod
477
476
  ```
478
477
 
479
478
  Once built, you can deploy or run the application efficiently.
@@ -485,19 +484,19 @@ Once built, you can deploy or run the application efficiently.
485
484
  Install all necessary dependencies, including development dependencies, before building:
486
485
 
487
486
  ```shell
488
- yarn install --immutable
487
+ bun install --frozen-lockfile
489
488
  ```
490
489
 
491
490
  Generate an optimized and compiled production build:
492
491
 
493
492
  ```shell
494
- yarn meocord build --prod
493
+ bun meocord build --prod
495
494
  ```
496
495
 
497
496
  Clean up and focus on production-only dependencies:
498
497
 
499
498
  ```shell
500
- yarn workspaces focus --production
499
+ bun install --production
501
500
  ```
502
501
 
503
502
  Ensure the following essential files and folders are prepared for deployment on the server:
@@ -507,16 +506,14 @@ Ensure the following essential files and folders are prepared for deployment on
507
506
  ├── dist
508
507
  ├── node_modules (production dependencies only)
509
508
  ├── .env (if applicable, ensure it contains necessary variables)
510
- ├── .yarn (optional: exclude cache if not required)
511
- ├── .yarnrc.yml
512
509
  ├── package.json
513
- └── yarn.lock
510
+ └── bun.lock
514
511
  ```
515
512
 
516
513
  Start the application in production mode on the server:
517
514
 
518
515
  ```shell
519
- yarn meocord start --prod
516
+ bun meocord start --prod
520
517
  ```
521
518
 
522
519
  ---
@@ -6,6 +6,7 @@ require('reflect-metadata');
6
6
  var inversify = require('inversify');
7
7
  var enum_index = require('../enum/index.cjs');
8
8
  var lodashEs = require('lodash-es');
9
+ var Table = require('cli-table3');
9
10
 
10
11
  const mainContainer = new inversify.Container();
11
12
 
@@ -279,23 +280,31 @@ class MeoCordApp {
279
280
  try {
280
281
  if (this.bot.application) {
281
282
  await this.bot.application.commands.set(builders);
282
- this.logger.log(`Registered ${builders.length} bot commands:`, builders.map((builder)=>{
283
+ const table = new Table({
284
+ head: [
285
+ 'Name',
286
+ 'Type',
287
+ 'Sub-commands'
288
+ ],
289
+ colWidths: [
290
+ null,
291
+ null,
292
+ 30
293
+ ],
294
+ wordWrap: true
295
+ });
296
+ for (const builder of builders){
283
297
  const json = typeof builder.toJSON === 'function' ? builder.toJSON() : builder;
284
298
  const typeName = json?.type === 1 ? 'SlashCommand' : json?.type === 2 ? 'UserContextMenu' : json?.type === 3 ? 'MessageContextMenu' : builder instanceof discord_js.SlashCommandBuilder ? 'SlashCommand' : 'Command';
285
- const subCommands = Array.isArray(json?.options) && json.options.length ? json.options.map((opt)=>({
286
- name: opt.name,
287
- options: opt.options.map((opt)=>opt.name)
288
- })) : undefined;
289
299
  const name = json?.name || builder.name;
290
- return subCommands ? {
291
- type: typeName,
300
+ const subCommands = Array.isArray(json?.options) && json.options.length ? json.options.map((opt)=>opt.name).join(', ') : '';
301
+ table.push([
292
302
  name,
303
+ typeName,
293
304
  subCommands
294
- } : {
295
- type: typeName,
296
- name
297
- };
298
- }));
305
+ ]);
306
+ }
307
+ this.logger.log(`Registered ${builders.length} bot commands:\n${table.toString()}`);
299
308
  }
300
309
  } catch (error) {
301
310
  this.logger.error('Error during command registration:', error);
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('reflect-metadata');
4
4
  var theme = require('../_shared/theme-TAjboxtz.cjs');
5
- var meocord_app = require('../_shared/meocord.app-q-erWOUy.cjs');
5
+ var meocord_app = require('../_shared/meocord.app-DhHfPcs8.cjs');
6
6
  require('inversify');
7
7
  require('discord.js');
8
8
  require('path');
@@ -15,6 +15,7 @@ require('dayjs/plugin/timezone.js');
15
15
  require('chalk');
16
16
  require('../enum/index.cjs');
17
17
  require('lodash-es');
18
+ require('cli-table3');
18
19
 
19
20
  class MeoCordFactory {
20
21
  static create(target) {
@@ -1,12 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  require('reflect-metadata');
4
- var meocord_app = require('../_shared/meocord.app-q-erWOUy.cjs');
4
+ var meocord_app = require('../_shared/meocord.app-DhHfPcs8.cjs');
5
5
  var inversify = require('inversify');
6
6
  var discord_js = require('discord.js');
7
7
  var theme = require('../_shared/theme-TAjboxtz.cjs');
8
8
  require('../enum/index.cjs');
9
9
  require('lodash-es');
10
+ require('cli-table3');
10
11
  require('node:util');
11
12
  require('dayjs');
12
13
  require('dayjs/plugin/utc.js');
@@ -12,8 +12,9 @@ import { setEnvironment, compileAndValidateConfig } from '../util/common.util.js
12
12
  import { prepareModifiedTsConfig } from '../util/tsconfig.util.js';
13
13
  import { Command } from 'commander';
14
14
  import { simpleGit } from 'simple-git';
15
- import chalk from 'chalk';
16
15
  import { execSync } from 'child_process';
16
+ import * as p from '@clack/prompts';
17
+ import { detectInstalledPMs, getInstallCommand } from '../util/package-manager.util.js';
17
18
  import { ensureReady, configureCommandHelp } from '../util/meocord-cli.util.js';
18
19
  import packageJson from '../package.json.js';
19
20
  import { fileURLToPath } from 'url';
@@ -65,7 +66,7 @@ For full license details, refer to:
65
66
  `);
66
67
  }
67
68
  });
68
- program.command('create <app-name>').description('Create a new MeoCord application').action(async (appName)=>await this.createApp(appName));
69
+ program.command('create <app-name>').description('Create a new MeoCord application').option('--use-npm', 'Use npm as the package manager').option('--use-yarn', 'Use Yarn as the package manager').option('--use-pnpm', 'Use pnpm as the package manager').option('--use-bun', 'Use Bun as the package manager').action(async (appName, options)=>await this.createApp(appName, options));
69
70
  program.command('build').description('Build the application').option('-d, --dev', 'Build in development mode').option('-p, --prod', 'Build in production mode').action(async (options)=>{
70
71
  await ensureReady();
71
72
  const mode = options.prod ? 'production' : 'development';
@@ -91,55 +92,105 @@ For full license details, refer to:
91
92
  configureCommandHelp(program);
92
93
  program.showHelpAfterError().parse(process.argv);
93
94
  }
94
- async createApp(appName) {
95
+ async createApp(appName, options) {
95
96
  const kebabCaseAppName = appName.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
96
97
  const appPath = path.resolve(process.cwd(), kebabCaseAppName);
97
98
  const gitRepo = 'https://github.com/l7aromeo/meocord-template.git';
98
- console.info(chalk.blueBright(`🚀 Creating a new MeoCord app: ${chalk.bold(kebabCaseAppName)}`));
99
- try {
100
- // Validate if directory already exists
101
- if (fs.existsSync(appPath)) {
102
- console.error(chalk.red(`❌ Directory "${chalk.bold(kebabCaseAppName)}" already exists.`));
99
+ p.intro(`meocord v${this.version}`);
100
+ // Validate directory
101
+ if (fs.existsSync(appPath)) {
102
+ p.cancel(`Directory "${kebabCaseAppName}" already exists.`);
103
+ await wait(100);
104
+ process.exit(1);
105
+ }
106
+ // Check Node.js version
107
+ const MINIMUM_NODE_VERSION = '22.14.0';
108
+ const [major, minor, patch] = process.version.slice(1).split('.').map(Number);
109
+ const [minMajor, minMinor, minPatch] = MINIMUM_NODE_VERSION.split('.').map(Number);
110
+ if (major < minMajor || major === minMajor && minor < minMinor || major === minMajor && minor === minMinor && patch < minPatch) {
111
+ p.cancel(`Node.js v${MINIMUM_NODE_VERSION} or higher is required. Current: ${process.version}`);
112
+ await wait(100);
113
+ process.exit(1);
114
+ }
115
+ // Determine package manager
116
+ const installedPMs = detectInstalledPMs();
117
+ let pm;
118
+ const flagMap = {
119
+ useNpm: 'npm',
120
+ useYarn: 'yarn',
121
+ usePnpm: 'pnpm',
122
+ useBun: 'bun'
123
+ };
124
+ const selectedFlag = Object.entries(flagMap).find(([key])=>options[key]);
125
+ if (selectedFlag) {
126
+ pm = selectedFlag[1];
127
+ if (!installedPMs.includes(pm)) {
128
+ p.cancel(`${pm} is not installed.`);
103
129
  await wait(100);
104
130
  process.exit(1);
105
131
  }
106
- // Check Node.js version
107
- const MINIMUM_NODE_VERSION = '22.14.0';
108
- const [major, minor, patch] = process.version.slice(1).split('.').map(Number);
109
- const [minMajor, minMinor, minPatch] = MINIMUM_NODE_VERSION.split('.').map(Number);
110
- if (major < minMajor || major === minMajor && minor < minMinor || major === minMajor && minor === minMinor && patch < minPatch) {
111
- console.error(chalk.red(`❌ Node.js v${MINIMUM_NODE_VERSION} or higher is required. Current version: v${process.version}.`));
112
- await wait(100);
113
- process.exit(1);
132
+ } else {
133
+ const defaultPM = installedPMs.includes('bun') ? 'bun' : 'npm';
134
+ const selected = await p.select({
135
+ message: 'Which package manager do you want to use?',
136
+ options: installedPMs.map((name)=>({
137
+ value: name,
138
+ label: name,
139
+ hint: name === defaultPM ? 'default' : undefined
140
+ })),
141
+ initialValue: defaultPM
142
+ });
143
+ if (p.isCancel(selected)) {
144
+ p.cancel('Operation cancelled.');
145
+ process.exit(0);
114
146
  }
115
- // Clone the template repository
116
- console.info(chalk.blueBright('📦 Fetching template...'));
147
+ pm = selected;
148
+ }
149
+ const s = p.spinner();
150
+ // Clone template
151
+ s.start(`Creating a new MeoCord app: ${kebabCaseAppName}`);
152
+ try {
117
153
  await simpleGit().clone(gitRepo, appPath);
118
- console.log(chalk.green(`✔ App successfully created at: ${chalk.bold(appPath)}`));
119
- // Remove .git history from template
154
+ } catch (error) {
155
+ s.stop('Failed to fetch template.');
156
+ p.cancel(error instanceof Error ? error.message : String(error));
157
+ await wait(100);
158
+ process.exit(1);
159
+ }
160
+ s.stop(`App created at: ${appPath}`);
161
+ // Initialize git
162
+ s.start('Initializing Git repository...');
163
+ try {
120
164
  fs.rmSync(path.join(appPath, '.git'), {
121
165
  recursive: true,
122
166
  force: true
123
167
  });
124
- // Initialize a new Git repository
125
- console.info(chalk.blueBright('🔧 Initializing Git repository...'));
126
168
  const git = simpleGit(appPath);
127
169
  await git.init();
128
170
  await git.add('./*');
129
171
  await git.commit('Initial commit');
130
- console.log(chalk.green('✔ Git repository initialized.'));
131
- // Install dependencies
132
- console.info(chalk.blueBright('📦 Installing dependencies...'));
133
- execSync(`cd ${kebabCaseAppName} && corepack enable && yarn install`, {
134
- stdio: 'inherit'
172
+ } catch (error) {
173
+ s.stop('Failed to initialize Git.');
174
+ p.cancel(error instanceof Error ? error.message : String(error));
175
+ await wait(100);
176
+ process.exit(1);
177
+ }
178
+ s.stop('Git repository initialized.');
179
+ // Install dependencies
180
+ s.start(`Installing dependencies with ${pm}...`);
181
+ try {
182
+ execSync(getInstallCommand(pm), {
183
+ cwd: appPath,
184
+ stdio: 'ignore'
135
185
  });
136
- console.log(chalk.green('✔ Dependencies installed successfully.'));
137
- console.log(chalk.greenBright(`🎉 MeoCord app "${chalk.bold(kebabCaseAppName)}" is ready!`));
138
186
  } catch (error) {
139
- console.error(chalk.red(`❌ Failed to create app: ${error instanceof Error ? error.message : String(error)}`));
187
+ s.stop('Failed to install dependencies.');
188
+ p.cancel(error instanceof Error ? error.message : String(error));
140
189
  await wait(100);
141
190
  process.exit(1);
142
191
  }
192
+ s.stop('Dependencies installed.');
193
+ p.outro(`MeoCord app "${kebabCaseAppName}" is ready!`);
143
194
  }
144
195
  /**
145
196
  * Builds the MeoCord application in the specified mode.
@@ -6,6 +6,7 @@ import { mainContainer } from '../decorator/container.js';
6
6
  import { sample } from 'lodash-es';
7
7
  import { createErrorEmbed } from '../util/embed.util.js';
8
8
  import { ReactionHandlerAction, CommandType } from '../enum/controller.enum.js';
9
+ import CliTable3 from 'cli-table3';
9
10
 
10
11
  class MeoCordApp {
11
12
  async start() {
@@ -58,23 +59,31 @@ class MeoCordApp {
58
59
  try {
59
60
  if (this.bot.application) {
60
61
  await this.bot.application.commands.set(builders);
61
- this.logger.log(`Registered ${builders.length} bot commands:`, builders.map((builder)=>{
62
+ const table = new CliTable3({
63
+ head: [
64
+ 'Name',
65
+ 'Type',
66
+ 'Sub-commands'
67
+ ],
68
+ colWidths: [
69
+ null,
70
+ null,
71
+ 30
72
+ ],
73
+ wordWrap: true
74
+ });
75
+ for (const builder of builders){
62
76
  const json = typeof builder.toJSON === 'function' ? builder.toJSON() : builder;
63
77
  const typeName = json?.type === 1 ? 'SlashCommand' : json?.type === 2 ? 'UserContextMenu' : json?.type === 3 ? 'MessageContextMenu' : builder instanceof SlashCommandBuilder ? 'SlashCommand' : 'Command';
64
- const subCommands = Array.isArray(json?.options) && json.options.length ? json.options.map((opt)=>({
65
- name: opt.name,
66
- options: opt.options.map((opt)=>opt.name)
67
- })) : undefined;
68
78
  const name = json?.name || builder.name;
69
- return subCommands ? {
70
- type: typeName,
79
+ const subCommands = Array.isArray(json?.options) && json.options.length ? json.options.map((opt)=>opt.name).join(', ') : '';
80
+ table.push([
71
81
  name,
82
+ typeName,
72
83
  subCommands
73
- } : {
74
- type: typeName,
75
- name
76
- };
77
- }));
84
+ ]);
85
+ }
86
+ this.logger.log(`Registered ${builders.length} bot commands:\n${table.toString()}`);
78
87
  }
79
88
  } catch (error) {
80
89
  this.logger.error('Error during command registration:', error);
@@ -1,4 +1,4 @@
1
- var version = "1.2.5";
1
+ var version = "1.2.6";
2
2
  var packageJson = {
3
3
  version: version};
4
4
 
@@ -0,0 +1,25 @@
1
+ import { execSync } from 'child_process';
2
+
3
+ const ALL_PACKAGE_MANAGERS = [
4
+ 'bun',
5
+ 'npm',
6
+ 'yarn',
7
+ 'pnpm'
8
+ ];
9
+ function detectInstalledPMs() {
10
+ return ALL_PACKAGE_MANAGERS.filter((pm)=>{
11
+ try {
12
+ execSync(`which ${pm}`, {
13
+ stdio: 'ignore'
14
+ });
15
+ return true;
16
+ } catch {
17
+ return false;
18
+ }
19
+ });
20
+ }
21
+ function getInstallCommand(pm) {
22
+ return `${pm} install`;
23
+ }
24
+
25
+ export { detectInstalledPMs, getInstallCommand };
@@ -16,7 +16,7 @@
16
16
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
  */
18
18
 
19
- import importPlugin from 'eslint-plugin-import'
19
+ import { importX } from 'eslint-plugin-import-x'
20
20
  import globals from 'globals'
21
21
  import tsParser from '@typescript-eslint/parser'
22
22
  import eslintTs from 'typescript-eslint'
@@ -40,7 +40,7 @@ const languageOptions = {
40
40
  export const typescriptConfig = {
41
41
  files: tsFiles,
42
42
  plugins: {
43
- import: importPlugin,
43
+ 'import-x': importX,
44
44
  prettier: eslintPluginPrettier,
45
45
  },
46
46
  languageOptions: {
@@ -48,10 +48,10 @@ export const typescriptConfig = {
48
48
  parser: tsParser,
49
49
  },
50
50
  settings: {
51
- 'import/parsers': {
51
+ 'import-x/parsers': {
52
52
  '@typescript-eslint/parser': ['.ts'],
53
53
  },
54
- 'import/resolver': {
54
+ 'import-x/resolver': {
55
55
  typescript: {
56
56
  alwaysTryTypes: true,
57
57
  project: './tsconfig.json',
@@ -59,7 +59,6 @@ export const typescriptConfig = {
59
59
  },
60
60
  },
61
61
  rules: {
62
- ...importPlugin.configs.typescript.rules,
63
62
  'prettier/prettier': 'error',
64
63
  '@typescript-eslint/no-explicit-any': 'off',
65
64
  '@typescript-eslint/ban-ts-comment': 'off',
package/package.json CHANGED
@@ -1,17 +1,11 @@
1
1
  {
2
2
  "name": "meocord",
3
3
  "description": "MeoCord is a lightweight and modular framework for building scalable Discord bots using TypeScript and Discord.js. It simplifies bot development with an extensible architecture, TypeScript-first approach, and powerful CLI tools.",
4
- "version": "1.2.6",
5
- "packageManager": "yarn@4.12.0",
4
+ "version": "1.3.1",
6
5
  "type": "module",
7
6
  "scripts": {
8
7
  "lint": "eslint --fix . && tsc --noEmit",
9
8
  "build": "rm -rf ./dist && rollup -c",
10
- "publish:prerelease": "./prepublish.sh && yarn build && yarn version -i prerelease && yarn npm publish --tag next",
11
- "publish:patch": "./prepublish.sh && yarn build && yarn version -i patch && yarn npm publish --tag latest",
12
- "publish:minor": "./prepublish.sh && yarn build && yarn version -i minor && yarn npm publish --tag latest",
13
- "publish:premajor": "./prepublish.sh && yarn build && yarn version -i premajor && yarn npm publish --tag next",
14
- "publish:major": "./prepublish.sh && yarn build && yarn version -i major && yarn npm publish --tag latest",
15
9
  "prepare": "husky"
16
10
  },
17
11
  "bin": "./dist/esm/bin/meocord.js",
@@ -62,6 +56,7 @@
62
56
  "README.md"
63
57
  ],
64
58
  "dependencies": {
59
+ "@clack/prompts": "^1.2.0",
65
60
  "@swc/core": "1.15.24",
66
61
  "chalk": "^5.6.2",
67
62
  "cli-table3": "^0.6.5",
@@ -81,19 +76,23 @@
81
76
  "webpack-node-externals": "^3.0.0"
82
77
  },
83
78
  "devDependencies": {
84
- "@eslint/js": "^9.39.4",
79
+ "@eslint/js": "^10.0.1",
85
80
  "@rollup/plugin-alias": "^6.0.0",
86
81
  "@rollup/plugin-json": "^6.1.0",
87
82
  "@rollup/plugin-node-resolve": "^16.0.3",
88
83
  "@rollup/plugin-swc": "^0.4.0",
84
+ "@semantic-release/commit-analyzer": "^13.0.1",
85
+ "@semantic-release/exec": "^7.1.0",
86
+ "@semantic-release/github": "^12.0.6",
87
+ "@semantic-release/release-notes-generator": "^14.1.0",
89
88
  "@types/lodash-es": "^4.17.12",
90
89
  "@types/webpack-node-externals": "^3.0.4",
91
90
  "@typescript-eslint/parser": "^8.58.1",
92
91
  "discord.js": "^14.26.2",
93
- "eslint": "^9.39.4",
92
+ "eslint": "^10.2.0",
94
93
  "eslint-config-prettier": "^10.1.8",
95
94
  "eslint-plugin-headers": "^1.3.4",
96
- "eslint-plugin-import": "^2.32.0",
95
+ "eslint-plugin-import-x": "^4.16.2",
97
96
  "eslint-plugin-prettier": "^5.5.5",
98
97
  "eslint-plugin-unused-imports": "^4.4.1",
99
98
  "globals": "^17.4.0",
@@ -102,6 +101,7 @@
102
101
  "rollup": "^4.60.1",
103
102
  "rollup-plugin-copy": "^3.5.0",
104
103
  "rollup-plugin-dts": "^6.4.1",
104
+ "semantic-release": "^25.0.3",
105
105
  "typescript": "^6.0.2",
106
106
  "typescript-eslint": "^8.58.1"
107
107
  },
@@ -109,6 +109,9 @@
109
109
  "discord.js": "^14.17.3",
110
110
  "dotenv": "^16.4.7"
111
111
  },
112
+ "publishConfig": {
113
+ "provenance": true
114
+ },
112
115
  "keywords": [
113
116
  "discord",
114
117
  "discord-bot",
@@ -120,4 +123,4 @@
120
123
  "meocord",
121
124
  "scalable-bots"
122
125
  ]
123
- }
126
+ }
package/CHANGELOG.md DELETED
@@ -1,261 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.2.6] - 2026-04-09
9
-
10
- ### Fixed
11
-
12
- - Compile config on `meocord start --dev` before watch mode to prevent stale `dist/meocord.config.mjs` from loading the wrong env file. ([72001dc](https://github.com/l7aromeo/meocord/commit/72001dc))
13
-
14
- ## [1.2.5] - 2026-04-09
15
-
16
- ### Fixed
17
-
18
- - Use webpack `mode: 'none'` for config compilation to prevent `DefinePlugin` from replacing `process.env.NODE_ENV` with a string literal, which caused the compiled config to always load the production env file. ([91d8a04](https://github.com/l7aromeo/meocord/commit/91d8a04))
19
-
20
- ## [1.2.4] - 2026-04-09
21
-
22
- ### Fixed
23
-
24
- - Compile `meocord.config.ts` to `dist/meocord.config.mjs` during `meocord build` so the config can be loaded at runtime without requiring `tsconfig.json`, source files, or path alias resolution. Fixes `@MeoCord` decorator failing with "No container found" in Docker and other environments where only `dist/` is present. ([2765dc8](https://github.com/l7aromeo/meocord/commit/2765dc8))
25
- - Cache loaded config in `loadMeoCordConfig()` to avoid repeated jiti calls on every invocation (e.g., logger reading `appName` on each log line). ([2765dc8](https://github.com/l7aromeo/meocord/commit/2765dc8))
26
-
27
- ## [1.2.3] - 2026-04-09
28
-
29
- ### Fixed
30
-
31
- - Move webpack build tools back to dependencies so `meocord start --dev` works automatically after `yarn add meocord` without requiring manual peer dependency installation. ([8fd1ca8](https://github.com/l7aromeo/meocord/commit/8fd1ca8))
32
- - Add missing `discord.js` and related dev dependencies to package.json. ([449685a](https://github.com/l7aromeo/meocord/commit/449685a))
33
-
34
- ## [1.2.2] - 2026-04-09
35
-
36
- ### Changed
37
-
38
- - **Breaking:** Migrate build system from Babel to Rollup. Output structure changed from `dist/` to `dist/{esm,cjs,types}/`. Package exports updated accordingly.
39
- - Replace Babel with Rollup for faster ESM, CJS, and declaration builds.
40
- - Move `discord.js` from dependencies to peer dependencies only, preventing duplicate package installs in consumer projects.
41
- - Replace webpack-based TypeScript config compilation with jiti runtime loader for faster startup and no temp file generation.
42
- - Update tsconfig.json for Rollup compatibility with `NodeNext` module resolution.
43
-
44
- ### Fixed
45
-
46
- - Resolve webpack config path in CLI after dist structure change.
47
- - Resolve circular dependency between `core/meocord.app.ts` and `decorator/app.decorator.ts`.
48
- - Extract context validation in `@UseGuard` to a type predicate function to eliminate redundant `instanceof` check warnings.
49
-
50
- ### Documentation
51
-
52
- - Update README to reflect dual ESM/CJS module support.
53
-
54
- ## [1.2.2-0] - 2026-04-09
55
-
56
- ### Changed
57
-
58
- - **Breaking:** Migrate build system from Babel to Rollup. Output structure changed from `dist/` to `dist/{esm,cjs,types}/`. Package exports updated accordingly. ([7601ff3](https://github.com/l7aromeo/meocord/commit/7601ff3))
59
- - Replace Babel with Rollup for faster ESM, CJS, and declaration builds. ([7601ff3](https://github.com/l7aromeo/meocord/commit/7601ff3))
60
- - Move `discord.js` from dependencies to peer dependencies only, preventing duplicate package installs in consumer projects. ([7601ff3](https://github.com/l7aromeo/meocord/commit/7601ff3))
61
- - Replace webpack-based TypeScript config compilation with jiti runtime loader for faster startup and no temp file generation. ([268869b](https://github.com/l7aromeo/meocord/commit/268869b))
62
-
63
- ### Fixed
64
-
65
- - Resolve webpack config path in CLI after dist structure change. ([76fcc96](https://github.com/l7aromeo/meocord/commit/76fcc96))
66
- - Resolve circular dependency between `core/meocord.app.ts` and `decorator/app.decorator.ts`. ([69b63ec](https://github.com/l7aromeo/meocord/commit/69b63ec))
67
- - Extract context validation in `@UseGuard` to a type predicate function to eliminate redundant `instanceof` check warnings. ([1c1cdb4](https://github.com/l7aromeo/meocord/commit/1c1cdb4))
68
-
69
- ## [1.2.1] - 2026-03-18
70
-
71
- ### Fixed
72
-
73
- - Fix graceful shutdown requiring double Ctrl+C to fully exit by properly handling SIGINT across parent and child processes. ([293377b](https://github.com/l7aromeo/meocord/commit/293377b))
74
- - Clear activity `setInterval` on shutdown to prevent it from keeping the process alive. ([293377b](https://github.com/l7aromeo/meocord/commit/293377b))
75
- - Remove unnecessary `wait()` delays in shutdown path for faster exit. ([293377b](https://github.com/l7aromeo/meocord/commit/293377b))
76
- - Add force-exit on second Ctrl+C at all process levels to prevent hanging when `bot.destroy()` stalls. ([293377b](https://github.com/l7aromeo/meocord/commit/293377b))
77
- - Propagate child process exit code to parent instead of always exiting with 0. ([293377b](https://github.com/l7aromeo/meocord/commit/293377b))
78
-
79
- ## [1.2.0] - 2026-03-11
80
-
81
- ### Added
82
-
83
- - feat(core): support modal submit in interaction dynamic params ([4f372b8](https://github.com/l7aromeo/meocord/commit/4f372b8709e0a164f80cce7d0d3e7dd64a3cd5f0))
84
-
85
- ### Fixed
86
-
87
- - Fix Webpack `ExternalItem` type mismatch in `meocord-config-loader.util.ts`.
88
-
89
- ### Changed
90
-
91
- - chore(deps): bump multiple dependencies ([a70d9e4](https://github.com/l7aromeo/meocord/commit/a70d9e405452553c6a40750b98658fd2403951a8))
92
-
93
- ## [1.1.0] - 2026-01-27
94
-
95
- ### Added
96
-
97
- - Add support for `UseGuard` to be used directly for class.
98
- - Add support for `Message` and `MessageReaction` handlers in `UseGuard` and `Guard` decorators.
99
-
100
- ### Changed
101
-
102
- - Update dependencies.
103
- - Refactor dependency injection container to avoid circular dependencies.
104
-
105
- ## [1.0.18-0] - 2026-01-26
106
-
107
- ### Added
108
-
109
- - Add support for `UseGuard` to be used directly for class.
110
- - Support for `Message` and `MessageReaction` handlers in `UseGuard` and `Guard` decorators.
111
-
112
- ### Changed
113
-
114
- - Update dependencies.
115
- - Refactor dependency injection container to avoid circular dependencies.
116
-
117
- ## [1.0.17] - 2025-12-29
118
-
119
- ### Fixed
120
-
121
- - Improve webpack compiler error handling and add keep-alive workaround for Bun.
122
-
123
- ### Changed
124
-
125
- - Update ESLint config to ignore `.yarn` directory.
126
-
127
- ## [1.0.16] - 2025-12-24
128
-
129
- ### Changed
130
-
131
- - Update `@swc/core`, `inversify`, `lodash-es`, `webpack`, and ESLint/TypeScript-ESLint related dependencies to their
132
- latest versions.
133
-
134
- ## [1.0.15] - 2025-12-12
135
-
136
- ### Added
137
-
138
- - Add multiple publish scripts for versioning and prepublish tasks.
139
-
140
- ### Changed
141
-
142
- - Update dependencies and bump Yarn version.
143
-
144
- ## [1.0.14] - 2025-10-30
145
-
146
- ### Fixed
147
-
148
- - Remove debug logging for command registration.
149
-
150
- ## [1.0.13] - 2025-10-30
151
-
152
- ### Fixed
153
-
154
- - Enhance command registration logging with type and subcommand details.
155
-
156
- ## [1.0.12] - 2025-10-27
157
-
158
- ### Fixed
159
-
160
- - Rename event listener from 'ready' to 'clientReady' in bot.
161
-
162
- ### Changed
163
-
164
- - Update dependencies.
165
-
166
- ## [1.0.11] - 2025-10-14
167
-
168
- ### Added
169
-
170
- - Integrate SWC for faster TypeScript compilation.
171
-
172
- ## [1.0.10] - 2025-04-21
173
-
174
- ### Fixed
175
-
176
- - Remove 'clean' property from output config to prevent build errors.
177
-
178
- ### Refactored
179
-
180
- - Modularize TypeScript config compilation in `config-loader`.
181
-
182
- ## [1.0.9] - 2025-04-20
183
-
184
- ### Fixed
185
-
186
- - Ensure temporary build files survive output cleaning.
187
-
188
- ## [1.0.8] - 2025-04-20
189
-
190
- ### Refactored
191
-
192
- - Improve `TerserPlugin` option handling in webpack config.
193
-
194
- ## [1.0.7] - 2025-04-20
195
-
196
- ### Changed
197
-
198
- - Remove unused packages.
199
-
200
- ### Refactored
201
-
202
- - Improve webpack config generation for clarity and flexibility.
203
-
204
- ## [1.0.6] - 2025-03-28
205
-
206
- ### Added
207
-
208
- - Add support for multiple command handlers with the same identifier in interactions.
209
-
210
- ## [1.0.5] - 2025-03-22
211
-
212
- ### Refactored
213
-
214
- - Replace `container.resolve` with `container.get` using autobind for controllers.
215
-
216
- ## [1.0.4] - 2025-03-20
217
-
218
- ### Changed
219
-
220
- - Bump dependencies in `yarn.lock` for Babel, TypeScript-ESLint, ESLint, and InversifyJS.
221
-
222
- ### Refactored
223
-
224
- - Update Inversify usage and guard resolution logic with autobind and streamlined imports.
225
-
226
- ## [1.0.3] - 2025-03-14
227
-
228
- ### Fixed
229
-
230
- - Improve kebab-case normalization for app names in `createApp` method.
231
-
232
- ## [1.0.2] - 2025-03-14
233
-
234
- ### Added
235
-
236
- - Add Node.js version check when creating a new MeoCord app.
237
-
238
- ### Changed
239
-
240
- - Update `packageManager` to `yarn@4.7.0`.
241
-
242
- ### Fixed
243
-
244
- - Normalize app name to kebab-case when creating a new MeoCord app.
245
- - Enable corepack before installing dependencies.
246
-
247
- ### Documentation
248
-
249
- - Update README with prerequisites and app creation guide.
250
-
251
- ## [1.0.1] - 2025-03-12
252
-
253
- ### Documentation
254
-
255
- - Remove `verbatimModuleSyntax` setting from README.
256
-
257
- ## [1.0.0] - 2025-03-11
258
-
259
- ### Fixed
260
-
261
- - Update regex to allow alphanumeric parameter names.