Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@vercel/build-utils

Package Overview
Dependencies
Maintainers
4
Versions
434
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/build-utils - npm Package Compare versions

Comparing version
13.26.1
to
13.26.2
+6
-0
CHANGELOG.md
# @vercel/build-utils
## 13.26.2
### Patch Changes
- 647c1e8: Cleanup getLambdaSupportsStreaming
## 13.26.1

@@ -4,0 +10,0 @@

+0
-3
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 @@ }

@@ -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:

{
"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