From 64593fb4e67b129ed3be5a7dbcd4f6eddae69f1b Mon Sep 17 00:00:00 2001 From: Swapnil Nagar Date: Thu, 5 Feb 2026 21:20:09 -0800 Subject: [PATCH] Fixing the missing type issue with the library --- package-lock.json | 21 ++++++++++++++------- package.json | 3 ++- src/http/HttpRequest.ts | 2 +- types/http.d.ts | 1 + 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index d54728d..91d488b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,17 @@ { "name": "@azure/functions", - "version": "4.11.1", + "version": "4.11.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@azure/functions", - "version": "4.11.1", + "version": "4.11.2", "license": "MIT", "dependencies": { "@azure/functions-extensions-base": "0.2.0", - "cookie": "^0.7.0" + "cookie": "^0.7.0", + "undici-types": "^7.20.0" }, "devDependencies": { "@types/chai": "^4.2.22", @@ -628,6 +629,13 @@ "undici-types": "~6.21.0" } }, + "node_modules/@types/node/node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/parse-json": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", @@ -6562,10 +6570,9 @@ } }, "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.20.0.tgz", + "integrity": "sha512-PZDAAlMkNw5ZzN/ebfyrwzrMWfIf7Jbn9iM/I6SF456OKrb2wnfqVowaxEY/cMAM8MjFu1zhdpJyA0L+rTYwNw==", "license": "MIT" }, "node_modules/universalify": { diff --git a/package.json b/package.json index d883a2b..ce1a5fe 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,8 @@ }, "dependencies": { "@azure/functions-extensions-base": "0.2.0", - "cookie": "^0.7.0" + "cookie": "^0.7.0", + "undici-types": "^7.20.0" }, "devDependencies": { "@types/chai": "^4.2.22", diff --git a/src/http/HttpRequest.ts b/src/http/HttpRequest.ts index f0b0d40..62564cb 100644 --- a/src/http/HttpRequest.ts +++ b/src/http/HttpRequest.ts @@ -153,7 +153,7 @@ export function createStreamRequest( duplex: 'half', method: nonNullProp(proxyReq, 'method'), headers, - }); + } as RequestInit); const params: Record = {}; for (const [key, rpcValue] of Object.entries(rpcParams)) { diff --git a/types/http.d.ts b/types/http.d.ts index 5373544..74cae3c 100644 --- a/types/http.d.ts +++ b/types/http.d.ts @@ -4,6 +4,7 @@ import { Blob } from 'buffer'; import { Readable } from 'stream'; import { ReadableStream } from 'stream/web'; +import { FormData, Headers } from 'undici-types'; import { URLSearchParams } from 'url'; import { FunctionOptions, FunctionOutput, FunctionResult, FunctionTrigger } from './index'; import { InvocationContext } from './InvocationContext';