@arkts/image-manager 0.1.0 → 0.1.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 +8 -8
- package/dist/index.mjs +8 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -590,20 +590,20 @@ async function resolveImageManagerOptions(options) {
|
|
|
590
590
|
function resolveDefaultEmulatorPath() {
|
|
591
591
|
switch (process.platform) {
|
|
592
592
|
case "darwin": return "/Applications/DevEco-Studio.app/Contents/tools/emulator/Emulator";
|
|
593
|
-
case "win32": return
|
|
593
|
+
case "win32": return "C:\\Program Files\\Huawei\\DevEco Studio\\tools\\emulator\\Emulator.exe";
|
|
594
594
|
default: return path.resolve(os.homedir(), ".huawei", "Emulator");
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
const imageBasePath = options.imageBasePath
|
|
598
|
-
const cachePath = options.cachePath
|
|
597
|
+
const imageBasePath = options.imageBasePath || resolveDefaultImageBasePath();
|
|
598
|
+
const cachePath = options.cachePath || path.resolve(imageBasePath, "cache");
|
|
599
599
|
return {
|
|
600
600
|
imageBasePath,
|
|
601
|
-
deployedPath: options.deployedPath
|
|
601
|
+
deployedPath: options.deployedPath || resolveDefaultDeployedPath(),
|
|
602
602
|
cachePath,
|
|
603
|
-
sdkPath: options.sdkPath
|
|
604
|
-
configPath: options.configPath
|
|
605
|
-
logPath: options.logPath
|
|
606
|
-
emulatorPath: options.emulatorPath
|
|
603
|
+
sdkPath: options.sdkPath || resolveDefaultSdkPath(),
|
|
604
|
+
configPath: options.configPath || resolveDefaultConfigPath(),
|
|
605
|
+
logPath: options.logPath || resolveDefaultLogPath(),
|
|
606
|
+
emulatorPath: options.emulatorPath || resolveDefaultEmulatorPath(),
|
|
607
607
|
path,
|
|
608
608
|
os,
|
|
609
609
|
fs: options.fs ?? await import("node:fs"),
|
package/dist/index.mjs
CHANGED
|
@@ -558,20 +558,20 @@ async function resolveImageManagerOptions(options) {
|
|
|
558
558
|
function resolveDefaultEmulatorPath() {
|
|
559
559
|
switch (process.platform) {
|
|
560
560
|
case "darwin": return "/Applications/DevEco-Studio.app/Contents/tools/emulator/Emulator";
|
|
561
|
-
case "win32": return
|
|
561
|
+
case "win32": return "C:\\Program Files\\Huawei\\DevEco Studio\\tools\\emulator\\Emulator.exe";
|
|
562
562
|
default: return path.resolve(os.homedir(), ".huawei", "Emulator");
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
const imageBasePath = options.imageBasePath
|
|
566
|
-
const cachePath = options.cachePath
|
|
565
|
+
const imageBasePath = options.imageBasePath || resolveDefaultImageBasePath();
|
|
566
|
+
const cachePath = options.cachePath || path.resolve(imageBasePath, "cache");
|
|
567
567
|
return {
|
|
568
568
|
imageBasePath,
|
|
569
|
-
deployedPath: options.deployedPath
|
|
569
|
+
deployedPath: options.deployedPath || resolveDefaultDeployedPath(),
|
|
570
570
|
cachePath,
|
|
571
|
-
sdkPath: options.sdkPath
|
|
572
|
-
configPath: options.configPath
|
|
573
|
-
logPath: options.logPath
|
|
574
|
-
emulatorPath: options.emulatorPath
|
|
571
|
+
sdkPath: options.sdkPath || resolveDefaultSdkPath(),
|
|
572
|
+
configPath: options.configPath || resolveDefaultConfigPath(),
|
|
573
|
+
logPath: options.logPath || resolveDefaultLogPath(),
|
|
574
|
+
emulatorPath: options.emulatorPath || resolveDefaultEmulatorPath(),
|
|
575
575
|
path,
|
|
576
576
|
os,
|
|
577
577
|
fs: options.fs ?? await import("node:fs"),
|
package/package.json
CHANGED