@oniroproject/core 0.14.1 → 0.15.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.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.
@@ -892,6 +947,8 @@ declare function listDevices(config: ConfigProvider, opts?: {
892
947
  timeoutMs?: number;
893
948
  logger?: Logger;
894
949
  }): Promise<DeviceInfo[]>;
950
+ /** Whether a listed target can be addressed: connected, or of a status hdc did not report. */
951
+ declare function isUsableDevice(device: DeviceInfo): boolean;
895
952
  /**
896
953
  * Resolve which device serial to address: an explicit `serial` wins, then the
897
954
  * `ONIRO_DEVICE_SERIAL` / `DEVICE_SERIAL` env vars, then the single connected
@@ -1687,6 +1744,12 @@ declare function streamHilog(opts: StreamHilogOptions): ChildProcessWithoutNullS
1687
1744
  declare function parseHilogLine(line: string): HilogEntry | null;
1688
1745
  /** Collapse consecutive duplicate entries (same level/tag/message), ignoring time/pid. */
1689
1746
  declare function dedupEntries(entries: HilogEntry[]): HilogEntry[];
1747
+ /**
1748
+ * A hilog `time` ("MM-DD HH:MM:SS.mmm", no year) as `Date.UTC` ms, in the year
1749
+ * that puts it closest to `referenceMs`, so a December 31st line read on
1750
+ * January 1st lands in the previous year. Null when `time` has another form.
1751
+ */
1752
+ declare function hilogTimeMs(time: string, referenceMs: number): number | null;
1690
1753
  interface WaitForLogOptions {
1691
1754
  config: ConfigProvider;
1692
1755
  /** Tested against `"<tag>: <message>"` of each parsed line. */
@@ -1696,14 +1759,20 @@ interface WaitForLogOptions {
1696
1759
  bundle?: string;
1697
1760
  domain?: string | number;
1698
1761
  deviceSerial?: string;
1762
+ /**
1763
+ * Also match lines logged up to this long before the call. By default (0) only
1764
+ * lines from the call onwards count, measured on the device clock to the second.
1765
+ * `Infinity` matches everything still in the device buffer.
1766
+ */
1767
+ lookbackMs?: number;
1699
1768
  abortSignal?: AbortSignal;
1700
1769
  logger?: Logger;
1701
1770
  }
1702
1771
  /**
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).
1772
+ * Resolve with the first hilog entry whose `"<tag>: <message>"` matches `pattern`
1773
+ * and that was logged since the call (see `lookbackMs`). The underlying stream is
1774
+ * auto-respawned if it dies before the deadline, so the wait survives a reboot
1775
+ * mid-observation. Rejects on timeout (OniroError) or abort (CancelledError).
1707
1776
  */
1708
1777
  declare function waitForLog(opts: WaitForLogOptions): Promise<HilogEntry>;
1709
1778
  interface WatchLogOptions {
@@ -1716,10 +1785,15 @@ interface WatchLogOptions {
1716
1785
  deviceSerial?: string;
1717
1786
  /** Collapse consecutive duplicate lines. Default true. */
1718
1787
  dedup?: boolean;
1788
+ /** Also collect lines logged up to this long before the call; see {@link WaitForLogOptions.lookbackMs}. */
1789
+ lookbackMs?: number;
1719
1790
  abortSignal?: AbortSignal;
1720
1791
  logger?: Logger;
1721
1792
  }
1722
- /** Collect all hilog entries matching `pattern` for `durationMs`. Deduped by default. */
1793
+ /**
1794
+ * Collect the hilog entries matching `pattern` that are logged during `durationMs`
1795
+ * (see `lookbackMs`). Deduped by default.
1796
+ */
1723
1797
  declare function watchLog(opts: WatchLogOptions): Promise<HilogEntry[]>;
1724
1798
  interface CaptureLogOptions {
1725
1799
  config: ConfigProvider;
@@ -1833,10 +1907,12 @@ interface DiscoverHapsOptions {
1833
1907
  /**
1834
1908
  * Walk a project's build outputs and group `*-signed.hap` / `*-unsigned.hap`
1835
1909
  * 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.
1910
+ * `oh_modules` / `.git`, and, when `projectDir` is an app project root, any
1911
+ * other app project nested inside it, whose HAPs belong to another app.
1912
+ * Ported from the proven MCP `findHaps`, extended with per-module grouping so
1913
+ * multi-module projects can install the right HAP. Each list is newest first,
1914
+ * so a fresh build wins over HAPs committed to the repository. Empty object
1915
+ * when nothing is built.
1840
1916
  */
1841
1917
  declare function discoverHaps(opts: DiscoverHapsOptions): Promise<Record<string, ModuleHaps>>;
1842
1918
  interface PickedHap {
@@ -1936,6 +2012,12 @@ declare function cleanCodelinterOutput(output: string): string;
1936
2012
  declare function parseCodelinterReport(output: string): CodelinterReport;
1937
2013
  /** The findings of a codelinter report; see {@link parseCodelinterReport}. */
1938
2014
  declare function parseCodelinterFindings(output: string): CodelinterFinding[];
2015
+ /**
2016
+ * Which of the project-root files codelinter needs are missing from `projectDir`,
2017
+ * each named by its first form. Without them codelinter exits non-zero without a
2018
+ * report, and says neither why nor which file.
2019
+ */
2020
+ declare function missingProjectRootFiles(projectDir: string): string[];
1939
2021
  interface RunCodelinterOptions {
1940
2022
  config: ConfigProvider;
1941
2023
  projectDir: string;
@@ -2229,6 +2311,11 @@ interface ApplyChangesResult {
2229
2311
  */
2230
2312
  declare function applyChanges(opts: ApplyChangesOptions): Promise<ApplyChangesResult>;
2231
2313
 
2314
+ /** `app.bundleName` from the text of a HAP's `module.json` (stage model) or `config.json` (FA model), or null. */
2315
+ declare function bundleNameFromHapConfig(text: string): string | null;
2316
+ /** The bundle a HAP installs as, read from its `module.json` or `config.json`; null when neither names one. */
2317
+ declare function readHapBundleName(hapPath: string): Promise<string | null>;
2318
+
2232
2319
  /**
2233
2320
  * Which runtime a project targets. OpenHarmony projects build against the public
2234
2321
  * OpenHarmony SDK; HarmonyOS projects build against Huawei's HarmonyOS SDK and
@@ -2459,7 +2546,7 @@ declare const SIGNING_ERRORS: {
2459
2546
  readonly DEVICE_ADD: "AppGallery Connect did not register the device.";
2460
2547
  readonly DEVICE_LIMIT: "This team has reached its device limit. Remove an unused device in AppGallery Connect and retry.";
2461
2548
  readonly DEVICE_NAME_REPEAT: "A device with that name is already registered. Retry.";
2462
- readonly DEVICE_NONE: "No device is connected and none is registered to this team, but a debug profile must name at least one. Connect a device and retry.";
2549
+ readonly DEVICE_NONE: "This team has no registered device and none could be registered from here, but a debug profile must name at least one. Connect a device that reports a UDID (`hdc shell bm get -u`), or register one in AppGallery Connect, and retry.";
2463
2550
  readonly PROFILE_ADD: "AppGallery Connect did not issue the provisioning profile.";
2464
2551
  readonly PROFILE_NAME_REPEAT: "A provisioning profile with that name already exists in AppGallery Connect. Retry.";
2465
2552
  readonly PROVISION_LIMIT: "This team has reached its debug-profile limit. Delete unused profiles in AppGallery Connect and retry.";
@@ -2525,4 +2612,4 @@ declare function harmonyOsAutoSign(opts: HarmonyOsAutoSignOptions): Promise<Harm
2525
2612
 
2526
2613
  declare const VERSION: string;
2527
2614
 
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 };
2615
+ 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, isUsableDevice, 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.
@@ -892,6 +947,8 @@ declare function listDevices(config: ConfigProvider, opts?: {
892
947
  timeoutMs?: number;
893
948
  logger?: Logger;
894
949
  }): Promise<DeviceInfo[]>;
950
+ /** Whether a listed target can be addressed: connected, or of a status hdc did not report. */
951
+ declare function isUsableDevice(device: DeviceInfo): boolean;
895
952
  /**
896
953
  * Resolve which device serial to address: an explicit `serial` wins, then the
897
954
  * `ONIRO_DEVICE_SERIAL` / `DEVICE_SERIAL` env vars, then the single connected
@@ -1687,6 +1744,12 @@ declare function streamHilog(opts: StreamHilogOptions): ChildProcessWithoutNullS
1687
1744
  declare function parseHilogLine(line: string): HilogEntry | null;
1688
1745
  /** Collapse consecutive duplicate entries (same level/tag/message), ignoring time/pid. */
1689
1746
  declare function dedupEntries(entries: HilogEntry[]): HilogEntry[];
1747
+ /**
1748
+ * A hilog `time` ("MM-DD HH:MM:SS.mmm", no year) as `Date.UTC` ms, in the year
1749
+ * that puts it closest to `referenceMs`, so a December 31st line read on
1750
+ * January 1st lands in the previous year. Null when `time` has another form.
1751
+ */
1752
+ declare function hilogTimeMs(time: string, referenceMs: number): number | null;
1690
1753
  interface WaitForLogOptions {
1691
1754
  config: ConfigProvider;
1692
1755
  /** Tested against `"<tag>: <message>"` of each parsed line. */
@@ -1696,14 +1759,20 @@ interface WaitForLogOptions {
1696
1759
  bundle?: string;
1697
1760
  domain?: string | number;
1698
1761
  deviceSerial?: string;
1762
+ /**
1763
+ * Also match lines logged up to this long before the call. By default (0) only
1764
+ * lines from the call onwards count, measured on the device clock to the second.
1765
+ * `Infinity` matches everything still in the device buffer.
1766
+ */
1767
+ lookbackMs?: number;
1699
1768
  abortSignal?: AbortSignal;
1700
1769
  logger?: Logger;
1701
1770
  }
1702
1771
  /**
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).
1772
+ * Resolve with the first hilog entry whose `"<tag>: <message>"` matches `pattern`
1773
+ * and that was logged since the call (see `lookbackMs`). The underlying stream is
1774
+ * auto-respawned if it dies before the deadline, so the wait survives a reboot
1775
+ * mid-observation. Rejects on timeout (OniroError) or abort (CancelledError).
1707
1776
  */
1708
1777
  declare function waitForLog(opts: WaitForLogOptions): Promise<HilogEntry>;
1709
1778
  interface WatchLogOptions {
@@ -1716,10 +1785,15 @@ interface WatchLogOptions {
1716
1785
  deviceSerial?: string;
1717
1786
  /** Collapse consecutive duplicate lines. Default true. */
1718
1787
  dedup?: boolean;
1788
+ /** Also collect lines logged up to this long before the call; see {@link WaitForLogOptions.lookbackMs}. */
1789
+ lookbackMs?: number;
1719
1790
  abortSignal?: AbortSignal;
1720
1791
  logger?: Logger;
1721
1792
  }
1722
- /** Collect all hilog entries matching `pattern` for `durationMs`. Deduped by default. */
1793
+ /**
1794
+ * Collect the hilog entries matching `pattern` that are logged during `durationMs`
1795
+ * (see `lookbackMs`). Deduped by default.
1796
+ */
1723
1797
  declare function watchLog(opts: WatchLogOptions): Promise<HilogEntry[]>;
1724
1798
  interface CaptureLogOptions {
1725
1799
  config: ConfigProvider;
@@ -1833,10 +1907,12 @@ interface DiscoverHapsOptions {
1833
1907
  /**
1834
1908
  * Walk a project's build outputs and group `*-signed.hap` / `*-unsigned.hap`
1835
1909
  * 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.
1910
+ * `oh_modules` / `.git`, and, when `projectDir` is an app project root, any
1911
+ * other app project nested inside it, whose HAPs belong to another app.
1912
+ * Ported from the proven MCP `findHaps`, extended with per-module grouping so
1913
+ * multi-module projects can install the right HAP. Each list is newest first,
1914
+ * so a fresh build wins over HAPs committed to the repository. Empty object
1915
+ * when nothing is built.
1840
1916
  */
1841
1917
  declare function discoverHaps(opts: DiscoverHapsOptions): Promise<Record<string, ModuleHaps>>;
1842
1918
  interface PickedHap {
@@ -1936,6 +2012,12 @@ declare function cleanCodelinterOutput(output: string): string;
1936
2012
  declare function parseCodelinterReport(output: string): CodelinterReport;
1937
2013
  /** The findings of a codelinter report; see {@link parseCodelinterReport}. */
1938
2014
  declare function parseCodelinterFindings(output: string): CodelinterFinding[];
2015
+ /**
2016
+ * Which of the project-root files codelinter needs are missing from `projectDir`,
2017
+ * each named by its first form. Without them codelinter exits non-zero without a
2018
+ * report, and says neither why nor which file.
2019
+ */
2020
+ declare function missingProjectRootFiles(projectDir: string): string[];
1939
2021
  interface RunCodelinterOptions {
1940
2022
  config: ConfigProvider;
1941
2023
  projectDir: string;
@@ -2229,6 +2311,11 @@ interface ApplyChangesResult {
2229
2311
  */
2230
2312
  declare function applyChanges(opts: ApplyChangesOptions): Promise<ApplyChangesResult>;
2231
2313
 
2314
+ /** `app.bundleName` from the text of a HAP's `module.json` (stage model) or `config.json` (FA model), or null. */
2315
+ declare function bundleNameFromHapConfig(text: string): string | null;
2316
+ /** The bundle a HAP installs as, read from its `module.json` or `config.json`; null when neither names one. */
2317
+ declare function readHapBundleName(hapPath: string): Promise<string | null>;
2318
+
2232
2319
  /**
2233
2320
  * Which runtime a project targets. OpenHarmony projects build against the public
2234
2321
  * OpenHarmony SDK; HarmonyOS projects build against Huawei's HarmonyOS SDK and
@@ -2459,7 +2546,7 @@ declare const SIGNING_ERRORS: {
2459
2546
  readonly DEVICE_ADD: "AppGallery Connect did not register the device.";
2460
2547
  readonly DEVICE_LIMIT: "This team has reached its device limit. Remove an unused device in AppGallery Connect and retry.";
2461
2548
  readonly DEVICE_NAME_REPEAT: "A device with that name is already registered. Retry.";
2462
- readonly DEVICE_NONE: "No device is connected and none is registered to this team, but a debug profile must name at least one. Connect a device and retry.";
2549
+ readonly DEVICE_NONE: "This team has no registered device and none could be registered from here, but a debug profile must name at least one. Connect a device that reports a UDID (`hdc shell bm get -u`), or register one in AppGallery Connect, and retry.";
2463
2550
  readonly PROFILE_ADD: "AppGallery Connect did not issue the provisioning profile.";
2464
2551
  readonly PROFILE_NAME_REPEAT: "A provisioning profile with that name already exists in AppGallery Connect. Retry.";
2465
2552
  readonly PROVISION_LIMIT: "This team has reached its debug-profile limit. Delete unused profiles in AppGallery Connect and retry.";
@@ -2525,4 +2612,4 @@ declare function harmonyOsAutoSign(opts: HarmonyOsAutoSignOptions): Promise<Harm
2525
2612
 
2526
2613
  declare const VERSION: string;
2527
2614
 
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 };
2615
+ 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, isUsableDevice, 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 };