Closed Valanap closed 1 year ago
You can't access a readable from the isolate. Think of the isolate like Safari. How would you access a readable that you made in nodejs from safari? It's non-sense. You need to set up a system of callbacks to pass data back an forth.
While we are migrating from
vm2
(like many others), where this use case worked as expected (there was direct access to object with reference), we cannot replicateReadable
functionality inisolated-vm
, I add the comment that the code is executed only in our separate NodeJS application.Assuming that user can:
We tried multiple options including unsafe ref.
I have created minimal repository, in real world, the readable function inside file is the readable from different SDK.
Provided example shows:
Created different sample with unsafeInherit, but also doesn't work, the Reference seem to be empty that way.
Looking for community help on how to resolve this issue, to get access to the Readable created dynamically with resolved promise.