@arkts/image-manager 0.5.9 → 0.5.11
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/default-product-config.cjs +32 -64
- package/dist/default-product-config.d.cts +0 -33
- package/dist/default-product-config.d.mts +0 -33
- package/dist/default-product-config.mjs +32 -64
- package/dist/index.cjs +111 -54
- package/dist/index.d.cts +18 -21
- package/dist/index.d.mts +18 -21
- package/dist/index.mjs +111 -54
- 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.11";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/common/serializable-content.ts
|
|
@@ -349,7 +349,7 @@ var ListsFileImpl = class extends SerializableFileImpl {
|
|
|
349
349
|
this.content = listsFileItems.filter((item, index, self) => index === self.findIndex((t) => t.uuid === item.uuid)).filter((item, index, self) => index === self.findIndex((t) => t.name === item.name));
|
|
350
350
|
}
|
|
351
351
|
addListsFileItem(listsFileItem) {
|
|
352
|
-
this.content.push(listsFileItem);
|
|
352
|
+
this.content.push(Object.fromEntries(Object.entries(listsFileItem).filter(([_, value]) => value !== void 0 && value !== null)));
|
|
353
353
|
this.removeDuplicateListFileItems(this.content);
|
|
354
354
|
this._isChanged = true;
|
|
355
355
|
return new ListsFileItemImpl(this, listsFileItem);
|
|
@@ -384,6 +384,54 @@ var ListsFileImpl = class extends SerializableFileImpl {
|
|
|
384
384
|
//#region src/configs/product/item.ts
|
|
385
385
|
let ProductConfigItem;
|
|
386
386
|
(function(_ProductConfigItem) {
|
|
387
|
+
function isBaseContent(content) {
|
|
388
|
+
return typeof content === "object" && content !== null && "name" in content && "screenWidth" in content && "screenHeight" in content && "screenDiagonal" in content && "screenDensity" in content && "visible" in content;
|
|
389
|
+
}
|
|
390
|
+
_ProductConfigItem.isBaseContent = isBaseContent;
|
|
391
|
+
function isBaseFoldContent(content) {
|
|
392
|
+
return isBaseContent(content) && "outerScreenWidth" in content && "outerScreenHeight" in content && "outerScreenDiagonal" in content;
|
|
393
|
+
}
|
|
394
|
+
_ProductConfigItem.isBaseFoldContent = isBaseFoldContent;
|
|
395
|
+
function isPhoneContent(content) {
|
|
396
|
+
return isBaseContent(content);
|
|
397
|
+
}
|
|
398
|
+
_ProductConfigItem.isPhoneContent = isPhoneContent;
|
|
399
|
+
function isTabletContent(content) {
|
|
400
|
+
return isBaseContent(content);
|
|
401
|
+
}
|
|
402
|
+
_ProductConfigItem.isTabletContent = isTabletContent;
|
|
403
|
+
function isTwoInOneContent(content) {
|
|
404
|
+
return isBaseContent(content);
|
|
405
|
+
}
|
|
406
|
+
_ProductConfigItem.isTwoInOneContent = isTwoInOneContent;
|
|
407
|
+
function isFoldableContent(content) {
|
|
408
|
+
return isBaseFoldContent(content);
|
|
409
|
+
}
|
|
410
|
+
_ProductConfigItem.isFoldableContent = isFoldableContent;
|
|
411
|
+
function isWideFoldContent(content) {
|
|
412
|
+
return isBaseFoldContent(content);
|
|
413
|
+
}
|
|
414
|
+
_ProductConfigItem.isWideFoldContent = isWideFoldContent;
|
|
415
|
+
function isTripleFoldContent(content) {
|
|
416
|
+
return isBaseFoldContent(content) && "outerDoubleScreenWidth" in content && "outerDoubleScreenHeight" in content && "outerDoubleScreenDiagonal" in content;
|
|
417
|
+
}
|
|
418
|
+
_ProductConfigItem.isTripleFoldContent = isTripleFoldContent;
|
|
419
|
+
function isTwoInOneFoldableContent(content) {
|
|
420
|
+
return isBaseFoldContent(content);
|
|
421
|
+
}
|
|
422
|
+
_ProductConfigItem.isTwoInOneFoldableContent = isTwoInOneFoldableContent;
|
|
423
|
+
function isTVContent(content) {
|
|
424
|
+
return isBaseContent(content);
|
|
425
|
+
}
|
|
426
|
+
_ProductConfigItem.isTVContent = isTVContent;
|
|
427
|
+
function isWearableContent(content) {
|
|
428
|
+
return isBaseContent(content);
|
|
429
|
+
}
|
|
430
|
+
_ProductConfigItem.isWearableContent = isWearableContent;
|
|
431
|
+
function isWearableKidContent(content) {
|
|
432
|
+
return isBaseContent(content);
|
|
433
|
+
}
|
|
434
|
+
_ProductConfigItem.isWearableKidContent = isWearableKidContent;
|
|
387
435
|
function is(value) {
|
|
388
436
|
return value instanceof ProductConfigItemImpl;
|
|
389
437
|
}
|
|
@@ -754,8 +802,8 @@ var ScreenPresetImpl = class {
|
|
|
754
802
|
_customizeScreen;
|
|
755
803
|
getCustomizeScreenConfig() {
|
|
756
804
|
if (this._customizeScreen) return this._customizeScreen;
|
|
757
|
-
if (this.getEmulatorDeviceItem().getContent().deviceType === "foldable" && this.options.productConfigItem.getContent().name === "Customize" && "customizeScreen" in this.options && "customizeFoldableScreen" in this.options) this._customizeScreen = new CustomizeFoldableScreenImpl(this, this.options.customizeScreen, this.options.customizeFoldableScreen);
|
|
758
|
-
else if (this.options.productConfigItem.getContent().name === "Customize" && "customizeScreen" in this.options) this._customizeScreen = new CustomizeScreenImpl(this, this.options.customizeScreen);
|
|
805
|
+
if (this.getEmulatorDeviceItem().getContent().deviceType === "foldable" && this.options.productConfigItem.getContent().name === "Customize" && "customizeScreen" in this.options && this.options.customizeScreen !== void 0 && this.options.customizeScreen !== null && "customizeFoldableScreen" in this.options && this.options.customizeFoldableScreen !== void 0 && this.options.customizeFoldableScreen !== null) this._customizeScreen = new CustomizeFoldableScreenImpl(this, this.options.customizeScreen, this.options.customizeFoldableScreen);
|
|
806
|
+
else if (this.options.productConfigItem.getContent().name === "Customize" && "customizeScreen" in this.options && this.options.customizeScreen !== void 0 && this.options.customizeScreen !== null) this._customizeScreen = new CustomizeScreenImpl(this, this.options.customizeScreen);
|
|
759
807
|
return this._customizeScreen;
|
|
760
808
|
}
|
|
761
809
|
toJSON() {
|
|
@@ -840,7 +888,7 @@ var LocalImageImpl = class extends BaseImageImpl {
|
|
|
840
888
|
return name?.[name.length - 1];
|
|
841
889
|
}
|
|
842
890
|
async createDevice(options) {
|
|
843
|
-
const { deployedPath,
|
|
891
|
+
const { deployedPath, configPath, logPath, sdkPath, defaultSdkPath, adapter: { join } } = this.getImageManager().getOptions();
|
|
844
892
|
const screen = new ScreenPresetImpl(options.screen);
|
|
845
893
|
const emulatorDeviceItem = screen.getEmulatorDeviceItem();
|
|
846
894
|
const productConfigItem = screen.getProductConfigItem();
|
|
@@ -851,30 +899,30 @@ var LocalImageImpl = class extends BaseImageImpl {
|
|
|
851
899
|
uuid,
|
|
852
900
|
"name": options.name,
|
|
853
901
|
"apiVersion": this.getApiVersion().toString(),
|
|
854
|
-
"cpuNumber": options.cpuNumber
|
|
902
|
+
"cpuNumber": options.cpuNumber?.toString(),
|
|
855
903
|
"path": deviceFolderPath.fsPath,
|
|
856
|
-
"memoryRamSize": options.memoryRamSize
|
|
857
|
-
"dataDiskSize": options.dataDiskSize
|
|
904
|
+
"memoryRamSize": options.memoryRamSize?.toString(),
|
|
905
|
+
"dataDiskSize": options.dataDiskSize?.toString(),
|
|
858
906
|
"version": this.getSdkPkgFile().data?.version ?? "",
|
|
859
|
-
"imageDir": this.getRelativePath()
|
|
860
|
-
"showVersion": this.getSdkPkgFile().data?.guestVersion
|
|
861
|
-
"harmonyos.sdk.path":
|
|
907
|
+
"imageDir": this.getRelativePath().endsWith("/") ? this.getRelativePath() : `${this.getRelativePath()}/`,
|
|
908
|
+
"showVersion": `${this.getSdkPkgFile().data?.guestVersion?.split(" ")[0]} ${this.getSdkPkgFile().data?.platformVersion}(${this.getSdkPkgFile().data?.apiVersion})`,
|
|
909
|
+
"harmonyos.sdk.path": defaultSdkPath?.fsPath ?? sdkPath.fsPath,
|
|
862
910
|
"harmonyos.config.path": configPath.fsPath,
|
|
863
911
|
"harmonyos.log.path": logPath.fsPath,
|
|
864
912
|
"hw.apiName": this.getSdkPkgFile().data?.platformVersion ?? "",
|
|
865
|
-
"abi": this.infoFile
|
|
913
|
+
"abi": this.infoFile?.abi,
|
|
866
914
|
"harmonyOSVersion": `${this.getSdkPkgFile().data?.guestVersion?.split(" ")[0]}-${this.getSdkPkgFile().data?.platformVersion}`,
|
|
867
915
|
"guestVersion": this.getSdkPkgFile().data?.guestVersion ?? "",
|
|
868
|
-
"diagonalSize": emulatorDeviceItem.getContent()
|
|
869
|
-
"density": emulatorDeviceItem.getContent()
|
|
870
|
-
"resolutionWidth": emulatorDeviceItem.getContent()
|
|
871
|
-
"resolutionHeight": emulatorDeviceItem.getContent()
|
|
872
|
-
"coverResolutionWidth": EmulatorFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()
|
|
873
|
-
"coverResolutionHeight": EmulatorFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()
|
|
874
|
-
"coverDiagonalSize": EmulatorFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()
|
|
875
|
-
"type": emulatorDeviceItem.getContent()
|
|
916
|
+
"diagonalSize": emulatorDeviceItem.getContent()?.diagonalSize?.toString(),
|
|
917
|
+
"density": emulatorDeviceItem.getContent()?.density?.toString(),
|
|
918
|
+
"resolutionWidth": emulatorDeviceItem.getContent()?.resolutionWidth?.toString(),
|
|
919
|
+
"resolutionHeight": emulatorDeviceItem.getContent()?.resolutionHeight?.toString(),
|
|
920
|
+
"coverResolutionWidth": EmulatorFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.coverResolutionWidth?.toString() : void 0,
|
|
921
|
+
"coverResolutionHeight": EmulatorFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.coverResolutionHeight?.toString() : void 0,
|
|
922
|
+
"coverDiagonalSize": EmulatorFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.coverDiagonalSize?.toString() : void 0,
|
|
923
|
+
"type": emulatorDeviceItem.getContent()?.deviceType,
|
|
876
924
|
"devModel": productConfigItem.getDevModel(),
|
|
877
|
-
"model": productConfigItem.getContent()
|
|
925
|
+
"model": productConfigItem.getContent()?.name
|
|
878
926
|
});
|
|
879
927
|
const device = new DeviceImpl({
|
|
880
928
|
imageManager: this.getImageManager(),
|
|
@@ -883,42 +931,45 @@ var LocalImageImpl = class extends BaseImageImpl {
|
|
|
883
931
|
screen
|
|
884
932
|
});
|
|
885
933
|
const deviceIniFile = new ConfigIniFileImpl(device, ConfigIniFileImpl.getFileUri(device), {
|
|
886
|
-
"name": listFileItem.getContent()
|
|
887
|
-
"deviceType": listFileItem.getContent()
|
|
888
|
-
"deviceModel": listFileItem.getContent()
|
|
889
|
-
"productModel": listFileItem.getContent()
|
|
934
|
+
"name": listFileItem.getContent()?.name,
|
|
935
|
+
"deviceType": listFileItem.getContent()?.type,
|
|
936
|
+
"deviceModel": listFileItem.getContent()?.devModel,
|
|
937
|
+
"productModel": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? void 0 : listFileItem.getContent()?.model,
|
|
890
938
|
"vendorCountry": options.vendorCountry ?? "CN",
|
|
891
|
-
"uuid": listFileItem.getContent()
|
|
939
|
+
"uuid": listFileItem.getContent()?.uuid,
|
|
892
940
|
"configPath": listFileItem.getContent()["harmonyos.config.path"],
|
|
893
941
|
"logPath": listFileItem.getContent()["harmonyos.log.path"],
|
|
894
942
|
"sdkPath": listFileItem.getContent()["harmonyos.sdk.path"],
|
|
895
|
-
"imageSubPath": listFileItem.getContent().imageDir
|
|
896
|
-
"instancePath": listFileItem.getContent()
|
|
943
|
+
"imageSubPath": listFileItem.getContent()?.imageDir.endsWith("/") ? listFileItem.getContent()?.imageDir : `${listFileItem.getContent()?.imageDir}/`,
|
|
944
|
+
"instancePath": listFileItem.getContent()?.path,
|
|
897
945
|
"os.osVersion": `${this.getSdkPkgFile().data?.guestVersion?.split(" ")[0]} ${this.getSdkPkgFile().data?.platformVersion}(${this.getApiVersion()})`,
|
|
898
946
|
"os.apiVersion": this.getApiVersion().toString(),
|
|
899
947
|
"os.softwareVersion": this.getSdkPkgFile().data?.version ?? "",
|
|
900
948
|
"os.isPublic": options.isPublic ?? true ? "true" : "false",
|
|
901
|
-
"hw.cpu.arch": listFileItem.getContent()
|
|
902
|
-
"hw.cpu.ncore": listFileItem.getContent()
|
|
903
|
-
"hw.lcd.density": emulatorDeviceItem.getContent()
|
|
904
|
-
"hw.lcd.single.diagonalSize": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()
|
|
905
|
-
"hw.lcd.single.height": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()
|
|
906
|
-
"hw.lcd.single.width": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()
|
|
907
|
-
"hw.lcd.double.diagonalSize": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()
|
|
908
|
-
"hw.lcd.double.height": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()
|
|
909
|
-
"hw.lcd.double.width": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()
|
|
910
|
-
"hw.lcd.
|
|
911
|
-
"hw.lcd.
|
|
949
|
+
"hw.cpu.arch": listFileItem.getContent()?.abi,
|
|
950
|
+
"hw.cpu.ncore": listFileItem.getContent()?.cpuNumber,
|
|
951
|
+
"hw.lcd.density": emulatorDeviceItem.getContent()?.density?.toFixed(),
|
|
952
|
+
"hw.lcd.single.diagonalSize": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.singleDiagonalSize?.toString() : void 0,
|
|
953
|
+
"hw.lcd.single.height": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.singleResolutionHeight?.toString() : void 0,
|
|
954
|
+
"hw.lcd.single.width": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.singleResolutionWidth?.toString() : void 0,
|
|
955
|
+
"hw.lcd.double.diagonalSize": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.doubleDiagonalSize?.toString() : void 0,
|
|
956
|
+
"hw.lcd.double.height": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.doubleResolutionHeight?.toString() : void 0,
|
|
957
|
+
"hw.lcd.double.width": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent()?.doubleResolutionWidth?.toString() : void 0,
|
|
958
|
+
"hw.lcd.triple.diagonalSize": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent().diagonalSize.toString() : void 0,
|
|
959
|
+
"hw.lcd.triple.height": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent().resolutionHeight.toString() : void 0,
|
|
960
|
+
"hw.lcd.triple.width": EmulatorTripleFoldItem.is(emulatorDeviceItem) ? emulatorDeviceItem.getContent().resolutionWidth.toString() : void 0,
|
|
961
|
+
"hw.lcd.phy.height": emulatorDeviceItem.getContent()?.physicalHeight?.toString(),
|
|
962
|
+
"hw.lcd.phy.width": emulatorDeviceItem.getContent()?.physicalWidth?.toString(),
|
|
912
963
|
"hw.lcd.number": EmulatorTripleFoldItem.is(emulatorDeviceItem) || EmulatorFoldItem.is(emulatorDeviceItem) ? "2" : "1",
|
|
913
|
-
"hw.ramSize": listFileItem.getContent()
|
|
914
|
-
"hw.dataPartitionSize": listFileItem.getContent()
|
|
964
|
+
"hw.ramSize": listFileItem.getContent()?.memoryRamSize,
|
|
965
|
+
"hw.dataPartitionSize": listFileItem.getContent()?.dataDiskSize,
|
|
915
966
|
"isCustomize": "true",
|
|
916
967
|
"hw.hdc.port": "notset"
|
|
917
968
|
});
|
|
918
969
|
device.setConfigIniFile(deviceIniFile);
|
|
919
970
|
const namedIniFile = new NamedIniFileImpl(device, NamedIniFileImpl.getFileUri(device), {
|
|
920
971
|
"hvd.ini.encoding": "UTF-8",
|
|
921
|
-
"path": listFileItem.getContent()
|
|
972
|
+
"path": listFileItem.getContent()?.path
|
|
922
973
|
});
|
|
923
974
|
device.setNamedIniFile(namedIniFile);
|
|
924
975
|
await namedIniFile.write();
|
|
@@ -1268,58 +1319,64 @@ let OptionsResolver;
|
|
|
1268
1319
|
_OptionsResolver.resolveAdapter = resolveAdapter;
|
|
1269
1320
|
async function resolveImageManagerOptions(options) {
|
|
1270
1321
|
const adapter = await resolveAdapter(options.adapter);
|
|
1271
|
-
const { os, join, process, URI } = adapter;
|
|
1322
|
+
const { os, join, process, URI, fs } = adapter;
|
|
1272
1323
|
function resolveDefaultImageBasePath() {
|
|
1273
1324
|
switch (process.platform) {
|
|
1274
1325
|
case "win32": return typeof process.env.APPDATA === "string" && process.env.APPDATA.length > 0 ? join(URI.file(process.env.APPDATA), "Local", "Huawei", "Sdk") : join(URI.file(os.homedir()), "AppData", "Local", "Huawei", "Sdk");
|
|
1275
1326
|
case "darwin": return join(URI.file(os.homedir()), "Library", "Huawei", "Sdk");
|
|
1276
|
-
default: return join(URI.file(os.homedir()), ".
|
|
1327
|
+
default: return join(URI.file(os.homedir()), ".Huawei", "Sdk");
|
|
1277
1328
|
}
|
|
1278
1329
|
}
|
|
1279
1330
|
function resolveDefaultDeployedPath() {
|
|
1280
1331
|
switch (process.platform) {
|
|
1281
1332
|
case "win32": return typeof process.env.APPDATA === "string" && process.env.APPDATA.length > 0 ? join(URI.file(process.env.APPDATA), "Local", "Huawei", "Emulator", "deployed") : join(URI.file(os.homedir()), "AppData", "Local", "Huawei", "Emulator", "deployed");
|
|
1282
|
-
default: return join(URI.file(os.homedir()), ".
|
|
1333
|
+
default: return join(URI.file(os.homedir()), ".Huawei", "Emulator", "deployed");
|
|
1283
1334
|
}
|
|
1284
1335
|
}
|
|
1285
1336
|
function resolveDefaultSdkPath() {
|
|
1286
1337
|
switch (process.platform) {
|
|
1287
1338
|
case "darwin": return URI.file("/Applications/DevEco-Studio.app/Contents/sdk/default/openharmony");
|
|
1288
1339
|
case "win32": return URI.file("C:\\Program Files\\Huawei\\DevEco Studio\\sdk\\default\\openharmony");
|
|
1289
|
-
default: return join(URI.file(os.homedir()), ".
|
|
1340
|
+
default: return join(URI.file(os.homedir()), ".Huawei", "Sdk", "default", "openharmony");
|
|
1290
1341
|
}
|
|
1291
1342
|
}
|
|
1292
1343
|
function resolveDefaultConfigPath() {
|
|
1293
1344
|
switch (process.platform) {
|
|
1294
1345
|
case "darwin": return join(URI.file(os.homedir()), "Library", "Application Support", "Huawei", "DevEcoStudio6.0");
|
|
1295
1346
|
case "win32": return join(URI.file(process.env.APPDATA ?? os.homedir()), "Roaming", "Huawei", "DevEcoStudio6.0");
|
|
1296
|
-
default: return join(URI.file(os.homedir()), ".
|
|
1347
|
+
default: return join(URI.file(os.homedir()), ".Huawei", "DevEcoStudio6.0");
|
|
1297
1348
|
}
|
|
1298
1349
|
}
|
|
1299
1350
|
function resolveDefaultLogPath() {
|
|
1300
1351
|
switch (process.platform) {
|
|
1301
1352
|
case "darwin": return join(URI.file(os.homedir()), "Library", "Logs", "Huawei", "DevEcoStudio6.0");
|
|
1302
1353
|
case "win32": return join(URI.file(process.env.APPDATA ?? os.homedir()), "Local", "Huawei", "DevEcoStudio6.0", "log");
|
|
1303
|
-
default: return join(URI.file(os.homedir()), ".
|
|
1354
|
+
default: return join(URI.file(os.homedir()), ".Huawei", "DevEcoStudio6.0", "log");
|
|
1304
1355
|
}
|
|
1305
1356
|
}
|
|
1306
1357
|
function resolveDefaultEmulatorPath() {
|
|
1307
1358
|
switch (process.platform) {
|
|
1308
1359
|
case "darwin": return URI.file("/Applications/DevEco-Studio.app/Contents/tools/emulator");
|
|
1309
1360
|
case "win32": return URI.file("C:\\Program Files\\Huawei\\DevEco Studio\\tools\\emulator");
|
|
1310
|
-
default: return join(URI.file(os.homedir()), ".
|
|
1361
|
+
default: return join(URI.file(os.homedir()), ".Huawei", "Emulator");
|
|
1311
1362
|
}
|
|
1312
1363
|
}
|
|
1313
1364
|
const imageBasePath = typeof options.imageBasePath === "string" ? options.imageBasePath ? URI.file(options.imageBasePath) : resolveDefaultImageBasePath() : options.imageBasePath ? options.imageBasePath : resolveDefaultImageBasePath();
|
|
1314
1365
|
const cachePath = typeof options.cachePath === "string" ? options.cachePath ? URI.file(options.cachePath) : join(imageBasePath, "cache") : options.cachePath ? options.cachePath : join(imageBasePath, "cache");
|
|
1366
|
+
const deployedPath = typeof options.deployedPath === "string" ? options.deployedPath ? URI.file(options.deployedPath) : resolveDefaultDeployedPath() : options.deployedPath ? options.deployedPath : resolveDefaultDeployedPath();
|
|
1367
|
+
const sdkPath = typeof options.sdkPath === "string" ? options.sdkPath ? URI.file(options.sdkPath) : resolveDefaultSdkPath() : options.sdkPath ? options.sdkPath : resolveDefaultSdkPath();
|
|
1368
|
+
const configPath = typeof options.configPath === "string" ? options.configPath ? URI.file(options.configPath) : resolveDefaultConfigPath() : options.configPath ? options.configPath : resolveDefaultConfigPath();
|
|
1369
|
+
const logPath = typeof options.logPath === "string" ? options.logPath ? URI.file(options.logPath) : resolveDefaultLogPath() : options.logPath ? options.logPath : resolveDefaultLogPath();
|
|
1370
|
+
const emulatorPath = typeof options.emulatorPath === "string" ? options.emulatorPath ? URI.file(options.emulatorPath) : resolveDefaultEmulatorPath() : options.emulatorPath ? options.emulatorPath : resolveDefaultEmulatorPath();
|
|
1315
1371
|
return {
|
|
1316
1372
|
imageBasePath,
|
|
1317
|
-
deployedPath
|
|
1373
|
+
deployedPath,
|
|
1318
1374
|
cachePath,
|
|
1319
|
-
sdkPath
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1375
|
+
sdkPath,
|
|
1376
|
+
defaultSdkPath: await fs.isDirectory(resolveDefaultSdkPath()).then((isDirectory) => isDirectory ? resolveDefaultSdkPath() : void 0, () => void 0),
|
|
1377
|
+
configPath,
|
|
1378
|
+
logPath,
|
|
1379
|
+
emulatorPath,
|
|
1323
1380
|
adapter
|
|
1324
1381
|
};
|
|
1325
1382
|
}
|
package/package.json
CHANGED