UNPKG

serverless-spy

Version:

CDK-based library for writing elegant integration tests on AWS serverless architecture and an additional web console to monitor events in real time.

40 lines (39 loc) 1.51 kB
import { QueryCommand as __QueryCommand } from "@aws-sdk/client-dynamodb"; import { Command as $Command } from "@smithy/smithy-client"; import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand"; import { ALL_MEMBERS, ALL_VALUES } from "../commands/utils"; export { DynamoDBDocumentClientCommand, $Command }; export class QueryCommand extends DynamoDBDocumentClientCommand { constructor(input) { super(); this.input = input; this.inputKeyNodes = { KeyConditions: { "*": { AttributeValueList: ALL_MEMBERS, }, }, QueryFilter: { "*": { AttributeValueList: ALL_MEMBERS, }, }, ExclusiveStartKey: ALL_VALUES, ExpressionAttributeValues: ALL_VALUES, }; this.outputKeyNodes = { Items: { "*": ALL_VALUES, }, LastEvaluatedKey: ALL_VALUES, }; this.clientCommand = new __QueryCommand(this.input); this.middlewareStack = this.clientCommand.middlewareStack; } resolveMiddleware(clientStack, configuration, options) { this.addMarshallingMiddleware(configuration); const stack = clientStack.concat(this.middlewareStack); const handler = this.clientCommand.resolveMiddleware(stack, configuration, options); return async () => handler(this.clientCommand); } }