aiot-toolkit 2.0.5-widget-provider-beta.1 → 2.0.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.
@@ -11,16 +11,16 @@ var _path = _interopRequireDefault(require("path"));
11
11
  var _AdbUtils = _interopRequireDefault(require("./AdbUtils"));
12
12
  var _RequestUtils = _interopRequireDefault(require("./RequestUtils"));
13
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- /**
15
- * DeviceUtil
14
+ /**
15
+ * DeviceUtil
16
16
  */
17
17
  class DeviceUtil {
18
18
  static ipRegExp = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
19
19
  static CLIENT_PORT = 39517;
20
20
  static quickapp_url = 'https://statres.quickapp.cn/quickapp/quickapptool/release/platform/';
21
- /**
22
- * 获取连接上的所有设备数组,供IDE使用
23
- * @returns
21
+ /**
22
+ * 获取连接上的所有设备数组,供IDE使用
23
+ * @returns
24
24
  */
25
25
  static getAllConnectedDevices() {
26
26
  try {
@@ -36,10 +36,10 @@ class DeviceUtil {
36
36
  _sharedUtils.ColorConsole.throw('Error getting connection information of adb device');
37
37
  }
38
38
  }
39
- /**
40
- * 安装调试器、预览版
41
- * @param options
42
- * @returns
39
+ /**
40
+ * 安装调试器、预览版
41
+ * @param options
42
+ * @returns
43
43
  */
44
44
  static async installDbgAndMkp(options) {
45
45
  try {
@@ -71,14 +71,14 @@ class DeviceUtil {
71
71
  return Promise.reject(new Error(`Failed to install , error message:${error?.toString() || 'unknown error'}`));
72
72
  }
73
73
  }
74
- /**
75
- * 如果是TV等AIOT设备,需要通过IP连接
76
- * 1. 若ip为空,则询问是否要连接新设备
77
- * 2. 无需连接新设备,返回
78
- * 3. 连接新设备,输入ip值(可输入多个ip,以逗号隔断)
79
- * 4. 判断输入值,空则输出info并返回
80
- * 5. 处理ip,输入每个ip设备的端口号,尝试连接,给出连接结果
81
- * @param ip
74
+ /**
75
+ * 如果是TV等AIOT设备,需要通过IP连接
76
+ * 1. 若ip为空,则询问是否要连接新设备
77
+ * 2. 无需连接新设备,返回
78
+ * 3. 连接新设备,输入ip值(可输入多个ip,以逗号隔断)
79
+ * 4. 判断输入值,空则输出info并返回
80
+ * 5. 处理ip,输入每个ip设备的端口号,尝试连接,给出连接结果
81
+ * @param ip
82
82
  */
83
83
  static async connectDevice(ip) {
84
84
  try {
@@ -137,11 +137,11 @@ class DeviceUtil {
137
137
  }
138
138
  } catch {}
139
139
  }
140
- /**
141
- * 选择一个或者多个设备
142
- * @param deviceList
143
- * @param orderText
144
- * @returns
140
+ /**
141
+ * 选择一个或者多个设备
142
+ * @param deviceList
143
+ * @param orderText
144
+ * @returns
145
145
  */
146
146
  static async queryDevice(deviceList) {
147
147
  let orderText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
@@ -164,11 +164,11 @@ class DeviceUtil {
164
164
  });
165
165
  return chooseDevices[0] === ALL_TEXT ? deviceList : chooseDevices;
166
166
  }
167
- /**
168
- * 下载apk
169
- * @param options
170
- * @param isQuickAppDebugger
171
- * @returns
167
+ /**
168
+ * 下载apk
169
+ * @param options
170
+ * @param isQuickAppDebugger
171
+ * @returns
172
172
  */
173
173
  static async downloadApk(options, isQuickAppDebugger) {
174
174
  const {
@@ -200,14 +200,14 @@ class DeviceUtil {
200
200
  }
201
201
  }
202
202
  }
203
- /**
204
- * 获取设备上的快应用框架(需要先安装调试器)
205
- * 1. 请求获取平台信息
206
- * 2. 若获取结果为空或者undefined,则等待3s再次请求
207
- * 3. 若获取结果不为空,但属性availablePlatforms为空,则等待3s再次请求
208
- * 4. 若请求次数超过3次,则结束请求
209
- * 5. 否则打印获取结果
210
- * @param options
203
+ /**
204
+ * 获取设备上的快应用框架(需要先安装调试器)
205
+ * 1. 请求获取平台信息
206
+ * 2. 若获取结果为空或者undefined,则等待3s再次请求
207
+ * 3. 若获取结果不为空,但属性availablePlatforms为空,则等待3s再次请求
208
+ * 4. 若请求次数超过3次,则结束请求
209
+ * 5. 否则打印获取结果
210
+ * @param options
211
211
  */
212
212
  static async getAvailablePlatform(options) {
213
213
  try {
@@ -256,11 +256,11 @@ class DeviceUtil {
256
256
  _sharedUtils.ColorConsole.throw(`Error getting the list of Quickapp engines on the device`);
257
257
  }
258
258
  }
259
- /**
260
- * 给设备列表中的每个设备安装apk
261
- * @param deviceList
262
- * @param apkPath
263
- * @returns
259
+ /**
260
+ * 给设备列表中的每个设备安装apk
261
+ * @param deviceList
262
+ * @param apkPath
263
+ * @returns
264
264
  */
265
265
  static async installApk() {
266
266
  let deviceList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
@@ -9,8 +9,8 @@ var _axios = _interopRequireDefault(require("axios"));
9
9
  var _fsExtra = _interopRequireDefault(require("fs-extra"));
10
10
  var _path = _interopRequireDefault(require("path"));
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- /**
13
- * RequestUtils
12
+ /**
13
+ * RequestUtils
14
14
  */
15
15
  class RequestUtils {
16
16
  static async sendReq(client, api, params) {
@@ -33,8 +33,8 @@ class VelaVvdUtils {
33
33
  return true;
34
34
  }
35
35
 
36
- /**
37
- * 命令行访问方式创建模拟器
36
+ /**
37
+ * 命令行访问方式创建模拟器
38
38
  */
39
39
  static async createVelaVvdByInquire() {
40
40
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiot-toolkit",
3
- "version": "2.0.5-widget-provider-beta.1",
3
+ "version": "2.0.5",
4
4
  "description": "Tools for creating, developing, and packaging aiot applications.",
5
5
  "keywords": [
6
6
  "aiot"
@@ -22,14 +22,14 @@
22
22
  "test": "node ./__tests__/aiot-toolkit.test.js"
23
23
  },
24
24
  "dependencies": {
25
- "@aiot-toolkit/aiotpack": "2.0.5-widget-provider-beta.1",
26
- "@aiot-toolkit/commander": "2.0.5-widget-provider-beta.1",
27
- "@aiot-toolkit/emulator": "2.0.5-widget-provider-beta.1",
28
- "@aiot-toolkit/shared-utils": "2.0.5-widget-provider-beta.1",
25
+ "@aiot-toolkit/aiotpack": "2.0.5",
26
+ "@aiot-toolkit/commander": "2.0.5",
27
+ "@aiot-toolkit/emulator": "2.0.5",
28
+ "@aiot-toolkit/shared-utils": "2.0.5",
29
29
  "@inquirer/prompts": "^5.3.0",
30
30
  "@miwt/adb": "^0.9.0",
31
31
  "axios": "^1.7.4",
32
- "file-lane": "2.0.5-widget-provider-beta.1",
32
+ "file-lane": "2.0.5",
33
33
  "fs-extra": "^11.2.0",
34
34
  "koa-router": "^13.0.1",
35
35
  "lodash": "^4.17.21",
@@ -43,5 +43,5 @@
43
43
  "@types/qr-image": "^3.2.9",
44
44
  "@types/semver": "^7.5.8"
45
45
  },
46
- "gitHead": "64842a2c374b8b3b344cef377d9c032eaf1a99a7"
46
+ "gitHead": "deb83e8b8fa65191a286690efe3d957d7df772f4"
47
47
  }