@onekeyfe/hd-shared 0.1.43 → 0.1.46
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/HardwareError.d.ts +1 -0
- package/dist/HardwareError.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -2
- package/package.json +2 -2
- package/src/HardwareError.ts +4 -1
package/dist/HardwareError.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export declare const HardwareErrorCode: {
|
|
|
59
59
|
readonly BleCharacteristicNotifyError: 709;
|
|
60
60
|
readonly BleWriteCharacteristicError: 710;
|
|
61
61
|
readonly BleAlreadyConnected: 711;
|
|
62
|
+
readonly BleLocationServicesDisabled: 712;
|
|
62
63
|
readonly RuntimeError: 800;
|
|
63
64
|
readonly PinInvalid: 801;
|
|
64
65
|
readonly PinCancelled: 802;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HardwareError.d.ts","sourceRoot":"","sources":["../src/HardwareError.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,OAAO,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,GAAG,CAAC;CACd;AAED,aAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE5C,aAAK,+BAA+B,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,OAAO,iBAAiB,CAAC,GAAG,MAAM;CAAE,CAAC;AAE5F,aAAK,cAAc,GAAG,OAAO,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAOxD,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAS,EAAE,cAAc,CAAkC;IAE3D,OAAO,SAAM;IAEb,MAAM,EAAE,GAAG,CAAM;gBAEL,aAAa,EAAE,cAAc,GAAG,MAAM;CAmBnD;AAED,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"HardwareError.d.ts","sourceRoot":"","sources":["../src/HardwareError.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,OAAO,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,GAAG,CAAC;CACd;AAED,aAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE5C,aAAK,+BAA+B,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,OAAO,iBAAiB,CAAC,GAAG,MAAM;CAAE,CAAC;AAE5F,aAAK,cAAc,GAAG,OAAO,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAOxD,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAS,EAAE,cAAc,CAAkC;IAE3D,OAAO,SAAM;IAEb,MAAM,EAAE,GAAG,CAAM;gBAEL,aAAa,EAAE,cAAc,GAAG,MAAM;CAmBnD;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiPpB,CAAC;AAEX,eAAO,MAAM,wBAAwB,EAAE,+BA0F7B,CAAC;AAEX,eAAO,MAAM,UAAU,kBACN,cAAc,GAAG,MAAM,yCAE7B,GAAG,kBAMb,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,GAAG,QAY1C,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,aAOtD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ declare const HardwareErrorCode: {
|
|
|
68
68
|
readonly BleCharacteristicNotifyError: 709;
|
|
69
69
|
readonly BleWriteCharacteristicError: 710;
|
|
70
70
|
readonly BleAlreadyConnected: 711;
|
|
71
|
+
readonly BleLocationServicesDisabled: 712;
|
|
71
72
|
readonly RuntimeError: 800;
|
|
72
73
|
readonly PinInvalid: 801;
|
|
73
74
|
readonly PinCancelled: 802;
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
1
5
|
/******************************************************************************
|
|
2
6
|
Copyright (c) Microsoft Corporation.
|
|
3
7
|
|
|
@@ -124,6 +128,7 @@ const HardwareErrorCode = {
|
|
|
124
128
|
BleCharacteristicNotifyError: 709,
|
|
125
129
|
BleWriteCharacteristicError: 710,
|
|
126
130
|
BleAlreadyConnected: 711,
|
|
131
|
+
BleLocationServicesDisabled: 712,
|
|
127
132
|
RuntimeError: 800,
|
|
128
133
|
PinInvalid: 801,
|
|
129
134
|
PinCancelled: 802,
|
|
@@ -172,7 +177,7 @@ const HardwareErrorCodeMessage = {
|
|
|
172
177
|
[HardwareErrorCode.TransportInvalidProtobuf]: 'Transport invalid protobuf',
|
|
173
178
|
[HardwareErrorCode.BleScanError]: 'BLE scan error',
|
|
174
179
|
[HardwareErrorCode.BlePermissionError]: 'Bluetooth required to be turned on',
|
|
175
|
-
[HardwareErrorCode.BleLocationError]: '
|
|
180
|
+
[HardwareErrorCode.BleLocationError]: 'Location permissions for the application are not available',
|
|
176
181
|
[HardwareErrorCode.BleRequiredUUID]: 'uuid is required',
|
|
177
182
|
[HardwareErrorCode.BleConnectedError]: 'connected error is always runtime error',
|
|
178
183
|
[HardwareErrorCode.BleDeviceNotBonded]: 'device is not bonded',
|
|
@@ -182,6 +187,7 @@ const HardwareErrorCodeMessage = {
|
|
|
182
187
|
[HardwareErrorCode.BleCharacteristicNotifyError]: 'Characteristic Notify Error',
|
|
183
188
|
[HardwareErrorCode.BleWriteCharacteristicError]: 'Write Characteristic Error',
|
|
184
189
|
[HardwareErrorCode.BleAlreadyConnected]: 'Already connected to device',
|
|
190
|
+
[HardwareErrorCode.BleLocationServicesDisabled]: 'Location Services disabled',
|
|
185
191
|
[HardwareErrorCode.RuntimeError]: 'Runtime error',
|
|
186
192
|
[HardwareErrorCode.PinInvalid]: 'Pin invalid',
|
|
187
193
|
[HardwareErrorCode.PinCancelled]: 'Pin cancelled',
|
|
@@ -233,4 +239,11 @@ var HardwareError$1 = /*#__PURE__*/Object.freeze({
|
|
|
233
239
|
CreateErrorByMessage: CreateErrorByMessage
|
|
234
240
|
});
|
|
235
241
|
|
|
236
|
-
|
|
242
|
+
exports.CreateErrorByMessage = CreateErrorByMessage;
|
|
243
|
+
exports.ERRORS = HardwareError$1;
|
|
244
|
+
exports.HardwareError = HardwareError;
|
|
245
|
+
exports.HardwareErrorCode = HardwareErrorCode;
|
|
246
|
+
exports.HardwareErrorCodeMessage = HardwareErrorCodeMessage;
|
|
247
|
+
exports.TypedError = TypedError;
|
|
248
|
+
exports.createDeferred = createDeferred;
|
|
249
|
+
exports.serializeError = serializeError;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-shared",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.46",
|
|
4
4
|
"description": "Hardware SDK's shared tool library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Hardware-SDK",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"lint": "eslint .",
|
|
26
26
|
"lint:fix": "eslint . --fix"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "cb71b9b5f2013756b0ba8d4111e233124bf6282e"
|
|
29
29
|
}
|
package/src/HardwareError.ts
CHANGED
|
@@ -223,6 +223,7 @@ export const HardwareErrorCode = {
|
|
|
223
223
|
BleCharacteristicNotifyError: 709,
|
|
224
224
|
BleWriteCharacteristicError: 710,
|
|
225
225
|
BleAlreadyConnected: 711,
|
|
226
|
+
BleLocationServicesDisabled: 712,
|
|
226
227
|
|
|
227
228
|
/**
|
|
228
229
|
* Hardware runtiome errors
|
|
@@ -347,7 +348,8 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
|
347
348
|
*/
|
|
348
349
|
[HardwareErrorCode.BleScanError]: 'BLE scan error',
|
|
349
350
|
[HardwareErrorCode.BlePermissionError]: 'Bluetooth required to be turned on',
|
|
350
|
-
[HardwareErrorCode.BleLocationError]:
|
|
351
|
+
[HardwareErrorCode.BleLocationError]:
|
|
352
|
+
'Location permissions for the application are not available',
|
|
351
353
|
[HardwareErrorCode.BleRequiredUUID]: 'uuid is required',
|
|
352
354
|
[HardwareErrorCode.BleConnectedError]: 'connected error is always runtime error',
|
|
353
355
|
[HardwareErrorCode.BleDeviceNotBonded]: 'device is not bonded',
|
|
@@ -357,6 +359,7 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
|
357
359
|
[HardwareErrorCode.BleCharacteristicNotifyError]: 'Characteristic Notify Error',
|
|
358
360
|
[HardwareErrorCode.BleWriteCharacteristicError]: 'Write Characteristic Error',
|
|
359
361
|
[HardwareErrorCode.BleAlreadyConnected]: 'Already connected to device',
|
|
362
|
+
[HardwareErrorCode.BleLocationServicesDisabled]: 'Location Services disabled',
|
|
360
363
|
|
|
361
364
|
/**
|
|
362
365
|
* Runtime Error
|