@vercel/build-utils 14.23.0 → 15.0.1

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 (64) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/daemons.d.ts +20 -0
  3. package/dist/fs/node-version.js +0 -3
  4. package/dist/fs/stream-to-digest-async.d.ts +0 -1
  5. package/dist/fs/stream-to-digest-async.js +3 -8
  6. package/dist/index.d.ts +2 -29
  7. package/dist/index.js +11 -37
  8. package/dist/schedules.d.ts +4 -0
  9. package/dist/types.d.ts +5 -0
  10. package/package.json +3 -7
  11. package/dist/collect-build-result/file-to-build-output-file.d.ts +0 -26
  12. package/dist/collect-build-result/file-to-build-output-file.js +0 -54
  13. package/dist/collect-build-result/get-build-result-metadata.d.ts +0 -33
  14. package/dist/collect-build-result/get-build-result-metadata.js +0 -99
  15. package/dist/collect-build-result/get-content-type.d.ts +0 -1
  16. package/dist/collect-build-result/get-content-type.js +0 -45
  17. package/dist/collect-build-result/get-lambda-by-output-path.d.ts +0 -13
  18. package/dist/collect-build-result/get-lambda-by-output-path.js +0 -31
  19. package/dist/collect-build-result/get-prerender-chain.d.ts +0 -8
  20. package/dist/collect-build-result/get-prerender-chain.js +0 -44
  21. package/dist/collect-build-result/is-route-middleware.d.ts +0 -4
  22. package/dist/collect-build-result/is-route-middleware.js +0 -30
  23. package/dist/collect-build-result/prerender-to-build-output-file.d.ts +0 -23
  24. package/dist/collect-build-result/prerender-to-build-output-file.js +0 -85
  25. package/dist/collect-build-result/stream-with-extended-payload.d.ts +0 -5
  26. package/dist/collect-build-result/stream-with-extended-payload.js +0 -49
  27. package/dist/collect-build-result/validate-build-result.d.ts +0 -19
  28. package/dist/collect-build-result/validate-build-result.js +0 -139
  29. package/dist/collect-build-result/validate-prerender.d.ts +0 -8
  30. package/dist/collect-build-result/validate-prerender.js +0 -32
  31. package/dist/collect-build-result/validate-regular-file.d.ts +0 -8
  32. package/dist/collect-build-result/validate-regular-file.js +0 -42
  33. package/dist/collect-uncompressed-size.d.ts +0 -6
  34. package/dist/collect-uncompressed-size.js +0 -59
  35. package/dist/deserialize/create-functions-iterator.d.ts +0 -8
  36. package/dist/deserialize/create-functions-iterator.js +0 -52
  37. package/dist/deserialize/deserialize-build-output-types.d.ts +0 -56
  38. package/dist/deserialize/deserialize-build-output-types.js +0 -16
  39. package/dist/deserialize/deserialize-build-output.d.ts +0 -4
  40. package/dist/deserialize/deserialize-build-output.js +0 -296
  41. package/dist/deserialize/deserialize-edge-function.d.ts +0 -5
  42. package/dist/deserialize/deserialize-edge-function.js +0 -47
  43. package/dist/deserialize/deserialize-lambda.d.ts +0 -22
  44. package/dist/deserialize/deserialize-lambda.js +0 -56
  45. package/dist/deserialize/hydrate-files-map.d.ts +0 -3
  46. package/dist/deserialize/hydrate-files-map.js +0 -55
  47. package/dist/deserialize/maybe-read-json.d.ts +0 -5
  48. package/dist/deserialize/maybe-read-json.js +0 -37
  49. package/dist/deserialize/serialized-types.d.ts +0 -32
  50. package/dist/deserialize/serialized-types.js +0 -16
  51. package/dist/deserialize/validate-framework-version.d.ts +0 -6
  52. package/dist/deserialize/validate-framework-version.js +0 -63
  53. package/dist/finalize-lambda.d.ts +0 -77
  54. package/dist/finalize-lambda.js +0 -117
  55. package/dist/process-serverless/get-encrypted-env-file.d.ts +0 -11
  56. package/dist/process-serverless/get-encrypted-env-file.js +0 -47
  57. package/dist/process-serverless/get-lambda-environment.d.ts +0 -19
  58. package/dist/process-serverless/get-lambda-environment.js +0 -53
  59. package/dist/process-serverless/get-lambda-preload-scripts.d.ts +0 -22
  60. package/dist/process-serverless/get-lambda-preload-scripts.js +0 -43
  61. package/dist/process-serverless/get-lambda-supports-streaming.d.ts +0 -22
  62. package/dist/process-serverless/get-lambda-supports-streaming.js +0 -42
  63. package/dist/validate-lambda-size.d.ts +0 -45
  64. package/dist/validate-lambda-size.js +0 -117
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 15.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1a379a3: Support `livenessProbe` in `vercel.json#daemons`.
8
+
9
+ ## 15.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - 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`.
14
+
15
+ 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.
16
+
17
+ Remove the Node builder's outdated reference to the shared streaming helper; its AWS custom-handler streaming behavior is unchanged.
18
+
19
+ ### Minor Changes
20
+
21
+ - 9b1b587: Allow explicitly selecting Node.js 26 for local builds without an environment variable.
22
+
23
+ ### Patch Changes
24
+
25
+ - 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.
26
+
3
27
  ## 14.23.0
