mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 15:53:55 +00:00
Added ability to export JS modules from agent.
This commit is contained in:
@@ -131,6 +131,12 @@ char* crashMemory = ILib_POSIX_InstallCrashHandler(argv[0]);
|
||||
}
|
||||
}
|
||||
|
||||
if (argc > 1 && strcmp(argv[1], "-export") == 0 && integratedJavaScriptLen == 0)
|
||||
{
|
||||
integratedJavaScript = ILibString_Copy("require('code-utils').expand({embedded: true});process.exit();",0);
|
||||
integratedJavaScriptLen = (int)strnlen_s(integratedJavaScript, sizeof(ILibScratchPad));
|
||||
}
|
||||
|
||||
if (argc > 2 && strcmp(argv[1], "-exec") == 0 && integratedJavaScriptLen == 0)
|
||||
{
|
||||
integratedJavaScript = ILibString_Copy(argv[2], 0);
|
||||
|
||||
Reference in New Issue
Block a user