@oniroproject/core 0.14.1 → 0.15.0

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.d.cts CHANGED
@@ -161,6 +161,12 @@ interface SdkRelease {
161
161
  */
162
162
  declare const ALL_SDKS: readonly SdkRelease[];
163
163
  declare const OHOS_URL_BASE = "https://repo.huaweicloud.com/openharmony/os";
164
+ /**
165
+ * OpenHarmony daily builds. The full SDK (with `@systemapi` declarations) is not on the
166
+ * release mirror; its `ohos-sdk-full` archives are published here, to be installed with
167
+ * `installSdkFromArchive`.
168
+ */
169
+ declare const OHOS_DAILY_BUILDS_URL = "https://dcp.openharmony.cn/workbench/cicd/dailybuild/dailylist";
164
170
 
165
171
  type OsFolder = 'linux' | 'darwin' | 'windows';
166
172
  /**
@@ -382,9 +388,15 @@ interface ExtractZipOptions {
382
388
  */
383
389
  declare function extractZipWithProgress(opts: ExtractZipOptions): Promise<void>;
384
390
  /**
385
- * Extract a tar/tar.gz/tar.bz2 archive. Wraps `tar.x`.
391
+ * Extract a tar/tar.gz/tar.bz2 archive. Wraps `tar.x`; `filter` receives each entry's
392
+ * archive path and skips the entry when it returns false.
386
393
  */
387
- declare function extractTarball(tarPath: string, dest: string, strip?: number): Promise<void>;
394
+ declare function extractTarball(tarPath: string, dest: string, strip?: number, filter?: (entryPath: string) => boolean): Promise<void>;
395
+ /**
396
+ * Contents of the first entry of a ZIP whose name `match` accepts, or undefined. Reads
397
+ * only the central directory and that entry, so it is cheap on multi-hundred-MB ZIPs.
398
+ */
399
+ declare function readZipEntry(zipPath: string, match: (entryName: string) => boolean): Promise<Buffer | undefined>;
388
400
 
389
401
  interface SdkInfo {
390
402
  version: string;
@@ -434,6 +446,49 @@ interface InstallSdkOptions {
434
446
  * 95..100 Finalize + cleanup
435
447
  */
436
448
  declare function downloadAndInstallSdk(opts: InstallSdkOptions): Promise<void>;
449
+ interface InstallSdkFromArchiveOptions {
450
+ config: ConfigProvider;
451
+ /**
452
+ * A local SDK tarball: an `ohos-sdk-full` archive from the daily builds
453
+ * (`OHOS_DAILY_BUILDS_URL`), or a public release downloaded by hand.
454
+ */
455
+ archivePath: string;
456
+ /** Replace an SDK already installed at the archive's API level. */
457
+ force?: boolean;
458
+ progress?: ProgressReporter;
459
+ abortSignal?: AbortSignal;
460
+ logger?: Logger;
461
+ /** Scratch directory for the extract temporaries; see {@link InstallSdkOptions.tmpDir}. */
462
+ tmpDir?: string;
463
+ }
464
+ interface InstalledSdk {
465
+ /** API level, from the components' `oh-uni-package.json` (e.g. `26`). */
466
+ api: string;
467
+ /** SDK build version from the same file (e.g. `26.0.0.39`). */
468
+ version: string;
469
+ /** Where it was installed: `<sdkRootDir>/<os>/<api>`. */
470
+ dir: string;
471
+ }
472
+ /**
473
+ * Install an OpenHarmony SDK from a local tarball into `<sdkRootDir>/<os>/<api>`. This
474
+ * is how the full SDK, which the release mirror does not carry, gets installed.
475
+ *
476
+ * Only the current OS's folder is unpacked, wherever it sits in the archive (the full
477
+ * SDK packs `linux`, `ohos` and `windows` side by side under `ohos-sdk/`), and the API
478
+ * level is read from the components rather than taken from the caller.
479
+ *
480
+ * Progress budget (overall 0..100):
481
+ * 0..40 Tarball extract
482
+ * 40..95 Component ZIP extracts
483
+ * 95..100 Finalize + cleanup
484
+ */
485
+ declare function installSdkFromArchive(opts: InstallSdkFromArchiveOptions): Promise<InstalledSdk>;
486
+ /**
487
+ * The shallowest `<osFolder>` directory under `root` that holds component ZIPs, or
488
+ * undefined. SDK tarballs nest it at different depths (`windows/`, `ohos-sdk/windows/`,
489
+ * deeper on macOS).
490
+ */
491
+ declare function findSdkOsDir(root: string, osFolder: OsFolder, maxDepth?: number): string | undefined;
437
492
 
438
493
  /**
439
494
  * Resolve the per-platform download URL for the OpenHarmony command-line tools.
@@ -1687,6 +1742,12 @@ declare function streamHilog(opts: StreamHilogOptions): ChildProcessWithoutNullS
1687
1742
  declare function parseHilogLine(line: string): HilogEntry | null;
1688
1743
  /** Collapse consecutive duplicate entries (same level/tag/message), ignoring time/pid. */
1689
1744
  declare function dedupEntries(entries: HilogEntry[]): HilogEntry[];
1745
+ /**
1746
+ * A hilog `time` ("MM-DD HH:MM:SS.mmm", no year) as `Date.UTC` ms, in the year
1747
+ * that puts it closest to `referenceMs`, so a December 31st line read on
1748
+ * January 1st lands in the previous year. Null when `time` has another form.
1749
+ */
1750
+ declare function hilogTimeMs(time: string, referenceMs: number): number | null;
1690
1751
  interface WaitForLogOptions {
1691
1752
  config: ConfigProvider;
1692
1753
  /** Tested against `"<tag>: <message>"` of each parsed line. */
@@ -1696,14 +1757,20 @@ interface WaitForLogOptions {
1696
1757
  bundle?: string;
1697
1758
  domain?: string | number;
1698
1759
  deviceSerial?: string;
1760
+ /**
1761
+ * Also match lines logged up to this long before the call. By default (0) only
1762
+ * lines from the call onwards count, measured on the device clock to the second.
1763
+ * `Infinity` matches everything still in the device buffer.
1764
+ */
1765
+ lookbackMs?: number;
1699
1766
  abortSignal?: AbortSignal;
1700
1767
  logger?: Logger;
1701
1768
  }
1702
1769
  /**
1703
- * Resolve with the first hilog entry whose `"<tag>: <message>"` matches `pattern`.
1704
- * The underlying stream is auto-respawned if it dies before the deadline, so the
1705
- * wait survives a reboot mid-observation. Rejects on timeout (OniroError) or
1706
- * abort (CancelledError).
1770
+ * Resolve with the first hilog entry whose `"<tag>: <message>"` matches `pattern`
1771
+ * and that was logged since the call (see `lookbackMs`). The underlying stream is
1772
+ * auto-respawned if it dies before the deadline, so the wait survives a reboot
1773
+ * mid-observation. Rejects on timeout (OniroError) or abort (CancelledError).
1707
1774
  */
1708
1775
  declare function waitForLog(opts: WaitForLogOptions): Promise<HilogEntry>;
1709
1776
  interface WatchLogOptions {
@@ -1716,10 +1783,15 @@ interface WatchLogOptions {
1716
1783
  deviceSerial?: string;
1717
1784
  /** Collapse consecutive duplicate lines. Default true. */
1718
1785
  dedup?: boolean;
1786
+ /** Also collect lines logged up to this long before the call; see {@link WaitForLogOptions.lookbackMs}. */
1787
+ lookbackMs?: number;
1719
1788
  abortSignal?: AbortSignal;
1720
1789
  logger?: Logger;
1721
1790
  }
1722
- /** Collect all hilog entries matching `pattern` for `durationMs`. Deduped by default. */
1791
+ /**
1792
+ * Collect the hilog entries matching `pattern` that are logged during `durationMs`
1793
+ * (see `lookbackMs`). Deduped by default.
1794
+ */
1723
1795
  declare function watchLog(opts: WatchLogOptions): Promise<HilogEntry[]>;
1724
1796
  interface CaptureLogOptions {
1725
1797
  config: ConfigProvider;
@@ -1833,10 +1905,12 @@ interface DiscoverHapsOptions {
1833
1905
  /**
1834
1906
  * Walk a project's build outputs and group `*-signed.hap` / `*-unsigned.hap`
1835
1907
  * by build module name (parsed from the HAP filename). Skips `node_modules` /
1836
- * `oh_modules` / `.git`. Ported from the proven MCP `findHaps`, extended with
1837
- * per-module grouping so multi-module projects can install the right HAP.
1838
- * Each list is newest first, so a fresh build wins over HAPs committed to the
1839
- * repository. Empty object when nothing is built.
1908
+ * `oh_modules` / `.git`, and, when `projectDir` is an app project root, any
1909
+ * other app project nested inside it, whose HAPs belong to another app.
1910
+ * Ported from the proven MCP `findHaps`, extended with per-module grouping so
1911
+ * multi-module projects can install the right HAP. Each list is newest first,
1912
+ * so a fresh build wins over HAPs committed to the repository. Empty object
1913
+ * when nothing is built.
1840
1914
  */
1841
1915
  declare function discoverHaps(opts: DiscoverHapsOptions): Promise<Record<string, ModuleHaps>>;
1842
1916
  interface PickedHap {
@@ -1936,6 +2010,12 @@ declare function cleanCodelinterOutput(output: string): string;
1936
2010
  declare function parseCodelinterReport(output: string): CodelinterReport;
1937
2011
  /** The findings of a codelinter report; see {@link parseCodelinterReport}. */
1938
2012
  declare function parseCodelinterFindings(output: string): CodelinterFinding[];
2013
+ /**
2014
+ * Which of the project-root files codelinter needs are missing from `projectDir`,
2015
+ * each named by its first form. Without them codelinter exits non-zero without a
2016
+ * report, and says neither why nor which file.
2017
+ */
2018
+ declare function missingProjectRootFiles(projectDir: string): string[];
1939
2019
  interface RunCodelinterOptions {
1940
2020
  config: ConfigProvider;
1941
2021
  projectDir: string;
@@ -2229,6 +2309,11 @@ interface ApplyChangesResult {
2229
2309
  */
2230
2310
  declare function applyChanges(opts: ApplyChangesOptions): Promise<ApplyChangesResult>;
2231
2311
 
2312
+ /** `app.bundleName` from the text of a HAP's `module.json` (stage model) or `config.json` (FA model), or null. */
2313
+ declare function bundleNameFromHapConfig(text: string): string | null;
2314
+ /** The bundle a HAP installs as, read from its `module.json` or `config.json`; null when neither names one. */
2315
+ declare function readHapBundleName(hapPath: string): Promise<string | null>;
2316
+
2232
2317
  /**
2233
2318
  * Which runtime a project targets. OpenHarmony projects build against the public
2234
2319
  * OpenHarmony SDK; HarmonyOS projects build against Huawei's HarmonyOS SDK and
@@ -2525,4 +2610,4 @@ declare function harmonyOsAutoSign(opts: HarmonyOsAutoSignOptions): Promise<Harm
2525
2610
 
2526
2611
  declare const VERSION: string;
2527
2612
 
2528
- export { ALL_SDKS, APL_VALUES, APP_FEATURE_VALUES, type AbilityInfo, type AgcAuthInfo, AgcError, type Apl, type AppFeature, type ApplyChangesOptions, type ApplyChangesResult, type BuildHapOptions, type BuildHapResult, type BundleOptions, CancelledError, type CaptureBurstOptions, type CaptureLogOptions, type CaptureLogResult, ChecksumMismatchError, type CmdToolsFlavour, CmdToolsNotInstalledError, type CmdToolsStatus, type CmdWrapper, type CodelinterFinding, type CodelinterReport, type CodelinterResult, type CodelinterSummary, CommandFailedError, type ConfigKey, type ConfigProvider, type CreateScaffoldOptions, type CreateScaffoldResult, type DeveloperAgreementStatus, type DeviceFullInfo, type DeviceInfo, type DiscoverHapsOptions, type DisplaySize, type DisplaySizeOptions, type DownloadOptions, type DumpLayoutOptions, type DumpLayoutResult, type DumpLogOptions, type EmulatorStatus, type ExtractZipOptions, type FlatLayoutNode, type GenerateSigningConfigsOptions, type GestureUitestOptions, type GetDeviceInfoOptions, HARMONYOS_SDK_VERSIONS, HUAWEI_SITES, type HapAssetDiff, type HarmonyOsAutoSignOptions, type HarmonyOsSdk, type HarmonyOsSession, type HarmonyOsSessionOptions, type HarmonyOsSigningResult, type HdcExecOptions, type HdcExecResult, type HdcShellOptions, type HidumperOptions, type HilogEntry, type HilogLevel, type HuaweiSite, type HuaweiSiteCode, type HuaweiTeam, type HuaweiUserInfo, INSTALL_TMP_DIRNAME, type InputType, type InstallAppOptions, type InstallAppResult, type InstallCandidate, type InstallCmdToolsOptions, type InstallEmulatorOptions, type InstallMethod, type InstallSdkOptions, type InstallTempDir, type InstallTempDirOptions, InsufficientSpaceError, type KeyboardState, type LaunchAppOptions, type LayoutNode, type LayoutSelector, type LocateTargetOptions, type LocatedTarget, type Logger, type ModuleHaps, OHOS_URL_BASE, type OniroContext, OniroError, type OsFolder, type OutputSink, type ParamOptions, type PerformInputOptions, type PerformInputResult, type PickTargetFailure, type PickedHap, type PrepareSigningOptions, type PrepareSigningResult, type ProgressReporter, type ProgressUpdate, type ProjectModule, type Prompter, type ProvisionProfileInfo, type RawLayoutNode, type RawTouchEvent, type RebootDecision, type RebootOptions, type RecvFileOptions, type RunCodelinterOptions, type RunHvigorwOptions, type RunHvigorwResult, type RunOhpmOptions, type RunProcessOptions, type RunningProcess, type RuntimeOs, SIGNING_ERRORS, type ScreenDump, type Screenshot, type ScreenshotOptions, type SdkArchiveInfo, type SdkInfo, SdkNotInstalledError, type SdkRelease, type SendFileOptions, type SendGestureOptions, type SendInputOptions, type SendRawTouchOptions, type SetHilogLevelOptions, type SigningKind, type SigningMaterialPaths, type SigningPasswords, type StartEmulatorOptions, type StoredSession, type StreamHilogOptions, TMP_DIR_HINT, TargetNotFoundError, type TemplateOption, type TokenStore, type UiInputType, UnsupportedPlatformError, VERSION, type WaitForBootOptions, type WaitForBundleOptions, type WaitForConditionOptions, type WaitForLogOptions, type WaitForTargetOptions, type WatchLogOptions, type Waypoint, appSandboxDir, applyChanges, assertDevicePath, assertLayoutSelector, attemptHdcConnection, buildCmdWrapper, buildGestureCommands, buildGestureUitestCommand, buildHap, buildHvigorwArgs, buildInputCommand, buildRawTouchCommand, captureBurst, captureLog, cleanCodelinterOutput, consoleLogger, createHarmonyOsSession, createInstallTempDir, createMaterial, createScaffold, createTempWorkDir, createTokenStore, decideInstallMethod, decideReboot, decryptPwd, dedupEntries, defaultContext, defaultPaths, describeLayoutNode, detectAaStartFailure, detectCmdToolsFlavour, detectInstallFailure, detectProjectSdkVersion, detectRuntimeOs, detectSigningConfigNames, diagnoseBuildFailure, diffEntryNames, diffHapAssets, discoverHaps, downloadAndInstallSdk, downloadFile, dumpLayout, dumpLog, dumpRenderService, dumpScreen, dumpWindow, encryptPwd, ensureFreeSpace, ensureInstallOk, ensureOhModules, ensureOk, ensureRemoteOk, escapeCmdArgument, escapeCmdCommand, existingHapOrUnsigned, extractTarball, extractZipWithProgress, findAppProcessId, findCmdToolsSourceDir, findCoveredNodes, findHarmonyOsSdk, findKeyboardWindow, findLayoutNodes, findMissingProjectSdk, findRunningProcess, flattenLayout, forceStop, formatBytes, generateSigningConfigs, getBundleName, getCmdToolsBin, getCmdToolsDownloadUrl, getCmdToolsPath, getCmdToolsStatus, getDeviceInfo, getDisplaySize, getEmulatorDir, getEmulatorStatus, getFreeSpaceBytes, getHdcPath, getHvigorwPath, getImeBundles, getInstalledSdks, getKey, getMainAbility, getOhosBaseSdkHome, getOhpmPath, getOsFolder, getSdkFilename, getSdkRootDir, getSupportedSdksForUi, harmonyOsAutoSign, harmonyOsSdkLabelForApi, hdcClientFailure, hdcExec, hdcTargetArgs, hdcTargetArgsFor, hideKeyboard, installApp, installCmdTools, installEmulator, installFailureReason, isBundleInstalled, isCmdToolsInstalled, isEmulatorInstalled, isOutOfSpaceError, isRamBackedPath, isUnsignedHap, isValidBundleName, isValidProjectName, killProcessTree, launchApp, listAbilities, listDevices, listModules, listRunningProcesses, listTemplates, locateTarget, needsCmdWrapper, nonInteractivePrompter, noopLogger, noopProgress, normaliseLocalPath, paramGet, paramGetMany, paramSet, parseBounds, parseCodelinterFindings, parseCodelinterReport, parseDeviceList, parseHilogLine, parseImeBundles, parseMainAbilityFromBmDump, parseParamValues, parseRemoteExit, performInput, pickHap, pickSigningKind, pickTarget, prepareSigning, pruneLayout, readJson5File, readJsonFile, readProvisionProfile, reboot, recvFile, removeCmdTools, removeEmulator, removeSdk, removeTempWorkDir, requireHarmonyOsSdk, resolveDeviceSerial, resolveKeyEvent, resolveTmpRoot, runCodelinter, runHvigorw, runOhpm, runProcess, scopedLogger, selectDevice, sendFile, sendGesture, sendInput, sendRawTouch, setHilogLevel, shell, shellChecked, spawnCompat, startEmulator, staticConfig, stopEmulator, streamHilog, takeScreenshot, toLongPath, toSpaceError, uninstallApp, unsignedHapRejection, validateTemplateLayout, verifySha256, waitForBoot, waitForBundle, waitForCondition, waitForLog, waitForTarget, watchLog, waypointsToRawEvents, withoutWindow, writeJson5File, writeJsonFile };
2613
+ export { ALL_SDKS, APL_VALUES, APP_FEATURE_VALUES, type AbilityInfo, type AgcAuthInfo, AgcError, type Apl, type AppFeature, type ApplyChangesOptions, type ApplyChangesResult, type BuildHapOptions, type BuildHapResult, type BundleOptions, CancelledError, type CaptureBurstOptions, type CaptureLogOptions, type CaptureLogResult, ChecksumMismatchError, type CmdToolsFlavour, CmdToolsNotInstalledError, type CmdToolsStatus, type CmdWrapper, type CodelinterFinding, type CodelinterReport, type CodelinterResult, type CodelinterSummary, CommandFailedError, type ConfigKey, type ConfigProvider, type CreateScaffoldOptions, type CreateScaffoldResult, type DeveloperAgreementStatus, type DeviceFullInfo, type DeviceInfo, type DiscoverHapsOptions, type DisplaySize, type DisplaySizeOptions, type DownloadOptions, type DumpLayoutOptions, type DumpLayoutResult, type DumpLogOptions, type EmulatorStatus, type ExtractZipOptions, type FlatLayoutNode, type GenerateSigningConfigsOptions, type GestureUitestOptions, type GetDeviceInfoOptions, HARMONYOS_SDK_VERSIONS, HUAWEI_SITES, type HapAssetDiff, type HarmonyOsAutoSignOptions, type HarmonyOsSdk, type HarmonyOsSession, type HarmonyOsSessionOptions, type HarmonyOsSigningResult, type HdcExecOptions, type HdcExecResult, type HdcShellOptions, type HidumperOptions, type HilogEntry, type HilogLevel, type HuaweiSite, type HuaweiSiteCode, type HuaweiTeam, type HuaweiUserInfo, INSTALL_TMP_DIRNAME, type InputType, type InstallAppOptions, type InstallAppResult, type InstallCandidate, type InstallCmdToolsOptions, type InstallEmulatorOptions, type InstallMethod, type InstallSdkFromArchiveOptions, type InstallSdkOptions, type InstallTempDir, type InstallTempDirOptions, type InstalledSdk, InsufficientSpaceError, type KeyboardState, type LaunchAppOptions, type LayoutNode, type LayoutSelector, type LocateTargetOptions, type LocatedTarget, type Logger, type ModuleHaps, OHOS_DAILY_BUILDS_URL, OHOS_URL_BASE, type OniroContext, OniroError, type OsFolder, type OutputSink, type ParamOptions, type PerformInputOptions, type PerformInputResult, type PickTargetFailure, type PickedHap, type PrepareSigningOptions, type PrepareSigningResult, type ProgressReporter, type ProgressUpdate, type ProjectModule, type Prompter, type ProvisionProfileInfo, type RawLayoutNode, type RawTouchEvent, type RebootDecision, type RebootOptions, type RecvFileOptions, type RunCodelinterOptions, type RunHvigorwOptions, type RunHvigorwResult, type RunOhpmOptions, type RunProcessOptions, type RunningProcess, type RuntimeOs, SIGNING_ERRORS, type ScreenDump, type Screenshot, type ScreenshotOptions, type SdkArchiveInfo, type SdkInfo, SdkNotInstalledError, type SdkRelease, type SendFileOptions, type SendGestureOptions, type SendInputOptions, type SendRawTouchOptions, type SetHilogLevelOptions, type SigningKind, type SigningMaterialPaths, type SigningPasswords, type StartEmulatorOptions, type StoredSession, type StreamHilogOptions, TMP_DIR_HINT, TargetNotFoundError, type TemplateOption, type TokenStore, type UiInputType, UnsupportedPlatformError, VERSION, type WaitForBootOptions, type WaitForBundleOptions, type WaitForConditionOptions, type WaitForLogOptions, type WaitForTargetOptions, type WatchLogOptions, type Waypoint, appSandboxDir, applyChanges, assertDevicePath, assertLayoutSelector, attemptHdcConnection, buildCmdWrapper, buildGestureCommands, buildGestureUitestCommand, buildHap, buildHvigorwArgs, buildInputCommand, buildRawTouchCommand, bundleNameFromHapConfig, captureBurst, captureLog, cleanCodelinterOutput, consoleLogger, createHarmonyOsSession, createInstallTempDir, createMaterial, createScaffold, createTempWorkDir, createTokenStore, decideInstallMethod, decideReboot, decryptPwd, dedupEntries, defaultContext, defaultPaths, describeLayoutNode, detectAaStartFailure, detectCmdToolsFlavour, detectInstallFailure, detectProjectSdkVersion, detectRuntimeOs, detectSigningConfigNames, diagnoseBuildFailure, diffEntryNames, diffHapAssets, discoverHaps, downloadAndInstallSdk, downloadFile, dumpLayout, dumpLog, dumpRenderService, dumpScreen, dumpWindow, encryptPwd, ensureFreeSpace, ensureInstallOk, ensureOhModules, ensureOk, ensureRemoteOk, escapeCmdArgument, escapeCmdCommand, existingHapOrUnsigned, extractTarball, extractZipWithProgress, findAppProcessId, findCmdToolsSourceDir, findCoveredNodes, findHarmonyOsSdk, findKeyboardWindow, findLayoutNodes, findMissingProjectSdk, findRunningProcess, findSdkOsDir, flattenLayout, forceStop, formatBytes, generateSigningConfigs, getBundleName, getCmdToolsBin, getCmdToolsDownloadUrl, getCmdToolsPath, getCmdToolsStatus, getDeviceInfo, getDisplaySize, getEmulatorDir, getEmulatorStatus, getFreeSpaceBytes, getHdcPath, getHvigorwPath, getImeBundles, getInstalledSdks, getKey, getMainAbility, getOhosBaseSdkHome, getOhpmPath, getOsFolder, getSdkFilename, getSdkRootDir, getSupportedSdksForUi, harmonyOsAutoSign, harmonyOsSdkLabelForApi, hdcClientFailure, hdcExec, hdcTargetArgs, hdcTargetArgsFor, hideKeyboard, hilogTimeMs, installApp, installCmdTools, installEmulator, installFailureReason, installSdkFromArchive, isBundleInstalled, isCmdToolsInstalled, isEmulatorInstalled, isOutOfSpaceError, isRamBackedPath, isUnsignedHap, isValidBundleName, isValidProjectName, killProcessTree, launchApp, listAbilities, listDevices, listModules, listRunningProcesses, listTemplates, locateTarget, missingProjectRootFiles, needsCmdWrapper, nonInteractivePrompter, noopLogger, noopProgress, normaliseLocalPath, paramGet, paramGetMany, paramSet, parseBounds, parseCodelinterFindings, parseCodelinterReport, parseDeviceList, parseHilogLine, parseImeBundles, parseMainAbilityFromBmDump, parseParamValues, parseRemoteExit, performInput, pickHap, pickSigningKind, pickTarget, prepareSigning, pruneLayout, readHapBundleName, readJson5File, readJsonFile, readProvisionProfile, readZipEntry, reboot, recvFile, removeCmdTools, removeEmulator, removeSdk, removeTempWorkDir, requireHarmonyOsSdk, resolveDeviceSerial, resolveKeyEvent, resolveTmpRoot, runCodelinter, runHvigorw, runOhpm, runProcess, scopedLogger, selectDevice, sendFile, sendGesture, sendInput, sendRawTouch, setHilogLevel, shell, shellChecked, spawnCompat, startEmulator, staticConfig, stopEmulator, streamHilog, takeScreenshot, toLongPath, toSpaceError, uninstallApp, unsignedHapRejection, validateTemplateLayout, verifySha256, waitForBoot, waitForBundle, waitForCondition, waitForLog, waitForTarget, watchLog, waypointsToRawEvents, withoutWindow, writeJson5File, writeJsonFile };
package/dist/index.d.ts CHANGED
@@ -161,6 +161,12 @@ interface SdkRelease {
161
161
  */
162
162
  declare const ALL_SDKS: readonly SdkRelease[];
163
163
  declare const OHOS_URL_BASE = "https://repo.huaweicloud.com/openharmony/os";
164
+ /**
165
+ * OpenHarmony daily builds. The full SDK (with `@systemapi` declarations) is not on the
166
+ * release mirror; its `ohos-sdk-full` archives are published here, to be installed with
167
+ * `installSdkFromArchive`.
168
+ */
169
+ declare const OHOS_DAILY_BUILDS_URL = "https://dcp.openharmony.cn/workbench/cicd/dailybuild/dailylist";
164
170
 
165
171
  type OsFolder = 'linux' | 'darwin' | 'windows';
166
172
  /**
@@ -382,9 +388,15 @@ interface ExtractZipOptions {
382
388
  */
383
389
  declare function extractZipWithProgress(opts: ExtractZipOptions): Promise<void>;
384
390
  /**
385
- * Extract a tar/tar.gz/tar.bz2 archive. Wraps `tar.x`.
391
+ * Extract a tar/tar.gz/tar.bz2 archive. Wraps `tar.x`; `filter` receives each entry's
392
+ * archive path and skips the entry when it returns false.
386
393
  */
387
- declare function extractTarball(tarPath: string, dest: string, strip?: number): Promise<void>;
394
+ declare function extractTarball(tarPath: string, dest: string, strip?: number, filter?: (entryPath: string) => boolean): Promise<void>;
395
+ /**
396
+ * Contents of the first entry of a ZIP whose name `match` accepts, or undefined. Reads
397
+ * only the central directory and that entry, so it is cheap on multi-hundred-MB ZIPs.
398
+ */
399
+ declare function readZipEntry(zipPath: string, match: (entryName: string) => boolean): Promise<Buffer | undefined>;
388
400
 
389
401
  interface SdkInfo {
390
402
  version: string;
@@ -434,6 +446,49 @@ interface InstallSdkOptions {
434
446
  * 95..100 Finalize + cleanup
435
447
  */
436
448
  declare function downloadAndInstallSdk(opts: InstallSdkOptions): Promise<void>;
449
+ interface InstallSdkFromArchiveOptions {
450
+ config: ConfigProvider;
451
+ /**
452
+ * A local SDK tarball: an `ohos-sdk-full` archive from the daily builds
453
+ * (`OHOS_DAILY_BUILDS_URL`), or a public release downloaded by hand.
454
+ */
455
+ archivePath: string;
456
+ /** Replace an SDK already installed at the archive's API level. */
457
+ force?: boolean;
458
+ progress?: ProgressReporter;
459
+ abortSignal?: AbortSignal;
460
+ logger?: Logger;
461
+ /** Scratch directory for the extract temporaries; see {@link InstallSdkOptions.tmpDir}. */
462
+ tmpDir?: string;
463
+ }
464
+ interface InstalledSdk {
465
+ /** API level, from the components' `oh-uni-package.json` (e.g. `26`). */
466
+ api: string;
467
+ /** SDK build version from the same file (e.g. `26.0.0.39`). */
468
+ version: string;
469
+ /** Where it was installed: `<sdkRootDir>/<os>/<api>`. */
470
+ dir: string;
471
+ }
472
+ /**
473
+ * Install an OpenHarmony SDK from a local tarball into `<sdkRootDir>/<os>/<api>`. This
474
+ * is how the full SDK, which the release mirror does not carry, gets installed.
475
+ *
476
+ * Only the current OS's folder is unpacked, wherever it sits in the archive (the full
477
+ * SDK packs `linux`, `ohos` and `windows` side by side under `ohos-sdk/`), and the API
478
+ * level is read from the components rather than taken from the caller.
479
+ *
480
+ * Progress budget (overall 0..100):
481
+ * 0..40 Tarball extract
482
+ * 40..95 Component ZIP extracts
483
+ * 95..100 Finalize + cleanup
484
+ */
485
+ declare function installSdkFromArchive(opts: InstallSdkFromArchiveOptions): Promise<InstalledSdk>;
486
+ /**
487
+ * The shallowest `<osFolder>` directory under `root` that holds component ZIPs, or
488
+ * undefined. SDK tarballs nest it at different depths (`windows/`, `ohos-sdk/windows/`,
489
+ * deeper on macOS).
490
+ */
491
+ declare function findSdkOsDir(root: string, osFolder: OsFolder, maxDepth?: number): string | undefined;
437
492
 
438
493
  /**
439
494
  * Resolve the per-platform download URL for the OpenHarmony command-line tools.
@@ -1687,6 +1742,12 @@ declare function streamHilog(opts: StreamHilogOptions): ChildProcessWithoutNullS
1687
1742
  declare function parseHilogLine(line: string): HilogEntry | null;
1688
1743
  /** Collapse consecutive duplicate entries (same level/tag/message), ignoring time/pid. */
1689
1744
  declare function dedupEntries(entries: HilogEntry[]): HilogEntry[];
1745
+ /**
1746
+ * A hilog `time` ("MM-DD HH:MM:SS.mmm", no year) as `Date.UTC` ms, in the year
1747
+ * that puts it closest to `referenceMs`, so a December 31st line read on
1748
+ * January 1st lands in the previous year. Null when `time` has another form.
1749
+ */
1750
+ declare function hilogTimeMs(time: string, referenceMs: number): number | null;
1690
1751
  interface WaitForLogOptions {
1691
1752
  config: ConfigProvider;
1692
1753
  /** Tested against `"<tag>: <message>"` of each parsed line. */
@@ -1696,14 +1757,20 @@ interface WaitForLogOptions {
1696
1757
  bundle?: string;
1697
1758
  domain?: string | number;
1698
1759
  deviceSerial?: string;
1760
+ /**
1761
+ * Also match lines logged up to this long before the call. By default (0) only
1762
+ * lines from the call onwards count, measured on the device clock to the second.
1763
+ * `Infinity` matches everything still in the device buffer.
1764
+ */
1765
+ lookbackMs?: number;
1699
1766
  abortSignal?: AbortSignal;
1700
1767
  logger?: Logger;
1701
1768
  }
1702
1769
  /**
1703
- * Resolve with the first hilog entry whose `"<tag>: <message>"` matches `pattern`.
1704
- * The underlying stream is auto-respawned if it dies before the deadline, so the
1705
- * wait survives a reboot mid-observation. Rejects on timeout (OniroError) or
1706
- * abort (CancelledError).
1770
+ * Resolve with the first hilog entry whose `"<tag>: <message>"` matches `pattern`
1771
+ * and that was logged since the call (see `lookbackMs`). The underlying stream is
1772
+ * auto-respawned if it dies before the deadline, so the wait survives a reboot
1773
+ * mid-observation. Rejects on timeout (OniroError) or abort (CancelledError).
1707
1774
  */
1708
1775
  declare function waitForLog(opts: WaitForLogOptions): Promise<HilogEntry>;
1709
1776
  interface WatchLogOptions {
@@ -1716,10 +1783,15 @@ interface WatchLogOptions {
1716
1783
  deviceSerial?: string;
1717
1784
  /** Collapse consecutive duplicate lines. Default true. */
1718
1785
  dedup?: boolean;
1786
+ /** Also collect lines logged up to this long before the call; see {@link WaitForLogOptions.lookbackMs}. */
1787
+ lookbackMs?: number;
1719
1788
  abortSignal?: AbortSignal;
1720
1789
  logger?: Logger;
1721
1790
  }
1722
- /** Collect all hilog entries matching `pattern` for `durationMs`. Deduped by default. */
1791
+ /**
1792
+ * Collect the hilog entries matching `pattern` that are logged during `durationMs`
1793
+ * (see `lookbackMs`). Deduped by default.
1794
+ */
1723
1795
  declare function watchLog(opts: WatchLogOptions): Promise<HilogEntry[]>;
1724
1796
  interface CaptureLogOptions {
1725
1797
  config: ConfigProvider;
@@ -1833,10 +1905,12 @@ interface DiscoverHapsOptions {
1833
1905
  /**
1834
1906
  * Walk a project's build outputs and group `*-signed.hap` / `*-unsigned.hap`
1835
1907
  * by build module name (parsed from the HAP filename). Skips `node_modules` /
1836
- * `oh_modules` / `.git`. Ported from the proven MCP `findHaps`, extended with
1837
- * per-module grouping so multi-module projects can install the right HAP.
1838
- * Each list is newest first, so a fresh build wins over HAPs committed to the
1839
- * repository. Empty object when nothing is built.
1908
+ * `oh_modules` / `.git`, and, when `projectDir` is an app project root, any
1909
+ * other app project nested inside it, whose HAPs belong to another app.
1910
+ * Ported from the proven MCP `findHaps`, extended with per-module grouping so
1911
+ * multi-module projects can install the right HAP. Each list is newest first,
1912
+ * so a fresh build wins over HAPs committed to the repository. Empty object
1913
+ * when nothing is built.
1840
1914
  */
1841
1915
  declare function discoverHaps(opts: DiscoverHapsOptions): Promise<Record<string, ModuleHaps>>;
1842
1916
  interface PickedHap {
@@ -1936,6 +2010,12 @@ declare function cleanCodelinterOutput(output: string): string;
1936
2010
  declare function parseCodelinterReport(output: string): CodelinterReport;
1937
2011
  /** The findings of a codelinter report; see {@link parseCodelinterReport}. */
1938
2012
  declare function parseCodelinterFindings(output: string): CodelinterFinding[];
2013
+ /**
2014
+ * Which of the project-root files codelinter needs are missing from `projectDir`,
2015
+ * each named by its first form. Without them codelinter exits non-zero without a
2016
+ * report, and says neither why nor which file.
2017
+ */
2018
+ declare function missingProjectRootFiles(projectDir: string): string[];
1939
2019
  interface RunCodelinterOptions {
1940
2020
  config: ConfigProvider;
1941
2021
  projectDir: string;
@@ -2229,6 +2309,11 @@ interface ApplyChangesResult {
2229
2309
  */
2230
2310
  declare function applyChanges(opts: ApplyChangesOptions): Promise<ApplyChangesResult>;
2231
2311
 
2312
+ /** `app.bundleName` from the text of a HAP's `module.json` (stage model) or `config.json` (FA model), or null. */
2313
+ declare function bundleNameFromHapConfig(text: string): string | null;
2314
+ /** The bundle a HAP installs as, read from its `module.json` or `config.json`; null when neither names one. */
2315
+ declare function readHapBundleName(hapPath: string): Promise<string | null>;
2316
+
2232
2317
  /**
2233
2318
  * Which runtime a project targets. OpenHarmony projects build against the public
2234
2319
  * OpenHarmony SDK; HarmonyOS projects build against Huawei's HarmonyOS SDK and
@@ -2525,4 +2610,4 @@ declare function harmonyOsAutoSign(opts: HarmonyOsAutoSignOptions): Promise<Harm
2525
2610
 
2526
2611
  declare const VERSION: string;
2527
2612
 
2528
- export { ALL_SDKS, APL_VALUES, APP_FEATURE_VALUES, type AbilityInfo, type AgcAuthInfo, AgcError, type Apl, type AppFeature, type ApplyChangesOptions, type ApplyChangesResult, type BuildHapOptions, type BuildHapResult, type BundleOptions, CancelledError, type CaptureBurstOptions, type CaptureLogOptions, type CaptureLogResult, ChecksumMismatchError, type CmdToolsFlavour, CmdToolsNotInstalledError, type CmdToolsStatus, type CmdWrapper, type CodelinterFinding, type CodelinterReport, type CodelinterResult, type CodelinterSummary, CommandFailedError, type ConfigKey, type ConfigProvider, type CreateScaffoldOptions, type CreateScaffoldResult, type DeveloperAgreementStatus, type DeviceFullInfo, type DeviceInfo, type DiscoverHapsOptions, type DisplaySize, type DisplaySizeOptions, type DownloadOptions, type DumpLayoutOptions, type DumpLayoutResult, type DumpLogOptions, type EmulatorStatus, type ExtractZipOptions, type FlatLayoutNode, type GenerateSigningConfigsOptions, type GestureUitestOptions, type GetDeviceInfoOptions, HARMONYOS_SDK_VERSIONS, HUAWEI_SITES, type HapAssetDiff, type HarmonyOsAutoSignOptions, type HarmonyOsSdk, type HarmonyOsSession, type HarmonyOsSessionOptions, type HarmonyOsSigningResult, type HdcExecOptions, type HdcExecResult, type HdcShellOptions, type HidumperOptions, type HilogEntry, type HilogLevel, type HuaweiSite, type HuaweiSiteCode, type HuaweiTeam, type HuaweiUserInfo, INSTALL_TMP_DIRNAME, type InputType, type InstallAppOptions, type InstallAppResult, type InstallCandidate, type InstallCmdToolsOptions, type InstallEmulatorOptions, type InstallMethod, type InstallSdkOptions, type InstallTempDir, type InstallTempDirOptions, InsufficientSpaceError, type KeyboardState, type LaunchAppOptions, type LayoutNode, type LayoutSelector, type LocateTargetOptions, type LocatedTarget, type Logger, type ModuleHaps, OHOS_URL_BASE, type OniroContext, OniroError, type OsFolder, type OutputSink, type ParamOptions, type PerformInputOptions, type PerformInputResult, type PickTargetFailure, type PickedHap, type PrepareSigningOptions, type PrepareSigningResult, type ProgressReporter, type ProgressUpdate, type ProjectModule, type Prompter, type ProvisionProfileInfo, type RawLayoutNode, type RawTouchEvent, type RebootDecision, type RebootOptions, type RecvFileOptions, type RunCodelinterOptions, type RunHvigorwOptions, type RunHvigorwResult, type RunOhpmOptions, type RunProcessOptions, type RunningProcess, type RuntimeOs, SIGNING_ERRORS, type ScreenDump, type Screenshot, type ScreenshotOptions, type SdkArchiveInfo, type SdkInfo, SdkNotInstalledError, type SdkRelease, type SendFileOptions, type SendGestureOptions, type SendInputOptions, type SendRawTouchOptions, type SetHilogLevelOptions, type SigningKind, type SigningMaterialPaths, type SigningPasswords, type StartEmulatorOptions, type StoredSession, type StreamHilogOptions, TMP_DIR_HINT, TargetNotFoundError, type TemplateOption, type TokenStore, type UiInputType, UnsupportedPlatformError, VERSION, type WaitForBootOptions, type WaitForBundleOptions, type WaitForConditionOptions, type WaitForLogOptions, type WaitForTargetOptions, type WatchLogOptions, type Waypoint, appSandboxDir, applyChanges, assertDevicePath, assertLayoutSelector, attemptHdcConnection, buildCmdWrapper, buildGestureCommands, buildGestureUitestCommand, buildHap, buildHvigorwArgs, buildInputCommand, buildRawTouchCommand, captureBurst, captureLog, cleanCodelinterOutput, consoleLogger, createHarmonyOsSession, createInstallTempDir, createMaterial, createScaffold, createTempWorkDir, createTokenStore, decideInstallMethod, decideReboot, decryptPwd, dedupEntries, defaultContext, defaultPaths, describeLayoutNode, detectAaStartFailure, detectCmdToolsFlavour, detectInstallFailure, detectProjectSdkVersion, detectRuntimeOs, detectSigningConfigNames, diagnoseBuildFailure, diffEntryNames, diffHapAssets, discoverHaps, downloadAndInstallSdk, downloadFile, dumpLayout, dumpLog, dumpRenderService, dumpScreen, dumpWindow, encryptPwd, ensureFreeSpace, ensureInstallOk, ensureOhModules, ensureOk, ensureRemoteOk, escapeCmdArgument, escapeCmdCommand, existingHapOrUnsigned, extractTarball, extractZipWithProgress, findAppProcessId, findCmdToolsSourceDir, findCoveredNodes, findHarmonyOsSdk, findKeyboardWindow, findLayoutNodes, findMissingProjectSdk, findRunningProcess, flattenLayout, forceStop, formatBytes, generateSigningConfigs, getBundleName, getCmdToolsBin, getCmdToolsDownloadUrl, getCmdToolsPath, getCmdToolsStatus, getDeviceInfo, getDisplaySize, getEmulatorDir, getEmulatorStatus, getFreeSpaceBytes, getHdcPath, getHvigorwPath, getImeBundles, getInstalledSdks, getKey, getMainAbility, getOhosBaseSdkHome, getOhpmPath, getOsFolder, getSdkFilename, getSdkRootDir, getSupportedSdksForUi, harmonyOsAutoSign, harmonyOsSdkLabelForApi, hdcClientFailure, hdcExec, hdcTargetArgs, hdcTargetArgsFor, hideKeyboard, installApp, installCmdTools, installEmulator, installFailureReason, isBundleInstalled, isCmdToolsInstalled, isEmulatorInstalled, isOutOfSpaceError, isRamBackedPath, isUnsignedHap, isValidBundleName, isValidProjectName, killProcessTree, launchApp, listAbilities, listDevices, listModules, listRunningProcesses, listTemplates, locateTarget, needsCmdWrapper, nonInteractivePrompter, noopLogger, noopProgress, normaliseLocalPath, paramGet, paramGetMany, paramSet, parseBounds, parseCodelinterFindings, parseCodelinterReport, parseDeviceList, parseHilogLine, parseImeBundles, parseMainAbilityFromBmDump, parseParamValues, parseRemoteExit, performInput, pickHap, pickSigningKind, pickTarget, prepareSigning, pruneLayout, readJson5File, readJsonFile, readProvisionProfile, reboot, recvFile, removeCmdTools, removeEmulator, removeSdk, removeTempWorkDir, requireHarmonyOsSdk, resolveDeviceSerial, resolveKeyEvent, resolveTmpRoot, runCodelinter, runHvigorw, runOhpm, runProcess, scopedLogger, selectDevice, sendFile, sendGesture, sendInput, sendRawTouch, setHilogLevel, shell, shellChecked, spawnCompat, startEmulator, staticConfig, stopEmulator, streamHilog, takeScreenshot, toLongPath, toSpaceError, uninstallApp, unsignedHapRejection, validateTemplateLayout, verifySha256, waitForBoot, waitForBundle, waitForCondition, waitForLog, waitForTarget, watchLog, waypointsToRawEvents, withoutWindow, writeJson5File, writeJsonFile };
2613
+ export { ALL_SDKS, APL_VALUES, APP_FEATURE_VALUES, type AbilityInfo, type AgcAuthInfo, AgcError, type Apl, type AppFeature, type ApplyChangesOptions, type ApplyChangesResult, type BuildHapOptions, type BuildHapResult, type BundleOptions, CancelledError, type CaptureBurstOptions, type CaptureLogOptions, type CaptureLogResult, ChecksumMismatchError, type CmdToolsFlavour, CmdToolsNotInstalledError, type CmdToolsStatus, type CmdWrapper, type CodelinterFinding, type CodelinterReport, type CodelinterResult, type CodelinterSummary, CommandFailedError, type ConfigKey, type ConfigProvider, type CreateScaffoldOptions, type CreateScaffoldResult, type DeveloperAgreementStatus, type DeviceFullInfo, type DeviceInfo, type DiscoverHapsOptions, type DisplaySize, type DisplaySizeOptions, type DownloadOptions, type DumpLayoutOptions, type DumpLayoutResult, type DumpLogOptions, type EmulatorStatus, type ExtractZipOptions, type FlatLayoutNode, type GenerateSigningConfigsOptions, type GestureUitestOptions, type GetDeviceInfoOptions, HARMONYOS_SDK_VERSIONS, HUAWEI_SITES, type HapAssetDiff, type HarmonyOsAutoSignOptions, type HarmonyOsSdk, type HarmonyOsSession, type HarmonyOsSessionOptions, type HarmonyOsSigningResult, type HdcExecOptions, type HdcExecResult, type HdcShellOptions, type HidumperOptions, type HilogEntry, type HilogLevel, type HuaweiSite, type HuaweiSiteCode, type HuaweiTeam, type HuaweiUserInfo, INSTALL_TMP_DIRNAME, type InputType, type InstallAppOptions, type InstallAppResult, type InstallCandidate, type InstallCmdToolsOptions, type InstallEmulatorOptions, type InstallMethod, type InstallSdkFromArchiveOptions, type InstallSdkOptions, type InstallTempDir, type InstallTempDirOptions, type InstalledSdk, InsufficientSpaceError, type KeyboardState, type LaunchAppOptions, type LayoutNode, type LayoutSelector, type LocateTargetOptions, type LocatedTarget, type Logger, type ModuleHaps, OHOS_DAILY_BUILDS_URL, OHOS_URL_BASE, type OniroContext, OniroError, type OsFolder, type OutputSink, type ParamOptions, type PerformInputOptions, type PerformInputResult, type PickTargetFailure, type PickedHap, type PrepareSigningOptions, type PrepareSigningResult, type ProgressReporter, type ProgressUpdate, type ProjectModule, type Prompter, type ProvisionProfileInfo, type RawLayoutNode, type RawTouchEvent, type RebootDecision, type RebootOptions, type RecvFileOptions, type RunCodelinterOptions, type RunHvigorwOptions, type RunHvigorwResult, type RunOhpmOptions, type RunProcessOptions, type RunningProcess, type RuntimeOs, SIGNING_ERRORS, type ScreenDump, type Screenshot, type ScreenshotOptions, type SdkArchiveInfo, type SdkInfo, SdkNotInstalledError, type SdkRelease, type SendFileOptions, type SendGestureOptions, type SendInputOptions, type SendRawTouchOptions, type SetHilogLevelOptions, type SigningKind, type SigningMaterialPaths, type SigningPasswords, type StartEmulatorOptions, type StoredSession, type StreamHilogOptions, TMP_DIR_HINT, TargetNotFoundError, type TemplateOption, type TokenStore, type UiInputType, UnsupportedPlatformError, VERSION, type WaitForBootOptions, type WaitForBundleOptions, type WaitForConditionOptions, type WaitForLogOptions, type WaitForTargetOptions, type WatchLogOptions, type Waypoint, appSandboxDir, applyChanges, assertDevicePath, assertLayoutSelector, attemptHdcConnection, buildCmdWrapper, buildGestureCommands, buildGestureUitestCommand, buildHap, buildHvigorwArgs, buildInputCommand, buildRawTouchCommand, bundleNameFromHapConfig, captureBurst, captureLog, cleanCodelinterOutput, consoleLogger, createHarmonyOsSession, createInstallTempDir, createMaterial, createScaffold, createTempWorkDir, createTokenStore, decideInstallMethod, decideReboot, decryptPwd, dedupEntries, defaultContext, defaultPaths, describeLayoutNode, detectAaStartFailure, detectCmdToolsFlavour, detectInstallFailure, detectProjectSdkVersion, detectRuntimeOs, detectSigningConfigNames, diagnoseBuildFailure, diffEntryNames, diffHapAssets, discoverHaps, downloadAndInstallSdk, downloadFile, dumpLayout, dumpLog, dumpRenderService, dumpScreen, dumpWindow, encryptPwd, ensureFreeSpace, ensureInstallOk, ensureOhModules, ensureOk, ensureRemoteOk, escapeCmdArgument, escapeCmdCommand, existingHapOrUnsigned, extractTarball, extractZipWithProgress, findAppProcessId, findCmdToolsSourceDir, findCoveredNodes, findHarmonyOsSdk, findKeyboardWindow, findLayoutNodes, findMissingProjectSdk, findRunningProcess, findSdkOsDir, flattenLayout, forceStop, formatBytes, generateSigningConfigs, getBundleName, getCmdToolsBin, getCmdToolsDownloadUrl, getCmdToolsPath, getCmdToolsStatus, getDeviceInfo, getDisplaySize, getEmulatorDir, getEmulatorStatus, getFreeSpaceBytes, getHdcPath, getHvigorwPath, getImeBundles, getInstalledSdks, getKey, getMainAbility, getOhosBaseSdkHome, getOhpmPath, getOsFolder, getSdkFilename, getSdkRootDir, getSupportedSdksForUi, harmonyOsAutoSign, harmonyOsSdkLabelForApi, hdcClientFailure, hdcExec, hdcTargetArgs, hdcTargetArgsFor, hideKeyboard, hilogTimeMs, installApp, installCmdTools, installEmulator, installFailureReason, installSdkFromArchive, isBundleInstalled, isCmdToolsInstalled, isEmulatorInstalled, isOutOfSpaceError, isRamBackedPath, isUnsignedHap, isValidBundleName, isValidProjectName, killProcessTree, launchApp, listAbilities, listDevices, listModules, listRunningProcesses, listTemplates, locateTarget, missingProjectRootFiles, needsCmdWrapper, nonInteractivePrompter, noopLogger, noopProgress, normaliseLocalPath, paramGet, paramGetMany, paramSet, parseBounds, parseCodelinterFindings, parseCodelinterReport, parseDeviceList, parseHilogLine, parseImeBundles, parseMainAbilityFromBmDump, parseParamValues, parseRemoteExit, performInput, pickHap, pickSigningKind, pickTarget, prepareSigning, pruneLayout, readHapBundleName, readJson5File, readJsonFile, readProvisionProfile, readZipEntry, reboot, recvFile, removeCmdTools, removeEmulator, removeSdk, removeTempWorkDir, requireHarmonyOsSdk, resolveDeviceSerial, resolveKeyEvent, resolveTmpRoot, runCodelinter, runHvigorw, runOhpm, runProcess, scopedLogger, selectDevice, sendFile, sendGesture, sendInput, sendRawTouch, setHilogLevel, shell, shellChecked, spawnCompat, startEmulator, staticConfig, stopEmulator, streamHilog, takeScreenshot, toLongPath, toSpaceError, uninstallApp, unsignedHapRejection, validateTemplateLayout, verifySha256, waitForBoot, waitForBundle, waitForCondition, waitForLog, waitForTarget, watchLog, waypointsToRawEvents, withoutWindow, writeJson5File, writeJsonFile };