ms-vite-plugin 1.4.10 → 1.4.11
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/docs/api/appleocr.md +78 -0
- package/docs/api/global.md +49 -0
- package/docs/api/node.md +3 -0
- package/docs/api/paddleocr.md +63 -11
- package/docs/api/yolo.md +58 -18
- package/docs/api/yolocls.md +272 -0
- package/docs/apicn/appleocr.md +78 -0
- package/docs/apicn/global.md +49 -0
- package/docs/apicn/node.md +6 -0
- package/docs/apicn/paddleocr.md +59 -7
- package/docs/apicn/yolo.md +50 -9
- package/docs/apicn/yolocls.md +272 -0
- package/docs/apipython/appleocr.md +75 -0
- package/docs/apipython/g.md +53 -0
- package/docs/apipython/node.md +4 -1
- package/docs/apipython/overview.md +1 -1
- package/docs/apipython/paddleocr.md +54 -4
- package/docs/apipython/yolo.md +37 -7
- package/docs/apipython/yolocls.md +269 -0
- package/docs/httpapi/api.md +284 -1
- package/package.json +1 -1
package/docs/httpapi/api.md
CHANGED
|
@@ -157,8 +157,9 @@ GET /api/source
|
|
|
157
157
|
|
|
158
158
|
| 名称 | 位置 | 类型 | 必选 | 说明 |
|
|
159
159
|
| --------- | ----- | ------- | ---- | ------------------ |
|
|
160
|
-
| max_depth | query | integer | 是 |
|
|
160
|
+
| max_depth | query | integer | 是 | 页面深度,值越小快照成本越低 |
|
|
161
161
|
| timeout | query | integer | 是 | 超时时间(单位秒) |
|
|
162
|
+
| mode | query | integer | 否 | 抓取模式。模式 1、模式 2,默认模式 1 |
|
|
162
163
|
|
|
163
164
|
> 返回示例
|
|
164
165
|
|
|
@@ -931,6 +932,49 @@ GET /logger/download
|
|
|
931
932
|
|
|
932
933
|
### 返回数据结构
|
|
933
934
|
|
|
935
|
+
## GET 当前日志最新行
|
|
936
|
+
|
|
937
|
+
GET /logger/current/lines
|
|
938
|
+
|
|
939
|
+
读取 LoggerModule 当前正在写入的日志文件最新输出行。单次最多返回 5000 行,超出时按 5000 行处理。接口会在读取前刷新当前日志缓冲区,返回的 `lines` 按日志原始输出顺序排列。
|
|
940
|
+
|
|
941
|
+
### 请求参数
|
|
942
|
+
|
|
943
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
944
|
+
| ----- | ----- | ------- | ---- | ------ | ------------------- |
|
|
945
|
+
| count | query | integer | 否 | 行数 | 默认 100,最大 5000 |
|
|
946
|
+
|
|
947
|
+
> 返回示例
|
|
948
|
+
|
|
949
|
+
> 200 Response
|
|
950
|
+
|
|
951
|
+
```json
|
|
952
|
+
{
|
|
953
|
+
"lines": [
|
|
954
|
+
"string",
|
|
955
|
+
"string"
|
|
956
|
+
],
|
|
957
|
+
"hasMore": true
|
|
958
|
+
}
|
|
959
|
+
```
|
|
960
|
+
|
|
961
|
+
### 返回结果
|
|
962
|
+
|
|
963
|
+
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|
|
964
|
+
| ------ | ---------------------------------------------------------------- | ------------------ | -------- |
|
|
965
|
+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none | Inline |
|
|
966
|
+
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | 参数不合法 | Inline |
|
|
967
|
+
| 404 | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) | 当前日志文件不存在 | Inline |
|
|
968
|
+
|
|
969
|
+
### 返回数据结构
|
|
970
|
+
|
|
971
|
+
状态码 **200**
|
|
972
|
+
|
|
973
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
974
|
+
| --------- | -------- | ---- | ---- | ------------ | -------------------------- |
|
|
975
|
+
| » lines | string[] | true | none | 日志行 | 最新日志行,按旧到新排列 |
|
|
976
|
+
| » hasMore | boolean | true | none | 是否还有更多 | 本次范围前是否还有更早日志 |
|
|
977
|
+
|
|
934
978
|
# Api/输入法接口
|
|
935
979
|
|
|
936
980
|
## GET API键盘是否弹出
|
|
@@ -2644,6 +2688,245 @@ GET /api/media/deleteAllScreenshots
|
|
|
2644
2688
|
| --------- | ------- | ---- | ---- | -------- | ---- |
|
|
2645
2689
|
| » success | boolean | true | none | 是否成功 | none |
|
|
2646
2690
|
|
|
2691
|
+
## POST 上传文件到沙盒目录
|
|
2692
|
+
|
|
2693
|
+
POST /api/file/upload
|
|
2694
|
+
|
|
2695
|
+
### 请求参数
|
|
2696
|
+
|
|
2697
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
2698
|
+
| ------- | ----- | -------------- | ---- | -------- | ---- |
|
|
2699
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
2700
|
+
| path | query | string | 是 | 路径 | 目标文件路径。支持 `/foo.bin` 或 `foo.bin`,会拼接到所选目录下 |
|
|
2701
|
+
| body | body | string(binary) | 是 | 文件内容 | 文件原始二进制数据,不是 multipart |
|
|
2702
|
+
|
|
2703
|
+
### 请求体
|
|
2704
|
+
|
|
2705
|
+
请求体为文件原始二进制数据。接口会流式写入所选沙盒目录,父目录不存在时会自动创建。
|
|
2706
|
+
|
|
2707
|
+
> 返回示例
|
|
2708
|
+
|
|
2709
|
+
> 200 Response
|
|
2710
|
+
|
|
2711
|
+
```json
|
|
2712
|
+
{
|
|
2713
|
+
"success": true,
|
|
2714
|
+
"data": "/private/var/mobile/Containers/Data/Application/.../tmp/foo.bin"
|
|
2715
|
+
}
|
|
2716
|
+
```
|
|
2717
|
+
|
|
2718
|
+
### 返回结果
|
|
2719
|
+
|
|
2720
|
+
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|
|
2721
|
+
| ------ | ---------------------------------------------------------------- | -------------- | -------- |
|
|
2722
|
+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none | Inline |
|
|
2723
|
+
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | 参数或上传失败 | Inline |
|
|
2724
|
+
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | 设备未授权 | Inline |
|
|
2725
|
+
|
|
2726
|
+
### 返回数据结构
|
|
2727
|
+
|
|
2728
|
+
状态码 **200**
|
|
2729
|
+
|
|
2730
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
2731
|
+
| --------- | ------- | ---- | ---- | -------- | ------------------------------ |
|
|
2732
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
2733
|
+
| » data | string | true | none | 完整路径 | 上传后的设备沙盒内完整文件路径 |
|
|
2734
|
+
|
|
2735
|
+
## GET 查询沙盒文件是否存在
|
|
2736
|
+
|
|
2737
|
+
GET /api/file/exists
|
|
2738
|
+
|
|
2739
|
+
### 请求参数
|
|
2740
|
+
|
|
2741
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
2742
|
+
| ------- | ----- | ------ | ---- | -------- | ---- |
|
|
2743
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
2744
|
+
| path | query | string | 是 | 路径 | 目标文件路径。支持 `/foo.bin` 或 `foo.bin`,会拼接到所选目录下 |
|
|
2745
|
+
|
|
2746
|
+
> 返回示例
|
|
2747
|
+
|
|
2748
|
+
> 200 Response
|
|
2749
|
+
|
|
2750
|
+
```json
|
|
2751
|
+
{
|
|
2752
|
+
"success": true,
|
|
2753
|
+
"data": {
|
|
2754
|
+
"exists": true
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
```
|
|
2758
|
+
|
|
2759
|
+
### 返回结果
|
|
2760
|
+
|
|
2761
|
+
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|
|
2762
|
+
| ------ | ---------------------------------------------------------------- | ---------- | -------- |
|
|
2763
|
+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none | Inline |
|
|
2764
|
+
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | 参数不合法 | Inline |
|
|
2765
|
+
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | 设备未授权 | Inline |
|
|
2766
|
+
|
|
2767
|
+
### 返回数据结构
|
|
2768
|
+
|
|
2769
|
+
状态码 **200**
|
|
2770
|
+
|
|
2771
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
2772
|
+
| ---------- | ------- | ----- | ---- | ------------ | ------------------------------------- |
|
|
2773
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
2774
|
+
| » data | object | true | none | 文件状态 | none |
|
|
2775
|
+
| »» exists | boolean | true | none | 文件是否存在 | 只判断文件,目录不算存在 |
|
|
2776
|
+
|
|
2777
|
+
## GET 删除沙盒文件
|
|
2778
|
+
|
|
2779
|
+
GET /api/file/delete
|
|
2780
|
+
|
|
2781
|
+
### 请求参数
|
|
2782
|
+
|
|
2783
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
2784
|
+
| ------- | ----- | ------ | ---- | -------- | ---- |
|
|
2785
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
2786
|
+
| path | query | string | 是 | 路径 | 目标文件路径。支持 `/foo.bin` 或 `foo.bin`,会拼接到所选目录下 |
|
|
2787
|
+
|
|
2788
|
+
> 返回示例
|
|
2789
|
+
|
|
2790
|
+
> 200 Response
|
|
2791
|
+
|
|
2792
|
+
```json
|
|
2793
|
+
{
|
|
2794
|
+
"success": true
|
|
2795
|
+
}
|
|
2796
|
+
```
|
|
2797
|
+
|
|
2798
|
+
### 返回结果
|
|
2799
|
+
|
|
2800
|
+
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|
|
2801
|
+
| ------ | ---------------------------------------------------------------- | -------------------- | -------- |
|
|
2802
|
+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none | Inline |
|
|
2803
|
+
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | 参数不合法或目标不是文件 | Inline |
|
|
2804
|
+
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | 设备未授权 | Inline |
|
|
2805
|
+
| 404 | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) | 文件不存在 | Inline |
|
|
2806
|
+
|
|
2807
|
+
### 返回数据结构
|
|
2808
|
+
|
|
2809
|
+
状态码 **200**
|
|
2810
|
+
|
|
2811
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
2812
|
+
| --------- | ------- | ---- | ---- | -------- | ---- |
|
|
2813
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
2814
|
+
|
|
2815
|
+
## GET 列出沙盒目录
|
|
2816
|
+
|
|
2817
|
+
GET /api/file/list
|
|
2818
|
+
|
|
2819
|
+
### 请求参数
|
|
2820
|
+
|
|
2821
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
2822
|
+
| ------- | ----- | ------ | ---- | -------- | ---- |
|
|
2823
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
2824
|
+
| path | query | string | 否 | 路径 | 起始目录路径。空值表示所选根目录;支持 `/foo` 或 `foo`,会拼接到所选目录下 |
|
|
2825
|
+
|
|
2826
|
+
> 返回示例
|
|
2827
|
+
|
|
2828
|
+
> 200 Response
|
|
2829
|
+
|
|
2830
|
+
```json
|
|
2831
|
+
{
|
|
2832
|
+
"success": true,
|
|
2833
|
+
"data": [
|
|
2834
|
+
{
|
|
2835
|
+
"name": "foo",
|
|
2836
|
+
"path": "foo",
|
|
2837
|
+
"isDirectory": true,
|
|
2838
|
+
"size": 0
|
|
2839
|
+
},
|
|
2840
|
+
{
|
|
2841
|
+
"name": "bar.txt",
|
|
2842
|
+
"path": "foo/bar.txt",
|
|
2843
|
+
"isDirectory": false,
|
|
2844
|
+
"size": 12
|
|
2845
|
+
}
|
|
2846
|
+
]
|
|
2847
|
+
}
|
|
2848
|
+
```
|
|
2849
|
+
|
|
2850
|
+
### 返回结果
|
|
2851
|
+
|
|
2852
|
+
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|
|
2853
|
+
| ------ | ---------------------------------------------------------------- | ---------- | -------- |
|
|
2854
|
+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none | Inline |
|
|
2855
|
+
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | 参数不合法 | Inline |
|
|
2856
|
+
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | 设备未授权 | Inline |
|
|
2857
|
+
| 404 | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) | 目录不存在 | Inline |
|
|
2858
|
+
|
|
2859
|
+
### 返回数据结构
|
|
2860
|
+
|
|
2861
|
+
状态码 **200**
|
|
2862
|
+
|
|
2863
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
2864
|
+
| --------------- | ------- | ---- | ---- | -------- | ---- |
|
|
2865
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
2866
|
+
| » data | array | true | none | 目录列表 | none |
|
|
2867
|
+
| »» name | string | true | none | 名称 | 文件或目录名 |
|
|
2868
|
+
| »» path | string | true | none | 相对路径 | 相对所选根目录的路径 |
|
|
2869
|
+
| »» isDirectory | boolean | true | none | 是否目录 | none |
|
|
2870
|
+
| »» size | integer | true | none | 文件大小 | 文件字节数,目录返回 0;结果包含起始目录下所有后代路径 |
|
|
2871
|
+
|
|
2872
|
+
## GET 删除沙盒目录
|
|
2873
|
+
|
|
2874
|
+
GET /api/file/deleteDir
|
|
2875
|
+
|
|
2876
|
+
### 请求参数
|
|
2877
|
+
|
|
2878
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
2879
|
+
| ------- | ----- | ------ | ---- | -------- | ---- |
|
|
2880
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
2881
|
+
| path | query | string | 是 | 路径 | 目录路径。支持 `/foo` 或 `foo`,会拼接到所选目录下 |
|
|
2882
|
+
|
|
2883
|
+
> 返回示例
|
|
2884
|
+
|
|
2885
|
+
> 200 Response
|
|
2886
|
+
|
|
2887
|
+
```json
|
|
2888
|
+
{
|
|
2889
|
+
"success": true
|
|
2890
|
+
}
|
|
2891
|
+
```
|
|
2892
|
+
|
|
2893
|
+
### 返回结果
|
|
2894
|
+
|
|
2895
|
+
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|
|
2896
|
+
| ------ | ---------------------------------------------------------------- | ---------- | -------- |
|
|
2897
|
+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none | Inline |
|
|
2898
|
+
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | 参数不合法 | Inline |
|
|
2899
|
+
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | 设备未授权 | Inline |
|
|
2900
|
+
| 404 | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) | 目录不存在 | Inline |
|
|
2901
|
+
|
|
2902
|
+
### 返回数据结构
|
|
2903
|
+
|
|
2904
|
+
状态码 **200**
|
|
2905
|
+
|
|
2906
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
2907
|
+
| --------- | ------- | ---- | ---- | -------- | ---- |
|
|
2908
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
2909
|
+
|
|
2910
|
+
## GET 下载沙盒文件
|
|
2911
|
+
|
|
2912
|
+
GET /api/file/download
|
|
2913
|
+
|
|
2914
|
+
### 请求参数
|
|
2915
|
+
|
|
2916
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
2917
|
+
| ------- | ----- | ------ | ---- | -------- | ---- |
|
|
2918
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
2919
|
+
| path | query | string | 是 | 路径 | 文件路径。支持 `/foo.bin` 或 `foo.bin`,会拼接到所选目录下 |
|
|
2920
|
+
|
|
2921
|
+
### 返回结果
|
|
2922
|
+
|
|
2923
|
+
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|
|
2924
|
+
| ------ | ---------------------------------------------------------------- | ---------- | -------- |
|
|
2925
|
+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | 文件流 | file |
|
|
2926
|
+
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | 参数不合法 | Inline |
|
|
2927
|
+
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | 设备未授权 | Inline |
|
|
2928
|
+
| 404 | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) | 文件不存在 | Inline |
|
|
2929
|
+
|
|
2647
2930
|
# 数据模型
|
|
2648
2931
|
|
|
2649
2932
|
<h2 id="tocS_软件状态">软件状态</h2>
|