@vercel/build-utils
Advanced tools
+6
-0
| # @vercel/build-utils | ||
| ## 13.26.2 | ||
| ### Patch Changes | ||
| - 647c1e8: Cleanup getLambdaSupportsStreaming | ||
| ## 13.26.1 | ||
@@ -4,0 +10,0 @@ |
| import type { Lambda } from './lambda'; | ||
| import type { NodejsLambda } from './nodejs-lambda'; | ||
| import type { BytecodeCachingOptions } from './process-serverless/get-lambda-preload-scripts'; | ||
| import type { SupportsStreamingResult } from './process-serverless/get-lambda-supports-streaming'; | ||
| /** | ||
@@ -62,4 +61,2 @@ * Optional wrapper around async work, allowing callers to inject tracing | ||
| uncompressedBytes: number; | ||
| /** Non-fatal streaming detection error, if any. Caller decides how to log. */ | ||
| streamingError?: SupportsStreamingResult['error']; | ||
| } | ||
@@ -66,0 +63,0 @@ /** |
@@ -101,7 +101,7 @@ "use strict"; | ||
| }; | ||
| const streamingResult = await (0, import_get_lambda_supports_streaming.getLambdaSupportsStreaming)( | ||
| const streamingResult = (0, import_get_lambda_supports_streaming.getLambdaSupportsStreaming)( | ||
| lambda, | ||
| forceStreamingRuntime | ||
| ); | ||
| lambda.supportsResponseStreaming = streamingResult.supportsStreaming; | ||
| lambda.supportsResponseStreaming = streamingResult; | ||
| return { | ||
@@ -112,4 +112,3 @@ buffer: zipResult.buffer, | ||
| size: zipResult.size, | ||
| uncompressedBytes, | ||
| streamingError: streamingResult.error | ||
| uncompressedBytes | ||
| }; | ||
@@ -116,0 +115,0 @@ } |
+1
-1
@@ -46,3 +46,3 @@ import FileBlob from './file-blob'; | ||
| export { getLambdaPreloadScripts, type BytecodeCachingOptions, } from './process-serverless/get-lambda-preload-scripts'; | ||
| export { getLambdaSupportsStreaming, type SupportsStreamingResult, } from './process-serverless/get-lambda-supports-streaming'; | ||
| export { getLambdaSupportsStreaming } from './process-serverless/get-lambda-supports-streaming'; | ||
| export { streamToDigestAsync, sha256, md5, type FileDigest, } from './fs/stream-to-digest-async'; | ||
@@ -49,0 +49,0 @@ export { getBuildResultMetadata, type BuildResultMetadata, } from './collect-build-result/get-build-result-metadata'; |
@@ -8,9 +8,2 @@ interface LambdaLike { | ||
| } | ||
| export interface SupportsStreamingResult { | ||
| supportsStreaming: boolean | undefined; | ||
| error?: { | ||
| handler: string; | ||
| message: string; | ||
| }; | ||
| } | ||
| /** | ||
@@ -29,3 +22,3 @@ * Determines if a Lambda should have streaming enabled. | ||
| */ | ||
| export declare function getLambdaSupportsStreaming(lambda: LambdaLike, forceStreamingRuntime: boolean): Promise<SupportsStreamingResult>; | ||
| export declare function getLambdaSupportsStreaming(lambda: LambdaLike, forceStreamingRuntime: boolean): boolean | undefined; | ||
| export {}; |
@@ -24,16 +24,16 @@ "use strict"; | ||
| module.exports = __toCommonJS(get_lambda_supports_streaming_exports); | ||
| async function getLambdaSupportsStreaming(lambda, forceStreamingRuntime) { | ||
| function getLambdaSupportsStreaming(lambda, forceStreamingRuntime) { | ||
| if (lambda.awsLambdaHandler) { | ||
| return { supportsStreaming: false }; | ||
| return false; | ||
| } | ||
| if (forceStreamingRuntime) { | ||
| return { supportsStreaming: true }; | ||
| return true; | ||
| } | ||
| if (typeof lambda.supportsResponseStreaming === "boolean") { | ||
| return { supportsStreaming: lambda.supportsResponseStreaming }; | ||
| return lambda.supportsResponseStreaming; | ||
| } | ||
| if ("launcherType" in lambda && lambda.launcherType === "Nodejs") { | ||
| return { supportsStreaming: true }; | ||
| return true; | ||
| } | ||
| return { supportsStreaming: void 0 }; | ||
| return void 0; | ||
| } | ||
@@ -40,0 +40,0 @@ // Annotate the CommonJS export names for ESM import in node: |
+3
-3
| { | ||
| "name": "@vercel/build-utils", | ||
| "version": "13.26.1", | ||
| "version": "13.26.2", | ||
| "license": "Apache-2.0", | ||
@@ -58,4 +58,4 @@ "main": "./dist/index.js", | ||
| "yazl": "2.5.1", | ||
| "@vercel/routing-utils": "6.2.0", | ||
| "@vercel/error-utils": "2.1.0" | ||
| "@vercel/error-utils": "2.1.0", | ||
| "@vercel/routing-utils": "6.2.0" | ||
| }, | ||
@@ -62,0 +62,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
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
2001087
-0.04%51339
-0.02%