Skip to content

Commit

Permalink
Merge pull request #195 from buggregator/issue/#94-var-dumper-cli-env…
Browse files Browse the repository at this point in the history
…ironment

issue/#94-var-dumper-cli-environment
  • Loading branch information
Kreezag committed Jul 5, 2024
2 parents 2f32f19 + b37c708 commit 095b7c2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/entities/var-dump/lib/normalize-var-dump-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export const normalizeVarDumpEvent = (event: ServerEvent<VarDump>): NormalizedEv
type: EVENT_TYPES.VAR_DUMP,
labels: [EVENT_TYPES.VAR_DUMP],
origin: {
file: event.payload.context?.source.file,
name: event.payload.context?.source.name,
line_number: event.payload.context?.source.line,
file: event.payload.context?.source?.file || "",
name: event.payload.context?.source?.name || "",
line_number: event.payload.context?.source?.line || "",
},
serverName: "",
date: event.timestamp ? new Date(event.timestamp * 1000) : null,
Expand All @@ -21,5 +21,9 @@ export const normalizeVarDumpEvent = (event: ServerEvent<VarDump>): NormalizedEv
normalizedEvent.labels.push(`label: ${event.payload.payload.label}`);
}

if (event.payload?.context?.cli) {
normalizedEvent.labels.push(`CLI: ${event.payload.context.cli}`);
}

return normalizedEvent;
}

0 comments on commit 095b7c2

Please sign in to comment.