create-mcp-kit 0.0.6 → 0.0.7
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/dist/index.js +19 -16
- package/package.json +8 -3
- package/template/client-js/.env.hbs +0 -0
- package/template/client-js/.gitignore.hbs +112 -0
- package/template/client-js/.nvmrc.hbs +1 -0
- package/template/client-js/.prettierrc.hbs +13 -0
- package/template/client-js/LICENSE.hbs +21 -0
- package/template/client-js/_github/workflows/build.yml.hbs +39 -0
- package/template/client-js/_github/workflows/npm-publish.yml.hbs +41 -0
- package/template/client-js/_husky/commit-msg.hbs +3 -0
- package/template/client-js/_husky/pre-commit.hbs +3 -0
- package/template/client-js/changelog-option.js.hbs +89 -0
- package/template/client-js/commitlint.config.js.hbs +27 -0
- package/template/client-js/eslint.config.js.hbs +48 -0
- package/template/client-js/jsconfig.json.hbs +21 -0
- package/template/client-js/lint-staged.config.js.hbs +5 -0
- package/template/client-js/package.json.hbs +66 -0
- package/template/client-js/scripts/base.js.hbs +65 -0
- package/template/client-js/scripts/build.js.hbs +4 -0
- package/template/client-js/scripts/dev.js.hbs +7 -0
- package/template/client-js/src/index.js.hbs +153 -0
- package/template/client-js/tests/index.test.js.hbs +22 -0
- package/template/{server-js/tests/utils.js → client-js/tests/utils.js.hbs} +2 -0
- package/template/client-js/vitest.config.js.hbs +27 -0
- package/template/client-js/vitest.global.js.hbs +21 -0
- package/template/client-ts/.env.hbs +0 -0
- package/template/client-ts/.gitignore.hbs +112 -0
- package/template/client-ts/.nvmrc.hbs +1 -0
- package/template/client-ts/.prettierrc.hbs +13 -0
- package/template/client-ts/LICENSE.hbs +21 -0
- package/template/client-ts/_github/workflows/build.yml.hbs +39 -0
- package/template/client-ts/_github/workflows/npm-publish.yml.hbs +41 -0
- package/template/client-ts/_husky/commit-msg.hbs +3 -0
- package/template/client-ts/_husky/pre-commit.hbs +3 -0
- package/template/client-ts/changelog-option.js.hbs +89 -0
- package/template/client-ts/commitlint.config.js.hbs +27 -0
- package/template/client-ts/eslint.config.js.hbs +55 -0
- package/template/client-ts/lint-staged.config.js.hbs +5 -0
- package/template/client-ts/package.json.hbs +73 -0
- package/template/client-ts/scripts/base.js.hbs +65 -0
- package/template/client-ts/scripts/build.js.hbs +4 -0
- package/template/client-ts/scripts/dev.js.hbs +7 -0
- package/template/client-ts/src/index.ts.hbs +153 -0
- package/template/client-ts/tests/index.test.ts.hbs +22 -0
- package/template/{server-ts/tests/utils.ts → client-ts/tests/utils.ts.hbs} +2 -0
- package/template/client-ts/tsconfig.json.hbs +21 -0
- package/template/client-ts/vitest.config.ts.hbs +27 -0
- package/template/client-ts/vitest.global.ts.hbs +21 -0
- package/template/server-js/jsconfig.json.hbs +5 -1
- package/template/server-js/package.json.hbs +4 -3
- package/template/server-js/tests/utils.js.hbs +18 -0
- package/template/server-js/vitest.config.js.hbs +5 -0
- package/template/server-js/vitest.global.js.hbs +1 -1
- package/template/server-ts/package.json.hbs +5 -4
- package/template/server-ts/tests/utils.ts.hbs +22 -0
- package/template/server-ts/tsconfig.json.hbs +5 -1
- package/template/server-ts/vitest.config.ts.hbs +5 -0
package/dist/index.js
CHANGED
|
@@ -32,7 +32,10 @@ const group = await clack.group({
|
|
|
32
32
|
message: "Project type:",
|
|
33
33
|
options: [{
|
|
34
34
|
value: "server",
|
|
35
|
-
label: pc.
|
|
35
|
+
label: pc.magentaBright("MCP Server")
|
|
36
|
+
}, {
|
|
37
|
+
value: "client",
|
|
38
|
+
label: pc.greenBright("MCP Client")
|
|
36
39
|
}]
|
|
37
40
|
}),
|
|
38
41
|
name: ({ results }) => clack.text({
|
|
@@ -44,10 +47,10 @@ const group = await clack.group({
|
|
|
44
47
|
message: "Project language:",
|
|
45
48
|
options: [{
|
|
46
49
|
value: "ts",
|
|
47
|
-
label: pc.
|
|
50
|
+
label: pc.magentaBright("TypeScript")
|
|
48
51
|
}, {
|
|
49
52
|
value: "js",
|
|
50
|
-
label: pc.
|
|
53
|
+
label: pc.greenBright("JavaScript")
|
|
51
54
|
}]
|
|
52
55
|
}),
|
|
53
56
|
transports: () => {
|
|
@@ -58,15 +61,15 @@ const group = await clack.group({
|
|
|
58
61
|
options: [
|
|
59
62
|
{
|
|
60
63
|
value: "stdio",
|
|
61
|
-
label: pc.
|
|
64
|
+
label: pc.magentaBright("STDIO")
|
|
62
65
|
},
|
|
63
66
|
{
|
|
64
67
|
value: "streamable",
|
|
65
|
-
label: pc.
|
|
68
|
+
label: pc.greenBright("Streamable HTTP")
|
|
66
69
|
},
|
|
67
70
|
{
|
|
68
71
|
value: "sse",
|
|
69
|
-
label: pc.
|
|
72
|
+
label: pc.yellowBright("SSE")
|
|
70
73
|
}
|
|
71
74
|
]
|
|
72
75
|
});
|
|
@@ -75,17 +78,17 @@ const group = await clack.group({
|
|
|
75
78
|
message: "Project template:",
|
|
76
79
|
options: [{
|
|
77
80
|
value: "standard",
|
|
78
|
-
label: pc.
|
|
81
|
+
label: pc.magentaBright("Standard (recommended)")
|
|
79
82
|
}, {
|
|
80
83
|
value: "custom",
|
|
81
|
-
label: pc.
|
|
84
|
+
label: pc.greenBright("Custom")
|
|
82
85
|
}]
|
|
83
86
|
}),
|
|
84
87
|
plugins: ({ results }) => {
|
|
85
88
|
if (results.template !== "custom") return Promise.resolve([
|
|
86
89
|
"github-action",
|
|
87
90
|
"vitest",
|
|
88
|
-
"inspector",
|
|
91
|
+
...results.type === "server" ? ["inspector"] : [],
|
|
89
92
|
"style",
|
|
90
93
|
"commitlint",
|
|
91
94
|
"changelog"
|
|
@@ -96,23 +99,23 @@ const group = await clack.group({
|
|
|
96
99
|
options: [
|
|
97
100
|
{
|
|
98
101
|
value: "github-action",
|
|
99
|
-
label: pc.
|
|
102
|
+
label: pc.magentaBright("GitHub Action")
|
|
100
103
|
},
|
|
101
104
|
{
|
|
102
105
|
value: "vitest",
|
|
103
|
-
label: pc.
|
|
106
|
+
label: pc.greenBright("Vitest")
|
|
104
107
|
},
|
|
105
|
-
{
|
|
108
|
+
...results.type === "server" ? [{
|
|
106
109
|
value: "inspector",
|
|
107
|
-
label: pc.
|
|
108
|
-
},
|
|
110
|
+
label: pc.cyanBright("Inspector")
|
|
111
|
+
}] : [],
|
|
109
112
|
{
|
|
110
113
|
value: "style",
|
|
111
|
-
label: pc.
|
|
114
|
+
label: pc.yellowBright("ESLint + Prettier + Lint-staged")
|
|
112
115
|
},
|
|
113
116
|
{
|
|
114
117
|
value: "commitlint",
|
|
115
|
-
label: pc.
|
|
118
|
+
label: pc.redBright("Commitlint")
|
|
116
119
|
},
|
|
117
120
|
{
|
|
118
121
|
value: "changelog",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-mcp-kit",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.7",
|
|
4
|
+
"description": "A CLI tool to create MCP (Model Context Protocol) applications with ease.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "zhensherlock",
|
|
7
7
|
"homepage": "https://github.com/my-mcp-hub/mcp-kit/tree/master/packages/create#readme",
|
|
@@ -12,11 +12,16 @@
|
|
|
12
12
|
"mcp",
|
|
13
13
|
"mcp server",
|
|
14
14
|
"mcp client",
|
|
15
|
+
"mcp host",
|
|
15
16
|
"mcp kit",
|
|
16
17
|
"mcp tool kit",
|
|
18
|
+
"mcp cli",
|
|
19
|
+
"cli",
|
|
20
|
+
"cli tool",
|
|
17
21
|
"create mcp",
|
|
18
22
|
"create mcp server",
|
|
19
23
|
"create mcp client",
|
|
24
|
+
"create mcp host",
|
|
20
25
|
"modelcontextprotocol",
|
|
21
26
|
"typescript"
|
|
22
27
|
],
|
|
@@ -43,7 +48,7 @@
|
|
|
43
48
|
"gradient-string": "^3.0.0",
|
|
44
49
|
"handlebars": "^4.7.8",
|
|
45
50
|
"picocolors": "^1.1.1",
|
|
46
|
-
"@mcp-tool-kit/shared": "^0.0.
|
|
51
|
+
"@mcp-tool-kit/shared": "^0.0.8"
|
|
47
52
|
},
|
|
48
53
|
"devDependencies": {},
|
|
49
54
|
"scripts": {
|
|
File without changes
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
.DS_Store
|
|
2
|
+
.idea/
|
|
3
|
+
# Logs
|
|
4
|
+
logs
|
|
5
|
+
*.log
|
|
6
|
+
npm-debug.log*
|
|
7
|
+
yarn-debug.log*
|
|
8
|
+
yarn-error.log*
|
|
9
|
+
lerna-debug.log*
|
|
10
|
+
|
|
11
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
12
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
13
|
+
|
|
14
|
+
# Runtime data
|
|
15
|
+
pids
|
|
16
|
+
*.pid
|
|
17
|
+
*.seed
|
|
18
|
+
*.pid.lock
|
|
19
|
+
|
|
20
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
21
|
+
lib-cov
|
|
22
|
+
|
|
23
|
+
# Coverage directory used by tools like istanbul
|
|
24
|
+
coverage
|
|
25
|
+
*.lcov
|
|
26
|
+
|
|
27
|
+
# nyc test coverage
|
|
28
|
+
.nyc_output
|
|
29
|
+
|
|
30
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
31
|
+
.grunt
|
|
32
|
+
|
|
33
|
+
# Bower dependency directory (https://bower.io/)
|
|
34
|
+
bower_components
|
|
35
|
+
|
|
36
|
+
# node-waf configuration
|
|
37
|
+
.lock-wscript
|
|
38
|
+
|
|
39
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
40
|
+
build/Release
|
|
41
|
+
|
|
42
|
+
# Dependency directories
|
|
43
|
+
node_modules/
|
|
44
|
+
jspm_packages/
|
|
45
|
+
|
|
46
|
+
# TypeScript v1 declaration files
|
|
47
|
+
typings/
|
|
48
|
+
|
|
49
|
+
# TypeScript cache
|
|
50
|
+
*.tsbuildinfo
|
|
51
|
+
|
|
52
|
+
# Optional npm cache directory
|
|
53
|
+
.npm
|
|
54
|
+
|
|
55
|
+
# Optional eslint cache
|
|
56
|
+
.eslintcache
|
|
57
|
+
|
|
58
|
+
# Microbundle cache
|
|
59
|
+
.rpt2_cache/
|
|
60
|
+
.rts2_cache_cjs/
|
|
61
|
+
.rts2_cache_es/
|
|
62
|
+
.rts2_cache_umd/
|
|
63
|
+
|
|
64
|
+
# Optional REPL history
|
|
65
|
+
.node_repl_history
|
|
66
|
+
|
|
67
|
+
# Output of 'npm pack'
|
|
68
|
+
*.tgz
|
|
69
|
+
|
|
70
|
+
# Yarn Integrity file
|
|
71
|
+
.yarn-integrity
|
|
72
|
+
|
|
73
|
+
# dotenv environment variables file
|
|
74
|
+
#.env
|
|
75
|
+
.env.test
|
|
76
|
+
|
|
77
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
78
|
+
.cache
|
|
79
|
+
|
|
80
|
+
# Next.js build output
|
|
81
|
+
.next
|
|
82
|
+
|
|
83
|
+
# Nuxt.js build / generate output
|
|
84
|
+
.nuxt
|
|
85
|
+
dist
|
|
86
|
+
|
|
87
|
+
# Gatsby files
|
|
88
|
+
.cache/
|
|
89
|
+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
|
90
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
91
|
+
# public
|
|
92
|
+
|
|
93
|
+
# vuepress build output
|
|
94
|
+
.vuepress/dist
|
|
95
|
+
|
|
96
|
+
# Serverless directories
|
|
97
|
+
.serverless/
|
|
98
|
+
|
|
99
|
+
# FuseBox cache
|
|
100
|
+
.fusebox/
|
|
101
|
+
|
|
102
|
+
# DynamoDB Local files
|
|
103
|
+
.dynamodb/
|
|
104
|
+
|
|
105
|
+
# TernJS port file
|
|
106
|
+
.tern-port
|
|
107
|
+
|
|
108
|
+
/docs/.vitepress/cache/
|
|
109
|
+
|
|
110
|
+
stats.html
|
|
111
|
+
|
|
112
|
+
build/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v22
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{{#if (includes plugins 'style')}}
|
|
2
|
+
{
|
|
3
|
+
"tabWidth": 2,
|
|
4
|
+
"printWidth": 120,
|
|
5
|
+
"useTabs": false,
|
|
6
|
+
"semi": false,
|
|
7
|
+
"singleQuote": true,
|
|
8
|
+
"trailingComma": "all",
|
|
9
|
+
"bracketSpacing": true,
|
|
10
|
+
"jsxBracketSameLine": false,
|
|
11
|
+
"arrowParens": "avoid"
|
|
12
|
+
}
|
|
13
|
+
{{/if}}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) {{year}} {{projectName}}
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{{#if (includes plugins 'github-action')}}
|
|
2
|
+
name: build
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
if: github.repository == '{{projectName}}'
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- name: Install Node
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version: 22
|
|
23
|
+
cache: npm
|
|
24
|
+
|
|
25
|
+
- name: Install Package
|
|
26
|
+
run: npm i
|
|
27
|
+
|
|
28
|
+
- name: Lint
|
|
29
|
+
run: npm run lint
|
|
30
|
+
|
|
31
|
+
- name: Build Package
|
|
32
|
+
run: npm run build
|
|
33
|
+
|
|
34
|
+
- name: Test Package
|
|
35
|
+
run: npm run coverage
|
|
36
|
+
|
|
37
|
+
- name: Coveralls
|
|
38
|
+
uses: coverallsapp/github-action@v2
|
|
39
|
+
{{/if}}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{{#if (includes plugins 'github-action')}}
|
|
2
|
+
name: npm-publish
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
release:
|
|
6
|
+
types: [created]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
if: github.repository == '{{projectName}}'
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
id-token: write
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: Install Node
|
|
22
|
+
uses: actions/setup-node@v4
|
|
23
|
+
with:
|
|
24
|
+
node-version: 22
|
|
25
|
+
registry-url: https://registry.npmjs.org/
|
|
26
|
+
cache: npm
|
|
27
|
+
|
|
28
|
+
- name: Install Package
|
|
29
|
+
run: npm i
|
|
30
|
+
|
|
31
|
+
- name: Lint
|
|
32
|
+
run: npm run lint
|
|
33
|
+
|
|
34
|
+
- name: Build Package
|
|
35
|
+
run: npm run build
|
|
36
|
+
|
|
37
|
+
- name: Publish NPM Package
|
|
38
|
+
run: npm publish --provenance --access public
|
|
39
|
+
env:
|
|
40
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
41
|
+
{{/if}}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{{#if (includes plugins 'changelog')}}
|
|
2
|
+
import compareFunc from 'compare-func'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
writerOpts: {
|
|
6
|
+
transform: (commit, context) => {
|
|
7
|
+
let discard = true
|
|
8
|
+
const issues = []
|
|
9
|
+
|
|
10
|
+
const newCommit = {
|
|
11
|
+
...commit,
|
|
12
|
+
notes: commit.notes.map(note => ({
|
|
13
|
+
...note,
|
|
14
|
+
title: 'BREAKING CHANGES',
|
|
15
|
+
})),
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (newCommit.notes.length > 0) {
|
|
19
|
+
discard = false
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const typeMap = {
|
|
23
|
+
feat: '✨ Features | 新功能',
|
|
24
|
+
fix: '🐛 Bug Fixes | Bug 修复',
|
|
25
|
+
perf: '⚡ Performance Improvements | 性能优化',
|
|
26
|
+
revert: '⏪ Reverts | 回退',
|
|
27
|
+
refactor: '♻ Code Refactoring | 代码重构',
|
|
28
|
+
test: '✅ Tests | 测试',
|
|
29
|
+
build: '👷 Build System | 构建',
|
|
30
|
+
chore: '🎫 Chores | 其他更新',
|
|
31
|
+
style: '💄 Styles | 风格',
|
|
32
|
+
ci: '🔧 Continuous Integration | CI 配置',
|
|
33
|
+
docs: '📝 Documentation | 文档',
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (typeMap[newCommit.type]) {
|
|
37
|
+
newCommit.type = typeMap[newCommit.type]
|
|
38
|
+
} else if (newCommit.type === 'revert' || newCommit.revert) {
|
|
39
|
+
newCommit.type = typeMap['revert']
|
|
40
|
+
} else if (discard) {
|
|
41
|
+
return
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (newCommit.scope === '*') {
|
|
45
|
+
newCommit.scope = ''
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (typeof newCommit.hash === 'string') {
|
|
49
|
+
newCommit.shortHash = newCommit.hash.substring(0, 7)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (typeof newCommit.subject === 'string') {
|
|
53
|
+
let url = context.repository ? `${context.host}/${context.owner}/${context.repository}` : context.repoUrl
|
|
54
|
+
|
|
55
|
+
if (url) {
|
|
56
|
+
url = `${url}/issues/`
|
|
57
|
+
newCommit.subject = newCommit.subject.replace(/#([0-9]+)/g, (_, issue) => {
|
|
58
|
+
issues.push(issue)
|
|
59
|
+
return `[#${issue}](${url}${issue})`
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (context.host) {
|
|
64
|
+
newCommit.subject = newCommit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
|
|
65
|
+
if (username.includes('/')) {
|
|
66
|
+
return `@${username}`
|
|
67
|
+
}
|
|
68
|
+
return `[@${username}](${context.host}/${username})`
|
|
69
|
+
})
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
newCommit.references = newCommit.references.filter(reference => {
|
|
74
|
+
if (issues.indexOf(reference.issue) === -1) {
|
|
75
|
+
return true
|
|
76
|
+
}
|
|
77
|
+
return false
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
return newCommit
|
|
81
|
+
},
|
|
82
|
+
groupBy: 'type',
|
|
83
|
+
commitGroupsSort: 'title',
|
|
84
|
+
commitsSort: ['scope', 'subject'],
|
|
85
|
+
noteGroupsSort: 'title',
|
|
86
|
+
notesSort: compareFunc,
|
|
87
|
+
},
|
|
88
|
+
}
|
|
89
|
+
{{/if}}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{{#if (includes plugins 'commitlint')}}
|
|
2
|
+
export default {
|
|
3
|
+
extends: ['@commitlint/config-conventional'],
|
|
4
|
+
rules: {
|
|
5
|
+
'type-enum': [
|
|
6
|
+
2,
|
|
7
|
+
'always',
|
|
8
|
+
[
|
|
9
|
+
'feat',
|
|
10
|
+
'fix',
|
|
11
|
+
'docs',
|
|
12
|
+
'style',
|
|
13
|
+
'refactor',
|
|
14
|
+
'perf',
|
|
15
|
+
'test',
|
|
16
|
+
'build',
|
|
17
|
+
'ci',
|
|
18
|
+
'chore',
|
|
19
|
+
'revert',
|
|
20
|
+
'build',
|
|
21
|
+
'release',
|
|
22
|
+
],
|
|
23
|
+
],
|
|
24
|
+
'subject-case': [0],
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
{{/if}}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{{#if (includes plugins 'style')}}
|
|
2
|
+
import importPlugin from 'eslint-plugin-import'
|
|
3
|
+
import prettierPlugin from 'eslint-plugin-prettier'
|
|
4
|
+
import globals from 'globals'
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
{
|
|
8
|
+
ignores: ['**/build', '**/node_modules', '**/.*', '.husky/'],
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
{{#if (includes plugins 'vitest')}}
|
|
12
|
+
files: ['src/**/*.js', 'tests/**/*.js'],
|
|
13
|
+
{{else}}
|
|
14
|
+
files: ['src/**/*.js'],
|
|
15
|
+
{{/if}}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
languageOptions: {
|
|
19
|
+
parserOptions: {
|
|
20
|
+
ecmaVersion: 'latest',
|
|
21
|
+
sourceType: 'module',
|
|
22
|
+
},
|
|
23
|
+
globals: {
|
|
24
|
+
...globals.es2022,
|
|
25
|
+
...globals.node,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
plugins: {
|
|
29
|
+
import: importPlugin,
|
|
30
|
+
prettier: prettierPlugin,
|
|
31
|
+
},
|
|
32
|
+
rules: {
|
|
33
|
+
'prettier/prettier': 'error',
|
|
34
|
+
'no-console': 'off',
|
|
35
|
+
semi: ['warn', 'never'],
|
|
36
|
+
quotes: ['warn', 'single'],
|
|
37
|
+
'no-unused-vars': 'off',
|
|
38
|
+
},
|
|
39
|
+
settings: {
|
|
40
|
+
'import/resolver': {
|
|
41
|
+
node: {
|
|
42
|
+
extensions: ['.js'],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
]
|
|
48
|
+
{{/if}}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"outDir": "./build",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"paths": {
|
|
12
|
+
"@/*": ["./src/*"]
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{{#if (includes plugins 'vitest')}}
|
|
16
|
+
"include": ["src", "tests", "vitest.config.js", "vitest.global.js"],
|
|
17
|
+
{{else}}
|
|
18
|
+
"include": ["src"],
|
|
19
|
+
{{/if}}
|
|
20
|
+
"exclude": ["node_modules"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "{{projectName}}",
|
|
5
|
+
"author": "zhensherlock",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"files": [
|
|
9
|
+
"build",
|
|
10
|
+
"LICENSE",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"main": "build/index.js",
|
|
14
|
+
"scripts": {
|
|
15
|
+
{{#if (includes plugins 'style')}}
|
|
16
|
+
"lint": "npx eslint \"src/**/*.js\"",
|
|
17
|
+
{{/if}}
|
|
18
|
+
"build": "tsc --noEmit && cross-env NODE_ENV=production node scripts/build.js",
|
|
19
|
+
"dev": "cross-env NODE_ENV=local node scripts/dev.js",
|
|
20
|
+
{{#if (includes plugins 'vitest')}}
|
|
21
|
+
"test": "vitest run",
|
|
22
|
+
"coverage": "rimraf coverage && vitest run --coverage",
|
|
23
|
+
{{/if}}
|
|
24
|
+
{{#if (includes plugins 'changelog')}}
|
|
25
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 -n changelog-option.js",
|
|
26
|
+
{{/if}}
|
|
27
|
+
"prepare": "husky"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.17.3",
|
|
31
|
+
"dotenv": "^17.2.1"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
{{#if (includes plugins 'commitlint')}}
|
|
35
|
+
"@commitlint/cli": "^19.8.1",
|
|
36
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
37
|
+
{{/if}}
|
|
38
|
+
{{#if (includes plugins 'vitest')}}
|
|
39
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
40
|
+
{{/if}}
|
|
41
|
+
{{#if (includes plugins 'changelog')}}
|
|
42
|
+
"compare-func": "^2.0.0",
|
|
43
|
+
{{/if}}
|
|
44
|
+
{{#if (includes plugins 'changelog')}}
|
|
45
|
+
"conventional-changelog-angular": "^8.0.0",
|
|
46
|
+
"conventional-changelog-cli": "^5.0.0",
|
|
47
|
+
{{/if}}
|
|
48
|
+
"cross-env": "^10.0.0",
|
|
49
|
+
"esbuild": "^0.25.9",
|
|
50
|
+
{{#if (includes plugins 'style')}}
|
|
51
|
+
"eslint": "^9.33.0",
|
|
52
|
+
"eslint-plugin-import": "^2.32.0",
|
|
53
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
54
|
+
"globals": "^16.3.0",
|
|
55
|
+
{{/if}}
|
|
56
|
+
"husky": "^9.1.7",
|
|
57
|
+
{{#if (includes plugins 'style')}}
|
|
58
|
+
"lint-staged": "^16.1.5",
|
|
59
|
+
"prettier": "^3.6.2",
|
|
60
|
+
{{/if}}
|
|
61
|
+
{{#if (includes plugins 'vitest')}}
|
|
62
|
+
"vitest": "^3.2.4",
|
|
63
|
+
{{/if}}
|
|
64
|
+
"rimraf": "^6.0.1"
|
|
65
|
+
}
|
|
66
|
+
}
|