Skip to content

Commit ad93cd7

Browse files
authored
Merge pull request #513 from tsedio/init-mpc-2
Init mpc 2
2 parents 613a53c + 3a956ac commit ad93cd7

File tree

92 files changed

+2080
-974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+2080
-974
lines changed

β€ŽAGENTS.mdβ€Ž

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
5+
Yarn 4 + Lerna workspaces organize sources under `packages/*`: `cli` hosts command entrypoints and generator templates, `cli-core` handles DI/prompt infrastructure, `cli-mcp` exposes MCP servers and tools, while `cli-plugin-*` packages bundle framework-specific blueprints plus their own tests. `cli-testing` provides shared harnesses, templates live in `packages/cli/templates`, artifacts land in `dist/`, VuePress + TSDoc files stay in `docs/`, and `tools/*` holds automation scripts (TypeScript references, ESLint, Vitest installers).
6+
7+
## Build, Test, and Development Commands
8+
9+
- `yarn build`: runs `monorepo build --verbose` across every workspace.
10+
- `yarn build:references`: refreshes TS project references after renaming or adding packages.
11+
- `yarn test`: executes the Vitest suite once; add `--coverage` for V8 reports.
12+
- `yarn lint` / `yarn lint:fix`: applies the flat ESLint config + Prettier formatting used in CI.
13+
- `yarn docs:serve` / `yarn docs:build`: runs `lerna run build && tsdoc` then serves or builds the VuePress site.
14+
15+
## Coding Style & Naming Conventions
16+
17+
Author TypeScript ES modules with 2-space indentation, double quotes, and trailing commas per the shared Prettier rules. Favor named exports and keep command providers in `packages/cli/src/commands/**/NameCmd.ts`, suffixing classes with `Cmd`. Tests and utilities mirror their source paths, ending in `.spec.ts` or `.integration.spec.ts`. Plugin packages follow `cli-plugin-<feature>` naming; templates underneath use kebab-case folder names. Keep import blocks sorted (enforced by `eslint-plugin-simple-import-sort`) and reserve default exports for entry aggregators such as `packages/cli/src/index.ts`.
18+
19+
## Testing Guidelines
20+
21+
Vitest powers both unit and integration coverage. Co-locate fast tests next to implementation files, while scenario-heavy suites live under `packages/*/test/**`. Use `yarn vitest packages/cli/src/commands/init/InitCmd.spec.ts` to focus a file, prefer `.integration.spec.ts` when exercising generators end-to-end, and ship PRs with `yarn test --coverage` so CI can enforce thresholds. Mock filesystem access via helpers in `cli-testing` instead of touching the real disk.
22+
23+
## Commit & Pull Request Guidelines
24+
25+
Commit messages must satisfy Conventional Commits (see `commitlint.config.js`); scope by workspace, e.g., `feat(cli-plugin-prisma): expand seed template`. Keep subjects under 200 characters and describe behavior, not implementation minutiae. Before opening a pull request, run `yarn build`, `yarn test`, and `yarn lint`, update docs/templates when behavior changes, and link the relevant issue. Summaries should highlight user-facing changes, test evidence, and screenshots or logs when generator output shifts.

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
# Contributing
1+
# Contributing
2+
23
## Introduction
34

45
First, thank you for considering contributing to Ts.ED! It is people like you that make the open source community such a great community! 😊
56

67
We welcome any type of contribution, not just code. You can help with:
78

9+
- Repository-specific build, testing, and PR expectations are summarized in the [Repository Guidelines](AGENTS.md); please skim them before opening a pull request.
10+
811
- QA: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
912
- Marketing: writing blog posts, how to's, printing stickers, ...
1013
- Community: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
@@ -23,15 +26,15 @@ Code review process
2326
The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge. It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
2427

2528
---
29+
2630
### WARNING
2731

2832
Ts.ED project uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) as format commit message.
2933

3034
Release note and tagging version are based on the message commits.
3135
If you don't follow the format, our CI won't be able to increment the version correctly and your feature won't be released on NPM.
3236

33-
To write your commit message, see [convention page here](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)
34-
---
37+
## To write your commit message, see [convention page here](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)
3538

