@vercel/build-utils 14.23.0 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/fs/node-version.js +0 -3
  3. package/dist/fs/stream-to-digest-async.d.ts +0 -1
  4. package/dist/fs/stream-to-digest-async.js +3 -8
  5. package/dist/index.d.ts +1 -28
  6. package/dist/index.js +11 -37
  7. package/dist/schedules.d.ts +4 -0
  8. package/dist/types.d.ts +5 -0
  9. package/package.json +3 -7
  10. package/dist/collect-build-result/file-to-build-output-file.d.ts +0 -26
  11. package/dist/collect-build-result/file-to-build-output-file.js +0 -54
  12. package/dist/collect-build-result/get-build-result-metadata.d.ts +0 -33
  13. package/dist/collect-build-result/get-build-result-metadata.js +0 -99
  14. package/dist/collect-build-result/get-content-type.d.ts +0 -1
  15. package/dist/collect-build-result/get-content-type.js +0 -45
  16. package/dist/collect-build-result/get-lambda-by-output-path.d.ts +0 -13
  17. package/dist/collect-build-result/get-lambda-by-output-path.js +0 -31
  18. package/dist/collect-build-result/get-prerender-chain.d.ts +0 -8
  19. package/dist/collect-build-result/get-prerender-chain.js +0 -44
  20. package/dist/collect-build-result/is-route-middleware.d.ts +0 -4
  21. package/dist/collect-build-result/is-route-middleware.js +0 -30
  22. package/dist/collect-build-result/prerender-to-build-output-file.d.ts +0 -23
  23. package/dist/collect-build-result/prerender-to-build-output-file.js +0 -85
  24. package/dist/collect-build-result/stream-with-extended-payload.d.ts +0 -5
  25. package/dist/collect-build-result/stream-with-extended-payload.js +0 -49
  26. package/dist/collect-build-result/validate-build-result.d.ts +0 -19
  27. package/dist/collect-build-result/validate-build-result.js +0 -139
  28. package/dist/collect-build-result/validate-prerender.d.ts +0 -8
  29. package/dist/collect-build-result/validate-prerender.js +0 -32
  30. package/dist/collect-build-result/validate-regular-file.d.ts +0 -8
  31. package/dist/collect-build-result/validate-regular-file.js +0 -42
  32. package/dist/collect-uncompressed-size.d.ts +0 -6
  33. package/dist/collect-uncompressed-size.js +0 -59
  34. package/dist/deserialize/create-functions-iterator.d.ts +0 -8
  35. package/dist/deserialize/create-functions-iterator.js +0 -52
  36. package/dist/deserialize/deserialize-build-output-types.d.ts +0 -56
  37. package/dist/deserialize/deserialize-build-output-types.js +0 -16
  38. package/dist/deserialize/deserialize-build-output.d.ts +0 -4
  39. package/dist/deserialize/deserialize-build-output.js +0 -296
  40. package/dist/deserialize/deserialize-edge-function.d.ts +0 -5
  41. package/dist/deserialize/deserialize-edge-function.js +0 -47
  42. package/dist/deserialize/deserialize-lambda.d.ts +0 -22
  43. package/dist/deserialize/deserialize-lambda.js +0 -56
  44. package/dist/deserialize/hydrate-files-map.d.ts +0 -3
  45. package/dist/deserialize/hydrate-files-map.js +0 -55
  46. package/dist/deserialize/maybe-read-json.d.ts +0 -5
  47. package/dist/deserialize/maybe-read-json.js +0 -37
  48. package/dist/deserialize/serialized-types.d.ts +0 -32
  49. package/dist/deserialize/serialized-types.js +0 -16
  50. package/dist/deserialize/validate-framework-version.d.ts +0 -6
  51. package/dist/deserialize/validate-framework-version.js +0 -63
  52. package/dist/finalize-lambda.d.ts +0 -77
  53. package/dist/finalize-lambda.js +0 -117
  54. package/dist/process-serverless/get-encrypted-env-file.d.ts +0 -11
  55. package/dist/process-serverless/get-encrypted-env-file.js +0 -47
  56. package/dist/process-serverless/get-lambda-environment.d.ts +0 -19
  57. package/dist/process-serverless/get-lambda-environment.js +0 -53
  58. package/dist/process-serverless/get-lambda-preload-scripts.d.ts +0 -22
  59. package/dist/process-serverless/get-lambda-preload-scripts.js +0 -43
  60. package/dist/process-serverless/get-lambda-supports-streaming.d.ts +0 -22
  61. package/dist/process-serverless/get-lambda-supports-streaming.js +0 -42
  62. package/dist/validate-lambda-size.d.ts +0 -45
  63. package/dist/validate-lambda-size.js +0 -117
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 15.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - fec2df1: Remove the legacy BYOC extension's build-output collection and deserialization utilities, Lambda finalization and size validation, and serverless environment/streaming helpers. BYOC function preparation now uses `vercel deploy describe`.
8
+
9
+ The removed exports include `deserializeBuildOutput`, `deserializeLambda`, `deserializeEdgeFunction`, `finalizeLambda`, `collectUncompressedSize`, the `validateBuildResult` and `validateLambdaSize` families, `getEncryptedEnv`, `getLambdaEnvironment`, `getLambdaPreloadScripts`, `getLambdaSupportsStreaming`, and the associated collection/deserialization and serverless types. Also remove the unused standalone `md5` helper. Preserve `streamToDigestAsync`, `sha256`, `FileDigest`, and `ExtendedBodyData`, which still have build-container consumers.
10
+
11
+ Remove the Node builder's outdated reference to the shared streaming helper; its AWS custom-handler streaming behavior is unchanged.
12
+
13
+ ### Minor Changes
14
+
15
+ - 9b1b587: Allow explicitly selecting Node.js 26 for local builds without an environment variable.
16
+
17
+ ### Patch Changes
18
+
19
+ - d123652: Accept a command argument array and `root` with Dockerfile and Containerfile schedule entrypoints. This adds configuration support; building and executing these schedules will follow separately.
20
+
3
21
  ## 14.23.0
