Skip to content

Commit e10f785

Browse files
authored
feat: rename webapp.json to webapplication.json @W-21110479@ (#14)
Updated all references to webapp.json across the plugin-webapp codebase to use webapplication.json, reflecting the new manifest file naming convention. Changes include: - Source files (ManifestWatcher, manifest, webappDiscovery, ErrorHandler, DevServerManager, dev.ts) - Error page template - CLI messages - Documentation (README, SF_WEBAPP_DEV_GUIDE) - Test files and fixtures
1 parent bca47ba commit e10f785

15 files changed

Lines changed: 808 additions & 811 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ We always recommend using the latest version of these commands bundled with the
5555
- 🔄 **Dev Server Management** - Spawns and monitors dev servers (Vite, CRA, Next.js)
5656
- 🎨 **Beautiful Error Handling** - HTML error pages with auto-refresh and diagnostics
5757
- 💚 **Health Monitoring** - Periodic health checks with status updates
58-
- 🔧 **Hot Config Reload** - Detects `webapp.json` changes automatically
58+
- 🔧 **Hot Config Reload** - Detects `webapplication.json` changes automatically
5959

6060
## Quick Start
6161

@@ -71,7 +71,7 @@ We always recommend using the latest version of these commands bundled with the
7171
sf org login web --alias myorg
7272
```
7373

74-
3. **Create webapp.json:**
74+
3. **Create webapplication.json:**
7575

7676
```json
7777
{
@@ -94,6 +94,7 @@ We always recommend using the latest version of these commands bundled with the
9494
## Documentation
9595

9696
📚 **[Complete Guide](SF_WEBAPP_DEV_GUIDE.md)** - Comprehensive documentation covering:
97+
9798
- Overview and architecture
9899
- Getting started (5-minute quick start)
99100
- Building the plugin
@@ -171,11 +172,11 @@ USAGE
171172
$ sf webapp dev --name <webapp-name> --target-org <org-alias> [options]
172173

173174
REQUIRED FLAGS
174-
-n, --name=<value> Name of the webapp (must match webapp.json)
175+
-n, --name=<value> Name of the webapp (must match webapplication.json)
175176
-o, --target-org=<value> Salesforce org to authenticate against
176177

177178
OPTIONAL FLAGS
178-
-u, --url=<value> Dev server URL (overrides webapp.json)
179+
-u, --url=<value> Dev server URL (overrides webapplication.json)
179180
-p, --port=<value> Proxy server port (default: 4545)
180181
--open Open browser automatically
181182

@@ -216,7 +217,7 @@ FEATURES
216217
- WebSocket support for Hot Module Replacement (HMR)
217218
- Beautiful HTML error pages with auto-refresh
218219
- Periodic health monitoring (every 5s)
219-
- Configuration file watching (webapp.json)
220+
- Configuration file watching (webapplication.json)
220221
- Graceful shutdown on Ctrl+C
221222

222223
SEE ALSO

SF_WEBAPP_DEV_GUIDE.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The `sf webapp dev` command enables local development of modern web applications
1010

1111
### Key Features
1212

13-
- **Auto-Discovery**: Automatically finds `webapp.json` files in your project
13+
- **Auto-Discovery**: Automatically finds `webapplication.json` files in your project
1414
- **Interactive Selection**: Prompts with arrow-key navigation when multiple webapps exist
1515
- **Authentication Injection**: Automatically adds Salesforce auth headers to API calls
1616
- **Intelligent Routing**: Routes requests to dev server or Salesforce based on URL patterns
@@ -22,7 +22,7 @@ The `sf webapp dev` command enables local development of modern web applications
2222

2323
## Quick Start
2424

25-
### 1. Create `webapp.json` in your project
25+
### 1. Create `webapplication.json` in your project
2626

2727
```json
2828
{
@@ -56,18 +56,18 @@ sf webapp dev [OPTIONS]
5656

5757
### Options
5858

59-
| Option | Short | Description | Default |
60-
| -------------- | ----- | --------------------------------------- | ------------- |
61-
| `--target-org` | `-o` | Salesforce org alias or username | Required |
62-
| `--name` | `-n` | Web application name (from webapp.json) | Auto-discover |
63-
| `--url` | `-u` | Explicit dev server URL | Auto-detect |
64-
| `--port` | `-p` | Proxy server port | 4545 |
65-
| `--open` | `-b` | Open browser automatically | false |
59+
| Option | Short | Description | Default |
60+
| -------------- | ----- | ----------------------------------------------- | ------------- |
61+
| `--target-org` | `-o` | Salesforce org alias or username | Required |
62+
| `--name` | `-n` | Web application name (from webapplication.json) | Auto-discover |
63+
| `--url` | `-u` | Explicit dev server URL | Auto-detect |
64+
| `--port` | `-p` | Proxy server port | 4545 |
65+
| `--open` | `-b` | Open browser automatically | false |
6666

6767
### Examples
6868

6969
```bash
70-
# Simplest - auto-discovers webapp.json
70+
# Simplest - auto-discovers webapplication.json
7171
sf webapp dev --target-org myOrg
7272

7373
# With browser auto-open
@@ -90,22 +90,22 @@ SF_LOG_LEVEL=debug sf webapp dev --target-org myOrg
9090

9191
## Webapp Discovery
9292

93-
The command automatically discovers `webapp.json` files in your project, making the `--name` flag optional in most cases.
93+
The command automatically discovers `webapplication.json` files in your project, making the `--name` flag optional in most cases.
9494

9595
### How Discovery Works
9696

9797
```mermaid
9898
flowchart TD
9999
Start["sf webapp dev"] --> HasName{"--name provided?"}
100-
HasName -->|Yes| SearchByName["Search for webapp.json with matching name field"]
101-
HasName -->|No| SearchAll["Search all webapp.json files in project"]
100+
HasName -->|Yes| SearchByName["Search for webapplication.json with matching name field"]
101+
HasName -->|No| SearchAll["Search all webapplication.json files in project"]
102102
103103
SearchByName --> FoundMatch{"Found?"}
104-
FoundMatch -->|Yes| UseManifest["Use matched webapp.json"]
104+
FoundMatch -->|Yes| UseManifest["Use matched webapplication.json"]
105105
FoundMatch -->|No| ErrorNotFound["Error: No webapp found with name X"]
106106
107107
SearchAll --> Count{"How many found?"}
108-
Count -->|0| ErrorNone["Error: No webapp.json found"]
108+
Count -->|0| ErrorNone["Error: No webapplication.json found"]
109109
Count -->|1| UseManifest
110110
Count -->|Multiple| Prompt["Interactive selection prompt"]
111111
Prompt --> UseManifest
@@ -115,12 +115,12 @@ flowchart TD
115115

116116
### Discovery Behavior
117117

118-
| Scenario | Behavior |
119-
| -------------------------------- | --------------------------------------------------- |
120-
| `--name myApp` provided | Finds webapp.json where `name` field equals "myApp" |
121-
| No `--name`, single webapp found | Auto-selects the webapp |
122-
| No `--name`, multiple found | Shows interactive selection with arrow keys |
123-
| No `--name`, none found | Shows error with helpful message |
118+
| Scenario | Behavior |
119+
| -------------------------------- | ----------------------------------------------------------- |
120+
| `--name myApp` provided | Finds webapplication.json where `name` field equals "myApp" |
121+
| No `--name`, single webapp found | Auto-selects the webapp |
122+
| No `--name`, multiple found | Shows interactive selection with arrow keys |
123+
| No `--name`, none found | Shows error with helpful message |
124124

125125
### Search Scope
126126

@@ -135,14 +135,14 @@ The command searches the current directory and all subdirectories, excluding:
135135

136136
### Interactive Selection
137137

138-
When multiple `webapp.json` files are found, you'll see an interactive prompt:
138+
When multiple `webapplication.json` files are found, you'll see an interactive prompt:
139139

140140
```
141-
Found 3 webapp.json files in project
141+
Found 3 webapplication.json files in project
142142
? Select the webapp to run: (Use arrow keys)
143-
❯ myApp - My Application (webapp.json)
144-
adminPortal - Admin Portal (apps/admin/webapp.json)
145-
dashboard - Dashboard App (packages/dashboard/webapp.json)
143+
❯ myApp - My Application (webapplication.json)
144+
adminPortal - Admin Portal (apps/admin/webapplication.json)
145+
dashboard - Dashboard App (packages/dashboard/webapplication.json)
146146
```
147147

148148
Use arrow keys to navigate and Enter to select.
@@ -194,7 +194,7 @@ Browser → Proxy → [Auth Headers Injected] → Salesforce → Response
194194

195195
## Configuration
196196

197-
### webapp.json Schema
197+
### webapplication.json Schema
198198

199199
#### Required Fields
200200

@@ -278,10 +278,10 @@ Use this when you want to start the dev server yourself.
278278

279279
### Manifest Hot Reload
280280

281-
Edit `webapp.json` while running - changes apply automatically:
281+
Edit `webapplication.json` while running - changes apply automatically:
282282

283283
```bash
284-
# Console output when you change webapp.json:
284+
# Console output when you change webapplication.json:
285285
Manifest changed detected
286286
✓ Manifest reloaded successfully
287287
Dev server URL updated to: http://localhost:5174
@@ -311,9 +311,9 @@ Automatically detects Salesforce Code Builder environment and binds to `0.0.0.0`
311311

312312
## Troubleshooting
313313

314-
### "No webapp.json found"
314+
### "No webapplication.json found"
315315

316-
Ensure you have a `webapp.json` file with required fields:
316+
Ensure you have a `webapplication.json` file with required fields:
317317

318318
```json
319319
{
@@ -326,19 +326,19 @@ Ensure you have a `webapp.json` file with required fields:
326326

327327
### "No webapp found with name X"
328328

329-
The `--name` flag matches the `name` field inside `webapp.json`, not the file path:
329+
The `--name` flag matches the `name` field inside `webapplication.json`, not the file path:
330330

331331
```bash
332-
# This looks for webapp.json where name="myApp"
332+
# This looks for webapplication.json where name="myApp"
333333
sf webapp dev --name myApp --target-org myOrg
334334
```
335335

336-
Check your `webapp.json` content to verify the name.
336+
Check your `webapplication.json` content to verify the name.
337337

338338
### "No Dev Server Detected"
339339

340340
1. Ensure dev server is running: `npm run dev`
341-
2. Verify URL in `webapp.json` is correct
341+
2. Verify URL in `webapplication.json` is correct
342342
3. Try explicit URL: `sf webapp dev --url http://localhost:5173 --target-org myOrg`
343343

344344
### "Port 4545 already in use"
@@ -374,7 +374,7 @@ SF_LOG_LEVEL=debug sf webapp dev --target-org myOrg
374374

375375
The command integrates with the Salesforce VSCode UI Preview extension (`salesforcedx-vscode-ui-preview`):
376376

377-
1. Extension detects `webapp.json` in workspace
377+
1. Extension detects `webapplication.json` in workspace
378378
2. User clicks "Preview" button on the file
379379
3. Extension executes: `sf webapp dev --target-org <org> --open`
380380
4. If multiple webapps exist, uses `--name` to specify which one
@@ -464,16 +464,16 @@ plugin-webapp/
464464

465465
### Key Components
466466

467-
| Component | Purpose |
468-
| ---------------------- | ------------------------------------------- |
469-
| `dev.ts` | Command orchestration and lifecycle |
470-
| `webappDiscovery.ts` | Recursive webapp.json discovery |
471-
| `org.ts` | Salesforce authentication token management |
472-
| `ProxyServer.ts` | HTTP proxy with WebSocket support |
473-
| `handler.ts` | Request routing to dev server or Salesforce |
474-
| `DevServerManager.ts` | Dev server process spawning and monitoring |
475-
| `ManifestWatcher.ts` | webapp.json file watching for hot reload |
476-
| `ErrorPageRenderer.ts` | Browser error page generation |
467+
| Component | Purpose |
468+
| ---------------------- | ------------------------------------------------ |
469+
| `dev.ts` | Command orchestration and lifecycle |
470+
| `webappDiscovery.ts` | Recursive webapplication.json discovery |
471+
| `org.ts` | Salesforce authentication token management |
472+
| `ProxyServer.ts` | HTTP proxy with WebSocket support |
473+
| `handler.ts` | Request routing to dev server or Salesforce |
474+
| `DevServerManager.ts` | Dev server process spawning and monitoring |
475+
| `ManifestWatcher.ts` | webapplication.json file watching for hot reload |
476+
| `ErrorPageRenderer.ts` | Browser error page generation |
477477

478478
---
479479

messages/webapp.dev.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Identifies the Web Application (optional)
1414

1515
# flags.name.description
1616

17-
The unique name of the web application as defined in webapp.json. If not provided, the command will automatically discover webapp.json files in the current directory and subdirectories. If only one webapp.json is found, it will be used automatically. If multiple are found, you will be prompted to select one.
17+
The unique name of the web application as defined in webapplication.json. If not provided, the command will automatically discover webapplication.json files in the current directory and subdirectories. If only one webapplication.json is found, it will be used automatically. If multiple are found, you will be prompted to select one.
1818

1919
# flags.url.summary
2020

2121
Dev server origin to forward UI/HMR/static requests
2222

2323
# flags.url.description
2424

25-
The URL where your dev server is running (e.g., http://localhost:5173). Required if webapp.json does not contain a dev.command or dev.url configuration. All non-Salesforce API requests will be forwarded to this URL.
25+
The URL where your dev server is running (e.g., http://localhost:5173). Required if webapplication.json does not contain a dev.command or dev.url configuration. All non-Salesforce API requests will be forwarded to this URL.
2626

2727
# flags.port.summary
2828

@@ -42,7 +42,7 @@ Automatically opens the proxy server URL in your default web browser when the se
4242

4343
# examples
4444

45-
- Start the development server (auto-discovers webapp.json):
45+
- Start the development server (auto-discovers webapplication.json):
4646

4747
<%= config.bin %> <%= command.id %> --target-org myorg
4848

@@ -133,7 +133,7 @@ Dev server failed to start: %s
133133

134134
# info.multiple-webapps-found
135135

136-
Found %s webapp.json files in project
136+
Found %s webapplication.json files in project
137137

138138
# info.using-webapp
139139

src/commands/webapp/dev.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default class WebappDev extends SfCommand<WebAppDevResult> {
106106

107107
try {
108108
// Step 1: Discover and select webapp
109-
this.logger.debug('Discovering webapp.json manifest(s)...');
109+
this.logger.debug('Discovering webapplication.json manifest(s)...');
110110

111111
const { webapp: discoveredWebapp, allWebapps } = await discoverWebapp(flags.name);
112112

@@ -180,7 +180,7 @@ export default class WebappDev extends SfCommand<WebAppDevResult> {
180180
devServerUrl = manifest.dev.url;
181181
this.logger.debug(`Using dev server URL from manifest: ${devServerUrl}`);
182182
} else if (manifest.dev?.command) {
183-
// Start dev server from the directory containing webapp.json
183+
// Start dev server from the directory containing webapplication.json
184184
this.logger.debug(`Starting dev server with command: ${manifest.dev.command}`);
185185
this.devServerManager = new DevServerManager({
186186
command: manifest.dev.command,

0 commit comments

Comments
 (0)