MCPcopy Index your code
hub / github.com/OpenPipe/OpenPipe / checkNodeInput

Function checkNodeInput

app/src/server/utils/nodes/checkNodeInput.ts:7–24  ·  view source on GitHub ↗
(
  input: U & {
    id: string;
    projectId: string;
    type: T;
    config: InferNodeConfig<T>;
  },
)

Source from the content-addressed store, hash-verified

5
6// This function signature ensures the config matches the type
7export const checkNodeInput = <
8 T extends NodeType,
9 U extends Pick<Node, "projectId"> & Record<string, unknown>,
10>(
11 input: U & {
12 id: string;
13 projectId: string;
14 type: T;
15 config: InferNodeConfig<T>;
16 },
17): U & { type: T; config: object; hash: string } => {
18 const hash = hashNode(input);
19 return {
20 ...input,
21 config: input.config as object,
22 hash,
23 };
24};

Callers 9

prepareArchiveCreationFunction · 0.90
prepareMonitorCreationFunction · 0.90
prepareFilterCreationFunction · 0.90
prepareDatasetCreationFunction · 0.90
monitors.router.tsFile · 0.90
archives.router.tsFile · 0.90

Calls 1

hashNodeFunction · 0.90

Tested by

no test coverage detected