mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-03 13:44:09 +08:00
* feat: removing old webapp skills * feat: adding sync of skills from webapps to afv * feat: adding the first iteration of skills * feat: pin template deps to latest npm versions and flatten skill folders - Add pin-template-deps.js to resolve "*" deps to exact npm versions - Integrate pinning into sync-template-skills npm script - Remove check-template-skills-versions.js (no longer needed) - Simplify workflow to single sync step - Flatten skill output: one folder per skill with cleaned names Made-with: Cursor * fix: resolve skill validation errors - Move .template-versions.json from skills/ to root - Shorten skill names to meet 64-char limit: - salesforce-webapp-feature-micro-frontend-generating-micro-frontend-lwc → salesforce-webapp-micro-frontend-lwc - salesforce-webapp-feature-react-agentforce-conversation-client-integrating-agentforce-conversation-client → salesforce-webapp-agentforce-conversation-client - salesforce-webapp-feature-react-file-upload-implementing-file-upload → salesforce-webapp-react-file-upload - Expand descriptions to meet 20-word minimum with trigger context * Add webapp skills from template, sync script updates - Rename skill folders from salesforce-webapp-* to *-webapp-* convention - Update sync-template-skills.js: set SKILL.md front matter name to dest folder - Remove sync-template-skills workflow and pin-template-deps script - Add .synced-template-skills.json manifest, deploying-webapp-to-salesforce skill - Replace salesforce-webapp-designing-webapp-ui-ux with designing-webapp-ui-ux Made-with: Cursor * Align SKILL.md front matter name with folder for all webapp skills Made-with: Cursor * Fix skill validation: description length and trigger context for configuring-webapp-metadata, creating-webapp Made-with: Cursor * Rename sync script to sync-webapp-skills, drop manifest file - Rename sync-template-skills.js to sync-webapp-skills.js - Update package.json script to sync-webapp-skills - Remove .synced-template-skills.json creation and add to .gitignore Made-with: Cursor * Revert sync-react-b2e-sample and sync-react-b2x-sample to upstream version Made-with: Cursor * Sync script: pin b2e and b2x to latest, sync skills from template - Pin both template packages to latest in sync-webapp-skills.js - Update package.json / package-lock.json (b2x 1.109.0) - Sync skills: managing-webapp-agentforce-conversation-client, bar-line-chart, remove building-webapp-analytics-charts and integrating-webapp-agentforce-conversation-client - Minor skill content updates Made-with: Cursor * Remove interactive map, weather widget, and Unsplash skills (no longer in template) Made-with: Cursor --------- Co-authored-by: Hemant Singh Bisht <hsinghbisht@salesforce.com>
3.4 KiB
3.4 KiB
| name | description |
|---|---|
| configuring-webapp-metadata | Use this skill when configuring web application metadata structure, webapplication.json, or bundle organization. Covers WebApplication bundle layout, meta XML, build output directory, and webapplication.json settings. |
WebApplication Requirements
Bundle Rules
- A WebApplication bundle must live under
webapplications/<AppName>/ - The bundle must contain
<AppName>.webapplication-meta.xml - The metadata filename must exactly match the folder name
- A build output directory must exist and contain at least one file
- Default build output directory:
dist/ - If
webapplication.json.outputDiris set, it overridesdist/
Valid example:
webapplications/
MyApp/
MyApp.webapplication-meta.xml
webapplication.json
dist/
index.html
Metadata XML
Required fields:
masterLabelversion(max 20 chars)isActive(boolean)
Optional fields:
description(max 255 chars)
webapplication.json
webapplication.json is optional.
Allowed top-level keys only:
outputDirroutingheaders
File Constraints
- Must be valid UTF-8 JSON
- Max size: 100 KB
- Root must be a non-empty object
- Never allow
{}, arrays, or primitives as the root
Path Safety
Applies to:
outputDirrouting.fallback
Reject:
- backslashes
- leading
/or\ ..segments- null or control characters
- globs:
*,?,** %
All resolved paths must stay within the application bundle.
outputDir
- Must be a non-empty string
- Must reference a subdirectory only
- Reject
.and./ - The directory must exist in the bundle
- The directory must contain at least one file
routing
- If present, must be a non-empty object
- Allowed keys only:
rewritesredirectsfallbacktrailingSlashfileBasedRouting
routing.trailingSlash
- Must be one of:
"always","never","auto"
routing.fileBasedRouting
- Must be a boolean
routing.fallback
- Must be a non-empty string
- Must satisfy Path Safety rules
- Target file must exist
routing.rewrites
- Must be a non-empty array
- Each item must be a non-empty object
- Allowed keys:
route,rewrite rewritemust be a non-empty stringroute, if present, must be a non-empty string
Example:
{
"routing": {
"rewrites": [
{ "route": "/app/:path*", "rewrite": "/index.html" }
]
}
}
routing.redirects
- Must be a non-empty array
- Each item must be a non-empty object
- Allowed keys:
route,redirect,statusCode redirectmust be a non-empty stringroute, if present, must be a non-empty stringstatusCode, if present, must be one of:301,302,307,308
Example:
{
"routing": {
"redirects": [
{ "route": "/old-page", "redirect": "/new-page", "statusCode": 301 }
]
}
}
headers
- If present, must be a non-empty array
- Each item must be a non-empty object
- Allowed keys:
source,headers headersmust be a non-empty array
Each header entry must contain:
key: non-empty stringvalue: non-empty string
Example:
{
"headers": [
{
"source": "/assets/**",
"headers": [
{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
]
}
]
}
Never Suggest
{}as the JSON root"routing": {}- empty arrays
- empty array items such as
[{}] "outputDir": ".""outputDir": "./"