@aiot-toolkit/shared-utils 2.0.5-beta.2 → 2.0.5-beta.20
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.
|
@@ -3,18 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
declare enum ProjectType {
|
|
5
5
|
VELA_UX = "velaUx",
|
|
6
|
-
ANDDROID_UX = "androidUx"
|
|
7
|
-
VELA_XTS = "velaXts"
|
|
6
|
+
ANDDROID_UX = "androidUx"
|
|
8
7
|
}
|
|
9
8
|
declare namespace ProjectType {
|
|
10
9
|
/**
|
|
11
10
|
* 获取项目类型
|
|
12
11
|
*
|
|
13
|
-
* 1. 存在`
|
|
14
|
-
* 2. 存在`src/app.ux`
|
|
12
|
+
* 1. 存在`src/app.ux`
|
|
15
13
|
* 1. `src/manifest.json`文件的 `deviceTypeList` 字段包含`watch`:velaUx
|
|
16
14
|
* 2. 否则:androidUx
|
|
17
|
-
*
|
|
15
|
+
* 2. 否则:velaUx
|
|
18
16
|
* @param projectPath
|
|
19
17
|
* @returns
|
|
20
18
|
*/
|
package/lib/enum/ProjectType.js
CHANGED
|
@@ -13,16 +13,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
13
13
|
var ProjectType = /*#__PURE__*/function (ProjectType) {
|
|
14
14
|
ProjectType["VELA_UX"] = "velaUx";
|
|
15
15
|
ProjectType["ANDDROID_UX"] = "androidUx";
|
|
16
|
-
ProjectType["VELA_XTS"] = "velaXts";
|
|
17
16
|
return ProjectType;
|
|
18
17
|
}(ProjectType || {});
|
|
19
18
|
(function (_ProjectType) {
|
|
20
19
|
function getProjectType(projectPath) {
|
|
21
20
|
let src = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'src';
|
|
22
|
-
const isXts = _fsExtra.default.existsSync(_path.default.resolve(projectPath, 'app/app.xts'));
|
|
23
|
-
if (isXts) {
|
|
24
|
-
return ProjectType.VELA_XTS;
|
|
25
|
-
}
|
|
26
21
|
const isUx = _fsExtra.default.existsSync(_path.default.resolve(projectPath, src, 'app.ux'));
|
|
27
22
|
if (isUx) {
|
|
28
23
|
const mainfest = _fsExtra.default.readJSONSync(_path.default.join(projectPath, src, 'manifest.json'));
|
|
@@ -5,11 +5,11 @@ interface IPosition {
|
|
|
5
5
|
/**
|
|
6
6
|
* 起始位置
|
|
7
7
|
*/
|
|
8
|
-
pos
|
|
8
|
+
pos?: number;
|
|
9
9
|
/**
|
|
10
10
|
* 结束位置
|
|
11
11
|
*/
|
|
12
|
-
end
|
|
12
|
+
end?: number;
|
|
13
13
|
/**
|
|
14
14
|
* 起始行
|
|
15
15
|
*/
|
|
@@ -21,11 +21,11 @@ interface IPosition {
|
|
|
21
21
|
/**
|
|
22
22
|
* 结束行
|
|
23
23
|
*/
|
|
24
|
-
endLine
|
|
24
|
+
endLine?: number;
|
|
25
25
|
/**
|
|
26
26
|
* 结束列
|
|
27
27
|
*/
|
|
28
|
-
endColumn
|
|
28
|
+
endColumn?: number;
|
|
29
29
|
/**
|
|
30
30
|
* 节点所在文件
|
|
31
31
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiot-toolkit/shared-utils",
|
|
3
|
-
"version": "2.0.5-beta.
|
|
3
|
+
"version": "2.0.5-beta.20",
|
|
4
4
|
"description": "The common method functions of the aiot-toolkit.",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"koa": "^2.15.3",
|
|
28
28
|
"koa-router": "^13.0.1",
|
|
29
29
|
"koa-static": "^5.0.0",
|
|
30
|
-
"minimatch": "
|
|
30
|
+
"minimatch": "10.0.1",
|
|
31
31
|
"portfinder": "^1.0.32",
|
|
32
32
|
"qrcode": "^1.5.4",
|
|
33
33
|
"rimraf": "^5.0.9",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@types/minimatch": "^5.1.2",
|
|
43
43
|
"@types/qrcode": "^1.5.5"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "e34506862fb5e24eb86b4a4aa67fa88bb76f6114"
|
|
46
46
|
}
|