Skip to content

@W-21301307 Fix content tracking#1701

Open
lesya7 wants to merge 5 commits intomainfrom
fix-content-tracking
Open

@W-21301307 Fix content tracking#1701
lesya7 wants to merge 5 commits intomainfrom
fix-content-tracking

Conversation

@lesya7
Copy link
Collaborator

@lesya7 lesya7 commented Mar 6, 2026

What does this PR do?

Adds per-file deploy result tracking for WebApplication bundles. Previously, deploying a WebApplication returned a single rolled-up result for the entire bundle. Now, each individual file (HTML, JS, CSS, etc.) gets its own FileResponse with the correct Created/Changed/Deleted status, matching how LWC bundles already report per-file results.
Key changes:
Parse WebApplicationResource deploy messages into individual FileResponse entries, mapping server fullName values back to local file paths
Fix getState() to prioritize deleted over changed — the Metadata API sets both flags to true on deletes
Filter out server-generated internal paths (webapplicationcontentindex.json, languageSettings, /languages/) from user-facing results
Suppress spurious "unmatched server result" warnings for WebApplicationResource entries already consumed by their parent WebApplication
Guard webapplication.json validation to only run on real filesystem (NodeFSTreeContainer), preventing crashes during retrieve (ZipTreeContainer) and source tracking (VirtualTreeContainer).

What issues does this PR fix or reference?

#, @W-21301307@

Functionality Before

Deploying a WebApplication bundle returned a single entry in the deploy results table — just the bundle name and type. Individual file statuses were lost.

<insert gif and/or summary>

Functionality After

Each file in a WebApplication bundle gets its own row in the deploy results with accurate per-file status (Created, Changed, Deleted, Unchanged). The parent .webapplication-meta.xml also gets its own entry with the bundle-level state.

<insert gif and/or summary>

lesya7 and others added 5 commits March 6, 2026 15:35
- Make webapplication.json optional (file-based routing when absent)
- Skip client-side validation during retrieve (ZipTreeContainer)
- Add containsPathTraversal() rejecting .., absolute paths, null bytes,
  control chars, glob wildcards, backslashes, and percent-encoding
- Add assertNoTraversal() resolved-path check as defense in depth
- Add 100 KB size limit matching server-side WebApplicationFileProcessor
- Validate fallback/rewrite file existence with and without outputDir
- Reject outputDir that resolves to the bundle root (. or ./)
- Config paths must use forward slashes (URL-style, portable)

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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