Archived
1
0
Commit Graph

17 Commits

Author SHA1 Message Date
2d8b785fb8 Fix health socket not getting client messages
Forgot to resume. Went ahead and did the same for the test plugin
although it only sends messages and doesn't receive any.
2021-02-16 15:01:46 -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
5505959f7e Expose websocket server to plugins
Same reasoning used when exposing Express.
2021-02-09 13:09:34 -06:00
055e0ef9ec Provide WsRouter to plugins 2021-02-09 13:09:27 -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
9d39c53c99 plugin: Give test-plugin some html to test overlay 2020-11-06 14:47:08 -05:00
197a09f0c1 plugin: Test endpoints via supertest
Unfortunately we can't use node-mocks-http to test a express.Router
that has async routes. See https://github.com/howardabrams/node-mocks-http/issues/225

router will just return undefined if the executing handler is async and
so the test will have no way to wait for it to complete. Thus, we have
to use supertest which starts an actual HTTP server in the background
and uses a HTTP client to send requests.
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
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
ef971009d9 plugin.test.ts: Make it clear iconPath is a path 2020-11-06 10:12:46 -05:00
82e8a00a0d Fix CI 2020-11-06 10:12:46 -05:00
bea185b8b2 plugin: Add basic loading test
Will work on testing overlay next.
2020-11-06 10:12:46 -05:00