@netlify/functions
Advanced tools
Comparing version
@@ -15,8 +15,4 @@ import { DevEventHandler, Geolocation } from '@netlify/dev-utils'; | ||
logStreamName: string; | ||
identity?: { | ||
[key: string]: any; | ||
}; | ||
clientContext?: { | ||
[key: string]: any; | ||
}; | ||
identity?: Record<string, any>; | ||
clientContext?: Record<string, any>; | ||
getRemainingTimeInMillis(): number; | ||
@@ -33,14 +29,6 @@ /** @deprecated Use handler callback or promise result */ | ||
interface EventHeaders { | ||
[name: string]: string | undefined; | ||
} | ||
interface EventMultiValueHeaders { | ||
[name: string]: string[] | undefined; | ||
} | ||
interface EventQueryStringParameters { | ||
[name: string]: string | undefined; | ||
} | ||
interface EventMultiValueQueryStringParameters { | ||
[name: string]: string[] | undefined; | ||
} | ||
type EventHeaders = Record<string, string | undefined>; | ||
type EventMultiValueHeaders = Record<string, string[] | undefined>; | ||
type EventQueryStringParameters = Record<string, string | undefined>; | ||
type EventMultiValueQueryStringParameters = Record<string, string[] | undefined>; | ||
interface HandlerEvent { | ||
@@ -62,8 +50,4 @@ rawUrl: string; | ||
statusCode: number; | ||
headers?: { | ||
[header: string]: boolean | number | string; | ||
}; | ||
multiValueHeaders?: { | ||
[header: string]: ReadonlyArray<boolean | number | string>; | ||
}; | ||
headers?: Record<string, boolean | number | string>; | ||
multiValueHeaders?: Record<string, readonly (boolean | number | string)[]>; | ||
body?: string; | ||
@@ -82,3 +66,3 @@ isBase64Encoded?: boolean; | ||
} | ||
type Handler = BaseHandler<HandlerResponse, HandlerContext>; | ||
type Handler = BaseHandler; | ||
@@ -85,0 +69,0 @@ declare global { |
@@ -88,4 +88,4 @@ // dev/main.ts | ||
this.isBackground = name.endsWith(BACKGROUND_FUNCTION_SUFFIX); | ||
const functionConfig = config.functions && config.functions[name]; | ||
this.schedule = functionConfig && functionConfig.schedule; | ||
const functionConfig = config.functions?.[name]; | ||
this.schedule = functionConfig?.schedule; | ||
this.srcFiles = /* @__PURE__ */ new Set(); | ||
@@ -792,3 +792,3 @@ } | ||
const url = new URL(`http://localhost${urlPath}`); | ||
const defaultURLMatch = url.pathname.match(DEFAULT_FUNCTION_URL_EXPRESSION); | ||
const defaultURLMatch = DEFAULT_FUNCTION_URL_EXPRESSION.exec(url.pathname); | ||
if (defaultURLMatch) { | ||
@@ -795,0 +795,0 @@ const func = this.get(defaultURLMatch[2]); |
@@ -13,8 +13,4 @@ import { PipelineSource } from 'node:stream'; | ||
logStreamName: string; | ||
identity?: { | ||
[key: string]: any; | ||
}; | ||
clientContext?: { | ||
[key: string]: any; | ||
}; | ||
identity?: Record<string, any>; | ||
clientContext?: Record<string, any>; | ||
getRemainingTimeInMillis(): number; | ||
@@ -31,14 +27,6 @@ /** @deprecated Use handler callback or promise result */ | ||
interface EventHeaders { | ||
[name: string]: string | undefined; | ||
} | ||
interface EventMultiValueHeaders { | ||
[name: string]: string[] | undefined; | ||
} | ||
interface EventQueryStringParameters { | ||
[name: string]: string | undefined; | ||
} | ||
interface EventMultiValueQueryStringParameters { | ||
[name: string]: string[] | undefined; | ||
} | ||
type EventHeaders = Record<string, string | undefined>; | ||
type EventMultiValueHeaders = Record<string, string[] | undefined>; | ||
type EventQueryStringParameters = Record<string, string | undefined>; | ||
type EventMultiValueQueryStringParameters = Record<string, string[] | undefined>; | ||
interface HandlerEvent { | ||
@@ -60,8 +48,4 @@ rawUrl: string; | ||
statusCode: number; | ||
headers?: { | ||
[header: string]: boolean | number | string; | ||
}; | ||
multiValueHeaders?: { | ||
[header: string]: ReadonlyArray<boolean | number | string>; | ||
}; | ||
headers?: Record<string, boolean | number | string>; | ||
multiValueHeaders?: Record<string, readonly (boolean | number | string)[]>; | ||
body?: string; | ||
@@ -86,4 +70,4 @@ isBase64Encoded?: boolean; | ||
} | ||
type Handler = BaseHandler<HandlerResponse, HandlerContext>; | ||
type BuilderHandler = BaseHandler<BuilderResponse, HandlerContext>; | ||
type Handler = BaseHandler; | ||
type BuilderHandler = BaseHandler<BuilderResponse>; | ||
interface StreamingHandler { | ||
@@ -90,0 +74,0 @@ (event: HandlerEvent, context: HandlerContext): Promise<StreamingResponse>; |
@@ -34,3 +34,3 @@ { | ||
}, | ||
"version": "4.1.2", | ||
"version": "4.1.3", | ||
"description": "TypeScript utilities for interacting with Netlify Functions", | ||
@@ -86,4 +86,4 @@ "files": [ | ||
"@netlify/dev-utils": "3.1.1", | ||
"@netlify/serverless-functions-api": "2.1.0", | ||
"@netlify/zip-it-and-ship-it": "^12.1.1", | ||
"@netlify/serverless-functions-api": "2.1.1", | ||
"@netlify/zip-it-and-ship-it": "^12.1.4", | ||
"cron-parser": "^4.9.0", | ||
@@ -90,0 +90,0 @@ "decache": "^4.6.2", |
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
76733
-0.67%1915
-1.64%+ Added
- Removed