@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.cjs +17 -1
- package/dist/index.d.cts +369 -368
- package/dist/index.d.mts +369 -368
- package/dist/index.mjs +17 -1
- package/package.json +1 -1
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.
|
|
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