@vercel/build-utils 14.11.0 → 14.13.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 14.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 34b2c8e: Support `afterCacheBypass` rules in Build Output API `config.json`, preserving request and cached response header conditions through builds and deserialization.
8
+
9
+ ## 14.12.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 6e68e60: Add `onMiss` to `Prerender`.
14
+
15
+ ```ts
16
+ onMiss?: 'sync' | 'dynamic';
17
+ ```
18
+
19
+ Declares how a request is served when no prerendered output is available for
20
+ it yet. Absent means `sync`: block the response on rendering it. `dynamic`
21
+ serves the request dynamically while the static shell is regenerated in the
22
+ background. The value is carried unvalidated so an unknown mode cannot fail
23
+ a deploy.
24
+
3
25
  ## 14.11.0
4
26
 
5
27
  ### Minor Changes
@@ -13,6 +13,7 @@ export interface DeserializeBuildOutputConfig<TFlags = unknown> {
13
13
  wildcard?: BuildResultV2Typical['wildcard'];
14
14
  images?: BuildResultV2Typical['images'];
15
15
  routes?: BuildResultV2Typical['routes'];
16
+ afterCacheBypass?: BuildResultV2Typical['afterCacheBypass'];
16
17
  overrides?: Record<string, DeserializeBuildOutputPathOverride>;
17
18
  framework?: BuildResultV2Typical['framework'];
18
19
  crons?: BuildResultV2Typical['crons'];
@@ -282,6 +282,7 @@ async function deserializeBuildOutput(options) {
282
282
  crons: config.crons,
283
283
  flags: flags ? flags : config.flags,
284
284
  routes: config.routes,
285
+ afterCacheBypass: config.afterCacheBypass,
285
286
  output,
286
287
  framework,
287
288
  ...includeDeploymentId ? { deploymentId: config.deploymentId } : {},
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import FileFsRef from './file-fs-ref';
3
3
  import FileRef from './file-ref';
4
4
  import { Lambda, createLambda, getLambdaOptionsFromFunction, sanitizeConsumerName } from './lambda';
5
5
  import { NodejsLambda, type NodejsLambdaOptions } from './nodejs-lambda';
6
- import { Prerender, type PrerenderInitialMetadata } from './prerender';
6
+ import { Prerender, type PrerenderInitialMetadata, type PrerenderOnMiss } from './prerender';
7
7
  import download, { downloadFile, type DownloadedFiles, isSymbolicLink, isDirectory, isExternalSymlink, isExternalSymlinkTarget, getSymlinkTarget } from './fs/download';
8
8
  import getWriteableDirectory from './fs/get-writable-directory';
9
9
  import glob, { type GlobOptions } from './fs/glob';
@@ -22,7 +22,7 @@ import { cloneEnv } from './clone-env';
22
22
  import { hardLinkDir } from './hard-link-dir';
23
23
  import { getNodeExecPath } from './get-node-exec-path';
24
24
  import { validateNpmrc } from './validate-npmrc';
25
- export type { NodejsLambdaOptions, PrerenderInitialMetadata };
25
+ export type { NodejsLambdaOptions, PrerenderInitialMetadata, PrerenderOnMiss };
26
26
  export type { LambdaAffinity } from './lambda';
27
27
  export { FileBlob, FileFsRef, FileRef, Lambda, NodejsLambda, createLambda, Prerender, download, downloadFile, type DownloadedFiles, getWriteableDirectory, glob, type GlobOptions, rename, spawnAsync, getScriptName, installDependencies, runPackageJsonScript, execCommand, spawnCommand, walkParentDirs, getNodeBinPath, getNodeBinPaths, getNodeExecPath, getSupportedNodeVersion, isBunVersion, getSupportedBunVersion, getOrCreateBunBinary, detectPackageManager, runNpmInstall, type NpmInstallOutput, runBundleInstall, runPipInstall, type PipInstallResult, runShellScript, runCustomInstallCommand, resetCustomInstallCommandSet, getEnvForPackageManager, getNodeVersion, getPathForPackageManager, getLatestNodeVersion, getDiscontinuedNodeVersions, getSpawnOptions, getPlatformEnv, getPrefixedEnvVars, getServiceUrlEnvVars, getExperimentalServiceUrlEnvVars, streamToBuffer, streamToBufferChunks, debug, isSymbolicLink, isDirectory, isExternalSymlink, isExternalSymlinkTarget, getSymlinkTarget, getLambdaOptionsFromFunction, sanitizeConsumerName, scanParentDirs, findPackageJson, getIgnoreFilter, cloneEnv, hardLinkDir, traverseUpDirectories, validateNpmrc, type CliType, };
28
28
  export { EdgeFunction } from './edge-function';