Skip to content

Commit 3c80ea5

Browse files
refactor: simplify WebAppDevResult to only url and devServerUrl
1 parent 28b7ed2 commit 3c80ea5

4 files changed

Lines changed: 2 additions & 27 deletions

File tree

schemas/webapp-dev.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,16 @@
55
"WebAppDevResult": {
66
"type": "object",
77
"properties": {
8-
"name": {
9-
"type": "string",
10-
"description": "Name of the web app"
11-
},
128
"url": {
139
"type": "string",
1410
"description": "Proxy server URL (where user should open browser)"
1511
},
16-
"port": {
17-
"type": "number",
18-
"description": "Port the proxy is running on"
19-
},
20-
"targetOrg": {
21-
"type": "string",
22-
"description": "Target org being used"
23-
},
2412
"devServerUrl": {
2513
"type": "string",
2614
"description": "Dev server URL being proxied"
2715
}
2816
},
29-
"required": ["name", "url", "port", "targetOrg", "devServerUrl"],
17+
"required": ["url", "devServerUrl"],
3018
"additionalProperties": false,
3119
"description": "Command execution result What the sf webapp dev command returns to the user"
3220
}

src/commands/webapp/dev.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,7 @@ export default class WebappDev extends SfCommand<WebAppDevResult> {
272272

273273
// Return result (never reached, but required for type safety)
274274
return {
275-
name: manifest?.name ?? '',
276275
url: proxyUrl,
277-
port: flags.port,
278-
targetOrg: orgUsername,
279276
devServerUrl: devServerUrl ?? '',
280277
};
281278
} catch (error) {

src/config/types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,8 @@ export type { ManifestChangeEvent } from './ManifestWatcher.js';
2525
* What the sf webapp dev command returns to the user
2626
*/
2727
export type WebAppDevResult = {
28-
/** Name of the web app */
29-
name: string;
3028
/** Proxy server URL (where user should open browser) */
3129
url: string;
32-
/** Port the proxy is running on */
33-
port: number;
34-
/** Target org being used */
35-
targetOrg: string;
3630
/** Dev server URL being proxied */
3731
devServerUrl: string;
3832
};

test/commands/webapp/dev.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,12 @@ describe('webapp:dev command integration', () => {
4545

4646
it('should have correct WebAppDevResult structure', () => {
4747
const result: WebAppDevResult = {
48-
name: 'testWebApp',
4948
url: 'http://localhost:4545',
50-
port: 4545,
51-
targetOrg: 'test@example.com',
5249
devServerUrl: 'http://localhost:5173',
5350
};
5451

55-
expect(result.name).to.equal('testWebApp');
5652
expect(result.url).to.equal('http://localhost:4545');
57-
expect(result.port).to.equal(4545);
53+
expect(result.devServerUrl).to.equal('http://localhost:5173');
5854
});
5955
});
6056

0 commit comments

Comments
 (0)