UNPKG

pw-stick-output

Version:

TypeScript utility for managing PipeWire audio node connections and routing with systemd integration

41 lines (40 loc) 1.56 kB
import type { ChildProcess, ExecOptions } from 'node:child_process'; import { MinimalAlphaConfigItem } from './configHelper.js'; export type ExecPromise = Promise<string> & { cp: ChildProcess; }; export declare function pmExec(shell: string, options?: ExecOptions): ExecPromise; export interface BaseBlock { id: string; type: string; [key: string]: string | undefined; } export interface SimplePortBlock { id: string; type: string; name: string; prefix?: string; isMonitor?: boolean; isPlayback?: boolean; isOutput?: boolean; } export declare function extractSimplePort(line: string): SimplePortBlock; export declare function extractSimplePorts(output: string): SimplePortBlock[]; type LinkBlock = { id: string; from: SimplePortBlock; to: SimplePortBlock; }; export declare function extractSimpleLinks(output: string): Record<string, LinkBlock>; export declare function extractNodes(output: string): BaseBlock[]; export declare function findBlockIdBy(blocks: BaseBlock[], field: string, name: string): string | undefined; export declare function filterBlocksBy(blocks: BaseBlock[], field: string, re: RegExp): BaseBlock[]; export interface MonBlock { _changedType: string | null; args?: string; [key: string]: string | undefined | null; } export declare function parseMonitoringBlock(text: string): MonBlock; export declare function monitor(onBlock: (block: MonBlock) => void): Promise<void>; export default function start(stickConfig: MinimalAlphaConfigItem[]): Promise<never>; export {};