Skip to content

Commit

Permalink
Remove duplicated config schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelBCarter committed Aug 1, 2024
1 parent c312cdd commit 660a473
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@ import { assertEx } from '@xylabs/assert'
import { removeFields } from '@xylabs/object'
import { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'
import { PayloadDiviner } from '@xyo-network/diviner-payload-abstract'
import {
isPayloadDivinerQueryPayload,
PayloadDivinerConfigSchema,
PayloadDivinerParams,
PayloadDivinerQueryPayload,
} from '@xyo-network/diviner-payload-model'
import { isPayloadDivinerQueryPayload, PayloadDivinerParams, PayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model'
import { PayloadBuilder } from '@xyo-network/payload-builder'
import { Payload, Schema, WithMeta } from '@xyo-network/payload-model'
import { Payload, WithMeta } from '@xyo-network/payload-model'

import { hasTimestamp } from './hasTimestamp.js'

Expand All @@ -24,9 +19,6 @@ export class MemoryPayloadDiviner<
TOut
>,
> extends PayloadDiviner<TParams, TIn, TOut, TEventData> {
static override readonly configSchemas: Schema[] = [...super.configSchemas, PayloadDivinerConfigSchema]
static override readonly defaultConfigSchema: Schema = PayloadDivinerConfigSchema

protected override async divineHandler(payloads?: TIn[]): Promise<WithMeta<TOut>[]> {
const filter = assertEx(payloads?.filter(isPayloadDivinerQueryPayload)?.pop(), () => 'Missing query payload')
if (!filter) return []
Expand Down

0 comments on commit 660a473

Please sign in to comment.