Skip to content

Add manifest update command#2845

Draft
heyitsaamir wants to merge 1 commit into
mainfrom
aamirj/manifest-update-command
Draft

Add manifest update command#2845
heyitsaamir wants to merge 1 commit into
mainfrom
aamirj/manifest-update-command

Conversation

@heyitsaamir
Copy link
Copy Markdown
Collaborator

@heyitsaamir heyitsaamir commented May 19, 2026

Summary

  • Adds teams app manifest update for quick manifest edits without the download/edit/upload dance.
  • Supports --set-json and --remove, with schema validation before anything gets uploaded.
  • Adds a shared manifest update service so future commands can reuse the same flow instead of each one hand-rolling manifest writes.

How it works

  • The command resolves the app + token, then delegates the real work to applyManifestUpdate() in src/apps/manifest-update.ts.
  • The shared service downloads the current app package, reads manifest.json, applies the requested mutations, bumps the patch version once, validates the final manifest, uploads it, then verifies the changed paths survived TDP import/export.
  • Schema validation uses the manifest $schema URL when present, or derives it from manifestVersion. Schemas are fetched only from Microsoft-hosted schema URLs and cached locally.
  • --json mode stays non-interactive and returns structured errors/results. Mutating JSON mode requires --yes, unless it is a dry run.

Notes

  • --set-json is intentionally the only set operation
  • Post-upload verification catches cases where TDP accepts a schema-valid field but drops it during app-definition conversion.

Test plan

  • npm run check-types
  • npm run build
  • npm run test -- manifest-mutate.test.ts manifest-update-command.test.ts manifest-schema-url-security.test.ts manifest-schema-validation.test.ts manifest-validation.test.ts
  • npm run test

@heyitsaamir heyitsaamir requested a review from Copilot May 19, 2026 14:25
@heyitsaamir heyitsaamir force-pushed the aamirj/manifest-update-command branch from e603e13 to 94ce9a6 Compare May 19, 2026 14:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@heyitsaamir heyitsaamir force-pushed the aamirj/manifest-update-command branch 8 times, most recently from 38fe140 to a1e301a Compare May 19, 2026 21:22
@heyitsaamir heyitsaamir force-pushed the aamirj/manifest-update-command branch from a1e301a to 8aafccd Compare May 19, 2026 21:24
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.

2 participants