Skip to content

Commit 67db444

Browse files
committed
add pathPrefix prompt
1 parent 206ad87 commit 67db444

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api/addServer.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@ export async function addServer(
5959
});
6060
if (portString) {
6161
spec.webServer.port = +portString;
62+
const prefix = await vscode.window.showInputBox({
63+
ignoreFocusOut: true,
64+
placeHolder:
65+
"Optional path prefix of instance",
66+
});
67+
if (typeof prefix !== "undefined") {
68+
if (prefix) {
69+
var pathPrefix = prefix.trim();
70+
if (pathPrefix.charAt(0) !== '/') {
71+
pathPrefix = '/' + pathPrefix;
72+
}
73+
spec.webServer.pathPrefix = pathPrefix;
74+
}
75+
}
76+
6277
const username = await vscode.window.showInputBox({
6378
ignoreFocusOut: true,
6479
placeHolder:

types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface IJSONServerSpec {
1919
username?: string;
2020
password?: string;
2121
description?: string;
22+
pathPrefix?: string;
2223
}
2324

2425
export interface IServerSpec extends IJSONServerSpec {

0 commit comments

Comments
 (0)