45 Commits

Author SHA1 Message Date
3fc556d4d5 Delegate authentication to plugins
Unfortunately since plugins can now override the root this is necessary
or just can't log in.
2021-02-12 16:50:23 -06:00
0abbc9789e Allow plugins to register at the root
Unfortunately we have existing plugins with routes there which we cannot
move.
2021-02-12 15:19:26 -06:00
619934dc29 Authenticate plugin routes (#2720) 2021-02-12 14:56:39 -06:00
e098df0766 Fix code-server module not being provided in Jest 2021-02-09 15:23:08 -06:00
2879bd4c22 Add type alias for required modules 2021-02-09 13:09:41 -06:00
c78f56b334 Expose HttpError to plugins
This will let them throw and show nice errors more easily.
2021-02-09 13:09:38 -06:00
22d194515a Expose replaceTemplates to plugins
This is mainly so they can get relative paths in their HTML, in
particular code-server's static base so they can use the favicon and
service worker.
2021-02-09 13:09:37 -06:00
5505959f7e Expose websocket server to plugins
Same reasoning used when exposing Express.
2021-02-09 13:09:34 -06:00
00cfd9bdf1 Add working directory to plugin config 2021-02-09 13:09:31 -06:00
3211eb1ce5 Expose log level to plugins
In case they need to map it to something else.
2021-02-09 13:09:30 -06:00
017b1cc633 Add deinit for plugins 2021-02-09 13:09:29 -06:00
055e0ef9ec Provide WsRouter to plugins 2021-02-09 13:09:27 -06:00
fb37473e72 Load only test plugin during tests
The other plugins in my path were causing the tests to fail.
2021-02-09 12:20:30 -06:00
f6b04c7c29 Expose proxy server to plugins 2021-02-09 12:19:39 -06:00
a8e928798b Re-export express for plugins 2021-02-09 12:19:38 -06:00
5f1fab7d27 Re-export logger field for plugins 2021-02-09 12:19:36 -06:00
9917da068a v3.7.0 2020-11-16 11:11:50 -05:00
277211c4ce plugin: Make init and applications callbacks optional 2020-11-06 14:47:08 -05:00
9453f891df plugin.ts: Fix usage of routerPath in mount 2020-11-06 10:13:01 -05:00
14f408a837 plugin: Plugin modules now export a single top level identifier
Makes typing much easier. Addresse's Will's last comment.
2020-11-06 10:13:01 -05:00
8a8159c683 plugin: More review fixes
Next commit will address Will's comments about the typings being weird.
2020-11-06 10:13:01 -05:00
706bc23f04 plugin: Fixes for CI 2020-11-06 10:13:01 -05:00
2a13d003d3 plugin.ts: Add homepageURL to plugin and application 2020-11-06 10:12:47 -05:00
687094802e plugin.ts: Make application endpoint paths absolute 2020-11-06 10:12:46 -05:00
139a28e0ea plugin.ts: Describe private counterpart functions
Addresses Will's comments.
2020-11-06 10:12:46 -05:00
afff86ae9c plugin.ts: Adjust to implement pluginapi.d.ts correctly 2020-11-06 10:12:46 -05:00
fed545e67d plugin.d.ts -> pluginapi.d.ts
More clear.
2020-11-06 10:12:46 -05:00
8d3a7721fe plugin.d.ts: Document plugin priority correctly 2020-11-06 10:12:46 -05:00
75e52a3774 plugin.ts: Fixes for @code-asher 2020-11-06 10:12:46 -05:00
f4d7f00033 plugin.ts: Fixes for @wbobeirne 2020-11-06 10:12:46 -05:00
30d2962e21 src/node/plugin.ts: Warn on duplicate plugin and only load first 2020-11-06 10:12:46 -05:00
82e8a00a0d Fix CI 2020-11-06 10:12:46 -05:00
e08a55d44a src/node/plugin.ts: Implement new plugin API 2020-11-06 10:12:45 -05:00
71dc5c7542 Switch to Express
It doesn't do anything yet.
2020-10-26 17:56:11 -05:00
c6ba12942c Filter blank plugin directories (#2187)
I neglected to realize that "".split(":") is an array with "" in it.
2020-10-11 02:14:43 -04:00
c86d7398ab Use system data directory for plugins 2020-10-08 16:18:31 -05:00
a44b4455f5 Read plugin name from package.json 2020-10-07 12:54:48 -05:00
c2ac126a50 Log all plugin errors as errors 2020-10-07 12:25:42 -05:00
ddda280df4 Rename plugin vars and make both colon-separated
Only one was colon separated but now they both are.
2020-10-07 12:18:57 -05:00
7a982555a8 Add version to plugin load log 2020-09-30 15:52:40 -05:00
e64b186527 Add variables to better customize plugin directories 2020-09-30 15:52:39 -05:00
9b979ac869 Document code-server injection 2020-08-05 13:00:37 -05:00
fd36f8c168 Use error log level for plugin load failure 2020-08-05 13:00:33 -05:00
361e7103ea Enable loading external plugins 2020-07-31 17:42:48 -05:00
bac948ea6f Add plugin system 2020-07-31 15:08:02 -05:00