( output: unknown, path: string, context: OutputExtractionContext )
| 109 | > & { base64MaxBytes?: number } |
| 110 | |
| 111 | async function extractOutputValue( |
| 112 | output: unknown, |
| 113 | path: string, |
| 114 | context: OutputExtractionContext |
| 115 | ): Promise<unknown> { |
| 116 | const parsedOutput = parseOutputContentSafely(output) |
| 117 | const outputValue = path |
| 118 | ? await navigatePathAsync(parsedOutput, path.split('.'), { |
| 119 | executionContext: { |
| 120 | workflowId: context.workflowId ?? '', |
| 121 | workspaceId: context.workspaceId, |
| 122 | executionId: context.executionId, |
| 123 | largeValueExecutionIds: context.largeValueExecutionIds, |
| 124 | largeValueKeys: context.largeValueKeys, |
| 125 | fileKeys: context.fileKeys, |
| 126 | allowLargeValueWorkflowScope: context.allowLargeValueWorkflowScope, |
| 127 | userId: context.userId, |
| 128 | metadata: { requestId: context.requestId }, |
| 129 | base64MaxBytes: context.base64MaxBytes, |
| 130 | }, |
| 131 | allowLargeValueRefs: true, |
| 132 | }) |
| 133 | : parsedOutput |
| 134 | |
| 135 | return outputValue |
| 136 | } |
| 137 | |
| 138 | function isDangerousKey(key: string): boolean { |
| 139 | return DANGEROUS_KEYS.includes(key) |
no test coverage detected