@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.cjs
CHANGED
|
@@ -32,7 +32,7 @@ let base64_js = require("base64-js");
|
|
|
32
32
|
let vscode_fs = require("vscode-fs");
|
|
33
33
|
|
|
34
34
|
//#region package.json
|
|
35
|
-
var version = "0.5.
|
|
35
|
+
var version = "0.5.5";
|
|
36
36
|
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/common/serializable-content.ts
|
|
@@ -283,6 +283,22 @@ var EmulatorFileImpl = class extends SerializableFileImpl {
|
|
|
283
283
|
else this.getDeviceItems(item.getChildren());
|
|
284
284
|
return items;
|
|
285
285
|
}
|
|
286
|
+
findRemoteImageByDeviceItem(deviceItem, remoteImages) {
|
|
287
|
+
return remoteImages.find((image) => {
|
|
288
|
+
if (image.getApiVersion() !== deviceItem.getContent().api) return false;
|
|
289
|
+
if (image.getFullDeviceType() === deviceItem.getContent().deviceType) return true;
|
|
290
|
+
if (image.getFullDeviceType() === "pc_all") {
|
|
291
|
+
if (deviceItem.getContent().deviceType === "2in1") return true;
|
|
292
|
+
else if (deviceItem.getContent().deviceType === "2in1_foldable") return true;
|
|
293
|
+
} else if (image.getFullDeviceType() === "phone_all") {
|
|
294
|
+
if (deviceItem.getContent().deviceType === "phone") return true;
|
|
295
|
+
else if (deviceItem.getContent().deviceType === "foldable") return true;
|
|
296
|
+
else if (deviceItem.getContent().deviceType === "widefold") return true;
|
|
297
|
+
else if (deviceItem.getContent().deviceType === "triplefold") return true;
|
|
298
|
+
}
|
|
299
|
+
return false;
|
|
300
|
+
});
|
|
301
|
+
}
|
|
286
302
|
findDeviceItems(options = {}) {
|
|
287
303
|
const items = [];
|
|
288
304
|
const pushDeviceItem = (item) => {
|