(items, data)
| 529 | } |
| 530 | |
| 531 | onResult(items, data) { |
| 532 | let result; |
| 533 | if (items.length === 0) { |
| 534 | result = data; |
| 535 | } |
| 536 | else { |
| 537 | const prop = items[0]; |
| 538 | if (!prop.children || prop.children.length === 0) |
| 539 | result = prop.value; |
| 540 | else { |
| 541 | let parts = []; |
| 542 | for (const child of prop.children) { |
| 543 | if (child.name && child.name !== "(..)") |
| 544 | parts.push(`${child.name}: ${child.value}`); |
| 545 | if (parts.length > 20) { |
| 546 | parts.push("…"); |
| 547 | break; |
| 548 | } |
| 549 | } |
| 550 | result = "{ " + parts.join(", ") + " }"; |
| 551 | } |
| 552 | } |
| 553 | this.clearLine(); |
| 554 | console.log(result); |
| 555 | this.showPrompt(); |
| 556 | } |
| 557 | |
| 558 | onBroken(path, line, text) { |
| 559 | // Auto-continue for non-interactive connections (e.g., mcsim) |
nothing calls this directly
no test coverage detected