(input: any)
| 298 | const isStream = h.stream |
| 299 | |
| 300 | const buildEffect = (input: any) => |
| 301 | mr.contextEffect.pipe( |
| 302 | Effect.flatMap((svcs) => { |
| 303 | const rpcEffect = TheClient |
| 304 | .use((client) => (client as any)[requestAttr]!(Request.make(input)) as Effect.Effect<any, any>) |
| 305 | .pipe( |
| 306 | // local: true → isolate to this RPC call. `layers` is pure today |
| 307 | // (RequestName + caller-supplied requestLevelLayers), but the |
| 308 | // flag prevents a stateful caller-supplied layer from leaking |
| 309 | // across RPC calls via the ambient fiber MemoMap. |
| 310 | Effect.provide(layers, { local: true }), |
| 311 | Effect.provide(svcs) |
| 312 | ) |
| 313 | return isCommand ? unwrapCommand(rpcEffect) : isStream ? rpcEffect : unwrapQuery(rpcEffect) |
| 314 | }), |
| 315 | // Forwarding the server's dependency metadata needs a recorder in scope. A parent |
| 316 | // query/command (vue) provides one; a top-level call gets a fresh per-request one. |
| 317 | DataDependencies.ensureDataDependencyRecorder |
| 318 | ) |
| 319 | |
| 320 | const buildStream = (input: any) => { |
| 321 | const stream = Stream.unwrap( |
no test coverage detected
searching dependent graphs…