Migrating to UXP because of M1 support. Missing features from CEP

Hi there. We’re starting the migration from one of our extensions to UXP in order to support M1 natively. But we hit some blockers on the road.

  1. On CEP, we use require("http") to start a new server and check for open ports.
  2. We use require('jrpc') and require("socket.io") to start a websocket server
  3. We use require("child_process") to spawn a Python process in the background.
  4. We use require("path") (from Node) to build a OS-compliant path for the above Python executable.

Why Python? We have a complex desktop application that communicates with a cloud service for collaborative work.

Is there a way to achieve similar behavior in UXP? I read somewhere that it doesn’t rely on Nodejs anymore so no Nodejs modules are available, just V8 engine.

  1. Node.js is not a thing in UXP land, so require('http') isn’t possible.
  2. I’m not familiar with jrpc, but socket.io should work with the caveat that a UXP plugin can only act as a websocket client, not a server.
  3. You may uxp.shell.openPath() and point to an executable, then cross your fingers and hope that there aren’t permission issues.
  4. path is a global, see here.