4
22
 
5
23
  ### Minor Changes
@@ -121,9 +121,6 @@ function getNodeVersionByMajor(major) {
121
121
  }
122
122
  function getOptions() {
123
123
  let versions = NODE_VERSIONS;
124
- if (process.env.VERCEL_ALLOW_NODEJS_26 !== "1") {
125
- versions = versions.filter((version) => version.major !== 26);
126
- }
127
124
  if (process.env.VERCEL_ALLOW_DISCONTINUED_NODEJS20 === "1") {
128
125
  versions = versions.map(
129
126
  (version) => version.major === 20 ? new import_types.NodeVersion({
@@ -5,4 +5,3 @@ export interface FileDigest {
5
5
  }
6
6
  export declare function streamToDigestAsync(stream: NodeJS.ReadableStream): Promise<FileDigest>;
7
7
  export declare function sha256(value: any): string;
8
- export declare function md5(value: Buffer): string;
@@ -18,7 +18,6 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var stream_to_digest_async_exports = {};
20
20
  __export(stream_to_digest_async_exports, {
21
- md5: () => md5,
22
21
  sha256: () => sha256,
23
22
  streamToDigestAsync: () => streamToDigestAsync
24
23
  });
@@ -29,11 +28,11 @@ async function streamToDigestAsync(stream) {
29
28
  stream.once("error", reject);
30
29
  let count = 0;
31
30
  const sha2562 = (0, import_crypto.createHash)("sha256");
32
- const md52 = (0, import_crypto.createHash)("md5");
31
+ const md5 = (0, import_crypto.createHash)("md5");
33
32
  stream.on("end", () => {
34
33
  const res = {
35
34
  sha256: sha2562.digest("hex"),
36
- md5: md52.digest("hex"),
35
+ md5: md5.digest("hex"),
37
36
  size: count
38
37
  };
39
38
  resolve(res);
@@ -42,7 +41,7 @@ async function streamToDigestAsync(stream) {
42
41
  let chunk;
43
42
  while (null !== (chunk = stream.read())) {
44
43
  const buffer = Buffer.isBuffer(chunk) ? Uint8Array.from(chunk) : Uint8Array.from(Buffer.from(chunk));
45
- md52.update(buffer);
44
+ md5.update(buffer);
46
45
  sha2562.update(buffer);
47
46
  count += chunk.length;
48
47
  }
@@ -52,12 +51,8 @@ async function streamToDigestAsync(stream) {
52
51
  function sha256(value) {
53
52
  return (0, import_crypto.createHash)("sha256").update(value).digest("hex");
54
53
  }
55
- function md5(value) {
56
- return (0, import_crypto.createHash)("md5").update(Uint8Array.from(value)).digest("hex");
57
- }
58
54
  // Annotate the CommonJS export names for ESM import in node:
59
55
  0 && (module.exports = {
60
- md5,
61
56
  sha256,
62
57
  streamToDigestAsync
63
58
  });
package/dist/index.d.ts CHANGED
@@ -54,32 +54,5 @@ export * from './service-path-utils';
54
54
  export * from './schedule-path-utils';
55
55
  export * from './schedules';
56
56
  export { DAEMON_NAME_PATTERN, getDaemonImageRepository, getDaemonNames, type DaemonConfig, type DaemonOutput, type DaemonInstances, type DaemonReplicas, type DaemonResources, type Daemons, } from './daemons';
57
- export { getEncryptedEnv, type EncryptedEnvFile, } from './process-serverless/get-encrypted-env-file';
58
- export { getLambdaEnvironment } from './process-serverless/get-lambda-environment';
59
- export { getLambdaPreloadScripts, type BytecodeCachingOptions, } from './process-serverless/get-lambda-preload-scripts';
60
- export { getLambdaSupportsStreaming } from './process-serverless/get-lambda-supports-streaming';
61
- export { streamToDigestAsync, sha256, md5, type FileDigest, } from './fs/stream-to-digest-async';
62
- export { getBuildResultMetadata, type BuildResultMetadata, } from './collect-build-result/get-build-result-metadata';
63
- export { validateBuildResult, SUPPORTED_AL2023_RUNTIMES, type ValidateBuildResultParams, type ValidateBuildResultResult, } from './collect-build-result/validate-build-result';
64
- export { getLambdaByOutputPath } from './collect-build-result/get-lambda-by-output-path';
65
- export { isRouteMiddleware } from './collect-build-result/is-route-middleware';
66
- export { getPrerenderChain } from './collect-build-result/get-prerender-chain';
67
- export { streamWithExtendedPayload, type ExtendedBodyData, } from './collect-build-result/stream-with-extended-payload';
68
- export { collectUncompressedSize } from './collect-uncompressed-size';
69
- export { finalizeLambda, type CreateZipResult, type CreateZipFn, type FinalizeLambdaParams, type FinalizeLambdaResult, type TraceFn, } from './finalize-lambda';
70
- export { validateLambdaSize, validateUncompressedLambdaSize, FunctionSizeError, MAX_LAMBDA_SIZE, MAX_LAMBDA_UNCOMPRESSED_SIZE, validateEnvWrapperSupport, ENV_WRAPPER_SUPPORTED_FAMILIES, } from './validate-lambda-size';
71
- export { validateFrameworkVersion } from './deserialize/validate-framework-version';
72
- export { hydrateFilesMap } from './deserialize/hydrate-files-map';
73
- export { createFunctionsIterator } from './deserialize/create-functions-iterator';
74
- export { maybeReadJSON } from './deserialize/maybe-read-json';
75
- export { deserializeBuildOutput, validateDeploymentId, } from './deserialize/deserialize-build-output';
76
- export type { DeserializeBuildOutputConfig, DeserializeBuildOutputResult, DeserializeBuildOutputPathOverride, DeserializeBuildOutputOptions, DeserializeBuildOutputLambdaOptions, GroupLambdasOptions, DeserializeBuildOutputSerializedConfig, DeserializeBuildOutputSerializedPrerender, } from './deserialize/deserialize-build-output-types';
77
- export { deserializeLambda, type DeserializeLambdaOptions, } from './deserialize/deserialize-lambda';
78
- export { deserializeEdgeFunction } from './deserialize/deserialize-edge-function';
79
- export type { Properties, SerializedLambda, SerializedNodejsLambda, SerializedEdgeFunction, SerializedFileFsRef, SerializedPrerender, } from './deserialize/serialized-types';
80
- export { validateRegularFile } from './collect-build-result/validate-regular-file';
81
- export { validatePrerender } from './collect-build-result/validate-prerender';
82
- export { getContentType } from './collect-build-result/get-content-type';
83
- export { fileToBuildOutputFile, type BuildOutputFile, } from './collect-build-result/file-to-build-output-file';
84
- export { prerenderToBuildOutputFile, type ExtendedPayload, } from './collect-build-result/prerender-to-build-output-file';
57
+ export { streamToDigestAsync, sha256, type FileDigest, } from './fs/stream-to-digest-async';
85
58
  export { EMPTY_DISCOVERY, NAVIGATION_ACCEPT_RE, promoteStaticFiles, staticBundleExclusions, staticDirectoryRedirects, staticFallbackRoutes, staticShadowRoutes, type ShadowRoute, type StaticBundleExclusions, type StaticFallback, type StaticDiscovery, type StaticMount, type StaticPromotionOptions, type StaticPromotionResult, } from './static-files';