You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+73-53Lines changed: 73 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# Contributing to Asgardeo MCP Node.js SDKs
2
2
3
-
This guide walks you through setting up the development environment and other important information for contributing to Asgardeo MCP Node.js SDKs.
3
+
This guide walks you through setting up the development environment and other important information for contributing to
4
+
Asgardeo MCP Node.js SDKs.
4
5
5
6
We welcome contributions of all kinds, from bug fixes and documentation improvements to new features.
6
7
@@ -35,9 +36,9 @@ We welcome contributions of all kinds, from bug fixes and documentation improvem
35
36
36
37
To build and write code, make sure you have the following set of tools on your local environment:
37
38
38
-
*[Git](https://git-scm.com/downloads) - Open source distributed version control system.
39
-
*[Node.js](https://nodejs.org/en/download/) - JavaScript runtime. (`v16.x or higher`)
40
-
*[pnpm](https://pnpm.io/) - Alternate npm client for faster package installs. (`v8.x or higher`)
39
+
-[Git](https://git-scm.com/downloads) - Open source distributed version control system.
40
+
-[Node.js](https://nodejs.org/en/download/) - JavaScript runtime. (`v16.x or higher`)
41
+
-[pnpm](https://pnpm.io/) - Alternate npm client for faster package installs. (`v8.x or higher`)
41
42
42
43
## Development Tools
43
44
@@ -95,10 +96,11 @@ pnpm build
95
96
96
97
## Project Structure
97
98
98
-
The asgardeo-mcp-node repository is a monorepo containing the following key packages located in the `packages/` directory:
99
+
The asgardeo-mcp-node repository is a monorepo containing the following key packages located in the `packages/`
100
+
directory:
99
101
100
-
-`packages/mcp-node` (`@brionmario-experimental/mcp-node`): Core Node.js utilities for MCP.
101
-
-`packages/mcp-express` (`@brionmario-experimental/mcp-express`): Express middleware for MCP, likely dependent on mcp-node.
102
+
-`packages/mcp-node` (`@asgardeo/mcp-node`): Core Node.js utilities for MCP.
103
+
-`packages/mcp-express` (`@asgardeo/mcp-express`): Express middleware for MCP, likely dependent on mcp-node.
102
104
103
105
Shared configurations (like ESLint, Prettier, TypeScript) are typically managed at the root level.
104
106
@@ -123,39 +125,42 @@ Shared configurations (like ESLint, Prettier, TypeScript) are typically managed
123
125
You can build all packages or a specific package:
124
126
125
127
**Build all packages:**
128
+
126
129
```bash
127
130
pnpm run build
128
131
# or if you have a specific script for all packages
129
132
# pnpm run build:all
130
133
```
131
134
132
-
**Build a specific package:**
133
-
Use the `--filter` flag with pnpm. Replace `<package-name>` with the actual package name (e.g., `@brionmario-experimental/mcp-express`).
135
+
**Build a specific package:** Use the `--filter` flag with pnpm. Replace `<package-name>` with the actual package name
136
+
(e.g., `@asgardeo/mcp-express`).
134
137
135
138
```bash
136
139
pnpm --filter <package-name> run build
137
140
138
141
# Example for mcp-express:
139
-
pnpm --filter @brionmario-experimental/mcp-express run build
142
+
pnpm --filter @asgardeo/mcp-express run build
140
143
```
141
144
142
145
### Linting Code
143
146
144
147
Ensure your code adheres to the project's linting standards:
145
148
146
149
**Lint all packages:**
150
+
147
151
```bash
148
152
pnpm run lint
149
153
# or
150
154
# pnpm run lint:all
151
155
```
152
156
153
157
**Lint a specific package:**
158
+
154
159
```bash
155
160
pnpm --filter <package-name> run lint
156
161
157
162
# Example for mcp-node:
158
-
pnpm --filter @brionmario-experimental/mcp-node run lint
163
+
pnpm --filter @asgardeo/mcp-node run lint
159
164
```
160
165
161
166
You can also run lint fix scripts if available (e.g., `pnpm run lint:fix`).
@@ -165,26 +170,28 @@ You can also run lint fix scripts if available (e.g., `pnpm run lint:fix`).
165
170
Ensure all existing tests pass and add new tests for your changes:
166
171
167
172
**Test all packages:**
173
+
168
174
```bash
169
175
pnpm run test
170
176
# or
171
177
# pnpm run test:all
172
178
```
173
179
174
180
**Test a specific package:**
181
+
175
182
```bash
176
183
pnpm --filter <package-name> run test
177
184
178
185
# Example for mcp-express:
179
-
pnpm --filter @brionmario-experimental/mcp-express run test
186
+
pnpm --filter @asgardeo/mcp-express run test
180
187
```
181
188
182
189
## Commit Message Guidelines
183
190
184
-
*This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].*
191
+
_This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format]._
185
192
186
-
We have very precise rules over how our Git commit messages must be formatted.
187
-
This format leads to **easier to read commit history**.
193
+
We have very precise rules over how our Git commit messages must be formatted. This format leads to **easier to read
194
+
commit history**.
188
195
189
196
Each commit message consists of a **header**, a **body**, and a **footer**.
190
197
@@ -198,10 +205,11 @@ Each commit message consists of a **header**, a **body**, and a **footer**.
198
205
199
206
The `header` is mandatory and must conform to the [Commit Message Header](#commit-message-header) format.
200
207
201
-
The `body` is mandatory for all commits except for those of type "docs".
202
-
When the body is present it must be at least 20 characters long and must conform to the [Commit Message Body](#commit-message-body) format.
208
+
The `body` is mandatory for all commits except for those of type "docs". When the body is present it must be at least 20
209
+
characters long and must conform to the [Commit Message Body](#commit-message-body) format.
203
210
204
-
The `footer` is optional. The [Commit Message Footer](#commit-message-footer) format describes what the footer is used for and the structure it must have.
211
+
The `footer` is optional. The [Commit Message Footer](#commit-message-footer) format describes what the footer is used
212
+
for and the structure it must have.
205
213
206
214
### Commit Message Header
207
215
@@ -221,54 +229,59 @@ The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` field is opti
221
229
222
230
Must be one of the following:
223
231
224
-
***build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
225
-
***ci**: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
226
-
***docs**: Documentation only changes
227
-
***feat**: A new feature
228
-
***fix**: A bug fix
229
-
***perf**: A code change that improves performance
230
-
***refactor**: A code change that neither fixes a bug nor adds a feature
231
-
***chore**: Housekeeping tasks that doesn't require to be highlighted in the changelog
232
-
***test**: Adding missing tests or correcting existing tests
232
+
-**build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
233
+
-**ci**: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
234
+
-**docs**: Documentation only changes
235
+
-**feat**: A new feature
236
+
-**fix**: A bug fix
237
+
-**perf**: A code change that improves performance
238
+
-**refactor**: A code change that neither fixes a bug nor adds a feature
239
+
-**chore**: Housekeeping tasks that doesn't require to be highlighted in the changelog
240
+
-**test**: Adding missing tests or correcting existing tests
233
241
234
242
#### Scope
235
243
236
-
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).
244
+
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated
245
+
from commit messages).
237
246
238
247
The following is the list of supported scopes:
239
248
240
-
*`mcp-node` - Changes to the `@brionmario-experimental/mcp-node` package.
241
-
*`mcp-express` - Changes to the `@brionmario-experimental/mcp-express` package.
242
-
*`workspace` - Changes to the workspace.
243
-
*`sample-app` - Changes to the sample app.
249
+
-`mcp-node` - Changes to the `@asgardeo/mcp-node` package.
250
+
-`mcp-express` - Changes to the `@asgardeo/mcp-express` package.
251
+
-`workspace` - Changes to the workspace.
252
+
-`sample-app` - Changes to the sample app.
244
253
245
254
There are currently a few exceptions to the "use package name" rule:
246
255
247
-
*`packaging`: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
248
-
*`changelog`: used for updating the release notes in CHANGELOG.md
249
-
*`dev-infra`: used for dev-infra related changes within the directories like /scripts.
250
-
*`docs-infra`: used for docs page changes.
251
-
* none/empty string: useful for `test` and `refactor` changes that are done across all packages (e.g. `test: add missing unit tests`) and for docs changes that are not related to a specific package (e.g. `docs: fix typo in example`).
256
+
-`packaging`: used for changes that change the npm package layout in all of our packages, e.g. public path changes,
257
+
package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
258
+
-`changelog`: used for updating the release notes in CHANGELOG.md
259
+
-`dev-infra`: used for dev-infra related changes within the directories like /scripts.
260
+
-`docs-infra`: used for docs page changes.
261
+
- none/empty string: useful for `test` and `refactor` changes that are done across all packages (e.g.
262
+
`test: add missing unit tests`) and for docs changes that are not related to a specific package (e.g.
263
+
`docs: fix typo in example`).
252
264
253
265
#### Summary
254
266
255
267
Use the summary field to provide a succinct description of the change:
256
268
257
-
* Use the imperative, present tense: "change" not "changed" nor "changes".
258
-
* Don't capitalize the first letter.
259
-
* No dot (.) at the end.
269
+
- Use the imperative, present tense: "change" not "changed" nor "changes".
270
+
- Don't capitalize the first letter.
271
+
- No dot (.) at the end.
260
272
261
273
### Commit Message Body
262
274
263
275
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
264
276
265
-
Explain the motivation for the change in the commit message body. This commit message should explain _why_ you are making the change.
266
-
You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
277
+
Explain the motivation for the change in the commit message body. This commit message should explain _why_ you are
278
+
making the change. You can include a comparison of the previous behavior with the new behavior in order to illustrate
279
+
the impact of the change.
267
280
268
281
### Commit Message Footer
269
282
270
-
The footer can contain information about breaking changes and deprecations and is also the place to reference GitHub issues, Jira tickets, and other PRs that this commit closes or is related to.
271
-
For example:
283
+
The footer can contain information about breaking changes and deprecations and is also the place to reference GitHub
284
+
issues, Jira tickets, and other PRs that this commit closes or is related to. For example:
272
285
273
286
```
274
287
BREAKING CHANGE: <breaking change summary>
@@ -290,9 +303,11 @@ DEPRECATED: <what is deprecated>
290
303
Closes #<pr number>
291
304
```
292
305
293
-
Breaking Change section should start with the phrase "BREAKING CHANGE: " followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
306
+
Breaking Change section should start with the phrase "BREAKING CHANGE: " followed by a summary of the breaking change, a
307
+
blank line, and a detailed description of the breaking change that also includes migration instructions.
294
308
295
-
Similarly, a Deprecation section should start with "DEPRECATED: " followed by a short description of what is deprecated, a blank line, and a detailed description of the deprecation that also mentions the recommended update path.
309
+
Similarly, a Deprecation section should start with "DEPRECATED: " followed by a short description of what is deprecated,
310
+
a blank line, and a detailed description of the deprecation that also mentions the recommended update path.
296
311
297
312
### Revert Commits
298
313
@@ -311,19 +326,22 @@ The content of the commit message body should contain:
311
326
```bash
312
327
git push origin feat/your-feature-name
313
328
```
314
-
4. Go to the original `brionmario/asgardeo-mcp-node` repository on GitHub and open a new Pull Request from your forked branch to the `main` branch of the upstream repository.
329
+
4. Go to the original `brionmario/asgardeo-mcp-node` repository on GitHub and open a new Pull Request from your forked
330
+
branch to the `main` branch of the upstream repository.
315
331
5. Provide a clear title and a detailed description for your Pull Request:
316
332
- Explain the "why" and "what" of your changes.
317
333
- Reference any related GitHub issues (e.g., "Closes #123").
318
334
- Include steps for testing if applicable.
319
-
6. Your Pull Request will be reviewed by maintainers. Be prepared to discuss your changes and make adjustments based on feedback.
335
+
6. Your Pull Request will be reviewed by maintainers. Be prepared to discuss your changes and make adjustments based on
336
+
feedback.
320
337
7. Once approved and all checks pass, your PR will be merged.
321
338
322
339
## Reporting Bugs
323
340
324
341
If you encounter a bug, please help us by reporting it!
325
342
326
-
1.**Search existing issues**: Before creating a new issue, please check if the bug has already been reported on the GitHub Issues page.
343
+
1.**Search existing issues**: Before creating a new issue, please check if the bug has already been reported on the
344
+
GitHub Issues page.
327
345
2.**Create a new issue**: If it's a new bug, please provide a detailed report including:
328
346
- A clear and descriptive title.
329
347
- Steps to reproduce the bug.
@@ -333,18 +351,20 @@ If you encounter a bug, please help us by reporting it!
333
351
334
352
### Security Vulnerabilities
335
353
336
-
Do not report security vulnerabilities through public GitHub issues.
337
-
Please report security vulnerabilities directly to security@wso2.com. We strongly advise following the WSO2 Security Vulnerability Reporting Guidelines.
354
+
Do not report security vulnerabilities through public GitHub issues. Please report security vulnerabilities directly to
355
+
security@wso2.com. We strongly advise following the WSO2 Security Vulnerability Reporting Guidelines.
338
356
339
357
## Suggesting Enhancements
340
358
341
359
We welcome suggestions for new features or improvements!
342
360
343
361
1.**Search existing issues/discussions**: Check if your idea has already been discussed.
344
-
2.**Create a new issue**: Provide a clear description of the proposed enhancement, why it would be beneficial, and any potential implementation details.
362
+
2.**Create a new issue**: Provide a clear description of the proposed enhancement, why it would be beneficial, and any
363
+
potential implementation details.
345
364
346
365
## License
347
366
348
-
By contributing to this project, you agree that your contributions will be licensed under the same license as the project itself.
367
+
By contributing to this project, you agree that your contributions will be licensed under the same license as the
0 commit comments