@arkts/image-manager 0.0.2 → 0.0.4

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.
@@ -1,4 +1,4 @@
1
- import { t as ProductConfig } from "./product-config-Dk21FD9U.cjs";
1
+ import { t as ProductConfig } from "./product-config-KZA5hTtZ.cjs";
2
2
 
3
3
  //#region src/default-product-config.d.ts
4
4
  declare const _default: ProductConfig;
@@ -1,4 +1,4 @@
1
- import { t as ProductConfig } from "./product-config-BbaYsaoV.mjs";
1
+ import { t as ProductConfig } from "./product-config-BthHVWvs.mjs";
2
2
 
3
3
  //#region src/default-product-config.d.ts
4
4
  declare const _default: ProductConfig;
package/dist/index.cjs CHANGED
@@ -657,7 +657,20 @@ async function createImageManager(options = {}) {
657
657
  return new ImageManagerImpl(await resolveImageManagerOptions(options));
658
658
  }
659
659
 
660
+ //#endregion
661
+ //#region src/product-config.ts
662
+ function createDeployedImageConfig(productConfigItem) {
663
+ return {
664
+ density: productConfigItem.screenDensity,
665
+ resolutionHeight: productConfigItem.screenHeight,
666
+ resolutionWidth: productConfigItem.screenWidth,
667
+ diagonalSize: productConfigItem.screenDiagonal,
668
+ productName: productConfigItem.name
669
+ };
670
+ }
671
+
660
672
  //#endregion
661
673
  exports.DevModel = DevModel;
662
674
  exports.RequestUrlError = RequestUrlError;
675
+ exports.createDeployedImageConfig = createDeployedImageConfig;
663
676
  exports.createImageManager = createImageManager;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as OS, c as Stringifiable, d as DeployedImageConfigWithProductName, f as DeployedImageOptions, i as DeviceType, l as DeployedDevModel, m as FullDeployedImageOptions, n as ProductConfigItem, o as PascalCaseDeviceType, p as DevModel, r as Arch, s as SnakecaseDeviceType, t as ProductConfig, u as DeployedImageConfig } from "./product-config-Dk21FD9U.cjs";
