Skip to content

Commit 4476e95

Browse files
authored
Merge pull request #257 from underctrl-io/codegen
feat: add codegen
2 parents e00f219 + 0972cf4 commit 4476e95

32 files changed

+1548
-600
lines changed

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ pnpm-debug.log*
2929

3030
.turbo
3131
turbo-lint.log
32-
.source
32+
.source
33+
34+
turbo/generators/templates/**/*.hbs

apps/test-bot/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Client } from 'discord.js';
22
import { Logger, commandkit } from 'commandkit';
3-
import './ai';
3+
import './ai.ts';
44

55
const client = new Client({
66
intents: [

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"apps/*"
99
],
1010
"scripts": {
11+
"bootstrap": "turbo gen bootstrap --args",
1112
"lint": "turbo run --filter=\"./packages/*\" lint",
1213
"build": "turbo run --filter=\"./packages/*\" build",
1314
"publish-package": "pnpm publish-package",
@@ -71,8 +72,10 @@
7172
]
7273
},
7374
"dependencies": {
75+
"@turbo/gen": "^2.5.4",
7476
"fs-extra": "^11.3.0",
7577
"klaw-sync": "^7.0.0",
76-
"typescript": "^5.8.3"
78+
"typescript": "^5.8.3",
79+
"yaml": "^2.8.0"
7780
}
7881
}

packages/ai/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
"commandkit",
2020
"ai"
2121
],
22-
"author": "twilight <[email protected]>",
22+
"contributors": [
23+
"Twilight <[email protected]>",
24+
25+
],
2326
"license": "MIT",
2427
"bugs": {
2528
"url": "https://github.com/underctrl-io/commandkit/issues"
@@ -29,7 +32,8 @@
2932
"commandkit": "workspace:*",
3033
"discord.js": "^14.19.3",
3134
"tsconfig": "workspace:*",
32-
"typescript": "^5.7.3"
35+
"typescript": "^5.7.3",
36+
"tsdown": "^0.12.7"
3337
},
3438
"dependencies": {
3539
"ai": "^4.3.16",

packages/ai/tsdown.config.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import createConfig from '../../tsdown.config';
2+
3+
export default createConfig();

packages/analytics/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
"commandkit",
2828
"analytics"
2929
],
30-
"author": "twilight <[email protected]>",
30+
"contributors": [
31+
"Twilight <[email protected]>",
32+
33+
],
3134
"license": "MIT",
3235
"bugs": {
3336
"url": "https://github.com/underctrl-io/commandkit/issues"
@@ -38,6 +41,7 @@
3841
"commandkit": "workspace:*",
3942
"posthog-node": "^4.18.0",
4043
"tsconfig": "workspace:*",
41-
"typescript": "^5.7.3"
44+
"typescript": "^5.7.3",
45+
"tsdown": "^0.12.7"
4246
}
4347
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import createConfig from '../../tsdown.config';
2+
3+
export default createConfig({
4+
entry: ['src'],
5+
unbundle: true,
6+
});

packages/cache/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
"cache management",
2323
"commandkit cache"
2424
],
25-
"author": "twilight <[email protected]>",
25+
"contributors": [
26+
"Twilight <[email protected]>",
27+
28+
],
2629
"license": "MIT",
2730
"bugs": {
2831
"url": "https://github.com/underctrl-io/commandkit/issues"
@@ -32,7 +35,8 @@
3235
"@types/ms": "^2.0.0",
3336
"commandkit": "workspace:*",
3437
"tsconfig": "workspace:*",
35-
"typescript": "^5.7.3"
38+
"typescript": "^5.7.3",
39+
"tsdown": "^0.12.7"
3640
},
3741
"dependencies": {
3842
"ms": "^2.1.3",

packages/cache/tsdown.config.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import createConfig from '../../tsdown.config';
2+
3+
export default createConfig();

packages/commandkit/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ You can find the full documentation [here](https://commandkit.dev).
4141

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

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

4645
```bash
47-
npm create commandkit@dev
46+
npm create commandkit
4847
```
4948

5049
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.

0 commit comments

Comments
 (0)