From bf5a0ca74223545cfc8e1e5cc0668fe186bf1e61 Mon Sep 17 00:00:00 2001 From: Erik van der Boom Date: Mon, 27 Apr 2026 23:19:34 +0200 Subject: [PATCH] fix(ci): sync the templates/ folder to vscode-ext alongside templates.ts After the templates split, mcp-ts/src/templates.ts imports from ./templates/.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. --- .github/workflows/ci.yml | 12 ++++++++---- .github/workflows/release.yml | 5 ++++- .gitignore | 3 ++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82266de..0f71d04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3008ff2..d01beee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: | diff --git a/.gitignore b/.gitignore index c6c3c19..0a66cdb 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,5 @@ Thumbs.db *~ # misc - added in pipeline -ai-setup-templates.ts \ No newline at end of file +ai-setup-templates.ts +vscode-ext/src/templates/