Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ pnpm-debug.log*

.turbo
turbo-lint.log
.source
.source

turbo/generators/templates/**/*.hbs
2 changes: 1 addition & 1 deletion apps/test-bot/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Client } from 'discord.js';
import { Logger, commandkit } from 'commandkit';
import './ai';
import './ai.ts';

const client = new Client({
intents: [
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"apps/*"
],
"scripts": {
"bootstrap": "turbo gen bootstrap --args",
"lint": "turbo run --filter=\"./packages/*\" lint",
"build": "turbo run --filter=\"./packages/*\" build",
"publish-package": "pnpm publish-package",
Expand Down Expand Up @@ -71,8 +72,10 @@
]
},
"dependencies": {
"@turbo/gen": "^2.5.4",
"fs-extra": "^11.3.0",
"klaw-sync": "^7.0.0",
"typescript": "^5.8.3"
"typescript": "^5.8.3",
"yaml": "^2.8.0"
}
}
8 changes: 6 additions & 2 deletions packages/ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
"commandkit",
"ai"
],
"author": "twilight <hello@twlite.dev>",
"contributors": [
"Twilight <hello@twlite.dev>",
"Avraj <avraj@underctrl.io>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/underctrl-io/commandkit/issues"
Expand All @@ -29,7 +32,8 @@
"commandkit": "workspace:*",
"discord.js": "^14.19.3",
"tsconfig": "workspace:*",
"typescript": "^5.7.3"
"typescript": "^5.7.3",
"tsdown": "^0.12.7"
},
"dependencies": {
"ai": "^4.3.16",
Expand Down
3 changes: 3 additions & 0 deletions packages/ai/tsdown.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import createConfig from '../../tsdown.config';

export default createConfig();
8 changes: 6 additions & 2 deletions packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
"commandkit",
"analytics"
],
"author": "twilight <hello@twlite.dev>",
"contributors": [
"Twilight <hello@twlite.dev>",
"Avraj <avraj@underctrl.io>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/underctrl-io/commandkit/issues"
Expand All @@ -38,6 +41,7 @@
"commandkit": "workspace:*",
"posthog-node": "^4.18.0",
"tsconfig": "workspace:*",
"typescript": "^5.7.3"
"typescript": "^5.7.3",
"tsdown": "^0.12.7"
}
}
6 changes: 6 additions & 0 deletions packages/analytics/tsdown.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import createConfig from '../../tsdown.config';

