@arkts/image-manager 0.5.12-beta.0 → 0.5.12-beta.2
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.12-beta.
|
|
35
|
+
var version = "0.5.12-beta.2";
|
|
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
|
}
|
|
@@ -303,10 +303,10 @@ var EmulatorFileImpl = class extends SerializableFileImpl {
|
|
|
303
303
|
const pushDeviceItem = (item) => {
|
|
304
304
|
if (EmulatorBasicItem.is(item)) {
|
|
305
305
|
if (options.apiVersion && item.getContent().api === options.apiVersion && options.deviceType && item.getContent().deviceType === options.deviceType) items.push(item);
|
|
306
|
-
} else if (EmulatorFoldItem.is(item)) {
|
|
307
|
-
if (options.apiVersion && item.getContent().api === options.apiVersion && options.deviceType && item.getContent().deviceType === options.deviceType) items.push(item);
|
|
308
306
|
} else if (EmulatorTripleFoldItem.is(item)) {
|
|
309
307
|
if (options.apiVersion && item.getContent().api === options.apiVersion && options.deviceType && item.getContent().deviceType === options.deviceType) items.push(item);
|
|
308
|
+
} else if (EmulatorFoldItem.is(item)) {
|
|
309
|
+
if (options.apiVersion && item.getContent().api === options.apiVersion && options.deviceType && item.getContent().deviceType === options.deviceType) items.push(item);
|
|
310
310
|
}
|
|
311
311
|
};
|
|
312
312
|
for (const item of this.getItems()) if (EmulatorGroupItem.is(item)) for (const child of item.getChildren()) pushDeviceItem(child);
|
|
@@ -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": this.getImageManager().getArch()
|
|
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,
|
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.12-beta.
|
|
6
|
+
var version = "0.5.12-beta.2";
|
|
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
|
}
|
|
@@ -274,10 +274,10 @@ var EmulatorFileImpl = class extends SerializableFileImpl {
|
|
|
274
274
|
const pushDeviceItem = (item) => {
|
|
275
275
|
if (EmulatorBasicItem.is(item)) {
|
|
276
276
|
if (options.apiVersion && item.getContent().api === options.apiVersion && options.deviceType && item.getContent().deviceType === options.deviceType) items.push(item);
|
|
277
|
-
} else if (EmulatorFoldItem.is(item)) {
|
|
278
|
-
if (options.apiVersion && item.getContent().api === options.apiVersion && options.deviceType && item.getContent().deviceType === options.deviceType) items.push(item);
|
|
279
277
|
} else if (EmulatorTripleFoldItem.is(item)) {
|
|
280
278
|
if (options.apiVersion && item.getContent().api === options.apiVersion && options.deviceType && item.getContent().deviceType === options.deviceType) items.push(item);
|
|
279
|
+
} else if (EmulatorFoldItem.is(item)) {
|
|
280
|
+
if (options.apiVersion && item.getContent().api === options.apiVersion && options.deviceType && item.getContent().deviceType === options.deviceType) items.push(item);
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
283
|
for (const item of this.getItems()) if (EmulatorGroupItem.is(item)) for (const child of item.getChildren()) pushDeviceItem(child);
|
|
@@ -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": this.getImageManager().getArch()
|
|
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,
|
package/package.json
CHANGED