-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src,agents: add support for source code collection
The runtime now stores the `scriptId` and `url` or `path` of all the loaded cjs and esm modules. A new grpc command has been added to retrieve the source code for any `scriptId`-`url|path` pair by reading the source code from file. In case the specific `scriptId`-`url|path` pair wasn't stored, it returns an error. In the rare case where a ESM is not loaded from a file URL, the code would be stored on loading time. PR-URL: #240 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
- Loading branch information
1 parent
0d16079
commit 6c30ede
Showing
31 changed files
with
2,677 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
syntax = "proto3"; | ||
|
||
import "common.proto"; | ||
|
||
package grpcagent; | ||
|
||
message SourceCodeArgs { | ||
int64 thread_id = 1; | ||
int32 script_id = 2; | ||
string path = 3; | ||
} | ||
|
||
message SourceCodeEvent { | ||
CommonResponse common = 1; | ||
int64 thread_id = 2; | ||
string path = 3; | ||
string code = 4; | ||
bool is_esm = 5; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.