aiot-toolkit 2.0.3-beta.9 → 2.0.3

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,7 +11,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
11
11
  * AndroidUxBuilder
12
12
  */
13
13
  class AndroidUxBuilder extends _UxBuilderBase.default {
14
- params = [];
14
+ params = [{
15
+ type: 'string',
16
+ name: 'devtool',
17
+ description: 'source map config'
18
+ }];
15
19
  match(projectPath) {
16
20
  return _sharedUtils.ProjectType.getProjectType(projectPath) === _sharedUtils.ProjectType.ANDDROID_UX;
17
21
  }
@@ -3,7 +3,7 @@ import IBuilder from './IBuilder';
3
3
  import UxBuilderBase, { IUxBuildOption } from './UxBuilderBase';
4
4
  export interface IVelaUxBuilderOption extends IUxBuildOption {
5
5
  watch?: boolean;
6
- enableJsc: boolean;
6
+ enableJsc?: boolean;
7
7
  enableE2e?: boolean;
8
8
  enableStats?: boolean;
9
9
  optimizeCssAttr?: boolean;
@@ -32,6 +32,9 @@ class VelaUxStarter extends _IStarter.default {
32
32
  this.event = new _events.default();
33
33
  this.builder = new _VelaUxBuilder.default({
34
34
  onBuildSuccess: data => {
35
+ _sharedUtils.ColorConsole.success({
36
+ word: 'build success: '
37
+ }, `${data.costTime}ms`);
35
38
  this.lastRpk = data.info?.rpk;
36
39
  this.event.emit('buildSuccess', data);
37
40
  }
@@ -126,7 +129,7 @@ class VelaUxStarter extends _IStarter.default {
126
129
  const projectInfo = _aiotpack.UxFileUtils.getMainfestInfo(projectPath, compilerOption.sourceRoot);
127
130
  if (this.lastRpk && _fsExtra.default.existsSync(this.lastRpk)) {
128
131
  const targetPath = await this.emulatorInstance?.pushRpk(this.lastRpk, projectInfo.package);
129
- await this.emulatorInstance?.install(targetPath);
132
+ await this.emulatorInstance?.install(targetPath, projectInfo.package);
130
133
  await this.emulatorInstance?.startApp(projectInfo.package, options.devtool);
131
134
  }
132
135
  this.event.on('buildSuccess', async data => {
@@ -137,7 +140,7 @@ class VelaUxStarter extends _IStarter.default {
137
140
  await this.emulatorInstance?.reloadApp(projectInfo.package);
138
141
  } else if (data.info?.trigger === _FileLaneTriggerType.default.START && data.info.rpk) {
139
142
  const targetPath = await this.emulatorInstance?.pushRpk(data.info.rpk, projectInfo.package);
140
- await this.emulatorInstance?.install(targetPath);
143
+ await this.emulatorInstance?.install(targetPath, projectInfo.package);
141
144
  await this.emulatorInstance?.startApp(projectInfo.package, options.devtool);
142
145
  }
143
146
  });
@@ -57,7 +57,7 @@ class VelaVvdUtils {
57
57
  })
58
58
  });
59
59
  // skin或者size
60
- let skin = '';
60
+ let skin;
61
61
  let width = '466';
62
62
  let height = '466';
63
63
  // vela4.0不允许自定义分辨率
@@ -73,7 +73,7 @@ class VelaVvdUtils {
73
73
  choices: skinList.map(item => {
74
74
  return {
75
75
  name: item.name,
76
- value: item.name,
76
+ value: item,
77
77
  description: item.name
78
78
  };
79
79
  })
@@ -92,7 +92,7 @@ class VelaVvdUtils {
92
92
  const vvdManager = new _emulator.VvdManager({
93
93
  sdkHome: VelaVvdUtils.sdkHome
94
94
  });
95
- if ((await vvdManager.hasSDKChildrenUpdate()).length > 0) {
95
+ if ((await vvdManager.hasSDKPartUpdate()).length > 0) {
96
96
  const downloder = await vvdManager.downloadSDK({
97
97
  force: false,
98
98
  cliProgress: true,
@@ -100,17 +100,18 @@ class VelaVvdUtils {
100
100
  });
101
101
  await downloder.downlodPromise;
102
102
  }
103
- const imageDir = _path.default.resolve(VelaVvdUtils.sdkHome, _emulator.SDKChildren.SYSTEM_IMAGES, velaImage);
103
+ const imageDir = _path.default.resolve(VelaVvdUtils.sdkHome, _emulator.SDKParts.SYSTEM_IMAGES, velaImage);
104
104
 
105
105
  // 创建vvd文本文件
106
106
  const vvdParams = {
107
107
  name,
108
- skin,
108
+ skin: skin?.name,
109
109
  width,
110
110
  height,
111
111
  arch: _emulator.IVvdArchType.arm,
112
112
  imageDir,
113
113
  imageType: velaImage,
114
+ 'skin.path': skin?.path,
114
115
  customLcdRadius: ''
115
116
  };
116
117
  VelaVvdUtils.vvdManager.createVvd(vvdParams);
@@ -120,7 +121,7 @@ class VelaVvdUtils {
120
121
  }
121
122
  }
122
123
  static async checkEmulatorEnv() {
123
- return (await this.vvdManager.hasSDKChildrenUpdate()).length === 0;
124
+ return (await this.vvdManager.hasSDKPartUpdate()).length === 0;
124
125
  }
125
126
 
126
127
  /** 初始化/重置模拟器环境 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiot-toolkit",
3
- "version": "2.0.3-beta.9",
3
+ "version": "2.0.3",
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.3-beta.9",
26
- "@aiot-toolkit/commander": "2.0.3-beta.9",
27
- "@aiot-toolkit/emulator": "2.0.3-beta.9",
28
- "@aiot-toolkit/shared-utils": "2.0.3-beta.9",
25
+ "@aiot-toolkit/aiotpack": "2.0.3",
26
+ "@aiot-toolkit/commander": "2.0.3",
27
+ "@aiot-toolkit/emulator": "2.0.3",
28
+ "@aiot-toolkit/shared-utils": "2.0.3",
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.3-beta.9",
32
+ "file-lane": "2.0.3",
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": "d51c01beb50c17548d9ab5be522790d295b4c18d"
46
+ "gitHead": "e29e61eb89c2559eb9f3a18c51fd5ce4c4196cc2"
47
47
  }