@ray-js/robot-data-stream 0.0.13-beta-4 → 0.0.13-beta-5
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/lib/api/p2pApi.js +4 -4
- package/package.json +3 -3
package/lib/api/p2pApi.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
3
3
|
/* eslint-disable prefer-promise-reject-errors */
|
|
4
4
|
import { p2p } from '@ray-js/ray';
|
|
5
|
-
import
|
|
5
|
+
import dayjs from 'dayjs';
|
|
6
6
|
import { logger } from '../utils';
|
|
7
7
|
import { trace } from '../trace';
|
|
8
8
|
/**
|
|
@@ -38,11 +38,11 @@ export default class P2pApi {
|
|
|
38
38
|
}
|
|
39
39
|
// if (!this.isConnected) {
|
|
40
40
|
logger('info', {
|
|
41
|
-
msg: `${source} start p2p reconnect ==> ${
|
|
41
|
+
msg: `${source} start p2p reconnect ==> ${dayjs().format('YYYY-MM-DD HH:mm:ss')}`
|
|
42
42
|
}, this.onLogger);
|
|
43
43
|
this.connectDevice(() => {
|
|
44
44
|
logger('info', {
|
|
45
|
-
msg: `${source} p2p reconnect success ==> ${
|
|
45
|
+
msg: `${source} p2p reconnect success ==> ${dayjs().format('YYYY-MM-DD HH:mm:ss')}`
|
|
46
46
|
}, this.onLogger);
|
|
47
47
|
this.isConnected = true;
|
|
48
48
|
if (this.isConnected) {
|
|
@@ -56,7 +56,7 @@ export default class P2pApi {
|
|
|
56
56
|
}, this.onLogger);
|
|
57
57
|
if (!this.isConnected) {
|
|
58
58
|
logger('warn', {
|
|
59
|
-
msg: `${source} p2p reconnect failed ==> ${
|
|
59
|
+
msg: `${source} p2p reconnect failed ==> ${dayjs().format('YYYY-MM-DD HH:mm:ss')}`
|
|
60
60
|
}, this.onLogger);
|
|
61
61
|
setTimeout(() => {
|
|
62
62
|
this.reconnectP2p(successCb, '0000');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/robot-data-stream",
|
|
3
|
-
"version": "0.0.13-beta-
|
|
3
|
+
"version": "0.0.13-beta-5",
|
|
4
4
|
"description": "扫地机P2P数据流标准化组件",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"clsx": "^1.2.1",
|
|
40
40
|
"crypto-js": "^4.2.0",
|
|
41
|
+
"dayjs": "^1.11.19",
|
|
41
42
|
"lodash-es": "^4.17.21",
|
|
42
43
|
"mitt": "^3.0.1",
|
|
43
|
-
"moment": "^2.30.1",
|
|
44
44
|
"react": "^17.0.2",
|
|
45
45
|
"react-dom": "^17.0.2"
|
|
46
46
|
},
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@ray-js/cli": "^1.5.20",
|
|
51
51
|
"@ray-js/log4js": "^0.0.4",
|
|
52
52
|
"@ray-js/ray": "^1.5.0",
|
|
53
|
-
"@ray-js/robot-protocol": "^0.
|
|
53
|
+
"@ray-js/robot-protocol": "^1.0.1",
|
|
54
54
|
"core-js": "^3.19.1",
|
|
55
55
|
"eslint-config-tuya-panel": "^0.4.2",
|
|
56
56
|
"husky": "^1.2.0",
|