4
28
 
5
29
  ### Minor Changes
package/dist/daemons.d.ts CHANGED
@@ -8,6 +8,24 @@ export interface DaemonResources {
8
8
  memory: '1Gi' | '2Gi' | '4Gi' | '8Gi';
9
9
  };
10
10
  }
11
+ /** A Kubernetes-style HTTP liveness probe. */
12
+ export interface DaemonLivenessProbe {
13
+ httpGet: {
14
+ path?: string;
15
+ port: number;
16
+ host?: string;
17
+ scheme?: 'HTTP' | 'HTTPS';
18
+ httpHeaders?: Array<{
19
+ name: string;
20
+ value: string;
21
+ }>;
22
+ };
23
+ initialDelaySeconds?: number;
24
+ periodSeconds?: number;
25
+ timeoutSeconds?: number;
26
+ successThreshold?: number;
27
+ failureThreshold?: number;
28
+ }
11
29
  /** A `vercel.json#daemons` entry. */
12
30
  export interface DaemonConfig {
13
31
  root: string;
@@ -18,6 +36,7 @@ export interface DaemonConfig {
18
36
  replicas?: DaemonInstances;
19
37
  resources?: DaemonResources;
20
38
  terminationGracePeriodSeconds?: number;
39
+ livenessProbe?: DaemonLivenessProbe;
21
40
  /** Bindings to services in the same deployment. */
22
41
  bindings?: Array<Required<ServiceBinding>>;
23
42
  }
@@ -37,6 +56,7 @@ export interface DaemonOutput {
37
56
  instances: DaemonInstances;
38
57
  resources?: DaemonResources;
39
58
  terminationGracePeriodSeconds?: number;
59
+ livenessProbe?: DaemonLivenessProbe;
40
60
  bindings?: Array<Required<ServiceBinding>>;
41
61
  }
42
62
  /**
@@ -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
@@ -53,33 +53,6 @@ export { isNodeEntrypoint } from './node-entrypoint';
53
53
  export * from './service-path-utils';
54
54
  export * from './schedule-path-utils';
55
55
  export * from './schedules';
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';
56
+ export { DAEMON_NAME_PATTERN, getDaemonImageRepository, getDaemonNames, type DaemonConfig, type DaemonOutput, type DaemonInstances, type DaemonLivenessProbe, type DaemonReplicas, type DaemonResources, type Daemons, } from './daemons';
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';