Skip to content

fix: resolve missing deps, broken JSON, type errors, and typos in CLI templates#521

Merged
heyitsaamir merged 4 commits into
mainfrom
fix/cli-template-bugs
Apr 14, 2026
Merged

fix: resolve missing deps, broken JSON, type errors, and typos in CLI templates#521
heyitsaamir merged 4 commits into
mainfrom
fix/cli-template-bugs

Conversation

@heyitsaamir

@heyitsaamir heyitsaamir commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Missing dependencies: Added missing @microsoft/teams.* and @microsoft/teams-js packages to 5 TypeScript template package.json.hbs files (ai, graph, mcp, mcpclient, tab) that were imported in source but not declared
  • Template/config bugs: Fixed broken JSON from split-line inspect script (mcp), wrong generic type params (tab app.function), missing utf8 encoding (vite.config.js), escaped Handlebars variable (csharp slnlaunch), stale net9.0 target (teamsapp.yml), unused bicep params (embed azure.parameters.json), uninitialized variable (python graph main.py)
  • Typos: Fixed "comma-delimeted" → "comma-delimited" in both oauth README files

… templates

Fix nine issues across packages/cli/ templates and configs:
- Add missing package dependencies in TypeScript template package.json.hbs files
- Fix broken JSON from split inspect script in mcp template
- Correct generic type parameters in tab template's app.function call
- Add utf8 encoding to readFileSync in tab vite.config.js
- Remove backslash escaping second {{name}} in csharp slnlaunch.user.hbs
- Update net9.0 → net10.0 in teamsapp.yml.hbs to match csproj target
- Remove unused botAadAppClientId/Secret from embed azure.parameters.json.hbs
- Initialize me = None before conditional in python graph template
- Fix "comma-delimeted" typo in oauth README files

Co-Authored-By: Claude <[email protected]>
Comment thread packages/cli/templates/typescript/ai/package.json.hbs
Comment thread packages/cli/templates/typescript/graph/package.json.hbs
Comment thread packages/cli/templates/typescript/mcp/package.json.hbs
Comment thread packages/cli/templates/typescript/mcpclient/package.json.hbs
Comment thread packages/cli/templates/typescript/tab/package.json.hbs
Comment thread packages/cli/templates/typescript/tab/src/index.ts Outdated
Comment thread packages/cli/templates/typescript/tab/vite.config.js
Comment thread packages/cli/templates/csharp/echo/{{name}}.slnlaunch.user.hbs
Comment thread packages/cli/configs/atk/basic/csharp/TeamsApp/teamsapp.yml.hbs
Comment thread packages/cli/templates/python/graph/src/main.py
Comment thread packages/cli/configs/atk/oauth/typescript/README.md
Comment thread packages/cli/configs/atk/oauth/python/README.md
singhk97
singhk97 previously approved these changes Apr 13, 2026
- examples/graph: add missing @microsoft/teams.common dependency
- examples/tab: add missing @microsoft/teams.common and @microsoft/teams-js dependencies
- examples/tab: fix app.function<> generic type parameters
- examples/tab: add 'utf8' encoding to readFileSync in vite.config.js

Co-Authored-By: Claude <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR fixes several CLI templates and examples by adding missing Teams SDK dependencies, correcting configuration/template bugs that caused broken builds or runtime issues, and cleaning up typos.

Changes:

  • Added missing @microsoft/teams.* and @microsoft/teams-js dependencies across multiple TypeScript templates/examples.
  • Fixed template/config issues (Vite tsconfigRaw read encoding, MCP inspect script JSON, corrected app.function generics, and other template fixes).
  • Corrected documentation typos in OAuth README files.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/cli/templates/typescript/tab/vite.config.js Read tsconfig.app.json as UTF-8 string for tsconfigRaw.
packages/cli/templates/typescript/tab/src/index.ts Fix app.function generic types for request/response shape.
packages/cli/templates/typescript/tab/package.json.hbs Add missing @microsoft/teams-js and @microsoft/teams.common.
packages/cli/templates/typescript/mcpclient/package.json.hbs Add missing Teams AI/common dependencies.
packages/cli/templates/typescript/mcp/package.json.hbs Fix broken JSON in inspect script and add Teams AI dependency.
packages/cli/templates/typescript/graph/package.json.hbs Add missing @microsoft/teams.api dependency.
packages/cli/templates/typescript/ai/package.json.hbs Add missing @microsoft/teams.common dependency.
packages/cli/templates/python/graph/src/main.py Initialize me to avoid uninitialized usage.
packages/cli/templates/csharp/echo/{{name}}.slnlaunch.user.hbs Fix escaped Handlebars variable in project path.
packages/cli/configs/atk/oauth/typescript/README.md Fix typo “comma-delimeted” → “comma-delimited”.
packages/cli/configs/atk/oauth/python/README.md Fix typo “comma-delimeted” → “comma-delimited”.
packages/cli/configs/atk/embed/typescript/infra/azure.parameters.json.hbs Remove unused bot AAD parameter entries.
packages/cli/configs/atk/basic/csharp/TeamsApp/teamsapp.yml.hbs Update deploy artifact path target framework folder.
examples/tab/vite.config.js Read tsconfig.app.json as UTF-8 string for tsconfigRaw.
examples/tab/src/index.ts Fix app.function generic types for request/response shape.
examples/tab/package.json Add missing @microsoft/teams-js and @microsoft/teams.common.
examples/graph/package.json Add missing @microsoft/teams.common.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/templates/typescript/tab/package.json.hbs
Comment thread examples/tab/package.json
heyitsaamir and others added 2 commits April 13, 2026 14:46
- Fix app.function<> to use single generic <TData> matching the actual
  type signature (TPlugin is inferred, TData is the input shape)
- Add missing @microsoft/teams.api to examples/ai
- Add missing @microsoft/teams.common to examples/mcp and examples/mcpclient
- Satisfies template-sync CI check

Co-Authored-By: Claude <[email protected]>
The func<TPlugin, TData> signature requires both type args. The original
<{}, { message: string }> was correct (TPlugin={}, TData={message:string}).

Co-Authored-By: Claude <[email protected]>
@heyitsaamir
heyitsaamir merged commit 12e1e42 into main Apr 14, 2026
8 checks passed
@heyitsaamir
heyitsaamir deleted the fix/cli-template-bugs branch April 14, 2026 01:08
@heyitsaamir heyitsaamir mentioned this pull request Apr 16, 2026
heyitsaamir added a commit that referenced this pull request Apr 16, 2026
## Summary
- Merges all changes from `main` since v2.0.7 into `release`
- Sets `version.json` to stable `2.0.8`

### What's included
- **feat:** Sovereign cloud support (GCCH, DoD, China) (#500)
- **feat:** Add missing endpoints — Paged Members, Meeting Notifications
& client gaps (#516)
- **feat:** Graceful stream cancellation on 403 (#513)
- **feat:** GitHub issue analysis → Teams notification workflow (#517)
- **fix:** Improve error message when app credentials are missing (#527)
- **fix:** Surface Graph API error body in GraphError (#524)
- **fix:** Resolve missing deps, broken JSON, type errors, and typos in
CLI templates (#521)
- **fix:** Drain entire queue per flush cycle (#520)
- **fix:** Merge User-Agent headers when cloning HTTP client (#508)
- Dependency bumps: hono, axios, vite, @hono/node-server

## Post-merge
1. Trigger the [release
pipeline](https://dev.azure.com/DomoreexpGithub/Github_Pipelines/_build?definitionId=52&_a=summary)
for `release` with **Public** publish type
2. Bump `version.json` on `main` to `2.0.9-preview.{height}`

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants