Skip to content

Conversation

@dmichon-msft
Copy link
Contributor

@dmichon-msft dmichon-msft commented Sep 30, 2025

Summary

Updates the API contract for the SplitterTransform to support adding and removing destinations after creation. This is useful for pipelines where a plugin may wish to temporarily listen to the terminal output and direct it somewhere, e.g. over a websocket connection.

Details

Adds new addDestination and removeDestination APIs to SplitterTransform. Updates the underlying implementation of the collection to use a Set instead of an array to simplify removal and deduplication during add. Updates the constructor arguments to accept any Iterable<TerminalWritable> so that the caller can pass a Set or other collection rather than requiring explicitly an array.

As an unrelated change, also fixed an issue with the heft-swc-test project that it was not cleaning the correct folders, causing breaks during local development.

How it was tested

Added unit tests for all the functionality on SplitterTransform.

Impacted documentation

API Documentation for @rushstack/terminal.

@dmichon-msft dmichon-msft enabled auto-merge (squash) September 30, 2025 22:19
@dmichon-msft dmichon-msft merged commit 66c887f into microsoft:main Sep 30, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

3 participants