export default createConfig({
entry: ['src'],
unbundle: true,
});
8 changes: 6 additions & 2 deletions packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"cache management",
"commandkit cache"
],
"author": "twilight <hello@twlite.dev>",
"contributors": [
"Twilight <hello@twlite.dev>",
"Avraj <avraj@underctrl.io>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/underctrl-io/commandkit/issues"
Expand All @@ -32,7 +35,8 @@
"@types/ms": "^2.0.0",
"commandkit": "workspace:*",
"tsconfig": "workspace:*",
"typescript": "^5.7.3"
"typescript": "^5.7.3",
"tsdown": "^0.12.7"
},
"dependencies": {
"ms": "^2.1.3",
Expand Down
3 changes: 3 additions & 0 deletions packages/cache/tsdown.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import createConfig from '../../tsdown.config';

export default createConfig();
3 changes: 1 addition & 2 deletions packages/commandkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ You can find the full documentation [here](https://commandkit.dev).

To create a new CommandKit project, you can use the following command:

<!-- TODO: use stable version -->

```bash
npm create commandkit@dev
npm create commandkit
```

This will prompt you to enter few details about your project. Once you have entered the details, you can simply run `commandkit dev` to start the bot application.
Expand Down
13 changes: 13 additions & 0 deletions packages/commandkit/src/cli/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ export async function buildApplication({
importSource: 'commandkit',
},
},
checks: {
circularDependency: true,
},
onwarn: (warning, defaultWarn) => {
if (warning?.message?.includes('compilerOptions.jsx')) return;

return defaultWarn(warning);
},
onLog: (level, log, defaultLog) => {
if (isDev) return;

return defaultLog(level, log);
},
moduleTypes: {
'.json': 'js',
'.node': 'binary',
Expand Down
8 changes: 4 additions & 4 deletions packages/create-commandkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"homepage": "https://commandkit.dev",
"scripts": {
"lint": "tsc --noEmit",
"dev": "tsup --watch",
"build": "tsup",
"dev": "tsdown --watch",
"build": "tsc",
"publish-package": "npm publish"
},
"dependencies": {
Expand All @@ -45,7 +45,7 @@
"@types/gradient-string": "^1.1.5",
"@types/node": "^22.0.0",
"tsconfig": "workspace:*",
"tsup": "^8.0.1",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"tsdown": "^0.12.7"
}
}
9 changes: 9 additions & 0 deletions packages/create-commandkit/tsdown.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import createConfig from '../../tsdown.config';

export default createConfig({
format: ['esm'],
entry: ['./src/index.ts'],
sourcemap: false,
dts: false,
minify: true,
});
15 changes: 0 additions & 15 deletions packages/create-commandkit/tsup.config.ts

This file was deleted.

4 changes: 2 additions & 2 deletions packages/devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"description": "CommandKit devtools",
"version": "0.0.0",
"main": "dist/index.js",
"type": "commonjs",
"types": "dist/index.d.ts",
"scripts": {
"lint": "tsc --noEmit",
Expand All @@ -19,7 +18,8 @@
"commandkit": "workspace:*",
"discord.js": "^14.19.1",
"tsconfig": "workspace:*",
"typescript": "^5.8.3"
"typescript": "^5.8.3",
"tsdown": "^0.12.7"
},
"files": [
"dist",
Expand Down
8 changes: 6 additions & 2 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
"redis",
"cache"
],
"author": "twilight <hello@twlite.dev>",
"contributors": [
"Twilight <hello@twlite.dev>",
"Avraj <avraj@underctrl.io>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/underctrl-io/commandkit/issues"
Expand All @@ -34,6 +37,7 @@
"commandkit": "workspace:*",
"discord.js": "^14.19.1",
"tsconfig": "workspace:*",
"typescript": "^5.7.3"
"typescript": "^5.7.3",
"tsdown": "^0.12.7"
}
}
2 changes: 1 addition & 1 deletion packages/i18n/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class I18nCliTemplatePlugin extends CompilerPlugin {
try {
ctx.registerTemplate('locale', this.handleTemplate.bind(this));
} catch (e) {
Logger.error(`Failed to register CLI template "locale": ${e}`);
Logger.error(`Failed to register the CLI template "locale": ${e}`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ export function i18n(

export { I18nCliTemplatePlugin };
export { locale, fetchT } from './hooks';
export { getI18n, I18nPlugin, type CommandLocalizationContext } from './i18n';
export { useI18n, I18nPlugin, type CommandLocalizationContext } from './i18n';
3 changes: 3 additions & 0 deletions packages/i18n/tsdown.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import createConfig from '../../tsdown.config';

export default createConfig();
9 changes: 6 additions & 3 deletions packages/legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"description": "Legacy command handler plugin for CommandKit",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"files": [
"dist"
],
Expand All @@ -20,7 +19,10 @@
"commandkit",
"legacy"
],
"author": "twilight <hello@twlite.dev>",
"contributors": [
"Twilight <hello@twlite.dev>",
"Avraj <avraj@underctrl.io>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/underctrl-io/commandkit/issues"
Expand All @@ -30,6 +32,7 @@
"commandkit": "workspace:*",
"discord.js": "^14.19.1",
"tsconfig": "workspace:*",
"typescript": "^5.7.3"
"typescript": "^5.7.3",
"tsdown": "^0.12.7"
}
}
3 changes: 3 additions & 0 deletions packages/legacy/tsdown.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import createConfig from '../../tsdown.config';

export default createConfig();
5 changes: 4 additions & 1 deletion packages/redis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
"redis",
"cache"
],
"author": "twilight <hello@twlite.dev>",
"contributors": [
"Twilight <hello@twlite.dev>",
"Avraj <avraj@underctrl.io>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/underctrl-io/commandkit/issues"
Expand Down
9 changes: 0 additions & 9 deletions packages/tasks/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/tasks/src/index.ts

This file was deleted.

15 changes: 0 additions & 15 deletions packages/tasks/tsconfig.json

This file was deleted.

Loading
Loading