From 5faba089e468b598aeed59c3061c2f033de6fa86 Mon Sep 17 00:00:00 2001 From: Dominik Kundel Date: Tue, 13 Jul 2021 16:24:46 -0700 Subject: [PATCH] build: adjust dependency imports for successful build --- packages/runtime-handler/src/dev-runtime/route.ts | 13 ++++++++----- packages/twilio-run/package.json | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/runtime-handler/src/dev-runtime/route.ts b/packages/runtime-handler/src/dev-runtime/route.ts index 52745cef..23e5fda1 100644 --- a/packages/runtime-handler/src/dev-runtime/route.ts +++ b/packages/runtime-handler/src/dev-runtime/route.ts @@ -1,6 +1,7 @@ import { Context, ServerlessCallback, + ServerlessEventObject, ServerlessFunctionSignature, TwilioClient, TwilioClientOptions, @@ -17,6 +18,10 @@ import { join, resolve } from 'path'; import { deserializeError } from 'serialize-error'; import { checkForValidAccountSid } from './checks/check-account-sid'; import { checkForValidAuthToken } from './checks/check-auth-token'; +import { + restrictedHeaderExactMatches, + restrictedHeaderPrefixes, +} from './checks/restricted-headers'; import { Reply } from './internal/functionRunner'; import { Response } from './internal/response'; import * as Runtime from './internal/runtime'; @@ -25,10 +30,6 @@ import debug from './utils/debug'; import { wrapErrorInHtml } from './utils/error-html'; import { requireFromProject } from './utils/requireFromProject'; import { cleanUpStackTrace } from './utils/stack-trace/clean-up'; -import { - restrictedHeaderPrefixes, - restrictedHeaderExactMatches, -} from './checks/restricted-headers'; const log = debug('twilio-runtime-handler:dev:route'); @@ -75,7 +76,9 @@ export function constructHeaders(rawHeaders?: string[]): Headers { return {}; } -export function constructEvent(req: ExpressRequest): T { +export function constructEvent( + req: ExpressRequest +): T { return { request: { headers: constructHeaders(req.rawHeaders), diff --git a/packages/twilio-run/package.json b/packages/twilio-run/package.json index 9914cc3c..5a5bfc64 100644 --- a/packages/twilio-run/package.json +++ b/packages/twilio-run/package.json @@ -36,7 +36,7 @@ "license": "MIT", "dependencies": { "@twilio-labs/serverless-api": "^5.1.1", - "@twilio-labs/serverless-runtime-types": "^2.1.0", + "@twilio-labs/serverless-runtime-types": "2.1.0-rc.0", "@types/express": "4.17.7", "@types/inquirer": "^6.0.3", "@types/is-ci": "^2.0.0",