Skip to content

Commit c3d2145

Browse files
committed
fix(): tests minor fixes
1 parent ff11216 commit c3d2145

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

lib/event-worker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Worker } from './worker';
22
import * as WorkerNames from './workerNames';
33
import { GroupWorkerTask } from 'hawk-worker-grouper/types/group-worker-task';
4-
import { CatcherMessageType, CatcherMessagePayload, CatcherMessageAccepted } from '@hawk.so/types'
4+
import { CatcherMessageType, CatcherMessagePayload, CatcherMessageAccepted, ErrorsCatcherType } from '@hawk.so/types'
55

66
/**
77
* Defines a Worker that handles events from Catcher.
@@ -12,7 +12,7 @@ export abstract class EventWorker extends Worker {
1212
* Worker type (will pull tasks from Registry queue with the same name)
1313
* 'errors/nodejs' for example
1414
*/
15-
public type: CatcherMessageType;
15+
public type: ErrorsCatcherType;
1616

1717
/**
1818
* Message handle function
@@ -25,9 +25,9 @@ export abstract class EventWorker extends Worker {
2525
await this.addTask(WorkerNames.GROUPER, {
2626
projectId: task.projectId,
2727
catcherType: this.type as CatcherMessageType,
28-
payload: task.payload as CatcherMessagePayload<typeof this.type>,
28+
payload: task.payload as CatcherMessagePayload<ErrorsCatcherType>,
2929
timestamp: task.timestamp
30-
} as GroupWorkerTask<typeof this.type>);
30+
} as GroupWorkerTask<ErrorsCatcherType>);
3131
}
3232

3333
/**

workers/javascript/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default class JavascriptEventWorker extends EventWorker {
2222
/**
2323
* Worker type (will pull tasks from Registry queue with the same name)
2424
*/
25-
public readonly type: CatcherMessageType = pkg.workerType as CatcherMessageType;
25+
public readonly type: ErrorsCatcherType = pkg.workerType as ErrorsCatcherType;
2626

2727
/**
2828
* Releases collection in database

workers/sentry/src/utils/converter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BacktraceFrame, DefaultAddons, EventContext, EventData, Json } from '@hawk.so/types';
1+
import { BacktraceFrame, DefaultAddons, EventContext, EventData, Json, SentryAddons } from '@hawk.so/types';
22
import { Event as SentryEvent } from '@sentry/core';
33

44
/**
@@ -111,7 +111,7 @@ export function composeContext(eventPayload: SentryEvent): EventContext | undefi
111111
*
112112
* @param eventPayload - Sentry event payload
113113
*/
114-
export function composeAddons(eventPayload: SentryEvent): EventData<DefaultAddons>['addons'] {
114+
export function composeAddons(eventPayload: SentryEvent): SentryAddons {
115115
const addons: Record<string, unknown> = {};
116116

117117
const fieldsToInclude: (keyof SentryEvent)[] = [

0 commit comments

Comments
 (0)