File tree 2 files changed +28
-0
lines changed
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import { PluginAPI } from "../plugin"
3
3
4
4
/**
5
5
* Implements the /api/applications endpoint
6
+ *
7
+ * See typings/pluginapi.d.ts for details.
6
8
*/
7
9
export function router ( papi : PluginAPI ) : express . Router {
8
10
const router = express . Router ( )
Original file line number Diff line number Diff line change @@ -42,12 +42,38 @@ import * as express from "express"
42
42
*
43
43
* If two plugins are found with the exact same name, then code-server will
44
44
* use the first one and emit a warning.
45
+ *
46
+ */
47
+
48
+ /* Programmability
45
49
*
46
50
* There is also a /api/applications endpoint to allow programmatic access to all
47
51
* available applications. It could be used to create a custom application dashboard
48
52
* for example. An important difference with the API is that all application paths
49
53
* will be absolute (i.e have the plugin path prepended) so that they may be used
50
54
* directly.
55
+ *
56
+ * Example output:
57
+ *
58
+ * [
59
+ * {
60
+ * "name": "Test App",
61
+ * "version": "4.0.0",
62
+ * "iconPath": "/test-plugin/test-app/icon.svg",
63
+ * "path": "/test-plugin/test-app",
64
+ * "description": "This app does XYZ.",
65
+ * "homepageURL": "https://example.com",
66
+ * "plugin": {
67
+ * "name": "test-plugin",
68
+ * "version": "1.0.0",
69
+ * "modulePath": "/Users/nhooyr/src/cdr/code-server/test/test-plugin",
70
+ * "displayName": "Test Plugin",
71
+ * "description": "Plugin used in code-server tests.",
72
+ * "routerPath": "/test-plugin",
73
+ * "homepageURL": "https://example.com"
74
+ * }
75
+ * }
76
+ * ]
51
77
*/
52
78
53
79
/**
You can’t perform that action at this time.
0 commit comments