( ref: LargeValueRef, options: RedactLargeValueRefsOptions )
| 162 | } |
| 163 | |
| 164 | async function redactRef( |
| 165 | ref: LargeValueRef, |
| 166 | options: RedactLargeValueRefsOptions |
| 167 | ): Promise<unknown> { |
| 168 | try { |
| 169 | const materialized = await materializeLargeValueRef(ref, { |
| 170 | ...options.store, |
| 171 | trackReference: false, |
| 172 | }) |
| 173 | if (materialized === undefined) { |
| 174 | return onRefFailure( |
| 175 | new Error('large value could not be materialized'), |
| 176 | options, |
| 177 | 'Failed to redact large value ref' |
| 178 | ) |
| 179 | } |
| 180 | return await maskAndReStore(materialized, options) |
| 181 | } catch (error) { |
| 182 | return onRefFailure(error, options, 'Failed to redact large value ref') |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | async function redactManifest( |
| 187 | manifest: LargeArrayManifest, |
no test coverage detected