File tree 4 files changed +18
-0
lines changed
4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ export class PluginAPI {
72
72
displayName : p . displayName ,
73
73
description : p . description ,
74
74
routerPath : p . routerPath ,
75
+ homepageURL : p . homepageURL ,
75
76
} ,
76
77
}
77
78
} ) ,
@@ -197,6 +198,9 @@ export class PluginAPI {
197
198
if ( ! p . routerPath ) {
198
199
throw new Error ( "plugin missing router path" )
199
200
}
201
+ if ( ! p . homepageURL ) {
202
+ throw new Error ( "plugin missing homepage" )
203
+ }
200
204
201
205
p . init ( {
202
206
logger : logger ,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ describe("plugin", () => {
22
22
23
23
description : "This app does XYZ." ,
24
24
iconPath : "/test-plugin/test-app/icon.svg" ,
25
+ homepageURL : "https://example.com" ,
25
26
path : "/test-plugin/test-app" ,
26
27
27
28
plugin : {
@@ -32,6 +33,7 @@ describe("plugin", () => {
32
33
displayName : "Test Plugin" ,
33
34
description : "Plugin used in code-server tests." ,
34
35
routerPath : "/test-plugin" ,
36
+ homepageURL : "https://example.com" ,
35
37
} ,
36
38
} ,
37
39
] ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as pluginapi from "../../../typings/pluginapi"
4
4
5
5
export const displayName = "Test Plugin"
6
6
export const routerPath = "/test-plugin"
7
+ export const homepageURL = "https://example.com"
7
8
export const description = "Plugin used in code-server tests."
8
9
9
10
export function init ( config : pluginapi . PluginConfig ) {
@@ -27,6 +28,7 @@ export function applications(): pluginapi.Application[] {
27
28
path : "/test-app" ,
28
29
29
30
description : "This app does XYZ." ,
31
+ homepageURL : "https://example.com" ,
30
32
} ,
31
33
]
32
34
}
Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ export interface Plugin {
87
87
*/
88
88
readonly routerPath : string
89
89
90
+ /**
91
+ * Link to plugin homepage.
92
+ */
93
+ readonly homepageURL : string
94
+
90
95
/**
91
96
* init is called so that the plugin may initialize itself with the config.
92
97
*/
@@ -144,4 +149,9 @@ export interface Application {
144
149
* <code-server-root>/<plugin-path>/<app-path>/<icon-path>
145
150
*/
146
151
readonly iconPath : string
152
+
153
+ /**
154
+ * Link to application homepage.
155
+ */
156
+ readonly homepageURL : string
147
157
}
You can’t perform that action at this time.
0 commit comments