/*
* Fetches raw inputs from containerRequest mounts with fallback to properties
+ * Returns undefined if containerRequest not loaded
+ * Returns [] if inputs not found in mounts or props
*/
export const getRawInputs = (data: any): CommandInputParameter[] | undefined => {
if (!data) { return undefined; }
const mountInput = data.mounts?.[MOUNT_PATH_CWL_INPUT]?.content;
const propsInput = data.properties?.cwl_input;
- if (!mountInput && !propsInput) { return undefined; }
+ if (!mountInput && !propsInput) { return []; }
return (mountInput || propsInput);
}
/*
* Fetches raw outputs from containerRequest properties
+ * Assumes containerRequest is loaded
*/
export const getRawOutputs = (data: any): CommandInputParameter[] | undefined => {
if (!data || !data.properties || !data.properties.cwl_output) { return undefined; }