3639
## Financial contributions
3740

@@ -42,6 +45,7 @@ We also welcome financial contributions in full transparency on our open collect
4245
If you have any questions, create an [issue](https://github.com/tsedio/tsed/issues) (protip: do a quick search first to see if someone else didn't ask the same question before!). You can also reach us at https://gitter.im/Tsed-io/community.
4346

4447
## How to work on Ts.ED
48+
4549
### Setup
4650

4751
Clone your fork of the repository
@@ -51,6 +55,7 @@ $ git clone https://github.com/YOUR_USERNAME/tsed-cli.git
5155
```
5256

5357
Install npm dependencies with yarn (not with NPM!):
58+
5459
```bash
5560
yarn
5661
```
@@ -59,7 +64,7 @@ Compile TypeScript:
5964

6065
```bash
6166
yarn build
62-
// or
67+
// or
6368
npm run build
6469
```
6570

@@ -101,6 +106,7 @@ git commit -m "feat(domain): Your message"
101106
```
102107

103108
Then:
109+
104110
```bash
105111
npm run test
106112
git fetch
@@ -142,18 +148,17 @@ yarn vuepress:serve
142148
- Feel free to ask for help from other members of the Ts.ED team.
143149

144150
## Credits
151+
145152
### Contributors
146153

147154
<a href="https://github.com/tsedio/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
148155

149-
150156
### Backers
151157

152158
Thank you to all our backers! πŸ™ [[Become a backer](https://opencollective.com/tsed#backer)]
153159

154160
<a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/backers.svg?width=890"></a>
155161

156-
157162
### Sponsors
158163

159164
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]

β€Žcommitlint.config.jsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export default {
22
extends: ["@commitlint/config-conventional"],
33
rules: {
4-
"header-max-length": [2, "always", 200]
4+
"header-max-length": [2, "always", 200],
5+
"body-max-line-length": [2, "always", 300]
56
}
67
};

β€Žpackage.jsonβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
},
4545
"homepage": "https://github.com/tsedio/tsed-cli",
4646
"dependencies": {
47-
"@tsed/core": ">=8.18.0",
48-
"@tsed/di": ">=8.18.0",
47+
"@tsed/core": ">=8.21.0",
48+
"@tsed/di": ">=8.21.0",
4949
"@tsed/logger": ">=8.0.3",
5050
"@tsed/logger-std": ">=8.0.3",
51-
"@tsed/normalize-path": ">=8.18.0",
52-
"@tsed/openspec": ">=8.18.0",
53-
"@tsed/schema": ">=8.18.0",
51+
"@tsed/normalize-path": ">=8.21.0",
52+
"@tsed/openspec": ">=8.21.0",
53+
"@tsed/schema": ">=8.21.0",
5454
"axios": "^1.7.7",
5555
"chalk": "^5.3.0",
5656
"commander": "^12.1.0",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {command} from "../fn/command.js";
2-
import type {CommandParameters} from "../interfaces/CommandParameters.js";
2+
import type {BaseCommandOptions} from "../interfaces/CommandOptions.js";
33

4-
export function Command(options: CommandParameters): ClassDecorator {
4+
export function Command<Input = any>(options: BaseCommandOptions<Input>): ClassDecorator {
55
return (token) => {
6-
command(token, options);
6+
command({...options, token});
77
};
88
}
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
export * from "./command.js";
2-
export * from "./onAdd.js";
3-
export * from "./onExec.js";
4-
export * from "./onPostInstall.js";
5-
export * from "./onPrompt.js";

β€Žpackages/cli-core/src/decorators/on.tsβ€Ž

Lines changed: 0 additions & 9 deletions
This file was deleted.

β€Žpackages/cli-core/src/decorators/onAdd.spec.tsβ€Ž

Lines changed: 0 additions & 18 deletions
This file was deleted.

β€Žpackages/cli-core/src/decorators/onAdd.tsβ€Ž

Lines changed: 0 additions & 6 deletions
This file was deleted.

β€Žpackages/cli-core/src/decorators/onExec.spec.tsβ€Ž

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
Β (0)