@aiot-toolkit/emulator 2.0.6-alpha.0 → 2.0.6-alpha.1

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.
@@ -4,7 +4,6 @@ import { EmulatorConfig } from '../../emulatorutil/running';
4
4
  import { Metadata } from '@grpc/grpc-js';
5
5
  import { ImageFormat, KeyboardEvent, LogMessage, MouseEvent, SensorValue } from './types/proto-types';
6
6
  import { UiControllerClient } from './types/UiControllerClient';
7
- import { ConnectivityState } from '@grpc/grpc-js/build/src/connectivity-state';
8
7
  export declare class GrpcEmulator {
9
8
  eConf: EmulatorConfig;
10
9
  protoPath: string[];
@@ -17,7 +16,6 @@ export declare class GrpcEmulator {
17
16
  controller: any;
18
17
  screenshotStream?: Readable;
19
18
  logcatStream?: Readable;
20
- state: ConnectivityState;
21
19
  constructor(eConf: EmulatorConfig, protoPath: string[]);
22
20
  close(): void;
23
21
  getAuthMeta(): Metadata;
@@ -10,13 +10,9 @@ var _protoLoader = require("@grpc/proto-loader");
10
10
  var _grpcError = require("./grpcError");
11
11
  var _grpcJs = require("@grpc/grpc-js");
12
12
  var _protoTypes = require("./types/proto-types");
13
- var _connectivityState = require("@grpc/grpc-js/build/src/connectivity-state");
14
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- // eslint-disable-next-line no-restricted-imports
16
-
17
14
  class GrpcEmulator {
18
15
  connected = false;
19
- state = (() => _connectivityState.ConnectivityState.IDLE)();
20
16
  constructor(eConf, protoPath) {
21
17
  this.eConf = eConf;
22
18
  this.protoPath = protoPath;
@@ -39,17 +35,6 @@ class GrpcEmulator {
39
35
  // 32MB
40
36
  'grpc.max_send_message_length': 32 * 1024 * 1024 // 32MB
41
37
  });
42
- const watchState = e => {
43
- if (e) {
44
- console.error('watchConnectivityState error:', e);
45
- }
46
- const currentState = this.client.getChannel().getConnectivityState(false);
47
- this.state = currentState;
48
- if (currentState !== _connectivityState.ConnectivityState.SHUTDOWN) {
49
- this.client.getChannel().watchConnectivityState(currentState, this.deadline, watchState);
50
- }
51
- };
52
- watchState();
53
38
  this.uiClient = new this.controller.UiController(`127.0.0.1:${eConf['grpc.port']}`, _grpcJs.credentials.createInsecure());
54
39
  }
55
40
  close() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiot-toolkit/emulator",
3
- "version": "2.0.6-alpha.0",
3
+ "version": "2.0.6-alpha.1",
4
4
  "description": "vela emulator tool.",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -32,7 +32,7 @@
32
32
  "emulator"
33
33
  ],
34
34
  "dependencies": {
35
- "@aiot-toolkit/shared-utils": "2.0.6-alpha.0",
35
+ "@aiot-toolkit/shared-utils": "2.0.6-alpha.1",
36
36
  "@grpc/grpc-js": "^1.13.3",
37
37
  "@grpc/proto-loader": "^0.7.13",
38
38
  "@miwt/adb": "0.10.5",
@@ -49,5 +49,5 @@
49
49
  "@types/adm-zip": "^0.5.5",
50
50
  "@types/ini": "^4.1.1"
51
51
  },
52
- "gitHead": "d62548a25ca507fac9532e34983e87a8cdee36f5"
52
+ "gitHead": "21fb17d2c22ebe5a760bebd33df255901e7488a1"
53
53
  }