Replace GRPC proto file and delete the related file
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run

This commit is contained in:
Namhyeon Go 2024-08-19 00:35:23 +09:00
parent 1863a76a4c
commit 5d9fb71753
3 changed files with 15 additions and 85 deletions

View File

@ -1,14 +0,0 @@
syntax = "proto3";
service WelsonAppLoader {
rpc Run (AppRequest) returns (AppResponse) {}
}
message AppRequest {
string appName = 1;
}
// The response message containing the greetings
message AppResponse {
string responseText = 1;
}

View File

@ -0,0 +1,15 @@
syntax = "proto3";
option csharp_namespace = "WelsonJS.GrpcService";
service MessageController {
rpc SendMessageStream (MessageRequest) returns (stream MessageReply);
}
message MessageRequest {
string clientId = 1;
}
message MessageReply {
string message = 1;
}

View File

@ -1,71 +0,0 @@
// scriptcontrol.js
// The Simplified entrypoint for win32com (based on MSScriptControl.ScriptControl)
var workingDirectory = "";
if (typeof CreateObject === "undefined") {
var CreateObject = function(progId, serverName, callback) {
var progIds = (progId instanceof Array ? progId : [progId]);
for (var i = 0; i < progIds.length; i++) {
try {
var obj = CreateObject.make(progIds[i], serverName);
if (typeof callback === "function") {
callback(obj, progIds[i]);
}
return obj;
} catch (e) {
console.error(e.message);
};
}
};
CreateObject.make = function(p, s) {
if (typeof WScript !== "undefined") {
return WScript.CreateObject(p, s);
} else if (typeof ActiveXObject !== "undefined") {
return new ActiveXObject(p);
}
};
}
function readFile(FN, charset) {
if(typeof(charset) === "undefined") {
var FSO = CreateObject("Scripting.FileSystemObject");
var T = null;
try {
var TS = FSO.OpenTextFile(FN, 1);
if (TS.AtEndOfStream) return "";
T = TS.ReadAll();
TS.Close();
TS = null;
} catch (e) {
console.log("ERROR! " + e.number + ", " + e.description + ", FN=" + FN);
}
FSO = null;
return T;
} else {
var fsT = CreateObject("ADODB.Stream");
fsT.CharSet = charset;
fsT.Open();
fsT.LoadFromFile(FN);
T = fsT.ReadText();
fsT = null;
return T;
}
}
function setWorkingDirectory(directory) {
workingDirectory = directory;
}
function run(targetName) {
var w = CreateObject("WScript.Shell")
, stdOutPath = "tmp\\stdout.txt"
, stdErrPath = "tmp\\stderr.txt"
;
if (workingDirectory != "") {
w.CurrentDirectory = workingDirectory;
}
w.Run("%comspec% /c (cscript //NoLogo app.js " + targetName + ") 1> " + stdOutPath + " 2> " + stdErrPath, 0, true);
return readFile(stdOutPath, "utf-8");
}