MCPcopy Index your code
hub / github.com/simstudioai/sim / redactRef

Function redactRef

apps/sim/lib/logs/execution/pii-large-values.ts:164–184  ·  view source on GitHub ↗
(
  ref: LargeValueRef,
  options: RedactLargeValueRefsOptions
)

Source from the content-addressed store, hash-verified

162}
163
164async 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
186async function redactManifest(
187 manifest: LargeArrayManifest,

Callers 1

replaceRefFunction · 0.85

Calls 3

materializeLargeValueRefFunction · 0.90
onRefFailureFunction · 0.85
maskAndReStoreFunction · 0.85

Tested by

no test coverage detected