@arkts/image-manager 0.1.5 → 0.2.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.cjs +18 -0
- package/dist/default-product-config.d.cts +1 -1
- package/dist/default-product-config.d.mts +1 -1
- package/dist/default-product-config.mjs +18 -0
- package/dist/index.cjs +13 -3
- package/dist/index.d.cts +8 -3
- package/dist/index.d.mts +8 -3
- package/dist/index.mjs +7 -3
- package/dist/{product-config-DtWd8ReR.d.mts → product-config-BwP_DEGj.d.mts} +4 -0
- package/dist/{product-config-sobL53MD.d.cts → product-config-C-0AD84Q.d.cts} +4 -0
- package/package.json +1 -1
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
//#region src/default-product-config.ts
|
|
3
3
|
var default_product_config_default = {
|
|
4
4
|
"Phone": [
|
|
5
|
+
{
|
|
6
|
+
name: "nova 15 Pro、nova 15 Ultra",
|
|
7
|
+
screenWidth: "1320",
|
|
8
|
+
screenHeight: "2856",
|
|
9
|
+
screenDiagonal: "6.84",
|
|
10
|
+
screenDensity: "560",
|
|
11
|
+
oneCutoutPath: "M517 45 L802 45 v 103 h -285 Z",
|
|
12
|
+
visible: true
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: "nova 15",
|
|
16
|
+
screenWidth: "1084",
|
|
17
|
+
screenHeight: "2412",
|
|
18
|
+
screenDiagonal: "6.7",
|
|
19
|
+
screenDensity: "480",
|
|
20
|
+
oneCutoutPath: "M504 16 L580 16 v 76 h -76 Z",
|
|
21
|
+
visible: true
|
|
22
|
+
},
|
|
5
23
|
{
|
|
6
24
|
name: "Mate 80 Pro Max、Mate 80 RS",
|
|
7
25
|
screenWidth: "1320",
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
//#region src/default-product-config.ts
|
|
2
2
|
var default_product_config_default = {
|
|
3
3
|
"Phone": [
|
|
4
|
+
{
|
|
5
|
+
name: "nova 15 Pro、nova 15 Ultra",
|
|
6
|
+
screenWidth: "1320",
|
|
7
|
+
screenHeight: "2856",
|
|
8
|
+
screenDiagonal: "6.84",
|
|
9
|
+
screenDensity: "560",
|
|
10
|
+
oneCutoutPath: "M517 45 L802 45 v 103 h -285 Z",
|
|
11
|
+
visible: true
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "nova 15",
|
|
15
|
+
screenWidth: "1084",
|
|
16
|
+
screenHeight: "2412",
|
|
17
|
+
screenDiagonal: "6.7",
|
|
18
|
+
screenDensity: "480",
|
|
19
|
+
oneCutoutPath: "M504 16 L580 16 v 76 h -76 Z",
|
|
20
|
+
visible: true
|
|
21
|
+
},
|
|
4
22
|
{
|
|
5
23
|
name: "Mate 80 Pro Max、Mate 80 RS",
|
|
6
24
|
screenWidth: "1320",
|
package/dist/index.cjs
CHANGED
|
@@ -35,6 +35,10 @@ progress_stream = __toESM(progress_stream);
|
|
|
35
35
|
let unzipper = require("unzipper");
|
|
36
36
|
unzipper = __toESM(unzipper);
|
|
37
37
|
|
|
38
|
+
//#region package.json
|
|
39
|
+
var version = "0.2.1";
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
38
42
|
//#region src/deployer/list.ts
|
|
39
43
|
let DevModel = /* @__PURE__ */ function(DevModel) {
|
|
40
44
|
DevModel["MCHEMU_AL00CN"] = "MCHEMU-AL00CN";
|
|
@@ -671,11 +675,11 @@ var ImageManagerImpl = class {
|
|
|
671
675
|
if (this.resolvedOptions.process.arch.toLowerCase().includes("arm")) return "arm64";
|
|
672
676
|
return "x86";
|
|
673
677
|
}
|
|
674
|
-
async getImages() {
|
|
678
|
+
async getImages(supportVersion = "6.0-hos-single-9") {
|
|
675
679
|
const response = await axios.default.post("https://devecostudio-drcn.deveco.dbankcloud.com/sdkmanager/v8/hos/getSdkList", {
|
|
676
680
|
osArch: this.getArch(),
|
|
677
681
|
osType: this.getOS(),
|
|
678
|
-
supportVersion
|
|
682
|
+
supportVersion
|
|
679
683
|
});
|
|
680
684
|
if (!Array.isArray(response.data)) return [];
|
|
681
685
|
const images = [];
|
|
@@ -717,4 +721,10 @@ function createDeployedImageConfig(productConfigItem) {
|
|
|
717
721
|
exports.DevModel = DevModel;
|
|
718
722
|
exports.RequestUrlError = RequestUrlError;
|
|
719
723
|
exports.createDeployedImageConfig = createDeployedImageConfig;
|
|
720
|
-
exports.createImageManager = createImageManager;
|
|
724
|
+
exports.createImageManager = createImageManager;
|
|
725
|
+
Object.defineProperty(exports, 'version', {
|
|
726
|
+
enumerable: true,
|
|
727
|
+
get: function () {
|
|
728
|
+
return version;
|
|
729
|
+
}
|
|
730
|
+
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DeviceType, c as SnakecaseDeviceType, d as DeployedImageConfig, f as DeployedImageConfigWithProductName, g as ProductNameable, h as FullDeployedImageOptions, i as Arch, l as Stringifiable, m as DevModel, n as ProductConfigItem, o as OS, p as DeployedImageOptions, r as createDeployedImageConfig, s as PascalCaseDeviceType, t as ProductConfig, u as DeployedDevModel } from "./product-config-
|
|
1
|
+
import { a as DeviceType, c as SnakecaseDeviceType, d as DeployedImageConfig, f as DeployedImageConfigWithProductName, g as ProductNameable, h as FullDeployedImageOptions, i as Arch, l as Stringifiable, m as DevModel, n as ProductConfigItem, o as OS, p as DeployedImageOptions, r as createDeployedImageConfig, s as PascalCaseDeviceType, t as ProductConfig, u as DeployedDevModel } from "./product-config-C-0AD84Q.cjs";
|
|
2
2
|
import { AxiosProgressEvent } from "axios";
|
|
3
3
|
import { Emitter } from "mitt";
|
|
4
4
|
import * as node_child_process0 from "node:child_process";
|
|
@@ -9,6 +9,9 @@ import * as node_path0 from "node:path";
|
|
|
9
9
|
import * as node_process0 from "node:process";
|
|
10
10
|
import * as node_crypto0 from "node:crypto";
|
|
11
11
|
|
|
12
|
+
//#region package.json.d.ts
|
|
13
|
+
declare let version: string;
|
|
14
|
+
//#endregion
|
|
12
15
|
//#region src/images/local-image.d.ts
|
|
13
16
|
interface LocalImage extends BaseImage, Stringifiable<LocalImage.Stringifiable> {
|
|
14
17
|
imageType: 'local';
|
|
@@ -159,8 +162,10 @@ interface ImageManager {
|
|
|
159
162
|
getOptions(): ResolvedImageManagerOptions;
|
|
160
163
|
/**
|
|
161
164
|
* Get the images.
|
|
165
|
+
*
|
|
166
|
+
* @param supportVersion - The support version of the images. Default is `6.0-hos-single-9`.
|
|
162
167
|
*/
|
|
163
|
-
getImages(): Promise<Image[]>;
|
|
168
|
+
getImages(supportVersion?: string): Promise<Image[]>;
|
|
164
169
|
/**
|
|
165
170
|
* Get the product config.
|
|
166
171
|
*
|
|
@@ -282,4 +287,4 @@ interface Device {
|
|
|
282
287
|
delete(): Promise<void | Error>;
|
|
283
288
|
}
|
|
284
289
|
//#endregion
|
|
285
|
-
export { Arch, DeployedDevModel, DeployedImageConfig, DeployedImageConfigWithProductName, DeployedImageOptions, DevModel, Device, DeviceType, FullDeployedImageOptions, Image, type ImageManager, type ImageManagerOptions, ImageType, LocalImage, OS, PascalCaseDeviceType, type ProductConfig, ProductNameable, RemoteImage, RequestUrlError, SnakecaseDeviceType, Stringifiable, createDeployedImageConfig, createImageManager };
|
|
290
|
+
export { Arch, DeployedDevModel, DeployedImageConfig, DeployedImageConfigWithProductName, DeployedImageOptions, DevModel, Device, DeviceType, FullDeployedImageOptions, Image, type ImageManager, type ImageManagerOptions, ImageType, LocalImage, OS, PascalCaseDeviceType, type ProductConfig, type ProductConfigItem, ProductNameable, RemoteImage, RequestUrlError, SnakecaseDeviceType, Stringifiable, createDeployedImageConfig, createImageManager, version };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DeviceType, c as SnakecaseDeviceType, d as DeployedImageConfig, f as DeployedImageConfigWithProductName, g as ProductNameable, h as FullDeployedImageOptions, i as Arch, l as Stringifiable, m as DevModel, n as ProductConfigItem, o as OS, p as DeployedImageOptions, r as createDeployedImageConfig, s as PascalCaseDeviceType, t as ProductConfig, u as DeployedDevModel } from "./product-config-
|
|
1
|
+
import { a as DeviceType, c as SnakecaseDeviceType, d as DeployedImageConfig, f as DeployedImageConfigWithProductName, g as ProductNameable, h as FullDeployedImageOptions, i as Arch, l as Stringifiable, m as DevModel, n as ProductConfigItem, o as OS, p as DeployedImageOptions, r as createDeployedImageConfig, s as PascalCaseDeviceType, t as ProductConfig, u as DeployedDevModel } from "./product-config-BwP_DEGj.mjs";
|
|
2
2
|
import { AxiosProgressEvent } from "axios";
|
|
3
3
|
import { Emitter } from "mitt";
|
|
4
4
|
import progress from "progress-stream";
|
|
@@ -9,6 +9,9 @@ import * as node_os0 from "node:os";
|
|
|
9
9
|
import * as node_path0 from "node:path";
|
|
10
10
|
import * as node_process0 from "node:process";
|
|
11
11
|
|
|
12
|
+
//#region package.json.d.ts
|
|
13
|
+
declare let version: string;
|
|
14
|
+
//#endregion
|
|
12
15
|
//#region src/images/local-image.d.ts
|
|
13
16
|
interface LocalImage extends BaseImage, Stringifiable<LocalImage.Stringifiable> {
|
|
14
17
|
imageType: 'local';
|
|
@@ -159,8 +162,10 @@ interface ImageManager {
|
|
|
159
162
|
getOptions(): ResolvedImageManagerOptions;
|
|
160
163
|
/**
|
|
161
164
|
* Get the images.
|
|
165
|
+
*
|
|
166
|
+
* @param supportVersion - The support version of the images. Default is `6.0-hos-single-9`.
|
|
162
167
|
*/
|
|
163
|
-
getImages(): Promise<Image[]>;
|
|
168
|
+
getImages(supportVersion?: string): Promise<Image[]>;
|
|
164
169
|
/**
|
|
165
170
|
* Get the product config.
|
|
166
171
|
*
|
|
@@ -282,4 +287,4 @@ interface Device {
|
|
|
282
287
|
delete(): Promise<void | Error>;
|
|
283
288
|
}
|
|
284
289
|
//#endregion
|
|
285
|
-
export { Arch, DeployedDevModel, DeployedImageConfig, DeployedImageConfigWithProductName, DeployedImageOptions, DevModel, type Device, DeviceType, FullDeployedImageOptions, type Image, type ImageManager, type ImageManagerOptions, type ImageType, type LocalImage, OS, PascalCaseDeviceType, type ProductConfig, ProductNameable, type RemoteImage, RequestUrlError, SnakecaseDeviceType, Stringifiable, createDeployedImageConfig, createImageManager };
|
|
290
|
+
export { Arch, DeployedDevModel, DeployedImageConfig, DeployedImageConfigWithProductName, DeployedImageOptions, DevModel, type Device, DeviceType, FullDeployedImageOptions, type Image, type ImageManager, type ImageManagerOptions, type ImageType, type LocalImage, OS, PascalCaseDeviceType, type ProductConfig, type ProductConfigItem, ProductNameable, type RemoteImage, RequestUrlError, SnakecaseDeviceType, Stringifiable, createDeployedImageConfig, createImageManager, version };
|
package/dist/index.mjs
CHANGED
|
@@ -3,6 +3,10 @@ import mitt from "mitt";
|
|
|
3
3
|
import progress from "progress-stream";
|
|
4
4
|
import unzipper from "unzipper";
|
|
5
5
|
|
|
6
|
+
//#region package.json
|
|
7
|
+
var version = "0.2.1";
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
6
10
|
//#region src/deployer/list.ts
|
|
7
11
|
let DevModel = /* @__PURE__ */ function(DevModel) {
|
|
8
12
|
DevModel["MCHEMU_AL00CN"] = "MCHEMU-AL00CN";
|
|
@@ -639,11 +643,11 @@ var ImageManagerImpl = class {
|
|
|
639
643
|
if (this.resolvedOptions.process.arch.toLowerCase().includes("arm")) return "arm64";
|
|
640
644
|
return "x86";
|
|
641
645
|
}
|
|
642
|
-
async getImages() {
|
|
646
|
+
async getImages(supportVersion = "6.0-hos-single-9") {
|
|
643
647
|
const response = await axios.post("https://devecostudio-drcn.deveco.dbankcloud.com/sdkmanager/v8/hos/getSdkList", {
|
|
644
648
|
osArch: this.getArch(),
|
|
645
649
|
osType: this.getOS(),
|
|
646
|
-
supportVersion
|
|
650
|
+
supportVersion
|
|
647
651
|
});
|
|
648
652
|
if (!Array.isArray(response.data)) return [];
|
|
649
653
|
const images = [];
|
|
@@ -682,4 +686,4 @@ function createDeployedImageConfig(productConfigItem) {
|
|
|
682
686
|
}
|
|
683
687
|
|
|
684
688
|
//#endregion
|
|
685
|
-
export { DevModel, RequestUrlError, createDeployedImageConfig, createImageManager };
|
|
689
|
+
export { DevModel, RequestUrlError, createDeployedImageConfig, createImageManager, version };
|
package/package.json
CHANGED