@@ -2,33 +2,35 @@ import * as express from "express"
2
2
import * as fspath from "path"
3
3
import * as pluginapi from "../../../typings/pluginapi"
4
4
5
- export const displayName = "Test Plugin"
6
- export const routerPath = "/test-plugin"
7
- export const homepageURL = "https://example.com"
8
- export const description = "Plugin used in code-server tests."
5
+ export const plugin : pluginapi . Plugin = {
6
+ displayName : "Test Plugin" ,
7
+ routerPath : "/test-plugin" ,
8
+ homepageURL : "https://example.com" ,
9
+ description : "Plugin used in code-server tests." ,
9
10
10
- export function init ( config : pluginapi . PluginConfig ) {
11
- config . logger . debug ( "test-plugin loaded!" )
12
- }
11
+ init : ( config ) => {
12
+ config . logger . debug ( "test-plugin loaded!" )
13
+ } ,
13
14
14
- export function router ( ) : express . Router {
15
- const r = express . Router ( )
16
- r . get ( "/goland/icon.svg" , ( req , res ) => {
17
- res . sendFile ( fspath . resolve ( __dirname , "../public/icon.svg" ) )
18
- } )
19
- return r
20
- }
15
+ router : ( ) => {
16
+ const r = express . Router ( )
17
+ r . get ( "/goland/icon.svg" , ( req , res ) => {
18
+ res . sendFile ( fspath . resolve ( __dirname , "../public/icon.svg" ) )
19
+ } )
20
+ return r
21
+ } ,
21
22
22
- export function applications ( ) : pluginapi . Application [ ] {
23
- return [
24
- {
25
- name : "Test App" ,
26
- version : "4.0.0" ,
27
- iconPath : "/icon.svg" ,
28
- path : "/test-app" ,
23
+ applications : ( ) => {
24
+ return [
25
+ {
26
+ name : "Test App" ,
27
+ version : "4.0.0" ,
28
+ iconPath : "/icon.svg" ,
29
+ path : "/test-app" ,
29
30
30
- description : "This app does XYZ." ,
31
- homepageURL : "https://example.com" ,
32
- } ,
33
- ]
31
+ description : "This app does XYZ." ,
32
+ homepageURL : "https://example.com" ,
33
+ } ,
34
+ ]
35
+ } ,
34
36
}
0 commit comments