{"version":3,"file":"outputs.cjs","names":[],"sources":["../src/outputs.ts"],"sourcesContent":["import type { Outputs, TerminalOutput } from '@lifi/compose-spec';\n\n/**\n * The entries of `outputs` the caller actually receives: every port no later\n * node spends, keyed `<nodeId>.<portName>` as on the wire, and every resource\n * input no node spends, keyed `input.<name>`. Consumed ports (intermediate\n * amounts a later op takes as input) are dropped.\n */\nexport const terminalOutputs = (\n  outputs: Outputs,\n): Record<string, TerminalOutput> =>\n  Object.fromEntries(\n    Object.entries(outputs).filter(\n      (entry): entry is [string, TerminalOutput] =>\n        entry[1].role === 'terminal',\n    ),\n  );\n"],"mappings":";;;;;;;;AAQA,MAAa,mBACX,YAEA,OAAO,YACL,OAAO,QAAQ,OAAO,CAAC,CAAC,QACrB,UACC,MAAM,EAAE,CAAC,SAAS,UACtB,CACF"}