skyeye-sdk-js 1.2.4 → 1.2.6

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.
@@ -18,6 +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(json: string): Promise<any>;
21
22
  RunTestcase(json: string): Promise<any>;
22
23
  Monitor(json: string): Promise<any>;
23
24
  call(request: JSONRequest): Promise<any>;
@@ -65,6 +65,24 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
65
65
  this.host = host;
66
66
  this.port = port;
67
67
  }
68
+ //终止所有grpc通信
69
+ stopGrpcService(json) {
70
+ const _super = Object.create(null, {
71
+ stopRunTest: { get: () => super.stopRunTest }
72
+ });
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ try {
75
+ const request = new skyeye_rpc_pb_1.JSONRequest();
76
+ request.setRequest(json);
77
+ const stream = _super.stopRunTest.call(this, request);
78
+ return stream;
79
+ }
80
+ catch (error) {
81
+ console.error("Error during stopGrpcService:", error);
82
+ throw error;
83
+ }
84
+ });
85
+ }
68
86
  RunTestcase(json) {
69
87
  const _super = Object.create(null, {
70
88
  runTestcase: { get: () => super.runTestcase }
@@ -77,7 +95,7 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
77
95
  return stream;
78
96
  }
79
97
  catch (error) {
80
- console.error("Error during RunTestcas2e:", error);
98
+ console.error("Error during RunTestcase:", error);
81
99
  throw error;
82
100
  }
83
101
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skyeye-sdk-js",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "gRPC to SkyEye",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -43,6 +43,20 @@ export class SkyEyeClient extends JSONTransmissionClient {
43
43
  }
44
44
 
45
45
 
46
+ //终止所有grpc通信
47
+ public async stopGrpcService(json: string){
48
+ try {
49
+ const request = new JSONRequest();
50
+ request.setRequest(json);
51
+ const stream = super.stopRunTest(request);
52
+ return stream;
53
+ } catch (error) {
54
+ console.error("Error during stopGrpcService:", error);
55
+ throw error;
56
+ }
57
+ }
58
+
59
+
46
60
  public async RunTestcase(json: string) {
47
61
  try {
48
62
  const request = new JSONRequest();
@@ -50,7 +64,7 @@ export class SkyEyeClient extends JSONTransmissionClient {
50
64
  const stream = super.runTestcase(request);
51
65
  return stream;
52
66
  } catch (error) {
53
- console.error("Error during RunTestcas2e:", error);
67
+ console.error("Error during RunTestcase:", error);
54
68
  throw error;
55
69
  }
56
70
  }
package/test.ts CHANGED
@@ -31,6 +31,7 @@ async function test() {
31
31
  // await client.initSkyEyeAndRun(pathSkyEye,fileName,port,skyeyeDir);
32
32
 
33
33
  await client.initSkyEyeAndRun2(pathSkyEye,fileName,port,skyeyeDir)
34
+
34
35
 
35
36
  // GrpcUtil.initAndRunExample();
36
37