skyeye-sdk-js 1.2.5 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/SkyEyeClient.d.ts +1 -1
- package/dist/src/SkyEyeClient.js +4 -2
- package/dist/src/proto/protoc.sh +1 -1
- package/dist/src/proto/skyeye_rpc.proto +1 -0
- package/dist/src/proto/skyeye_rpc_grpc_pb.js +11 -0
- package/package.json +1 -1
- package/src/SkyEyeClient.ts +4 -2
- package/test.ts +1 -0
- package/dist/src/proto/dir.bat +0 -37
|
@@ -18,7 +18,7 @@ export declare class SkyEyeClient extends JSONTransmissionClient {
|
|
|
18
18
|
private host;
|
|
19
19
|
private port;
|
|
20
20
|
constructor(host: string, port: string);
|
|
21
|
-
stopGrpcService(): Promise<any>;
|
|
21
|
+
stopGrpcService(json: string): Promise<any>;
|
|
22
22
|
RunTestcase(json: string): Promise<any>;
|
|
23
23
|
Monitor(json: string): Promise<any>;
|
|
24
24
|
call(request: JSONRequest): Promise<any>;
|
package/dist/src/SkyEyeClient.js
CHANGED
|
@@ -66,13 +66,15 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
|
|
|
66
66
|
this.port = port;
|
|
67
67
|
}
|
|
68
68
|
//终止所有grpc通信
|
|
69
|
-
stopGrpcService() {
|
|
69
|
+
stopGrpcService(json) {
|
|
70
70
|
const _super = Object.create(null, {
|
|
71
71
|
stopRunTest: { get: () => super.stopRunTest }
|
|
72
72
|
});
|
|
73
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
74
|
try {
|
|
75
|
-
const
|
|
75
|
+
const request = new skyeye_rpc_pb_1.JSONRequest();
|
|
76
|
+
request.setRequest(json);
|
|
77
|
+
const stream = _super.stopRunTest.call(this, request);
|
|
76
78
|
return stream;
|
|
77
79
|
}
|
|
78
80
|
catch (error) {
|
package/dist/src/proto/protoc.sh
CHANGED
|
@@ -7,7 +7,7 @@ PROTOC_GEN_TS_PATH="./node_modules/.bin/protoc-gen-ts"
|
|
|
7
7
|
GRPC_TOOLS_NODE_PROTOC_PLUGIN="./node_modules/.bin/grpc_tools_node_protoc_plugin"
|
|
8
8
|
GRPC_TOOLS_NODE_PROTOC="./node_modules/.bin/grpc_tools_node_protoc"
|
|
9
9
|
|
|
10
|
-
for f in ./src/
|
|
10
|
+
for f in ./src/proto/*; do
|
|
11
11
|
|
|
12
12
|
# skip the non proto files
|
|
13
13
|
if [ "$(basename "$f")" == "index.ts" ]; then
|
|
@@ -5,6 +5,7 @@ service JSONTransmission {
|
|
|
5
5
|
rpc SkyEyeLogReport (JSONRequest) returns (stream JSONResponse){};
|
|
6
6
|
rpc RunTestcase (JSONRequest) returns (stream JSONResponse){};
|
|
7
7
|
rpc Monitor (JSONRequest) returns (stream JSONResponse){};
|
|
8
|
+
rpc stopRunTest (JSONRequest) returns (stream JSONResponse){};
|
|
8
9
|
}
|
|
9
10
|
message JSONRequest {
|
|
10
11
|
string request = 1;
|
|
@@ -72,6 +72,17 @@ var JSONTransmissionService = exports.JSONTransmissionService = {
|
|
|
72
72
|
responseSerialize: serialize_JSONResponse,
|
|
73
73
|
responseDeserialize: deserialize_JSONResponse,
|
|
74
74
|
},
|
|
75
|
+
stopRunTest: {
|
|
76
|
+
path: '/JSONTransmission/stopRunTest',
|
|
77
|
+
requestStream: false,
|
|
78
|
+
responseStream: true,
|
|
79
|
+
requestType: skyeye_rpc_pb.JSONRequest,
|
|
80
|
+
responseType: skyeye_rpc_pb.JSONResponse,
|
|
81
|
+
requestSerialize: serialize_JSONRequest,
|
|
82
|
+
requestDeserialize: deserialize_JSONRequest,
|
|
83
|
+
responseSerialize: serialize_JSONResponse,
|
|
84
|
+
responseDeserialize: deserialize_JSONResponse,
|
|
85
|
+
},
|
|
75
86
|
};
|
|
76
87
|
|
|
77
88
|
exports.JSONTransmissionClient = grpc.makeGenericClientConstructor(JSONTransmissionService);
|
package/package.json
CHANGED
package/src/SkyEyeClient.ts
CHANGED
|
@@ -44,9 +44,11 @@ export class SkyEyeClient extends JSONTransmissionClient {
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
//终止所有grpc通信
|
|
47
|
-
public async stopGrpcService(){
|
|
47
|
+
public async stopGrpcService(json: string){
|
|
48
48
|
try {
|
|
49
|
-
const
|
|
49
|
+
const request = new JSONRequest();
|
|
50
|
+
request.setRequest(json);
|
|
51
|
+
const stream = super.stopRunTest(request);
|
|
50
52
|
return stream;
|
|
51
53
|
} catch (error) {
|
|
52
54
|
console.error("Error during stopGrpcService:", error);
|
package/test.ts
CHANGED
package/dist/src/proto/dir.bat
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
|
|
3
|
-
rem set
|
|
4
|
-
rem cd /d D:\UpperComputer\develop\skyeye-sdk-js\src\proto2\protoc.bat
|
|
5
|
-
|
|
6
|
-
rem current dir
|
|
7
|
-
echo current dir %CD%
|
|
8
|
-
|
|
9
|
-
set PROTO_FILE=skyeye_rpc.proto
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
set PROTOC_GEN_TS_PATH=D:\UpperComputer\develop\skyeye-sdk-js\node_modules\.bin\protoc-gen-ts.cmd
|
|
13
|
-
set GRPC_TOOLS_NODE_PROTOC_PLUGIN=D:\UpperComputer\develop\skyeye-sdk-js\node_modules\.bin\grpc_tools_node_protoc_plugin.cmd
|
|
14
|
-
set GRPC_TOOLS_NODE_PROTOC=D:\UpperComputer\develop\skyeye-sdk-js\node_modules\.bin\grpc_tools_node_protoc.cmd
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
rem display path variables
|
|
19
|
-
echo PROTOC_GEN_TS_PATH: %PROTOC_GEN_TS_PATH%
|
|
20
|
-
echo GRPC_TOOLS_NODE_PROTOC_PLUGIN: %GRPC_TOOLS_NODE_PROTOC_PLUGIN%
|
|
21
|
-
echo GRPC_TOOLS_NODE_PROTOC: %GRPC_TOOLS_NODE_PROTOC%
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
rem 生成 JavaScript 文件
|
|
25
|
-
%GRPC_TOOLS_NODE_PROTOC% ^
|
|
26
|
-
--js_out=import_style=commonjs,binary:. ^
|
|
27
|
-
--grpc_out=. ^
|
|
28
|
-
--plugin=protoc-gen-grpc=%GRPC_TOOLS_NODE_PROTOC_PLUGIN% ^
|
|
29
|
-
-I . ^
|
|
30
|
-
%PROTO_FILE%
|
|
31
|
-
|
|
32
|
-
rem 生成 TypeScript 文件
|
|
33
|
-
%GRPC_TOOLS_NODE_PROTOC% ^
|
|
34
|
-
--plugin=protoc-gen-ts=%PROTOC_GEN_TS_PATH% ^
|
|
35
|
-
--ts_out=. ^
|
|
36
|
-
-I . ^
|
|
37
|
-
%PROTO_FILE%
|