adb-ready 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,13 @@ breaking changes.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.1.1] - 2026-09-10
13
+
14
+ ### Fixed
15
+
16
+ - Keep successful background target and port health probes in diagnostic
17
+ events without repeatedly printing them over development-server output.
18
+
12
19
  ## [0.1.0] - 2026-09-10
13
20
 
14
21
  ### Added
@@ -25,5 +32,6 @@ breaking changes.
25
32
  explainable configuration precedence.
26
33
  - Human, plain, JSON, and NDJSON output across Node, Bun, and Deno entrypoints.
27
34
 
28
- [Unreleased]: https://github.com/Adam014/adb-ready/compare/v0.1.0...HEAD
35
+ [Unreleased]: https://github.com/Adam014/adb-ready/compare/v0.1.1...HEAD
36
+ [0.1.1]: https://github.com/Adam014/adb-ready/compare/v0.1.0...v0.1.1
29
37
  [0.1.0]: https://github.com/Adam014/adb-ready/compare/v0.0.1-alpha.0...v0.1.0
package/dist/cli.js CHANGED
@@ -9,7 +9,7 @@ import process9 from "node:process";
9
9
  // package.json
10
10
  var package_default = {
11
11
  name: "adb-ready",
12
- version: "0.1.0",
12
+ version: "0.1.1",
13
13
  description: "Make an Android target ready, then keep the development session working.",
14
14
  private: false,
15
15
  type: "module",
@@ -837,6 +837,7 @@ class AdbClient {
837
837
  async#observe(operation, message, args, parse, signal, options = {}) {
838
838
  const operationId = this.#idFactory();
839
839
  const correlation = { ...this.#options.correlation, operationId };
840
+ const background = this.#options.presentation === "background";
840
841
  const finalArgs = [
841
842
  ...options.useServerArguments === false ? [] : this.#serverArguments(),
842
843
  ...args
@@ -844,12 +845,13 @@ class AdbClient {
844
845
  this.#options.bus.emit({
845
846
  type: "operation.started",
846
847
  source: `adb.${operation}`,
847
- severity: "info",
848
+ severity: background ? "debug" : "info",
848
849
  message,
849
850
  correlation,
850
851
  data: {
851
852
  executable: redactText(this.#options.executable).value,
852
- args: finalArgs.map((argument) => redactText(argument).value)
853
+ args: finalArgs.map((argument) => redactText(argument).value),
854
+ ...background ? { presentation: "background" } : {}
853
855
  }
854
856
  });
855
857
  const request = {
@@ -865,10 +867,13 @@ class AdbClient {
865
867
  this.#options.bus.emit({
866
868
  type: succeeded ? "operation.completed" : "operation.failed",
867
869
  source: `adb.${operation}`,
868
- severity: succeeded ? "info" : "error",
870
+ severity: succeeded ? background ? "debug" : "info" : "error",
869
871
  message: succeeded ? `${message} completed` : `${message} failed`,
870
872
  correlation,
871
- data: processMetadata(result)
873
+ data: {
874
+ ...processMetadata(result),
875
+ ...background ? { presentation: "background" } : {}
876
+ }
872
877
  });
873
878
  return {
874
879
  operationId,
@@ -4185,7 +4190,7 @@ async function runDev(options, config = {}, dependencies = {}, signal) {
4185
4190
  if (normalizedPorts.problems.length > 0)
4186
4191
  return await complete(null);
4187
4192
  const targetCorrelation = { ...correlation, targetId: selected.target.id };
4188
- const client = new AdbClient({
4193
+ const clientOptions = {
4189
4194
  executable,
4190
4195
  bus,
4191
4196
  correlation: targetCorrelation,
@@ -4194,7 +4199,9 @@ async function runDev(options, config = {}, dependencies = {}, signal) {
4194
4199
  ...config.timeoutMs === undefined ? {} : { timeoutMs: config.timeoutMs },
4195
4200
  ...dependencies.runner === undefined ? {} : { runner: dependencies.runner },
4196
4201
  idFactory
4197
- });
4202
+ };
4203
+ const client = new AdbClient(clientOptions);
4204
+ const healthClient = new AdbClient({ ...clientOptions, presentation: "background" });
4198
4205
  const listed = await client.listPortMappings(target, "reverse", signal);
4199
4206
  if (!processSucceeded(listed.process)) {
4200
4207
  problems.push(operationProblem("reverse-list", listed, context.commandId));
@@ -4593,7 +4600,7 @@ async function runDev(options, config = {}, dependencies = {}, signal) {
4593
4600
  const abortWatcher = () => watchController.abort();
4594
4601
  signal?.addEventListener("abort", abortWatcher, { once: true });
4595
4602
  const observeSession = async (watchSignal) => {
4596
- const state = await client.getState(target.serial, watchSignal);
4603
+ const state = await healthClient.getState(target.serial, watchSignal);
4597
4604
  if (!processSucceeded(state.process) || state.value !== "device") {
4598
4605
  return {
4599
4606
  targetReady: false,
@@ -4604,7 +4611,7 @@ async function runDev(options, config = {}, dependencies = {}, signal) {
4604
4611
  detail: `Target ${target.serial} is not ready.`
4605
4612
  };
4606
4613
  }
4607
- const mappings = await client.listPortMappings(target, "reverse", watchSignal);
4614
+ const mappings = await healthClient.listPortMappings(target, "reverse", watchSignal);
4608
4615
  if (!processSucceeded(mappings.process)) {
4609
4616
  return {
4610
4617
  targetReady: true,
@@ -6978,6 +6985,8 @@ class ProgressRenderer {
6978
6985
  this.#spinner.dispose();
6979
6986
  }
6980
6987
  onEvent(event) {
6988
+ if (event.data?.presentation === "background")
6989
+ return;
6981
6990
  if (event.type === "operation.started") {
6982
6991
  this.#spinner.start(event.message);
6983
6992
  } else if (event.type === "operation.completed") {
@@ -9051,4 +9060,4 @@ try {
9051
9060
  process10.removeListener("SIGTERM", abort);
9052
9061
  }
9053
9062
 
9054
- //# debugId=62DDFFDF33E82E9264756E2164756E21
9063
+ //# debugId=9D393E2FCFBCF69364756E2164756E21