alphatheta-connect 0.28.1 → 0.28.2

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.
@@ -65,7 +65,7 @@ export declare const UInt8: {
65
65
  data: Buffer;
66
66
  };
67
67
  type: NumberFieldType;
68
- bytesToRead: 1 | 2 | 4;
68
+ bytesToRead: 1 | 4 | 2;
69
69
  };
70
70
  /**
71
71
  * Field representing a UInt16
@@ -81,7 +81,7 @@ export declare const UInt16: {
81
81
  data: Buffer;
82
82
  };
83
83
  type: NumberFieldType;
84
- bytesToRead: 1 | 2 | 4;
84
+ bytesToRead: 1 | 4 | 2;
85
85
  };
86
86
  /**
87
87
  * Field representing a UInt32
@@ -97,7 +97,7 @@ export declare const UInt32: {
97
97
  data: Buffer;
98
98
  };
99
99
  type: NumberFieldType;
100
- bytesToRead: 1 | 2 | 4;
100
+ bytesToRead: 1 | 4 | 2;
101
101
  };
102
102
  /**
103
103
  * Field representing a null-terminated big endian UTF-16 string
@@ -131,7 +131,7 @@ declare const fieldMap: {
131
131
  data: Buffer;
132
132
  };
133
133
  type: NumberFieldType;
134
- bytesToRead: 1 | 2 | 4;
134
+ bytesToRead: 1 | 4 | 2;
135
135
  };
136
136
  readonly 16: {
137
137
  new (value: number | Buffer): {
@@ -144,7 +144,7 @@ declare const fieldMap: {
144
144
  data: Buffer;
145
145
  };
146
146
  type: NumberFieldType;
147
- bytesToRead: 1 | 2 | 4;
147
+ bytesToRead: 1 | 4 | 2;
148
148
  };
149
149
  readonly 17: {
150
150
  new (value: number | Buffer): {
@@ -157,7 +157,7 @@ declare const fieldMap: {
157
157
  data: Buffer;
158
158
  };
159
159
  type: NumberFieldType;
160
- bytesToRead: 1 | 2 | 4;
160
+ bytesToRead: 1 | 4 | 2;
161
161
  };
162
162
  readonly 20: typeof Binary;
163
163
  readonly 38: typeof String;
@@ -123,6 +123,11 @@ export declare class Connection {
123
123
  constructor(device: Device, socket: PromiseSocket<Socket>);
124
124
  writeMessage(message: Message, span: Span): Promise<void>;
125
125
  readMessage<T extends Response>(expect: T, span: Span): Promise<Message<T>>;
126
+ /**
127
+ * False once the device has closed its end of the connection or the socket
128
+ * has failed. Every write after that fails with "write after end".
129
+ */
130
+ get isOpen(): boolean;
126
131
  close(): void;
127
132
  }
128
133
  export declare class QueryInterface {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alphatheta-connect",
3
- "version": "0.28.1",
3
+ "version": "0.28.2",
4
4
  "main": "lib/index.js",
5
5
  "author": "Evan Purkhiser <evanpurkhiser@gmail.com>",
6
6
  "contributors": [