Skip to content

Move non-auth mediator commands to ipc message port

MR:

Description

There are a set of non-authenticated mediator commands which should be moved to ipc. These commands depend on running in the main browser context, so we need to escape the extension runtime sandbox.

These commands include:

  • COMMAND_READY
  • COMMAND_GET_CONFIG (this one might best be implemented with secrets)
  • COMMAND_START_REMOTE
  • COMMAND_OPEN_URI
  • COMMAND_PREVENT_UNLOAD
  • COMMAND_TRACK_EVENT
  • COMMAND_SET_HREF

Implementation plan

  1. Introduce message constants for these commands
  2. Update MessagePortsController to listen for these messages (probably on this.#webIdeChannel.port1) and handle them appropriately.
  3. Remove these commands from the mediator-commands package.
  4. Update the vscode-extension-web-ide to remove these COMMAND_ references and add a new mediator/ipc module for executing the ipc specific "commands".
Edited by Paul Slaughter