@vercel/container 28.0.0 → 29.0.0-snapshot-c9dfd83f2293

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.
@@ -20,12 +20,10 @@ export interface RegistryCredentials {
20
20
  username: string;
21
21
  token: string;
22
22
  }
23
- export interface BuildPushParams extends RegistryCredentials {
23
+ export interface BuildParams {
24
24
  contextDir: string;
25
25
  dockerfilePath: string;
26
26
  imageRef: string;
27
- /** Bare repository name (without team/project prefix), for error messages. */
28
- repository: string;
29
27
  /**
30
28
  * Project build env (from `meta.buildEnv`) forwarded to the image build as
31
29
  * `--build-arg KEY=VALUE`, so Dockerfiles can consume declared `ARG`s during
@@ -42,6 +40,10 @@ export interface BuildPushParams extends RegistryCredentials {
42
40
  baseImageIsLocal?: boolean;
43
41
  span?: Span;
44
42
  }
43
+ export interface BuildPushParams extends BuildParams, RegistryCredentials {
44
+ /** Bare repository name (without team/project prefix), for error messages. */
45
+ repository: string;
46
+ }
45
47
  /**
46
48
  * Pluggable container image toolchain. Docker is used on developer machines;
47
49
  * buildah is used in the Vercel build container (daemonless, smaller footprint).
@@ -58,12 +60,13 @@ export interface ContainerEngine {
58
60
  */
59
61
  withRuntime<T>(span: Span | undefined, fn: () => Promise<T>): Promise<T>;
60
62
  /** Build the image and return the local reference it was tagged with. */
61
- build(params: BuildPushParams): Promise<string>;
63
+ build(params: BuildParams): Promise<string>;
62
64
  /** ONBUILD triggers kept in a built image. Buildah's OCI images drop them. */
63
65
  onBuildTriggers?(imageRef: string): Promise<string[]>;
64
66
  login(params: RegistryCredentials): Promise<void>;
65
67
  /** Push the image and return the digest of the manifest the registry stored. */
66
68
  push(params: BuildPushParams): Promise<string>;
69
+ exportLayout?(params: BuildParams, directory: string): Promise<void>;
67
70
  /**
68
71
  * Verify the engine's storage is configured as intended (e.g. native overlay
69
72
  * on the mounted cell volume) before building. MAY throw to fail the build
@@ -77,3 +80,5 @@ export interface ContainerEngine {
77
80
  */
78
81
  reportStorage?(span?: Span): Promise<void>;
79
82
  }
83
+ export type LayoutExportingEngine = ContainerEngine & Required<Pick<ContainerEngine, 'exportLayout'>>;
84
+ export declare function exportsLayouts(engine: ContainerEngine): engine is LayoutExportingEngine;