UNPKG

alagarr

Version:

Alagarr is a request-response helper library that removes the boilerplate from your Node.js serverless functions and helps make your code portable.

63 lines (62 loc) 1.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mockContext = { awsRequestId: 'foobar', callbackWaitsForEmptyEventLoop: true, done: () => undefined, fail: () => undefined, functionName: 'foobar', functionVersion: 'foobar', getRemainingTimeInMillis: () => 0, invokedFunctionArn: 'foobar', logGroupName: 'foobar', logStreamName: 'foobar', memoryLimitInMB: 128, succeed: () => undefined, }; exports.mockRequestContext = { accountId: 'foobar', apiId: 'foobar', httpMethod: 'GET', identity: { accessKey: null, accountId: null, apiKey: null, apiKeyId: null, caller: null, cognitoAuthenticationProvider: null, cognitoAuthenticationType: null, cognitoIdentityId: null, cognitoIdentityPoolId: null, sourceIp: 'foobar', user: null, userAgent: 'foobar', userArn: null, }, path: '/', requestId: 'foobar', requestTimeEpoch: 0, resourceId: 'foobar', resourcePath: 'foobar', stage: 'foobar', }; exports.get = { body: 'foobar', context: exports.mockContext, cookies: {}, headers: {}, httpMethod: 'GET', isBase64Encoded: false, meta: {}, method: 'GET', path: '/', pathParameters: {}, provider: 'aws', query: {}, queryStringParameters: {}, requestContext: exports.mockRequestContext, resource: 'foobar', source: 'aws', stageVariables: {}, timestamp: Date.now(), };