refactor: Move non-auth mediator commands to ipc
Issue: #317 (closed)
Description
This MR moves the non-auth mediator commands to the messagePassingProtocol
API. We need to move away from mediator commands and most commands can live in the gitlab.gitlab-web-ide
extensions itself, but these commands require the main runtime context. Thankfully, these aren't really commands and are actually meant to be more like postMessages
anyway.
How to test
To test startRemote
message:
- Start Web IDE example app
- Open the terminal (
CTRL + `
) and click Configure a remote connection. - Enter example.com, /example/proj, and 123456 for the configuration parameters.
- The Web IDE should restart in "Remote" mode. This doesn't need to actually work. It just needs to respond.
To test preventUnload
message:
- Start Web IDE example app
- Open a file and make a change
- Try to close the tab
- The Web IDE should show the prevent unload warning
- Revert the change
- Try to close the tab
To test ready
message:
- Start Web IDE example app
- In browser console look for
[web-ide-example-app] Web IDE ready!
message
Screenshots
Edited by Paul Slaughter