@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 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 path.resolve("C:", "Program Files", "Huawei", "DevEco Studio", "tools", "emulator", "Emulator.exe");
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 ?? resolveDefaultImageBasePath();
598
- const cachePath = options.cachePath ?? path.resolve(imageBasePath, "cache");
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 ?? resolveDefaultDeployedPath(),
601
+ deployedPath: options.deployedPath || resolveDefaultDeployedPath(),
602
602
  cachePath,
603
- sdkPath: options.sdkPath ?? resolveDefaultSdkPath(),
604
- configPath: options.configPath ?? resolveDefaultConfigPath(),
605
- logPath: options.logPath ?? resolveDefaultLogPath(),
606
- emulatorPath: options.emulatorPath ?? resolveDefaultEmulatorPath(),
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 path.resolve("C:", "Program Files", "Huawei", "DevEco Studio", "tools", "emulator", "Emulator.exe");
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 ?? resolveDefaultImageBasePath();
566
- const cachePath = options.cachePath ?? path.resolve(imageBasePath, "cache");
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 ?? resolveDefaultDeployedPath(),
569
+ deployedPath: options.deployedPath || resolveDefaultDeployedPath(),
570
570
  cachePath,
571
- sdkPath: options.sdkPath ?? resolveDefaultSdkPath(),
572
- configPath: options.configPath ?? resolveDefaultConfigPath(),
573
- logPath: options.logPath ?? resolveDefaultLogPath(),
574
- emulatorPath: options.emulatorPath ?? resolveDefaultEmulatorPath(),
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arkts/image-manager",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "description": "OpenHarmony/HarmonyOS qemu image manager.",
6
6
  "author": "Naily Zero <zero@naily.cc> (https://naily.cc)",
7
7
  "license": "MIT",