Commit Graph

41 Commits

Author SHA1 Message Date
Asher 2879bd4c22
Add type alias for required modules 2021-02-09 13:09:41 -06:00
Asher c78f56b334
Expose HttpError to plugins
This will let them throw and show nice errors more easily.
2021-02-09 13:09:38 -06:00
Asher 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
Asher 5505959f7e
Expose websocket server to plugins
Same reasoning used when exposing Express.
2021-02-09 13:09:34 -06:00
Asher 00cfd9bdf1
Add working directory to plugin config 2021-02-09 13:09:31 -06:00
Asher 3211eb1ce5
Expose log level to plugins
In case they need to map it to something else.
2021-02-09 13:09:30 -06:00
Asher 017b1cc633
Add deinit for plugins 2021-02-09 13:09:29 -06:00
Asher 055e0ef9ec
Provide WsRouter to plugins 2021-02-09 13:09:27 -06:00
Asher 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
Asher f6b04c7c29
Expose proxy server to plugins 2021-02-09 12:19:39 -06:00
Asher a8e928798b
Re-export express for plugins 2021-02-09 12:19:38 -06:00
Asher 5f1fab7d27
Re-export logger field for plugins 2021-02-09 12:19:36 -06:00
Anmol Sethi 9917da068a
v3.7.0 2020-11-16 11:11:50 -05:00
Anmol Sethi 277211c4ce
plugin: Make init and applications callbacks optional 2020-11-06 14:47:08 -05:00
Anmol Sethi 9453f891df
plugin.ts: Fix usage of routerPath in mount 2020-11-06 10:13:01 -05:00
Anmol Sethi 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
Anmol Sethi 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
Anmol Sethi 706bc23f04
plugin: Fixes for CI 2020-11-06 10:13:01 -05:00
Anmol Sethi 2a13d003d3
plugin.ts: Add homepageURL to plugin and application 2020-11-06 10:12:47 -05:00
Anmol Sethi 687094802e
plugin.ts: Make application endpoint paths absolute 2020-11-06 10:12:46 -05:00
Anmol Sethi 139a28e0ea
plugin.ts: Describe private counterpart functions
Addresses Will's comments.
2020-11-06 10:12:46 -05:00
Anmol Sethi afff86ae9c
plugin.ts: Adjust to implement pluginapi.d.ts correctly 2020-11-06 10:12:46 -05:00
Anmol Sethi fed545e67d
plugin.d.ts -> pluginapi.d.ts
More clear.
2020-11-06 10:12:46 -05:00
Anmol Sethi 8d3a7721fe
plugin.d.ts: Document plugin priority correctly 2020-11-06 10:12:46 -05:00
Anmol Sethi 75e52a3774
plugin.ts: Fixes for @code-asher 2020-11-06 10:12:46 -05:00
Anmol Sethi f4d7f00033
plugin.ts: Fixes for @wbobeirne 2020-11-06 10:12:46 -05:00
Anmol Sethi 30d2962e21
src/node/plugin.ts: Warn on duplicate plugin and only load first 2020-11-06 10:12:46 -05:00
Anmol Sethi 82e8a00a0d
Fix CI 2020-11-06 10:12:46 -05:00
Anmol Sethi e08a55d44a
src/node/plugin.ts: Implement new plugin API 2020-11-06 10:12:45 -05:00
Asher 71dc5c7542
Switch to Express
It doesn't do anything yet.
2020-10-26 17:56:11 -05:00
Asher 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
Asher c86d7398ab
Use system data directory for plugins 2020-10-08 16:18:31 -05:00
Asher a44b4455f5
Read plugin name from package.json 2020-10-07 12:54:48 -05:00
Asher c2ac126a50
Log all plugin errors as errors 2020-10-07 12:25:42 -05:00
Asher 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
Asher 7a982555a8
Add version to plugin load log 2020-09-30 15:52:40 -05:00
Asher e64b186527
Add variables to better customize plugin directories 2020-09-30 15:52:39 -05:00
Asher 9b979ac869
Document code-server injection 2020-08-05 13:00:37 -05:00
Asher fd36f8c168
Use error log level for plugin load failure 2020-08-05 13:00:33 -05:00
Asher 361e7103ea
Enable loading external plugins 2020-07-31 17:42:48 -05:00
Asher bac948ea6f
Add plugin system 2020-07-31 15:08:02 -05:00