@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.
- package/dist/engines/types.d.ts +9 -4
- package/dist/index.js +1542 -1328
- package/dist/oci-layout/layout.d.ts +5 -3
- package/dist/publish.d.ts +37 -0
- package/dist/registry.d.ts +1 -1
- package/dist/schedules-command-dispatcher +0 -0
- package/dist/schedules-command.d.ts +2 -2
- package/package.json +3 -3
|
@@ -2,6 +2,7 @@ export declare const OCI_LAYOUT_VERSION = "1.0.0";
|
|
|
2
2
|
export declare const OCI_INDEX_MEDIA_TYPE = "application/vnd.oci.image.index.v1+json";
|
|
3
3
|
export declare const OCI_MANIFEST_MEDIA_TYPE = "application/vnd.oci.image.manifest.v1+json";
|
|
4
4
|
export declare const DOCKER_MANIFEST_MEDIA_TYPE = "application/vnd.docker.distribution.manifest.v2+json";
|
|
5
|
+
export declare const DOCKER_MANIFEST_LIST_MEDIA_TYPE = "application/vnd.docker.distribution.manifest.list.v2+json";
|
|
5
6
|
export declare const OCI_CONFIG_MEDIA_TYPE = "application/vnd.oci.image.config.v1+json";
|
|
6
7
|
export interface OciDescriptor {
|
|
7
8
|
mediaType?: string;
|
|
@@ -22,9 +23,10 @@ export declare function blobPath(layoutDir: string, digest: string): string;
|
|
|
22
23
|
export declare function layoutRefPath(layoutDir: string, imageRef: string): string;
|
|
23
24
|
export declare function parseDescriptor(value: unknown, label: string): OciDescriptor;
|
|
24
25
|
/**
|
|
25
|
-
* Verify an
|
|
26
|
-
*
|
|
27
|
-
*
|
|
26
|
+
* Verify an OCI image layout holds one linux/amd64 image, and that every blob
|
|
27
|
+
* of that image (manifest, config, and all layers) is present with the
|
|
28
|
+
* expected size. Other platforms, attestations and non-image artifacts are
|
|
29
|
+
* skipped, so a builder that adds them does not fail the build.
|
|
28
30
|
*
|
|
29
31
|
* The CNB lifecycle in `-layout` mode exits 0 even if run-image layer blobs are
|
|
30
32
|
* missing; this check catches incomplete exports before handing the layout to
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Span } from '@vercel/build-utils';
|
|
2
|
+
import type { BuildahClient } from './clients/buildah';
|
|
3
|
+
import type { BuildParams, ContainerEngine } from './engines/types';
|
|
4
|
+
import { type ImageOutput } from './oci-layout';
|
|
5
|
+
import type { SchedulesCommand } from './schedules-command';
|
|
6
|
+
export interface DockerfileBuild {
|
|
7
|
+
contextDir: string;
|
|
8
|
+
dockerfilePath: string;
|
|
9
|
+
repository: string;
|
|
10
|
+
tag: string;
|
|
11
|
+
buildArgs?: Record<string, string>;
|
|
12
|
+
buildTarget?: string;
|
|
13
|
+
buildahClient: BuildahClient;
|
|
14
|
+
parentSpan?: Span;
|
|
15
|
+
schedulesCommand?: SchedulesCommand;
|
|
16
|
+
}
|
|
17
|
+
export interface ImagePublisher {
|
|
18
|
+
readonly mode: 'build_and_push' | 'build_and_export';
|
|
19
|
+
readonly spanAttributes: Readonly<Record<string, string>>;
|
|
20
|
+
/**
|
|
21
|
+
* Runs before the engine is touched, so a bad token fails before any
|
|
22
|
+
* toolchain work.
|
|
23
|
+
*/
|
|
24
|
+
resolve(span?: Span): Promise<ImagePublication>;
|
|
25
|
+
}
|
|
26
|
+
export interface ImagePublication {
|
|
27
|
+
/** The reference to build the image under. */
|
|
28
|
+
readonly imageRef: string;
|
|
29
|
+
/** Runs once the toolchain is ready and before the build. */
|
|
30
|
+
connect?(span?: Span): Promise<void>;
|
|
31
|
+
publish(params: BuildParams, span?: Span): Promise<ImageOutput>;
|
|
32
|
+
}
|
|
33
|
+
export declare function createImagePublisher(params: {
|
|
34
|
+
build: DockerfileBuild;
|
|
35
|
+
engine: ContainerEngine;
|
|
36
|
+
exportLayout: boolean;
|
|
37
|
+
}): ImagePublisher;
|
package/dist/registry.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Span } from '@vercel/build-utils';
|
|
2
2
|
import type { BuildPushParams } from './engines/types';
|
|
3
3
|
import type { OidcClaims } from './oidc';
|
|
4
|
-
interface RegistryTarget {
|
|
4
|
+
export interface RegistryTarget {
|
|
5
5
|
token: string;
|
|
6
6
|
claims: OidcClaims;
|
|
7
7
|
username: string;
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BuildParams, ContainerEngine } from './engines/types';
|
|
2
2
|
export interface SchedulesCommand {
|
|
3
3
|
command: [string, ...string[]];
|
|
4
4
|
}
|
|
@@ -8,4 +8,4 @@ export interface SchedulesCommand {
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const SCHEDULES_COMMAND_ENV = "VERCEL_SCHEDULE_RUN_COMMAND";
|
|
10
10
|
/** Build the schedule's Dockerfile, then derive an image that runs the dispatcher. */
|
|
11
|
-
export declare function buildSchedulesCommandImage(engine: ContainerEngine, params:
|
|
11
|
+
export declare function buildSchedulesCommandImage(engine: ContainerEngine, params: BuildParams, dispatcher?: string): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/container",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "29.0.0-snapshot-c9dfd83f2293",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"tar": "7.5.11"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@vercel/build-utils": "15.
|
|
21
|
+
"@vercel/build-utils": "15.7.0-snapshot-c9dfd83f2293"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "20.11.0",
|
|
25
25
|
"vitest": "4.1.10",
|
|
26
26
|
"@vercel-internals/ipc-proxy": "1.1.4",
|
|
27
|
-
"@vercel/build-utils": "15.
|
|
27
|
+
"@vercel/build-utils": "15.7.0-snapshot-c9dfd83f2293"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|