feat: spawn stream support for Executor#1972
Open
RohitKushvaha01 wants to merge 15 commits intoAcode-Foundation:mainfrom
Open
feat: spawn stream support for Executor#1972RohitKushvaha01 wants to merge 15 commits intoAcode-Foundation:mainfrom
RohitKushvaha01 wants to merge 15 commits intoAcode-Foundation:mainfrom
Conversation
Contributor
Greptile SummaryThis PR introduces Key changes:
Remaining issues:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant JS as Executor.js
participant CD as Cordova (execute())
participant SS as ServerSocket(0)
participant PS as ProcessServer
participant WS as WebSocket Client (JS)
participant PR as Process (cmd)
JS->>CD: exec("spawn", [cmd])
CD->>SS: new ServerSocket(0) → port
SS-->>CD: port (socket closed)
CD->>PS: new ProcessServer(port, cmd)
CD->>PS: startAndAwait()
PS->>PS: start() [background thread]
PS-->>PS: onStart() → readyLatch.countDown()
PS-->>CD: await() returns
CD-->>JS: callbackContext.success(port)
JS->>WS: new WebSocket("ws://127.0.0.1:port")
WS->>PS: onOpen(conn)
PS->>PR: ProcessBuilder(cmd).start()
PR-->>PS: stdin / stdout streams
PS->>PS: reader thread → conn.send(bytes)
Note over WS,PS: stdin writes via ws.send() → onMessage → PR stdin
Note over PS,PR: stdout bytes streamed back via WebSocket binary frames
PR-->>PS: stdout EOF → conn.close(1000)
PS->>PS: onClose → process.destroy()
PS->>PS: new Thread → stop()
Reviews (7): Last reviewed commit: "Update src/plugins/terminal/src/android/..." | Re-trigger Greptile |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API example