Add local frontend validation of app manifest fields#5997
Conversation
🦋 Changeset detectedLatest commit: 5b708a1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements local validation for app extension manifests using Zod schemas. The validation covers extension configurations, mount points, targets, and ensures proper relationships between URLs, targets, and permissions before submitting to Saleor's backend validation.
Key Changes
- Added
ExtensionManifestValidatorclass to validate app manifests with Zod schemas - Implemented comprehensive schema definitions for app manifests, extensions, targets, options, and mount points
- Added validation rules for URL patterns, permission subsets, and target-specific configurations
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/extensions/extension-manifest-validator.ts | Core validator class that parses and validates app manifests |
| src/extensions/domain/app-manifest.ts | Schema for app manifest with validation for relative URLs and permission inheritance |
| src/extensions/domain/app-extension-manifest.ts | Schema for individual extensions with target/mount/URL validation rules |
| src/extensions/domain/app-extension-manifest-target.ts | Enum schema defining valid extension targets |
| src/extensions/domain/app-extension-manifest-options.ts | Schema for target-specific options with mutual exclusivity validation |
| src/extensions/domain/app-extension-manifest-available-mounts.ts | Constants defining valid mount points and widget-compatible mounts |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5997 +/- ##
==========================================
+ Coverage 39.52% 39.63% +0.11%
==========================================
Files 2428 2434 +6
Lines 39532 39613 +81
Branches 8721 9058 +337
==========================================
+ Hits 15624 15701 +77
+ Misses 23882 22713 -1169
- Partials 26 1199 +1173 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Differences Found✅ No packages or licenses were added. SummaryExpand
|
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 19 out of 21 changed files in this pull request and generated 13 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 22 out of 24 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 23 out of 25 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
Added client-side validation of app manifest fields during the installation flow. This provides early feedback to users while making the installation process more permissive - converting some API-level validation errors into warnings that don't block installation.
Changes
Benefits
Next steps