Commit e743427
refactor: improve webapp discovery with SFDX project detection @W-21193297@ (#18)
* refactor(dev): improve webapp discovery and console output @W-21193297@
- Add SFDX project detection for webapp discovery
- Simplify webapplications folder detection logic
- Condense warning messages, remove verbose JSON examples
- Add help tip for configuration options
* feat: W-21111977 consume error-page template from @salesforce/webapp-experimental/proxy (#22)
* feat: consume error-page template from @salesforce/webapp-experimental/proxy @W-21111977@
Update plugin-webapp to import the error page HTML template from the
@salesforce/webapp-experimental proxy package instead of bundling it locally.
Migration changes:
- ErrorPageRenderer now uses getErrorPageTemplate() from @salesforce/webapp-experimental/proxy
- Removed local error-page.html template (now lives in webapps package)
- Removed scripts/copy-templates.cjs (no longer needed)
- Removed postbuild script from package.json
- Bumped @salesforce/webapp-experimental dependency to ^1.17.0
Bug fixes included:
- DevServerManager: emit DevServerError directly instead of wrapping in SfError,
so the proxy can display the "Dev Server Error" page when dev server crashes
- ProxyServer: add socket error handler to prevent ECONNRESET from crashing the
proxy when dev server dies mid-connection
Depends on: salesforce-experience-platform-emu/webapps PR for @W-21111977@
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: W-21111977 consume error-page template from @salesforce/webapp-experimental/proxy
Update plugin-webapp to import the error page HTML template from the
@salesforce/webapp-experimental proxy package (v1.23.0) instead of
bundling it locally.
Migration changes:
- ErrorPageRenderer now uses getErrorPageTemplate() from
@salesforce/webapp-experimental/proxy (direct import, no workarounds)
- Removed local error-page.html template (now lives in webapps package)
- Removed scripts/copy-templates.cjs (no longer needed)
- Removed postbuild script from package.json
- Bumped @salesforce/webapp-experimental dependency to ^1.23.0
Bug fixes included:
- DevServerManager: emit DevServerError directly instead of wrapping
in SfError, so the proxy can display the "Dev Server Error" page
when dev server crashes
- ProxyServer: add socket error handler to prevent ECONNRESET from
crashing the proxy when dev server dies mid-connection
- ProxyServer: remove label/version from fallback manifest (not in type)
Depends on: salesforce-experience-platform-emu/webapps#86 (merged)
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Ankit Singh <singhankit@singhank-ltmg4lv.internal.salesforce.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: address PR feedback and merge conflicts
- messages: specify 'proxy server' in Ctrl+C stop message
- ProxyServer: add label and version to fallback WebAppManifest
- ErrorPageRenderer: use local template (getErrorPageTemplate not in package)
- tests: add label and version to WebAppManifest fixtures
Co-authored-by: Cursor <cursoragent@cursor.com>
* revert: drop merge-fix changes, keep only PR feedback
Keep only the messages change: 'Press Ctrl+C to stop the proxy server'.
Revert ErrorPageRenderer, ProxyServer, and test changes - will address separately.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: address PR review comments
- no-manifest: log applied defaults (dev command, proxy port) at info level
- ready-for-development: show only URL to open in browser (proxy URL)
- flags.url: add dev server URL precedence to help text
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: remove unused error-page-template.ts
Co-authored-by: Cursor <cursoragent@cursor.com>
* @W-21111861@ feat: Skip standalone proxy when Vite WebApp proxy is active (#23)
* feat: add Vite proxy detection and TTY-aware messaging
- Detect Vite WebApp proxy via health check, skip standalone proxy when active
- Use getErrorPageTemplate from @salesforce/webapp-experimental/proxy
- TTY-aware stop message (Ctrl+C in terminal vs VS Code command palette)
- Add info.ready-for-development-vite for Vite proxy case
- Simplify ready-for-development to show only URL to open
- Resolve PR review comments on messaging
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: remove label/version to match @salesforce/webapp-experimental 1.x type
- Run yarn install to resolve 1.23.0+ (was 0.2.0 from stale lock)
- ProxyServer: use minimal fallback { name, outputDir } per PR #22
- Tests: remove label/version from manifest fixtures
- ManifestWatcher tests: fix assertions for simplified type
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: group ready-for-development messages, simplify Vite message format
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: update server-running message - remove bold, add quotes
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
* Address review comments: URL mismatch tests, multi-meta warning, 60s timeout
- Add comprehensive tests for devServerUrl vs actualDevServerUrl mismatch
combinations (explicit URL match/mismatch, manifest, skipDevServer cases)
- Warn when multiple .webapplication-meta.xml files found in directory;
use first match for backward compatibility
- Increase dev server startup timeout from 30 to 60 seconds to align with
VS Code extension and support slower dev server startups
Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor: discover webapps from all package directories via SfProject
Co-authored-by: Cursor <cursoragent@cursor.com>
* Update SF_WEBAPP_DEV_GUIDE.md
Co-authored-by: Brian Buchanan <5377888+bpbuch@users.noreply.github.com>
* Update SF_WEBAPP_DEV_GUIDE.md
Co-authored-by: Brian Buchanan <5377888+bpbuch@users.noreply.github.com>
* Update SF_WEBAPP_DEV_GUIDE.md
Co-authored-by: Brian Buchanan <5377888+bpbuch@users.noreply.github.com>
* SF_WEBAPP_DEV_GUIDE: document only dev.command and dev.url for dev command
- Remove name, label from --name option (matches folder name)
- Simplify picker format, remove label references
- Remove Full Configuration example (name, label, version, outputDir)
- Add Dev + Routing example with only dev and routing
- Update troubleshooting: --name matches folder name only
Co-authored-by: Cursor <cursoragent@cursor.com>
* Revert README to main branch
Co-authored-by: Cursor <cursoragent@cursor.com>
* Align README with main branch (plugin-app-dev template)
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Ankit Singh <singhankit@salesforce.com>
Co-authored-by: Ankit Singh <singhankit@singhank-ltmg4lv.internal.salesforce.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Brian Buchanan <5377888+bpbuch@users.noreply.github.com>1 parent caed512 commit e743427
13 files changed
Lines changed: 1218 additions & 484 deletions
File tree
- messages
- src
- commands/webapp
- config
- error
- proxy
- server
- test
- commands/webapp
- config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
| 50 | + | |
49 | 51 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
67 | | - | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
98 | | - | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 108 | + | |
108 | 109 | | |
109 | | - | |
110 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | | - | |
113 | | - | |
| 114 | + | |
114 | 115 | | |
115 | | - | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
120 | | - | |
| 128 | + | |
121 | 129 | | |
122 | 130 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
132 | 135 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
140 | 144 | | |
141 | | - | |
| 145 | + | |
142 | 146 | | |
143 | 147 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
156 | 161 | | |
157 | 162 | | |
158 | | - | |
159 | | - | |
160 | | - | |
| 163 | + | |
161 | 164 | | |
162 | | - | |
163 | | - | |
| 165 | + | |
164 | 166 | | |
165 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
166 | 170 | | |
167 | | - | |
168 | | - | |
169 | | - | |
| 171 | + | |
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
178 | | - | |
| 180 | + | |
179 | 181 | | |
180 | | - | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 187 | + | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| |||
237 | 238 | | |
238 | 239 | | |
239 | 240 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 241 | + | |
253 | 242 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
260 | 247 | | |
261 | | - | |
| 248 | + | |
262 | 249 | | |
263 | 250 | | |
264 | 251 | | |
| |||
278 | 265 | | |
279 | 266 | | |
280 | 267 | | |
281 | | - | |
282 | | - | |
283 | 268 | | |
284 | 269 | | |
285 | 270 | | |
| |||
335 | 320 | | |
336 | 321 | | |
337 | 322 | | |
338 | | - | |
| 323 | + | |
339 | 324 | | |
340 | 325 | | |
341 | 326 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | 327 | | |
348 | 328 | | |
349 | 329 | | |
| |||
393 | 373 | | |
394 | 374 | | |
395 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
396 | 440 | | |
397 | 441 | | |
398 | | - | |
| 442 | + | |
399 | 443 | | |
400 | | - | |
| 444 | + | |
401 | 445 | | |
402 | 446 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
407 | 452 | | |
408 | 453 | | |
409 | | - | |
| 454 | + | |
410 | 455 | | |
411 | | - | |
| 456 | + | |
412 | 457 | | |
413 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
414 | 473 | | |
415 | | - | |
416 | | - | |
| 474 | + | |
417 | 475 | | |
418 | 476 | | |
419 | 477 | | |
| |||
586 | 644 | | |
587 | 645 | | |
588 | 646 | | |
589 | | - | |
| 647 | + | |
590 | 648 | | |
591 | 649 | | |
592 | 650 | | |
| |||
0 commit comments