@arkts/image-manager 0.5.4 → 0.5.5

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/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { fromByteArray } from "base64-js";
3
3
  import { RelativePattern, WriteableFlags, createNodeFileSystem } from "vscode-fs";
4
4
 
5
5
  //#region package.json
6
- var version = "0.5.4";
6
+ var version = "0.5.5";
7
7
 
8
8
  //#endregion
9
9
  //#region src/common/serializable-content.ts
@@ -254,6 +254,22 @@ var EmulatorFileImpl = class extends SerializableFileImpl {
254
254
  else this.getDeviceItems(item.getChildren());
255
255
  return items;
256
256
  }
257
+ findRemoteImageByDeviceItem(deviceItem, remoteImages) {
258
+ return remoteImages.find((image) => {
259
+ if (image.getApiVersion() !== deviceItem.getContent().api) return false;
260
+ if (image.getFullDeviceType() === deviceItem.getContent().deviceType) return true;
261
+ if (image.getFullDeviceType() === "pc_all") {
262
+ if (deviceItem.getContent().deviceType === "2in1") return true;
263
+ else if (deviceItem.getContent().deviceType === "2in1_foldable") return true;
264
+ } else if (image.getFullDeviceType() === "phone_all") {
265
+ if (deviceItem.getContent().deviceType === "phone") return true;
266
+ else if (deviceItem.getContent().deviceType === "foldable") return true;
267
+ else if (deviceItem.getContent().deviceType === "widefold") return true;
268
+ else if (deviceItem.getContent().deviceType === "triplefold") return true;
269
+ }
270
+ return false;
271
+ });
272
+ }
257
273
  findDeviceItems(options = {}) {
258
274
  const items = [];
259
275
  const pushDeviceItem = (item) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arkts/image-manager",
3
3
  "type": "module",
4
- "version": "0.5.4",
4
+ "version": "0.5.5",
5
5
  "description": "OpenHarmony/HarmonyOS qemu image manager.",
6
6
  "author": "Naily Zero <zero@naily.cc> (https://naily.cc)",
7
7
  "license": "MIT",