fix(ci): sync the templates/ folder to vscode-ext alongside templates.ts

After the templates split, mcp-ts/src/templates.ts imports from ./templates/<module>.ts, so the packaged VS Code extension's bundled fallback (vscode-ext/src/ai-setup-templates.ts) needs the matching templates/ folder for esbuild to resolve those imports at build time. Update both ci.yml and release.yml to copy mcp-ts/src/templates/ to vscode-ext/src/templates/ alongside the single-file copy, and add the destination folder to .gitignore. Also drops a stale comment referring to a parity test that no longer exists.
This commit is contained in:
Erik van der Boom 2026-04-27 23:19:34 +02:00
parent 2f586f8575
commit bf5a0ca742
3 changed files with 14 additions and 6 deletions

View file

@ -47,12 +47,13 @@ jobs:
path: mcp-ts/test-results.json
# ── Template sync ─────────────────────────────────────────────────────────
# ai-setup-templates.ts is .gitignored — always generated fresh here.
# The copy-parity test in mcp-ts/test/templates-parity.test.ts then confirms
# the synced file is byte-for-byte identical to the source.
# ai-setup-templates.ts and the templates/ folder copy are .gitignored
# — always generated fresh here from the mcp-ts source of truth.
- name: Sync templates to vscode-ext
run: |
cp mcp-ts/src/templates.ts vscode-ext/src/ai-setup-templates.ts
rm -rf vscode-ext/src/templates
cp -R mcp-ts/src/templates vscode-ext/src/templates
echo "Template copy synced."
# ── VS Code extension ─────────────────────────────────────────────────────
@ -98,7 +99,10 @@ jobs:
run: cd mcp-ts && npm run test:coverage
- name: Sync templates to vscode-ext
run: cp mcp-ts/src/templates.ts vscode-ext/src/ai-setup-templates.ts
run: |
cp mcp-ts/src/templates.ts vscode-ext/src/ai-setup-templates.ts
rm -rf vscode-ext/src/templates
cp -R mcp-ts/src/templates vscode-ext/src/templates
- name: Install vscode-ext
run: cd vscode-ext && npm ci

View file

@ -77,7 +77,10 @@ jobs:
npm run compile
- name: Sync templates to vscode-ext
run: cp mcp-ts/src/templates.ts vscode-ext/src/ai-setup-templates.ts
run: |
cp mcp-ts/src/templates.ts vscode-ext/src/ai-setup-templates.ts
rm -rf vscode-ext/src/templates
cp -R mcp-ts/src/templates vscode-ext/src/templates
- name: Bundle mcp-ts into extension
run: |

3
.gitignore vendored
View file

@ -33,4 +33,5 @@ Thumbs.db
*~
# misc - added in pipeline
ai-setup-templates.ts
ai-setup-templates.ts
vscode-ext/src/templates/