@arkts/image-manager 0.2.3 → 0.3.1
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/dist/default-product-config.d.cts +1 -1
- package/dist/default-product-config.d.mts +1 -1
- package/dist/index.cjs +269 -210
- package/dist/index.d.cts +266 -43
- package/dist/index.d.mts +266 -43
- package/dist/index.mjs +267 -210
- package/dist/product-config-2xNDbvax.d.cts +72 -0
- package/dist/product-config-CDvEXtfy.d.mts +72 -0
- package/package.json +3 -1
- package/dist/product-config-BwP_DEGj.d.mts +0 -263
- package/dist/product-config-C-0AD84Q.d.cts +0 -263
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
interface Stringifiable<T> {
|
|
3
|
+
toJSON(): T;
|
|
4
|
+
}
|
|
5
|
+
type OS = 'windows' | 'mac' | 'linux';
|
|
6
|
+
type Arch = 'x86' | 'arm64';
|
|
7
|
+
type DeviceType = 'pc' | 'phone' | 'tablet' | 'wearable' | 'tv' | 'foldable' | 'widefold' | '2in1';
|
|
8
|
+
type SnakecaseDeviceType = 'phone' | 'tablet' | '2in1' | 'foldable' | 'widefold' | 'triplefold' | '2in1_foldable' | 'tv' | 'wearable';
|
|
9
|
+
type PascalCaseDeviceType = 'Phone' | 'Tablet' | '2in1' | 'Foldable' | 'WideFold' | 'TripleFold' | '2in1 Foldable' | 'TV' | 'Wearable';
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/product-config.d.ts
|
|
12
|
+
interface ProductConfigItem {
|
|
13
|
+
/**
|
|
14
|
+
* The name of the product.
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* The screen width of the product.
|
|
19
|
+
*/
|
|
20
|
+
screenWidth: string;
|
|
21
|
+
/**
|
|
22
|
+
* The screen height of the product.
|
|
23
|
+
*/
|
|
24
|
+
screenHeight: string;
|
|
25
|
+
/**
|
|
26
|
+
* The screen diagonal of the product.
|
|
27
|
+
*/
|
|
28
|
+
screenDiagonal: string;
|
|
29
|
+
/**
|
|
30
|
+
* The screen density of the product.
|
|
31
|
+
*/
|
|
32
|
+
screenDensity: string;
|
|
33
|
+
/**
|
|
34
|
+
* The outer screen width of the product.
|
|
35
|
+
*/
|
|
36
|
+
outerScreenWidth?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The outer screen height of the product.
|
|
39
|
+
*/
|
|
40
|
+
outerDoubleScreenWidth?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The outer double screen height of the product.
|
|
43
|
+
*/
|
|
44
|
+
outerDoubleScreenHeight?: string;
|
|
45
|
+
/**
|
|
46
|
+
* The outer double screen diagonal of the product.
|
|
47
|
+
*/
|
|
48
|
+
outerDoubleScreenDiagonal?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The outer screen height of the product.
|
|
51
|
+
*/
|
|
52
|
+
outerScreenHeight?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The outer screen diagonal of the product.
|
|
55
|
+
*/
|
|
56
|
+
outerScreenDiagonal?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the product is visible.
|
|
59
|
+
*/
|
|
60
|
+
visible: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The one cutout path of the product.
|
|
63
|
+
*/
|
|
64
|
+
oneCutoutPath?: string;
|
|
65
|
+
/**
|
|
66
|
+
* The dev model of the product.
|
|
67
|
+
*/
|
|
68
|
+
devModel?: string;
|
|
69
|
+
}
|
|
70
|
+
type ProductConfig = Record<PascalCaseDeviceType, ProductConfigItem[]>;
|
|
71
|
+
//#endregion
|
|
72
|
+
export { OS as a, Stringifiable as c, DeviceType as i, ProductConfigItem as n, PascalCaseDeviceType as o, Arch as r, SnakecaseDeviceType as s, ProductConfig as t };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkts/image-manager",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"description": "OpenHarmony/HarmonyOS qemu image manager.",
|
|
6
6
|
"author": "Naily Zero <zero@naily.cc> (https://naily.cc)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -45,12 +45,14 @@
|
|
|
45
45
|
"axios": "^1.13.4",
|
|
46
46
|
"mitt": "^3.0.1",
|
|
47
47
|
"progress-stream": "^2.0.0",
|
|
48
|
+
"semver": "^7.7.4",
|
|
48
49
|
"unzipper": "^0.12.3"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@antfu/eslint-config": "^7.2.0",
|
|
52
53
|
"@changesets/cli": "^2.29.8",
|
|
53
54
|
"@types/node": "^25.2.0",
|
|
55
|
+
"@types/semver": "^7.7.1",
|
|
54
56
|
"@vitest/coverage-v8": "4.0.18",
|
|
55
57
|
"@vitest/ui": "4.0.18",
|
|
56
58
|
"eslint": "^9.39.2",
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
//#region src/deployer/list.d.ts
|
|
2
|
-
declare enum DevModel {
|
|
3
|
-
MCHEMU_AL00CN = "MCHEMU-AL00CN",
|
|
4
|
-
PHEMU_FD00 = "PHEMU-FD00",
|
|
5
|
-
PHEMU_FD01 = "PHEMU-FD01",
|
|
6
|
-
PHEMU_FD02 = "PHEMU-FD02",
|
|
7
|
-
PHEMU_FD06 = "PHEMU-FD06",
|
|
8
|
-
PCEMU_FD00 = "PCEMU-FD00",
|
|
9
|
-
PCEMU_FD05 = "PCEMU-FD05"
|
|
10
|
-
}
|
|
11
|
-
type DeployedDevModel = 'MCHEMU-AL00CN' | 'PHEMU-FD00' | 'PHEMU-FD01' | 'PHEMU-FD02' | 'PHEMU-FD06' | 'PCEMU-FD00' | 'PCEMU-FD05' | DevModel | (string & {});
|
|
12
|
-
type ProductNameable<T> = T & {
|
|
13
|
-
/**
|
|
14
|
-
* The name of the product.
|
|
15
|
-
*
|
|
16
|
-
* @example 'Mate 80 Pro Max、Mate 80 RS'
|
|
17
|
-
*/
|
|
18
|
-
productName: string;
|
|
19
|
-
};
|
|
20
|
-
interface DeployedImageConfig {
|
|
21
|
-
/**
|
|
22
|
-
* Diagonal size.
|
|
23
|
-
*
|
|
24
|
-
* @example '1.6'
|
|
25
|
-
*/
|
|
26
|
-
diagonalSize: string;
|
|
27
|
-
/**
|
|
28
|
-
* Density.
|
|
29
|
-
*
|
|
30
|
-
* @example '320'
|
|
31
|
-
*/
|
|
32
|
-
density: string;
|
|
33
|
-
/**
|
|
34
|
-
* Resolution height.
|
|
35
|
-
*
|
|
36
|
-
* @example '466'
|
|
37
|
-
*/
|
|
38
|
-
resolutionHeight: string;
|
|
39
|
-
/**
|
|
40
|
-
* Resolution width.
|
|
41
|
-
*
|
|
42
|
-
* @example '466'
|
|
43
|
-
*/
|
|
44
|
-
resolutionWidth: string;
|
|
45
|
-
}
|
|
46
|
-
interface DeployedImageConfigWithProductName extends DeployedImageConfig {
|
|
47
|
-
/**
|
|
48
|
-
* The name of the product.
|
|
49
|
-
*
|
|
50
|
-
* @example 'Mate 80 Pro Max、Mate 80 RS'
|
|
51
|
-
*/
|
|
52
|
-
productName: string;
|
|
53
|
-
}
|
|
54
|
-
interface DeployedImageOptions extends DeployedImageConfig {
|
|
55
|
-
/**
|
|
56
|
-
* RAM size.
|
|
57
|
-
*
|
|
58
|
-
* @example '4096'
|
|
59
|
-
*/
|
|
60
|
-
'memoryRamSize': string;
|
|
61
|
-
/**
|
|
62
|
-
* CPU number.
|
|
63
|
-
*
|
|
64
|
-
* @example '4'
|
|
65
|
-
*/
|
|
66
|
-
'cpuNumber': string;
|
|
67
|
-
/**
|
|
68
|
-
* Data disk size.
|
|
69
|
-
*
|
|
70
|
-
* @example '6144'
|
|
71
|
-
*/
|
|
72
|
-
'dataDiskSize': string;
|
|
73
|
-
/**
|
|
74
|
-
* Deployed name.
|
|
75
|
-
*
|
|
76
|
-
* @example 'Huawei_Wearable'
|
|
77
|
-
*/
|
|
78
|
-
'name': string;
|
|
79
|
-
/**
|
|
80
|
-
* UUID.
|
|
81
|
-
*
|
|
82
|
-
* @example 'ce454934-3a1b-4770-9838-dc85c5d7b6c1'
|
|
83
|
-
*/
|
|
84
|
-
'uuid': string;
|
|
85
|
-
/**
|
|
86
|
-
* OpenHarmony/HarmonyOS version.
|
|
87
|
-
*
|
|
88
|
-
* @example '6.0.1'
|
|
89
|
-
*/
|
|
90
|
-
'hw.apiName': string;
|
|
91
|
-
/**
|
|
92
|
-
* Device model.
|
|
93
|
-
*
|
|
94
|
-
* @example 'MCHEMU-AL00CN'
|
|
95
|
-
*/
|
|
96
|
-
'devModel'?: DeployedDevModel;
|
|
97
|
-
/**
|
|
98
|
-
* Model.
|
|
99
|
-
*
|
|
100
|
-
* @example 'Mate 80 Pro Max、Mate 80 RS'
|
|
101
|
-
*/
|
|
102
|
-
'model': string;
|
|
103
|
-
}
|
|
104
|
-
interface FullDeployedImageOptions extends DeployedImageOptions {
|
|
105
|
-
/**
|
|
106
|
-
* Image directory.
|
|
107
|
-
*
|
|
108
|
-
* @example 'system-image/HarmonyOS-6.0.1/wearable_arm/'
|
|
109
|
-
*/
|
|
110
|
-
'imageDir': string;
|
|
111
|
-
/**
|
|
112
|
-
* Image SDK version.
|
|
113
|
-
*
|
|
114
|
-
* @example '6.0.0.112'
|
|
115
|
-
*/
|
|
116
|
-
'version': string;
|
|
117
|
-
/**
|
|
118
|
-
* Device type.
|
|
119
|
-
*
|
|
120
|
-
* @example 'wearable', 'phone', 'tablet'
|
|
121
|
-
*/
|
|
122
|
-
'type': 'wearable' | 'phone' | 'tablet' | '2in1' | 'tv' | (string & {});
|
|
123
|
-
/**
|
|
124
|
-
* Architecture.
|
|
125
|
-
*
|
|
126
|
-
* @example 'arm'
|
|
127
|
-
*/
|
|
128
|
-
'abi': string;
|
|
129
|
-
/**
|
|
130
|
-
* API version.
|
|
131
|
-
*
|
|
132
|
-
* @example '21'
|
|
133
|
-
*/
|
|
134
|
-
'apiVersion': string;
|
|
135
|
-
/**
|
|
136
|
-
* Deployed path.
|
|
137
|
-
*
|
|
138
|
-
* @example '/Users/xxx/.Huawei/Emulator/deployed/Huawei_Wearable'
|
|
139
|
-
*/
|
|
140
|
-
'path': string;
|
|
141
|
-
/**
|
|
142
|
-
* Show version.
|
|
143
|
-
*
|
|
144
|
-
* @example 'HarmonyOS 6.0.1(21)'
|
|
145
|
-
*/
|
|
146
|
-
'showVersion': string;
|
|
147
|
-
/**
|
|
148
|
-
* HarmonyOS version.
|
|
149
|
-
*
|
|
150
|
-
* @example 'HarmonyOS-6.0.1'
|
|
151
|
-
*/
|
|
152
|
-
'harmonyOSVersion': string;
|
|
153
|
-
/**
|
|
154
|
-
* Cover resolution width.
|
|
155
|
-
*
|
|
156
|
-
* @example '2472'
|
|
157
|
-
*/
|
|
158
|
-
'coverResolutionWidth'?: string;
|
|
159
|
-
/**
|
|
160
|
-
* Cover resolution height.
|
|
161
|
-
*
|
|
162
|
-
* @example '1648'
|
|
163
|
-
*/
|
|
164
|
-
'coverResolutionHeight'?: string;
|
|
165
|
-
/**
|
|
166
|
-
* Cover diagonal size.
|
|
167
|
-
*
|
|
168
|
-
* @example '13.0'
|
|
169
|
-
*/
|
|
170
|
-
'coverDiagonalSize'?: string;
|
|
171
|
-
/**
|
|
172
|
-
* HarmonyOS SDK path.
|
|
173
|
-
*
|
|
174
|
-
* @example '/Applications/DevEco-Studio.app/Contents/sdk'
|
|
175
|
-
*/
|
|
176
|
-
'harmonyos.sdk.path': string;
|
|
177
|
-
/**
|
|
178
|
-
* HarmonyOS config path.
|
|
179
|
-
*
|
|
180
|
-
* @example '/Users/xxx/Library/Application Support/Huawei/DevEcoStudio6.0'
|
|
181
|
-
*/
|
|
182
|
-
'harmonyos.config.path': string;
|
|
183
|
-
/**
|
|
184
|
-
* HarmonyOS log path.
|
|
185
|
-
*
|
|
186
|
-
* @example '/Users/xxx/Library/Logs/Huawei/DevEcoStudio6.0'
|
|
187
|
-
*/
|
|
188
|
-
'harmonyos.log.path': string;
|
|
189
|
-
}
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/types.d.ts
|
|
192
|
-
interface Stringifiable<T> {
|
|
193
|
-
toJSON(): T;
|
|
194
|
-
}
|
|
195
|
-
type OS = 'windows' | 'mac' | 'linux';
|
|
196
|
-
type Arch = 'x86' | 'arm64';
|
|
197
|
-
type DeviceType = 'pc' | 'phone' | 'tablet' | 'wearable' | 'tv' | 'foldable' | 'widefold' | '2in1';
|
|
198
|
-
type SnakecaseDeviceType = 'phone' | 'tablet' | '2in1' | 'foldable' | 'widefold' | 'triplefold' | '2in1_foldable' | 'tv' | 'wearable';
|
|
199
|
-
type PascalCaseDeviceType = 'Phone' | 'Tablet' | '2in1' | 'Foldable' | 'WideFold' | 'TripleFold' | '2in1 Foldable' | 'TV' | 'Wearable';
|
|
200
|
-
//#endregion
|
|
201
|
-
//#region src/product-config.d.ts
|
|
202
|
-
interface ProductConfigItem {
|
|
203
|
-
/**
|
|
204
|
-
* The name of the product.
|
|
205
|
-
*/
|
|
206
|
-
name: string;
|
|
207
|
-
/**
|
|
208
|
-
* The screen width of the product.
|
|
209
|
-
*/
|
|
210
|
-
screenWidth: string;
|
|
211
|
-
/**
|
|
212
|
-
* The screen height of the product.
|
|
213
|
-
*/
|
|
214
|
-
screenHeight: string;
|
|
215
|
-
/**
|
|
216
|
-
* The screen diagonal of the product.
|
|
217
|
-
*/
|
|
218
|
-
screenDiagonal: string;
|
|
219
|
-
/**
|
|
220
|
-
* The screen density of the product.
|
|
221
|
-
*/
|
|
222
|
-
screenDensity: string;
|
|
223
|
-
/**
|
|
224
|
-
* The outer screen width of the product.
|
|
225
|
-
*/
|
|
226
|
-
outerScreenWidth?: string;
|
|
227
|
-
/**
|
|
228
|
-
* The outer screen height of the product.
|
|
229
|
-
*/
|
|
230
|
-
outerDoubleScreenWidth?: string;
|
|
231
|
-
/**
|
|
232
|
-
* The outer double screen height of the product.
|
|
233
|
-
*/
|
|
234
|
-
outerDoubleScreenHeight?: string;
|
|
235
|
-
/**
|
|
236
|
-
* The outer double screen diagonal of the product.
|
|
237
|
-
*/
|
|
238
|
-
outerDoubleScreenDiagonal?: string;
|
|
239
|
-
/**
|
|
240
|
-
* The outer screen height of the product.
|
|
241
|
-
*/
|
|
242
|
-
outerScreenHeight?: string;
|
|
243
|
-
/**
|
|
244
|
-
* The outer screen diagonal of the product.
|
|
245
|
-
*/
|
|
246
|
-
outerScreenDiagonal?: string;
|
|
247
|
-
/**
|
|
248
|
-
* Whether the product is visible.
|
|
249
|
-
*/
|
|
250
|
-
visible: boolean;
|
|
251
|
-
/**
|
|
252
|
-
* The one cutout path of the product.
|
|
253
|
-
*/
|
|
254
|
-
oneCutoutPath?: string;
|
|
255
|
-
/**
|
|
256
|
-
* The dev model of the product.
|
|
257
|
-
*/
|
|
258
|
-
devModel?: string;
|
|
259
|
-
}
|
|
260
|
-
type ProductConfig = Record<PascalCaseDeviceType, ProductConfigItem[]>;
|
|
261
|
-
declare function createDeployedImageConfig(productConfigItem: ProductConfigItem): DeployedImageConfigWithProductName;
|
|
262
|
-
//#endregion
|
|
263
|
-
export { DeviceType as a, SnakecaseDeviceType as c, DeployedImageConfig as d, DeployedImageConfigWithProductName as f, ProductNameable as g, FullDeployedImageOptions as h, Arch as i, Stringifiable as l, DevModel as m, ProductConfigItem as n, OS as o, DeployedImageOptions as p, createDeployedImageConfig as r, PascalCaseDeviceType as s, ProductConfig as t, DeployedDevModel as u };
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
//#region src/deployer/list.d.ts
|
|
2
|
-
declare enum DevModel {
|
|
3
|
-
MCHEMU_AL00CN = "MCHEMU-AL00CN",
|
|
4
|
-
PHEMU_FD00 = "PHEMU-FD00",
|
|
5
|
-
PHEMU_FD01 = "PHEMU-FD01",
|
|
6
|
-
PHEMU_FD02 = "PHEMU-FD02",
|
|
7
|
-
PHEMU_FD06 = "PHEMU-FD06",
|
|
8
|
-
PCEMU_FD00 = "PCEMU-FD00",
|
|
9
|
-
PCEMU_FD05 = "PCEMU-FD05"
|
|
10
|
-
}
|
|
11
|
-
type DeployedDevModel = 'MCHEMU-AL00CN' | 'PHEMU-FD00' | 'PHEMU-FD01' | 'PHEMU-FD02' | 'PHEMU-FD06' | 'PCEMU-FD00' | 'PCEMU-FD05' | DevModel | (string & {});
|
|
12
|
-
type ProductNameable<T> = T & {
|
|
13
|
-
/**
|
|
14
|
-
* The name of the product.
|
|
15
|
-
*
|
|
16
|
-
* @example 'Mate 80 Pro Max、Mate 80 RS'
|
|
17
|
-
*/
|
|
18
|
-
productName: string;
|
|
19
|
-
};
|
|
20
|
-
interface DeployedImageConfig {
|
|
21
|
-
/**
|
|
22
|
-
* Diagonal size.
|
|
23
|
-
*
|
|
24
|
-
* @example '1.6'
|
|
25
|
-
*/
|
|
26
|
-
diagonalSize: string;
|
|
27
|
-
/**
|
|
28
|
-
* Density.
|
|
29
|
-
*
|
|
30
|
-
* @example '320'
|
|
31
|
-
*/
|
|
32
|
-
density: string;
|
|
33
|
-
/**
|
|
34
|
-
* Resolution height.
|
|
35
|
-
*
|
|
36
|
-
* @example '466'
|
|
37
|
-
*/
|
|
38
|
-
resolutionHeight: string;
|
|
39
|
-
/**
|
|
40
|
-
* Resolution width.
|
|
41
|
-
*
|
|
42
|
-
* @example '466'
|
|
43
|
-
*/
|
|
44
|
-
resolutionWidth: string;
|
|
45
|
-
}
|
|
46
|
-
interface DeployedImageConfigWithProductName extends DeployedImageConfig {
|
|
47
|
-
/**
|
|
48
|
-
* The name of the product.
|
|
49
|
-
*
|
|
50
|
-
* @example 'Mate 80 Pro Max、Mate 80 RS'
|
|
51
|
-
*/
|
|
52
|
-
productName: string;
|
|
53
|
-
}
|
|
54
|
-
interface DeployedImageOptions extends DeployedImageConfig {
|
|
55
|
-
/**
|
|
56
|
-
* RAM size.
|
|
57
|
-
*
|
|
58
|
-
* @example '4096'
|
|
59
|
-
*/
|
|
60
|
-
'memoryRamSize': string;
|
|
61
|
-
/**
|
|
62
|
-
* CPU number.
|
|
63
|
-
*
|
|
64
|
-
* @example '4'
|
|
65
|
-
*/
|
|
66
|
-
'cpuNumber': string;
|
|
67
|
-
/**
|
|
68
|
-
* Data disk size.
|
|
69
|
-
*
|
|
70
|
-
* @example '6144'
|
|
71
|
-
*/
|
|
72
|
-
'dataDiskSize': string;
|
|
73
|
-
/**
|
|
74
|
-
* Deployed name.
|
|
75
|
-
*
|
|
76
|
-
* @example 'Huawei_Wearable'
|
|
77
|
-
*/
|
|
78
|
-
'name': string;
|
|
79
|
-
/**
|
|
80
|
-
* UUID.
|
|
81
|
-
*
|
|
82
|
-
* @example 'ce454934-3a1b-4770-9838-dc85c5d7b6c1'
|
|
83
|
-
*/
|
|
84
|
-
'uuid': string;
|
|
85
|
-
/**
|
|
86
|
-
* OpenHarmony/HarmonyOS version.
|
|
87
|
-
*
|
|
88
|
-
* @example '6.0.1'
|
|
89
|
-
*/
|
|
90
|
-
'hw.apiName': string;
|
|
91
|
-
/**
|
|
92
|
-
* Device model.
|
|
93
|
-
*
|
|
94
|
-
* @example 'MCHEMU-AL00CN'
|
|
95
|
-
*/
|
|
96
|
-
'devModel'?: DeployedDevModel;
|
|
97
|
-
/**
|
|
98
|
-
* Model.
|
|
99
|
-
*
|
|
100
|
-
* @example 'Mate 80 Pro Max、Mate 80 RS'
|
|
101
|
-
*/
|
|
102
|
-
'model': string;
|
|
103
|
-
}
|
|
104
|
-
interface FullDeployedImageOptions extends DeployedImageOptions {
|
|
105
|
-
/**
|
|
106
|
-
* Image directory.
|
|
107
|
-
*
|
|
108
|
-
* @example 'system-image/HarmonyOS-6.0.1/wearable_arm/'
|
|
109
|
-
*/
|
|
110
|
-
'imageDir': string;
|
|
111
|
-
/**
|
|
112
|
-
* Image SDK version.
|
|
113
|
-
*
|
|
114
|
-
* @example '6.0.0.112'
|
|
115
|
-
*/
|
|
116
|
-
'version': string;
|
|
117
|
-
/**
|
|
118
|
-
* Device type.
|
|
119
|
-
*
|
|
120
|
-
* @example 'wearable', 'phone', 'tablet'
|
|
121
|
-
*/
|
|
122
|
-
'type': 'wearable' | 'phone' | 'tablet' | '2in1' | 'tv' | (string & {});
|
|
123
|
-
/**
|
|
124
|
-
* Architecture.
|
|
125
|
-
*
|
|
126
|
-
* @example 'arm'
|
|
127
|
-
*/
|
|
128
|
-
'abi': string;
|
|
129
|
-
/**
|
|
130
|
-
* API version.
|
|
131
|
-
*
|
|
132
|
-
* @example '21'
|
|
133
|
-
*/
|
|
134
|
-
'apiVersion': string;
|
|
135
|
-
/**
|
|
136
|
-
* Deployed path.
|
|
137
|
-
*
|
|
138
|
-
* @example '/Users/xxx/.Huawei/Emulator/deployed/Huawei_Wearable'
|
|
139
|
-
*/
|
|
140
|
-
'path': string;
|
|
141
|
-
/**
|
|
142
|
-
* Show version.
|
|
143
|
-
*
|
|
144
|
-
* @example 'HarmonyOS 6.0.1(21)'
|
|
145
|
-
*/
|
|
146
|
-
'showVersion': string;
|
|
147
|
-
/**
|
|
148
|
-
* HarmonyOS version.
|
|
149
|
-
*
|
|
150
|
-
* @example 'HarmonyOS-6.0.1'
|
|
151
|
-
*/
|
|
152
|
-
'harmonyOSVersion': string;
|
|
153
|
-
/**
|
|
154
|
-
* Cover resolution width.
|
|
155
|
-
*
|
|
156
|
-
* @example '2472'
|
|
157
|
-
*/
|
|
158
|
-
'coverResolutionWidth'?: string;
|
|
159
|
-
/**
|
|
160
|
-
* Cover resolution height.
|
|
161
|
-
*
|
|
162
|
-
* @example '1648'
|
|
163
|
-
*/
|
|
164
|
-
'coverResolutionHeight'?: string;
|
|
165
|
-
/**
|
|
166
|
-
* Cover diagonal size.
|
|
167
|
-
*
|
|
168
|
-
* @example '13.0'
|
|
169
|
-
*/
|
|
170
|
-
'coverDiagonalSize'?: string;
|
|
171
|
-
/**
|
|
172
|
-
* HarmonyOS SDK path.
|
|
173
|
-
*
|
|
174
|
-
* @example '/Applications/DevEco-Studio.app/Contents/sdk'
|
|
175
|
-
*/
|
|
176
|
-
'harmonyos.sdk.path': string;
|
|
177
|
-
/**
|
|
178
|
-
* HarmonyOS config path.
|
|
179
|
-
*
|
|
180
|
-
* @example '/Users/xxx/Library/Application Support/Huawei/DevEcoStudio6.0'
|
|
181
|
-
*/
|
|
182
|
-
'harmonyos.config.path': string;
|
|
183
|
-
/**
|
|
184
|
-
* HarmonyOS log path.
|
|
185
|
-
*
|
|
186
|
-
* @example '/Users/xxx/Library/Logs/Huawei/DevEcoStudio6.0'
|
|
187
|
-
*/
|
|
188
|
-
'harmonyos.log.path': string;
|
|
189
|
-
}
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/types.d.ts
|
|
192
|
-
interface Stringifiable<T> {
|
|
193
|
-
toJSON(): T;
|
|
194
|
-
}
|
|
195
|
-
type OS = 'windows' | 'mac' | 'linux';
|
|
196
|
-
type Arch = 'x86' | 'arm64';
|
|
197
|
-
type DeviceType = 'pc' | 'phone' | 'tablet' | 'wearable' | 'tv' | 'foldable' | 'widefold' | '2in1';
|
|
198
|
-
type SnakecaseDeviceType = 'phone' | 'tablet' | '2in1' | 'foldable' | 'widefold' | 'triplefold' | '2in1_foldable' | 'tv' | 'wearable';
|
|
199
|
-
type PascalCaseDeviceType = 'Phone' | 'Tablet' | '2in1' | 'Foldable' | 'WideFold' | 'TripleFold' | '2in1 Foldable' | 'TV' | 'Wearable';
|
|
200
|
-
//#endregion
|
|
201
|
-
//#region src/product-config.d.ts
|
|
202
|
-
interface ProductConfigItem {
|
|
203
|
-
/**
|
|
204
|
-
* The name of the product.
|
|
205
|
-
*/
|
|
206
|
-
name: string;
|
|
207
|
-
/**
|
|
208
|
-
* The screen width of the product.
|
|
209
|
-
*/
|
|
210
|
-
screenWidth: string;
|
|
211
|
-
/**
|
|
212
|
-
* The screen height of the product.
|
|
213
|
-
*/
|
|
214
|
-
screenHeight: string;
|
|
215
|
-
/**
|
|
216
|
-
* The screen diagonal of the product.
|
|
217
|
-
*/
|
|
218
|
-
screenDiagonal: string;
|
|
219
|
-
/**
|
|
220
|
-
* The screen density of the product.
|
|
221
|
-
*/
|
|
222
|
-
screenDensity: string;
|
|
223
|
-
/**
|
|
224
|
-
* The outer screen width of the product.
|
|
225
|
-
*/
|
|
226
|
-
outerScreenWidth?: string;
|
|
227
|
-
/**
|
|
228
|
-
* The outer screen height of the product.
|
|
229
|
-
*/
|
|
230
|
-
outerDoubleScreenWidth?: string;
|
|
231
|
-
/**
|
|
232
|
-
* The outer double screen height of the product.
|
|
233
|
-
*/
|
|
234
|
-
outerDoubleScreenHeight?: string;
|
|
235
|
-
/**
|
|
236
|
-
* The outer double screen diagonal of the product.
|
|
237
|
-
*/
|
|
238
|
-
outerDoubleScreenDiagonal?: string;
|
|
239
|
-
/**
|
|
240
|
-
* The outer screen height of the product.
|
|
241
|
-
*/
|
|
242
|
-
outerScreenHeight?: string;
|
|
243
|
-
/**
|
|
244
|
-
* The outer screen diagonal of the product.
|
|
245
|
-
*/
|
|
246
|
-
outerScreenDiagonal?: string;
|
|
247
|
-
/**
|
|
248
|
-
* Whether the product is visible.
|
|
249
|
-
*/
|
|
250
|
-
visible: boolean;
|
|
251
|
-
/**
|
|
252
|
-
* The one cutout path of the product.
|
|
253
|
-
*/
|
|
254
|
-
oneCutoutPath?: string;
|
|
255
|
-
/**
|
|
256
|
-
* The dev model of the product.
|
|
257
|
-
*/
|
|
258
|
-
devModel?: string;
|
|
259
|
-
}
|
|
260
|
-
type ProductConfig = Record<PascalCaseDeviceType, ProductConfigItem[]>;
|
|
261
|
-
declare function createDeployedImageConfig(productConfigItem: ProductConfigItem): DeployedImageConfigWithProductName;
|
|
262
|
-
//#endregion
|
|
263
|
-
export { DeviceType as a, SnakecaseDeviceType as c, DeployedImageConfig as d, DeployedImageConfigWithProductName as f, ProductNameable as g, FullDeployedImageOptions as h, Arch as i, Stringifiable as l, DevModel as m, ProductConfigItem as n, OS as o, DeployedImageOptions as p, createDeployedImageConfig as r, PascalCaseDeviceType as s, ProductConfig as t, DeployedDevModel as u };
|