@deveco-test/deveco-cli 1.3.3-Test.2 → 1.3.3-Test.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.
- package/README.md +59 -17
- package/SKILL.md +8 -7
- package/THIRD-PARTY-LICENSES +6 -6
- package/dist/cli.js +117 -120
- package/dist/internal/telemetry-upload-background.js +2 -2
- package/docs.zip +2 -2
- package/index.zip +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -561,19 +561,22 @@ devecocli check arkts --project /path/to/project
|
|
|
561
561
|
|
|
562
562
|
```bash
|
|
563
563
|
devecocli emulator list [--format <table|json>]
|
|
564
|
+
devecocli emulator list --details
|
|
564
565
|
```
|
|
565
566
|
|
|
566
567
|
**参数:**
|
|
567
568
|
|
|
568
569
|
| 参数名 | 说明 |
|
|
569
570
|
| --- | --- |
|
|
570
|
-
| `--format` | 可选,控制终端输出格式,取值为 `table` 或 `json`,默认为 `table` |
|
|
571
|
+
| `--format` | 可选,控制终端输出格式,取值为 `table` 或 `json`,默认为 `table`;`json` 返回固定的五字段精简结构 |
|
|
572
|
+
| `--details` | 可选,直接输出底层 `Emulator -list -details` 的完整 JSON,不做任何字段裁剪、重命名或补充;与 `--format` 互斥 |
|
|
571
573
|
|
|
572
574
|
**示例:**
|
|
573
575
|
|
|
574
576
|
```bash
|
|
575
577
|
devecocli emulator list
|
|
576
578
|
devecocli emulator list --format json
|
|
579
|
+
devecocli emulator list --details
|
|
577
580
|
```
|
|
578
581
|
|
|
579
582
|
### `emulator start`
|
|
@@ -640,7 +643,8 @@ devecocli emulator volume up --target Phone
|
|
|
640
643
|
devecocli emulator fold half-open --target Phone
|
|
641
644
|
devecocli emulator battery --target Phone --level 90
|
|
642
645
|
devecocli emulator battery --target Phone --status charging
|
|
643
|
-
devecocli emulator
|
|
646
|
+
devecocli emulator battery --target Phone --level 80 --status charging
|
|
647
|
+
devecocli emulator geolocation --target Phone --longitude 116.40024 --latitude 39.908
|
|
644
648
|
devecocli emulator scene outdoorRunning --target Phone
|
|
645
649
|
devecocli emulator sensor --target Phone --heartrate 80
|
|
646
650
|
```
|
|
@@ -648,11 +652,14 @@ devecocli emulator sensor --target Phone --heartrate 80
|
|
|
648
652
|
**说明:**
|
|
649
653
|
|
|
650
654
|
- `--target` 支持模拟器名称或 `127.0.0.1:<port>` 序列号。
|
|
655
|
+
- `battery --level` 与 `battery --status` 可同时传入(一次调用同时设置电量与充电状态)。
|
|
651
656
|
- `battery --level` 会自动查询模拟器当前充电状态:充电时取值范围为整数 `[0, 100]`,未充电时为 `[1, 100]`。
|
|
652
657
|
- `battery --status` 取值为 `charging` 或 `discharging`。
|
|
658
|
+
- `--level 0` 与 `--status discharging` 组合非法(电量 0 仅在充电时允许),会被拒绝。
|
|
653
659
|
- `geolocation` 支持 `--longitude`、`--latitude`、`--altitude`、`--direction`。
|
|
654
660
|
- `scene` 取值为 `outdoorRunning`、`outdoorCycling`、`drivingNavigation`。
|
|
655
|
-
- `sensor` 支持 `--light-intensity`、`--humidity`、`--temperature`、`--steps`、`--heartrate
|
|
661
|
+
- `sensor` 支持 `--light-intensity`、`--humidity`、`--temperature`、`--steps`、`--heartrate`,可同时传入多个。
|
|
662
|
+
- `geolocation`/`battery`/`sensor` 多参数为逐项串行下发、非原子:第 N 项失败时前 N−1 项已生效且不回滚,建议失败后整体重跑。
|
|
656
663
|
- `fold <state>` 会根据目标模拟器的设备类型校验状态,设备与参数必须匹配:
|
|
657
664
|
|
|
658
665
|
| 设备类型 | 支持的 `state` |
|
|
@@ -671,44 +678,78 @@ devecocli emulator sensor --target Phone --heartrate 80
|
|
|
671
678
|
**命令格式:**
|
|
672
679
|
|
|
673
680
|
```bash
|
|
674
|
-
devecocli emulator create <name>
|
|
681
|
+
devecocli emulator create <name> \
|
|
682
|
+
--device-type <type> \
|
|
683
|
+
--os-version <version> \
|
|
684
|
+
[--instance-path <path>] \
|
|
685
|
+
[--image-root <path>] \
|
|
686
|
+
[--screen-profile <model>] \
|
|
687
|
+
[--screen <config...>] \
|
|
688
|
+
[--storage <size>] \
|
|
689
|
+
[--memory <size>] \
|
|
690
|
+
[--hot-boot <true|false>] \
|
|
691
|
+
[--force]
|
|
675
692
|
```
|
|
676
693
|
|
|
677
694
|
**参数:**
|
|
678
695
|
|
|
679
|
-
| 参数名
|
|
680
|
-
|
|
|
681
|
-
| name
|
|
682
|
-
|
|
|
683
|
-
|
|
|
684
|
-
|
|
|
696
|
+
| 参数名 | 说明 |
|
|
697
|
+
| --- | --- |
|
|
698
|
+
| `name` | 必选,模拟器名称 |
|
|
699
|
+
| `--device-type` | 必选,指定模拟器产品类型,支持的产品类型以官方设备支持类型为准,不区分大小写 |
|
|
700
|
+
| `--os-version` | 必选,模拟器镜像版本 |
|
|
701
|
+
| `--instance-path` / `--path` | 可选,模拟器实例路径 |
|
|
702
|
+
| `--image-root` | 可选,模拟器镜像路径 |
|
|
703
|
+
| `--screen-profile` | 可选,模拟器设备型号,例如 `Mate 70 Pro` |
|
|
704
|
+
| `--screen` | 可选,屏幕配置,格式为 `宽度(px) 高度(px) DPI 屏幕对角线长度(inch)`;宽度和高度范围为 720~3500 px,DPI 范围为 240~640,屏幕对角线长度范围为 3.5~9 inch;折叠屏模拟器传入两组配置 |
|
|
705
|
+
| `--storage` | 可选,存储空间,范围 `2–1023`,单位 G |
|
|
706
|
+
| `--memory` | 可选,运行内存,范围 `2–32`,单位 G |
|
|
707
|
+
| `--hot-boot` | 可选,取值为 `true` 或 `false`,从 26.0.0 Beta1 开始支持;API 26 及以上未指定时默认为 `true` |
|
|
708
|
+
| `--force` | 可选,覆盖已有同名的模拟器 |
|
|
709
|
+
|
|
710
|
+
`--screen-profile` 和 `--screen` 可同时指定,此时使用 `--screen`。
|
|
685
711
|
|
|
686
712
|
**示例:**
|
|
687
713
|
|
|
688
714
|
```bash
|
|
689
715
|
devecocli emulator create MyPhone --device-type phone --os-version "HarmonyOS 6.0.1(21)"
|
|
716
|
+
|
|
717
|
+
devecocli emulator create MyPhone \
|
|
718
|
+
--device-type phone \
|
|
719
|
+
--os-version "HarmonyOS 6.0.1(21)" \
|
|
720
|
+
--screen-profile "Mate 70 Pro" \
|
|
721
|
+
--storage 8 \
|
|
722
|
+
--memory 8
|
|
723
|
+
|
|
724
|
+
devecocli emulator create Foldable \
|
|
725
|
+
--device-type foldable \
|
|
726
|
+
--os-version "HarmonyOS 6.0.1(21)" \
|
|
727
|
+
--screen "2200 2480 480 7.8" "1080 2480 480 6.4"
|
|
690
728
|
```
|
|
691
729
|
|
|
692
730
|
### `emulator delete`
|
|
693
731
|
|
|
694
|
-
|
|
732
|
+
删除模拟器
|
|
695
733
|
|
|
696
734
|
**命令格式:**
|
|
697
735
|
|
|
698
736
|
```bash
|
|
699
|
-
devecocli emulator delete <name>
|
|
737
|
+
devecocli emulator delete <name> [--instance-path <path>]
|
|
700
738
|
```
|
|
701
739
|
|
|
702
740
|
**参数:**
|
|
703
741
|
|
|
704
|
-
| 参数名
|
|
705
|
-
|
|
|
706
|
-
| name | 必选,模拟器实例名称或序列号 |
|
|
742
|
+
| 参数名 | 说明 |
|
|
743
|
+
| --- | --- |
|
|
744
|
+
| `name` | 必选,模拟器实例名称或序列号 |
|
|
745
|
+
| `--instance-path` / `--path` | 可选,模拟器实例路径;删除通过自定义路径创建的模拟器时,需传入创建时使用的同一路径 |
|
|
707
746
|
|
|
708
747
|
**示例:**
|
|
709
748
|
|
|
710
749
|
```bash
|
|
711
750
|
devecocli emulator delete MyPhone
|
|
751
|
+
|
|
752
|
+
devecocli emulator delete MyPhone --instance-path /custom/instance/path
|
|
712
753
|
```
|
|
713
754
|
|
|
714
755
|
### `emulator image list`
|
|
@@ -1248,14 +1289,14 @@ devecocli ui window list --all
|
|
|
1248
1289
|
**命令格式:**
|
|
1249
1290
|
|
|
1250
1291
|
```bash
|
|
1251
|
-
devecocli run --module <
|
|
1292
|
+
devecocli run --module <m1> [m2...] --device <device> --product <product> --build-mode <mode> --ability <ability> --uninstall --skip-build --apply <fileName> --hotreload [action] --hotreload-apply <fileName>
|
|
1252
1293
|
```
|
|
1253
1294
|
|
|
1254
1295
|
**参数:**
|
|
1255
1296
|
|
|
1256
1297
|
| 参数名 | 说明 |
|
|
1257
1298
|
| ------------ |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
1258
|
-
| --module |
|
|
1299
|
+
| --module | 可选,模块名称,支持多个以空格分隔。如需指定模块的 `target` 信息,使用 `module@target` 形式。当工程中只有一个可运行模块( `entry` / `feature` / `shared` )时,可缺省 |
|
|
1259
1300
|
| --device | 设备名称或设备序列号,单设备时可选,多设备时必选 |
|
|
1260
1301
|
| --product | 可选,产品的名称,默认为 `default` |
|
|
1261
1302
|
| --build-mode | 可选,构建模式名称,默认为 `debug` |
|
|
@@ -1272,6 +1313,7 @@ devecocli run --module <module> --device <device> --product <product> --build-mo
|
|
|
1272
1313
|
devecocli run
|
|
1273
1314
|
devecocli run --module entry --device 127.0.0.1:5555
|
|
1274
1315
|
devecocli run --module library@phone --device 127.0.0.1:5555
|
|
1316
|
+
devecocli run --module entry service uiextension --device 127.0.0.1:5555
|
|
1275
1317
|
devecocli run --product oversea --module entry --ability EntryAbility
|
|
1276
1318
|
devecocli run --build-mode release
|
|
1277
1319
|
devecocli run --uninstall
|
package/SKILL.md
CHANGED
|
@@ -49,18 +49,19 @@ Run this command once after a round of edits, right before the build. Catches mo
|
|
|
49
49
|
### `devecocli emulator`
|
|
50
50
|
Manage local emulator instances and system images.
|
|
51
51
|
- **Studio requirement**: DevEco Studio `>= 6.1.0`.
|
|
52
|
-
- `list`: Show instances (status, serial, device type). Opt: `--format <table|json>` (default: `table`).
|
|
52
|
+
- `list`: Show instances (status, serial, device type). Opt: `--format <table|json>` (default: `table`); `--details` (mutually exclusive with `--format`) dumps the raw JSON of `Emulator -list -details` verbatim — no field trimming/renaming.
|
|
53
53
|
- `start <names...>`: Start instances. Quote names with spaces. (See Troubleshooting if blocked).
|
|
54
54
|
- `stop <names...>`: Stop by name or serial (`127.0.0.1:<port>`).
|
|
55
55
|
- Scene control commands require Emulator 7.0 or later. Use `DEVECO_CLI_DEBUG=1` to inspect the underlying `Emulator` command mapping.
|
|
56
56
|
- `shake` / `power` / `rotate <left|right>` / `volume <up|down>` (Req: `--target <nameOrSerial>`): Basic emulator controls.
|
|
57
57
|
- `fold <state>` (Req: `--target <nameOrSerial>`): Set foldable display state, matched against the target emulator's reported `deviceType`. `foldable` uses `open|half-open|close`; `2in1_foldable` uses `open|vertical-open|half-open|close`; `triplefold` uses `single|double|triple` or one of its six left/right folded-state combinations. Other device types and cross-device states are rejected before execution.
|
|
58
|
-
- `battery` (Req: `--target`;
|
|
59
|
-
- `geolocation` (Req: `--target`; one
|
|
58
|
+
- `battery` (Req: `--target`; `--level <0-100>` and/or `--status <charging|discharging>`): Set battery state. `--level` and `--status` may be set together in one call. `--level` checks the current emulator charging state automatically (`0-100` while charging, `1-100` otherwise); `--level 0` combined with `--status discharging` is rejected as invalid.
|
|
59
|
+
- `geolocation` (Req: `--target`; `--longitude`+`--latitude` recommended together, missing one warns only; Opt: `--altitude`, `--direction`): Inject GPS data (multiple options in one call).
|
|
60
60
|
- `scene <outdoorRunning|outdoorCycling|drivingNavigation>` (Req: `--target`): Start motion simulation.
|
|
61
|
-
- `sensor` (Req: `--target`;
|
|
62
|
-
- `
|
|
63
|
-
- `
|
|
61
|
+
- `sensor` (Req: `--target`; `--light-intensity`/`--humidity`/`--temperature`/`--steps`/`--heartrate`, multiple may be set in one call): Inject sensor data.
|
|
62
|
+
- Multi-option `geolocation`/`battery`/`sensor` commands dispatch actions sequentially and are non-atomic: on action N failure, actions 1..N-1 are already applied with no rollback; re-run the whole command to converge.
|
|
63
|
+
- `create <name>` (Req: `--device-type`, `--os-version`): Create instance. Opts: `--instance-path <path>` (alias `--path`), `--image-root <path>`, `--screen-profile <model>`, `--screen <config...>`, `--storage <2-1023>`, `--memory <2-32>`, `--hot-boot <true|false>`, `--force`. Device type is case-insensitive. `--screen` accepts one quoted configuration or two for a foldable device in the format `width(px) height(px) DPI screen-diagonal-length(inch)`; width/height: 720-3500 px, DPI: 240-640, screen diagonal length: 3.5-9 inch. When combined with `--screen-profile`, `--screen` takes precedence. API 26+ uses hot boot by default unless explicitly disabled.
|
|
64
|
+
- `delete <name>`: Delete instance. Opt: `--instance-path <path>` (alias `--path`) — required to delete an instance created with a custom path.
|
|
64
65
|
- `image list`: List downloaded images. Opts: `--device-type <type>`, `--all`, `--format <table|json>`.
|
|
65
66
|
- `image download` / `image remove` (Req: `--device-type`, `--os-version`): Download/remove image. (Takes 30+ min, set long timeout).
|
|
66
67
|
*Device types*: `phone`, `foldable`, `widefold`, `triplefold`, `tablet`, `2in1`, `2in1 foldable`, `wearable`, `tv`.
|
|
@@ -86,7 +87,7 @@ Search/read local HarmonyOS docs.
|
|
|
86
87
|
|
|
87
88
|
### `devecocli run` `[Outside sandbox]`
|
|
88
89
|
Build, install, and launch. After a successful ability launch (and after a successful `--apply`), runs a **default smoke check**. Success prints `Smoke: PASS`; failures print `Smoke: FAIL_CRASH` or `Smoke: FAIL_BLANK` (crash log path via `crash_log:`, blank screenshot via `screenshot:`) and exit non-zero. Smoke is skipped when there is no ability to launch, and for `--hotreload` / `--hotreload-apply`.
|
|
89
|
-
- `--module <
|
|
90
|
+
- `--module <m1> [m2...]`: Target module(s) (auto-selected if only one runnable).
|
|
90
91
|
- `--device <name|serial>`: Target device (Req if multiple connected).
|
|
91
92
|
- `--product <product>` / `--build-mode <mode>`: Defaults: `default` / `debug`.
|
|
92
93
|
- `--ability <ability>`: Default from `module.json5`.
|
package/THIRD-PARTY-LICENSES
CHANGED
|
@@ -1908,7 +1908,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
1908
1908
|
|
|
1909
1909
|
The following npm package may be included in this product:
|
|
1910
1910
|
|
|
1911
|
-
- qs@6.
|
|
1911
|
+
- qs@6.16.0
|
|
1912
1912
|
|
|
1913
1913
|
This package contains the following license:
|
|
1914
1914
|
|
|
@@ -2089,7 +2089,7 @@ THE SOFTWARE.
|
|
|
2089
2089
|
|
|
2090
2090
|
The following npm package may be included in this product:
|
|
2091
2091
|
|
|
2092
|
-
- fast-uri@3.1.
|
|
2092
|
+
- fast-uri@3.1.8
|
|
2093
2093
|
|
|
2094
2094
|
This package contains the following license:
|
|
2095
2095
|
|
|
@@ -2331,7 +2331,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
2331
2331
|
|
|
2332
2332
|
The following npm package may be included in this product:
|
|
2333
2333
|
|
|
2334
|
-
- smol-toml@1.
|
|
2334
|
+
- smol-toml@1.8.0
|
|
2335
2335
|
|
|
2336
2336
|
This package contains the following license:
|
|
2337
2337
|
|
|
@@ -2586,7 +2586,7 @@ MIT
|
|
|
2586
2586
|
|
|
2587
2587
|
The following npm package may be included in this product:
|
|
2588
2588
|
|
|
2589
|
-
- adm-zip@0.6.
|
|
2589
|
+
- adm-zip@0.6.1
|
|
2590
2590
|
|
|
2591
2591
|
This package contains the following license:
|
|
2592
2592
|
|
|
@@ -2830,7 +2830,7 @@ SOFTWARE.
|
|
|
2830
2830
|
The following npm packages may be included in this product:
|
|
2831
2831
|
|
|
2832
2832
|
- side-channel-weakmap@1.0.2
|
|
2833
|
-
- side-channel@1.1.
|
|
2833
|
+
- side-channel@1.1.1
|
|
2834
2834
|
|
|
2835
2835
|
These packages each contain the following license:
|
|
2836
2836
|
|
|
@@ -2920,7 +2920,7 @@ SOFTWARE.
|
|
|
2920
2920
|
|
|
2921
2921
|
The following npm package may be included in this product:
|
|
2922
2922
|
|
|
2923
|
-
- hono@4.13.
|
|
2923
|
+
- hono@4.13.8
|
|
2924
2924
|
|
|
2925
2925
|
This package contains the following license:
|
|
2926
2926
|
|