@vercel/container 14.0.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.
- package/dist/index.js +20 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3422,9 +3422,9 @@ async function resolveImageHandler(options, source, span) {
|
|
|
3422
3422
|
}
|
|
3423
3423
|
const { dockerfileRel, dockerfilePath } = source;
|
|
3424
3424
|
if (meta?.isDev) {
|
|
3425
|
-
const
|
|
3425
|
+
const serviceName = options.service?.name;
|
|
3426
3426
|
const tag2 = devImageTag(
|
|
3427
|
-
|
|
3427
|
+
serviceName ?? import_node_path17.default.basename(dockerfileRel).split(".")[0]
|
|
3428
3428
|
);
|
|
3429
3429
|
span?.setAttributes({ "container.mode": "dev", "image.tag": tag2 });
|
|
3430
3430
|
return tag2;
|
|
@@ -3434,9 +3434,9 @@ async function resolveImageHandler(options, source, span) {
|
|
|
3434
3434
|
`Dockerfile not found at "${dockerfilePath}" for container service.`
|
|
3435
3435
|
);
|
|
3436
3436
|
}
|
|
3437
|
-
const
|
|
3438
|
-
const repository = sanitizeRepository(
|
|
3439
|
-
|
|
3437
|
+
const { daemon } = options.config;
|
|
3438
|
+
const repository = daemon ? (0, import_build_utils6.getDaemonImageRepository)(daemon.name) : sanitizeRepository(
|
|
3439
|
+
options.service?.name ?? import_node_path17.default.basename(dockerfileRel).split(".")[0]
|
|
3440
3440
|
);
|
|
3441
3441
|
const tag = resolveImageTag();
|
|
3442
3442
|
const contextDir = import_node_path17.default.dirname(dockerfilePath);
|
|
@@ -3469,12 +3469,27 @@ function buildArgsFromEnv(env) {
|
|
|
3469
3469
|
}
|
|
3470
3470
|
async function build(options) {
|
|
3471
3471
|
const source = resolveImageSource(options, "build");
|
|
3472
|
+
const { daemon } = options.config;
|
|
3472
3473
|
const image = await withSpan(
|
|
3473
3474
|
options.span,
|
|
3474
3475
|
"container.resolve_image",
|
|
3475
3476
|
{ "service.name": options.service?.name },
|
|
3476
3477
|
(span) => resolveImageHandler(options, source, span)
|
|
3477
3478
|
);
|
|
3479
|
+
if (daemon) {
|
|
3480
|
+
return {
|
|
3481
|
+
output: {},
|
|
3482
|
+
daemons: {
|
|
3483
|
+
[daemon.name]: {
|
|
3484
|
+
runtime: "container",
|
|
3485
|
+
image,
|
|
3486
|
+
replicas: daemon.replicas,
|
|
3487
|
+
...daemon.command && { command: daemon.command },
|
|
3488
|
+
...daemon.resources && { resources: daemon.resources }
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
};
|
|
3492
|
+
}
|
|
3478
3493
|
const lambdaOptions = await (0, import_build_utils6.getLambdaOptionsFromFunction)({
|
|
3479
3494
|
sourceFile: resolveFunctionSourceFile(options),
|
|
3480
3495
|
config: options.config
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/container",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"homepage": "https://vercel.com/docs",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"tar": "7.5.11"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@vercel/build-utils": "14.
|
|
20
|
+
"@vercel/build-utils": "14.17.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "20.11.0",
|
|
24
24
|
"vitest": "4.1.10",
|
|
25
|
-
"@vercel/build-utils": "14.
|
|
25
|
+
"@vercel/build-utils": "14.17.0"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|