@salesforce/webapp-template-feature-micro-frontend 1.86.0 → 1.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
paths:
|
|
4
|
+
- "**/webapplications/**/*"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# WebApplication Requirements
|
|
8
|
+
|
|
9
|
+
## Bundle Rules
|
|
10
|
+
- A WebApplication bundle must live under `webapplications/<AppName>/`
|
|
11
|
+
- The bundle must contain `<AppName>.webapplication-meta.xml`
|
|
12
|
+
- The metadata filename must exactly match the folder name
|
|
13
|
+
- A build output directory must exist and contain at least one file
|
|
14
|
+
- Default build output directory: `dist/`
|
|
15
|
+
- If `webapplication.json.outputDir` is set, it overrides `dist/`
|
|
16
|
+
|
|
17
|
+
Valid example:
|
|
18
|
+
```text
|
|
19
|
+
webapplications/
|
|
20
|
+
MyApp/
|
|
21
|
+
MyApp.webapplication-meta.xml
|
|
22
|
+
webapplication.json
|
|
23
|
+
dist/
|
|
24
|
+
index.html
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Metadata XML
|
|
28
|
+
Required fields:
|
|
29
|
+
- `masterLabel`
|
|
30
|
+
- `version` (max 20 chars)
|
|
31
|
+
- `isActive` (boolean)
|
|
32
|
+
|
|
33
|
+
Optional fields:
|
|
34
|
+
- `description` (max 255 chars)
|
|
35
|
+
|
|
36
|
+
## webapplication.json
|
|
37
|
+
`webapplication.json` is optional.
|
|
38
|
+
|
|
39
|
+
Allowed top-level keys only:
|
|
40
|
+
- `outputDir`
|
|
41
|
+
- `routing`
|
|
42
|
+
- `headers`
|
|
43
|
+
|
|
44
|
+
### File Constraints
|
|
45
|
+
- Must be valid UTF-8 JSON
|
|
46
|
+
- Max size: 100 KB
|
|
47
|
+
- Root must be a non-empty object
|
|
48
|
+
- Never allow `{}`, arrays, or primitives as the root
|
|
49
|
+
|
|
50
|
+
### Path Safety
|
|
51
|
+
Applies to:
|
|
52
|
+
- `outputDir`
|
|
53
|
+
- `routing.fallback`
|
|
54
|
+
|
|
55
|
+
Reject:
|
|
56
|
+
- backslashes
|
|
57
|
+
- leading `/` or `\`
|
|
58
|
+
- `..` segments
|
|
59
|
+
- null or control characters
|
|
60
|
+
- globs: `*`, `?`, `**`
|
|
61
|
+
- `%`
|
|
62
|
+
|
|
63
|
+
All resolved paths must stay within the application bundle.
|
|
64
|
+
|
|
65
|
+
### outputDir
|
|
66
|
+
- Must be a non-empty string
|
|
67
|
+
- Must reference a subdirectory only
|
|
68
|
+
- Reject `.` and `./`
|
|
69
|
+
- The directory must exist in the bundle
|
|
70
|
+
- The directory must contain at least one file
|
|
71
|
+
|
|
72
|
+
### routing
|
|
73
|
+
- If present, must be a non-empty object
|
|
74
|
+
- Allowed keys only:
|
|
75
|
+
- `rewrites`
|
|
76
|
+
- `redirects`
|
|
77
|
+
- `fallback`
|
|
78
|
+
- `trailingSlash`
|
|
79
|
+
- `fileBasedRouting`
|
|
80
|
+
|
|
81
|
+
#### routing.trailingSlash
|
|
82
|
+
- Must be one of: `"always"`, `"never"`, `"auto"`
|
|
83
|
+
|
|
84
|
+
#### routing.fileBasedRouting
|
|
85
|
+
- Must be a boolean
|
|
86
|
+
|
|
87
|
+
#### routing.fallback
|
|
88
|
+
- Must be a non-empty string
|
|
89
|
+
- Must satisfy Path Safety rules
|
|
90
|
+
- Target file must exist
|
|
91
|
+
|
|
92
|
+
#### routing.rewrites
|
|
93
|
+
- Must be a non-empty array
|
|
94
|
+
- Each item must be a non-empty object
|
|
95
|
+
- Allowed keys: `route`, `rewrite`
|
|
96
|
+
- `rewrite` must be a non-empty string
|
|
97
|
+
- `route`, if present, must be a non-empty string
|
|
98
|
+
|
|
99
|
+
Example:
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"routing": {
|
|
103
|
+
"rewrites": [
|
|
104
|
+
{ "route": "/app/:path*", "rewrite": "/index.html" }
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
#### routing.redirects
|
|
111
|
+
- Must be a non-empty array
|
|
112
|
+
- Each item must be a non-empty object
|
|
113
|
+
- Allowed keys: `route`, `redirect`, `statusCode`
|
|
114
|
+
- `redirect` must be a non-empty string
|
|
115
|
+
- `route`, if present, must be a non-empty string
|
|
116
|
+
- `statusCode`, if present, must be one of: `301`, `302`, `307`, `308`
|
|
117
|
+
|
|
118
|
+
Example:
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"routing": {
|
|
122
|
+
"redirects": [
|
|
123
|
+
{ "route": "/old-page", "redirect": "/new-page", "statusCode": 301 }
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### headers
|
|
130
|
+
- If present, must be a non-empty array
|
|
131
|
+
- Each item must be a non-empty object
|
|
132
|
+
- Allowed keys: `source`, `headers`
|
|
133
|
+
- `headers` must be a non-empty array
|
|
134
|
+
|
|
135
|
+
Each header entry must contain:
|
|
136
|
+
- `key`: non-empty string
|
|
137
|
+
- `value`: non-empty string
|
|
138
|
+
|
|
139
|
+
Example:
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"headers": [
|
|
143
|
+
{
|
|
144
|
+
"source": "/assets/**",
|
|
145
|
+
"headers": [
|
|
146
|
+
{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Never Suggest
|
|
154
|
+
- `{}` as the JSON root
|
|
155
|
+
- `"routing": {}`
|
|
156
|
+
- empty arrays
|
|
157
|
+
- empty array items such as `[{}]`
|
|
158
|
+
- `"outputDir": "."`
|
|
159
|
+
- `"outputDir": "./"`
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.87.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.86.0...v1.87.0) (2026-03-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* new webapp specific rules ([#246](https://github.com/salesforce-experience-platform-emu/webapps/issues/246)) ([cff4738](https://github.com/salesforce-experience-platform-emu/webapps/commit/cff4738ed407828c844e1cd412c962e2a64d869d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [1.86.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.85.0...v1.86.0) (2026-03-10)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@salesforce/sdk-data": "^1.
|
|
19
|
-
"@salesforce/webapp-experimental": "^1.
|
|
18
|
+
"@salesforce/sdk-data": "^1.87.0",
|
|
19
|
+
"@salesforce/webapp-experimental": "^1.87.0",
|
|
20
20
|
"@tailwindcss/vite": "^4.1.17",
|
|
21
21
|
"class-variance-authority": "^0.7.1",
|
|
22
22
|
"clsx": "^2.1.1",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
39
39
|
"@graphql-tools/utils": "^11.0.0",
|
|
40
40
|
"@playwright/test": "^1.49.0",
|
|
41
|
-
"@salesforce/vite-plugin-webapp-experimental": "^1.
|
|
41
|
+
"@salesforce/vite-plugin-webapp-experimental": "^1.87.0",
|
|
42
42
|
"@testing-library/jest-dom": "^6.6.3",
|
|
43
43
|
"@testing-library/react": "^16.1.0",
|
|
44
44
|
"@testing-library/user-event": "^14.5.2",
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-feature-micro-frontend",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.87.0",
|
|
4
4
|
"description": "Micro Frontend generation feature for Web Applications",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"clean": "rm -rf dist"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@salesforce/micro-frontends-experimental": "^1.
|
|
22
|
-
"@salesforce/webapp-experimental": "^1.
|
|
21
|
+
"@salesforce/micro-frontends-experimental": "^1.87.0",
|
|
22
|
+
"@salesforce/webapp-experimental": "^1.87.0",
|
|
23
23
|
"@types/react": "^19.2.7",
|
|
24
24
|
"@types/react-dom": "^19.2.3",
|
|
25
25
|
"react-dom": "^19.2.1",
|