1
+ import { a as DeviceType, c as SnakecaseDeviceType, d as DeployedImageConfig, f as DeployedImageConfigWithProductName, 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-KZA5hTtZ.cjs";
2
2
  import { AxiosProgressEvent } from "axios";
3
3
  import { Emitter } from "mitt";
4
4
  import * as node_child_process0 from "node:child_process";
@@ -261,4 +261,4 @@ interface ImageDeployer {
261
261
  deploy(symlinkImage?: boolean): Promise<void | Error>;
262
262
  }
263
263
  //#endregion
264
- export { Arch, DeployedDevModel, DeployedImageConfig, DeployedImageConfigWithProductName, DeployedImageOptions, DevModel, DeviceType, FullDeployedImageOptions, Image, ImageDeployer, type ImageManager, type ImageManagerOptions, ImageType, LocalImage, OS, PascalCaseDeviceType, type ProductConfig, RemoteImage, RequestUrlError, SnakecaseDeviceType, Stringifiable, createImageManager };
264
+ export { Arch, DeployedDevModel, DeployedImageConfig, DeployedImageConfigWithProductName, DeployedImageOptions, DevModel, DeviceType, FullDeployedImageOptions, Image, ImageDeployer, type ImageManager, type ImageManagerOptions, ImageType, LocalImage, OS, PascalCaseDeviceType, type ProductConfig, RemoteImage, RequestUrlError, SnakecaseDeviceType, Stringifiable, createDeployedImageConfig, createImageManager };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as OS, c as Stringifiable, d as DeployedImageConfigWithProductName, f as DeployedImageOptions, i as DeviceType, l as DeployedDevModel, m as FullDeployedImageOptions, n as ProductConfigItem, o as PascalCaseDeviceType, p as DevModel, r as Arch, s as SnakecaseDeviceType, t as ProductConfig, u as DeployedImageConfig } from "./product-config-BbaYsaoV.mjs";
1
+ import { a as DeviceType, c as SnakecaseDeviceType, d as DeployedImageConfig, f as DeployedImageConfigWithProductName, 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-BthHVWvs.mjs";
2
2
  import { AxiosProgressEvent } from "axios";
3
3
  import { Emitter } from "mitt";
4
4
  import progress from "progress-stream";
@@ -261,4 +261,4 @@ interface ImageDeployer {
261
261
  deploy(symlinkImage?: boolean): Promise<void | Error>;
262
262
  }
263
263
  //#endregion
264
- export { Arch, DeployedDevModel, DeployedImageConfig, DeployedImageConfigWithProductName, DeployedImageOptions, DevModel, DeviceType, FullDeployedImageOptions, type Image, type ImageDeployer, type ImageManager, type ImageManagerOptions, type ImageType, type LocalImage, OS, PascalCaseDeviceType, type ProductConfig, type RemoteImage, RequestUrlError, SnakecaseDeviceType, Stringifiable, createImageManager };
264
+ export { Arch, DeployedDevModel, DeployedImageConfig, DeployedImageConfigWithProductName, DeployedImageOptions, DevModel, DeviceType, FullDeployedImageOptions, type Image, type ImageDeployer, type ImageManager, type ImageManagerOptions, type ImageType, type LocalImage, OS, PascalCaseDeviceType, type ProductConfig, type RemoteImage, RequestUrlError, SnakecaseDeviceType, Stringifiable, createDeployedImageConfig, createImageManager };
package/dist/index.mjs CHANGED
@@ -626,4 +626,16 @@ async function createImageManager(options = {}) {
626
626
  }
627
627
 
628
628
  //#endregion
629
- export { DevModel, RequestUrlError, createImageManager };
629
+ //#region src/product-config.ts
630
+ function createDeployedImageConfig(productConfigItem) {
631
+ return {
632
+ density: productConfigItem.screenDensity,
633
+ resolutionHeight: productConfigItem.screenHeight,
634
+ resolutionWidth: productConfigItem.screenWidth,
635
+ diagonalSize: productConfigItem.screenDiagonal,
636
+ productName: productConfigItem.name
637
+ };
638
+ }
639
+
640
+ //#endregion
641
+ export { DevModel, RequestUrlError, createDeployedImageConfig, createImageManager };
@@ -246,5 +246,6 @@ interface ProductConfigItem {
246
246
  devModel?: string;
247
247
  }
248
248
  type ProductConfig = Record<PascalCaseDeviceType, ProductConfigItem[]>;
249
+ declare function createDeployedImageConfig(productConfigItem: ProductConfigItem): DeployedImageConfigWithProductName;
249
250
  //#endregion
250
- export { OS as a, Stringifiable as c, DeployedImageConfigWithProductName as d, DeployedImageOptions as f, DeviceType as i, DeployedDevModel as l, FullDeployedImageOptions as m, ProductConfigItem as n, PascalCaseDeviceType as o, DevModel as p, Arch as r, SnakecaseDeviceType as s, ProductConfig as t, DeployedImageConfig as u };
251
+ export { DeviceType as a, SnakecaseDeviceType as c, DeployedImageConfig as d, DeployedImageConfigWithProductName as f, 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 };
@@ -246,5 +246,6 @@ interface ProductConfigItem {
246
246
  devModel?: string;
247
247
  }
248
248
  type ProductConfig = Record<PascalCaseDeviceType, ProductConfigItem[]>;
249
+ declare function createDeployedImageConfig(productConfigItem: ProductConfigItem): DeployedImageConfigWithProductName;
249
250
  //#endregion
250
- export { OS as a, Stringifiable as c, DeployedImageConfigWithProductName as d, DeployedImageOptions as f, DeviceType as i, DeployedDevModel as l, FullDeployedImageOptions as m, ProductConfigItem as n, PascalCaseDeviceType as o, DevModel as p, Arch as r, SnakecaseDeviceType as s, ProductConfig as t, DeployedImageConfig as u };
251
+ export { DeviceType as a, SnakecaseDeviceType as c, DeployedImageConfig as d, DeployedImageConfigWithProductName as f, 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 };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arkts/image-manager",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "description": "OpenHarmony/HarmonyOS qemu image manager.",
6
6
  "author": "Naily Zero <zero@naily.cc> (https://naily.cc)",
7
7
  "license": "MIT",