@arkts/image-manager 0.5.11 → 0.5.12-beta.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/index.cjs +7 -9
- package/dist/index.mjs +7 -9
- 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.12-beta.1";
|
|
36
36
|
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/common/serializable-content.ts
|
|
@@ -235,8 +235,8 @@ var EmulatorGroupItemImpl = class extends SerializableContentImpl {
|
|
|
235
235
|
getChildren() {
|
|
236
236
|
return this.getContent().children.map((children) => {
|
|
237
237
|
if (EmulatorBasicItem.isContent(children)) return new EmulatorBasicItemImpl(this.emulatorFile, children);
|
|
238
|
-
else if (EmulatorFoldItem.isContent(children)) return new EmulatorFoldItemImpl(this.emulatorFile, children);
|
|
239
238
|
else if (EmulatorTripleFoldItem.isContent(children)) return new EmulatorTripleFoldItemImpl(this.emulatorFile, children);
|
|
239
|
+
else if (EmulatorFoldItem.isContent(children)) return new EmulatorFoldItemImpl(this.emulatorFile, children);
|
|
240
240
|
}).filter(Boolean);
|
|
241
241
|
}
|
|
242
242
|
};
|
|
@@ -271,8 +271,8 @@ var EmulatorFileImpl = class extends SerializableFileImpl {
|
|
|
271
271
|
if (EmulatorGroupItem.isContent(item)) return new EmulatorGroupItemImpl(this, item);
|
|
272
272
|
else if (EmulatorFile.isItemContent(item)) {
|
|
273
273
|
if (EmulatorBasicItem.isContent(item)) return new EmulatorBasicItemImpl(this, item);
|
|
274
|
-
else if (EmulatorFoldItem.isContent(item)) return new EmulatorFoldItemImpl(this, item);
|
|
275
274
|
else if (EmulatorTripleFoldItem.isContent(item)) return new EmulatorTripleFoldItemImpl(this, item);
|
|
275
|
+
else if (EmulatorFoldItem.isContent(item)) return new EmulatorFoldItemImpl(this, item);
|
|
276
276
|
}
|
|
277
277
|
}).filter(Boolean);
|
|
278
278
|
}
|
|
@@ -636,9 +636,7 @@ var DeviceImpl = class {
|
|
|
636
636
|
fs.delete(join(deployedPath, this.getListsFileItem().getContent().name), { recursive: true }),
|
|
637
637
|
fs.delete(join(deployedPath, `${this.getListsFileItem().getContent().name}.ini`), { recursive: false }),
|
|
638
638
|
this.getImageManager().readListsFile().then(async (listsFile) => {
|
|
639
|
-
const listsFileItem = listsFile.getListsFileItems().find((item) =>
|
|
640
|
-
return item.getContent().name === this.getListsFileItem().getContent().name;
|
|
641
|
-
});
|
|
639
|
+
const listsFileItem = listsFile.getListsFileItems().find((item) => item.getContent().name === this.getListsFileItem().getContent().name);
|
|
642
640
|
if (!listsFileItem) return;
|
|
643
641
|
await listsFile.deleteListsFileItem(listsFileItem).write();
|
|
644
642
|
})
|
|
@@ -975,7 +973,7 @@ var LocalImageImpl = class extends BaseImageImpl {
|
|
|
975
973
|
"os.apiVersion": this.getApiVersion().toString(),
|
|
976
974
|
"os.softwareVersion": this.getSdkPkgFile().data?.version ?? "",
|
|
977
975
|
"os.isPublic": options.isPublic ?? true ? "true" : "false",
|
|
978
|
-
"hw.cpu.arch":
|
|
976
|
+
"hw.cpu.arch": this.getImageManager().getArch(),
|
|
979
977
|
"hw.cpu.ncore": listFileItem.getContent()?.cpuNumber,
|
|
980
978
|
"hw.lcd.density": emulatorDeviceItem.getContent()?.density?.toFixed(),
|
|
981
979
|
"hw.lcd.single.diagonalSize": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.singleDiagonalSize?.toString() : void 0,
|
|
@@ -989,10 +987,10 @@ var LocalImageImpl = class extends BaseImageImpl {
|
|
|
989
987
|
"hw.lcd.triple.width": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent().resolutionWidth.toString() : void 0,
|
|
990
988
|
"hw.lcd.phy.height": emulatorDeviceItem.getContent()?.physicalHeight?.toString(),
|
|
991
989
|
"hw.lcd.phy.width": emulatorDeviceItem.getContent()?.physicalWidth?.toString(),
|
|
992
|
-
"hw.lcd.number": EmulatorTripleFoldItem.is(emulatorDeviceItem)
|
|
990
|
+
"hw.lcd.number": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? "3" : EmulatorFoldItem.is(emulatorDeviceItem) ? "2" : "1",
|
|
993
991
|
"hw.ramSize": listFileItem.getContent()?.memoryRamSize,
|
|
994
992
|
"hw.dataPartitionSize": listFileItem.getContent()?.dataDiskSize,
|
|
995
|
-
"isCustomize": "true",
|
|
993
|
+
"isCustomize": screen.getCustomizeScreenConfig() ? "true" : "false",
|
|
996
994
|
"hw.hdc.port": "notset"
|
|
997
995
|
});
|
|
998
996
|
device.setConfigIniFile(deviceIniFile);
|
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.12-beta.1";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/common/serializable-content.ts
|
|
@@ -206,8 +206,8 @@ var EmulatorGroupItemImpl = class extends SerializableContentImpl {
|
|
|
206
206
|
getChildren() {
|
|
207
207
|
return this.getContent().children.map((children) => {
|
|
208
208
|
if (EmulatorBasicItem.isContent(children)) return new EmulatorBasicItemImpl(this.emulatorFile, children);
|
|
209
|
-
else if (EmulatorFoldItem.isContent(children)) return new EmulatorFoldItemImpl(this.emulatorFile, children);
|
|
210
209
|
else if (EmulatorTripleFoldItem.isContent(children)) return new EmulatorTripleFoldItemImpl(this.emulatorFile, children);
|
|
210
|
+
else if (EmulatorFoldItem.isContent(children)) return new EmulatorFoldItemImpl(this.emulatorFile, children);
|
|
211
211
|
}).filter(Boolean);
|
|
212
212
|
}
|
|
213
213
|
};
|
|
@@ -242,8 +242,8 @@ var EmulatorFileImpl = class extends SerializableFileImpl {
|
|
|
242
242
|
if (EmulatorGroupItem.isContent(item)) return new EmulatorGroupItemImpl(this, item);
|
|
243
243
|
else if (EmulatorFile.isItemContent(item)) {
|
|
244
244
|
if (EmulatorBasicItem.isContent(item)) return new EmulatorBasicItemImpl(this, item);
|
|
245
|
-
else if (EmulatorFoldItem.isContent(item)) return new EmulatorFoldItemImpl(this, item);
|
|
246
245
|
else if (EmulatorTripleFoldItem.isContent(item)) return new EmulatorTripleFoldItemImpl(this, item);
|
|
246
|
+
else if (EmulatorFoldItem.isContent(item)) return new EmulatorFoldItemImpl(this, item);
|
|
247
247
|
}
|
|
248
248
|
}).filter(Boolean);
|
|
249
249
|
}
|
|
@@ -607,9 +607,7 @@ var DeviceImpl = class {
|
|
|
607
607
|
fs.delete(join(deployedPath, this.getListsFileItem().getContent().name), { recursive: true }),
|
|
608
608
|
fs.delete(join(deployedPath, `${this.getListsFileItem().getContent().name}.ini`), { recursive: false }),
|
|
609
609
|
this.getImageManager().readListsFile().then(async (listsFile) => {
|
|
610
|
-
const listsFileItem = listsFile.getListsFileItems().find((item) =>
|
|
611
|
-
return item.getContent().name === this.getListsFileItem().getContent().name;
|
|
612
|
-
});
|
|
610
|
+
const listsFileItem = listsFile.getListsFileItems().find((item) => item.getContent().name === this.getListsFileItem().getContent().name);
|
|
613
611
|
if (!listsFileItem) return;
|
|
614
612
|
await listsFile.deleteListsFileItem(listsFileItem).write();
|
|
615
613
|
})
|
|
@@ -946,7 +944,7 @@ var LocalImageImpl = class extends BaseImageImpl {
|
|
|
946
944
|
"os.apiVersion": this.getApiVersion().toString(),
|
|
947
945
|
"os.softwareVersion": this.getSdkPkgFile().data?.version ?? "",
|
|
948
946
|
"os.isPublic": options.isPublic ?? true ? "true" : "false",
|
|
949
|
-
"hw.cpu.arch":
|
|
947
|
+
"hw.cpu.arch": this.getImageManager().getArch(),
|
|
950
948
|
"hw.cpu.ncore": listFileItem.getContent()?.cpuNumber,
|
|
951
949
|
"hw.lcd.density": emulatorDeviceItem.getContent()?.density?.toFixed(),
|
|
952
950
|
"hw.lcd.single.diagonalSize": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.singleDiagonalSize?.toString() : void 0,
|
|
@@ -960,10 +958,10 @@ var LocalImageImpl = class extends BaseImageImpl {
|
|
|
960
958
|
"hw.lcd.triple.width": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent().resolutionWidth.toString() : void 0,
|
|
961
959
|
"hw.lcd.phy.height": emulatorDeviceItem.getContent()?.physicalHeight?.toString(),
|
|
962
960
|
"hw.lcd.phy.width": emulatorDeviceItem.getContent()?.physicalWidth?.toString(),
|
|
963
|
-
"hw.lcd.number": EmulatorTripleFoldItem.is(emulatorDeviceItem)
|
|
961
|
+
"hw.lcd.number": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? "3" : EmulatorFoldItem.is(emulatorDeviceItem) ? "2" : "1",
|
|
964
962
|
"hw.ramSize": listFileItem.getContent()?.memoryRamSize,
|
|
965
963
|
"hw.dataPartitionSize": listFileItem.getContent()?.dataDiskSize,
|
|
966
|
-
"isCustomize": "true",
|
|
964
|
+
"isCustomize": screen.getCustomizeScreenConfig() ? "true" : "false",
|
|
967
965
|
"hw.hdc.port": "notset"
|
|
968
966
|
});
|
|
969
967
|
device.setConfigIniFile(deviceIniFile);
|
package/package.json
CHANGED