@vercel/container 23.0.1 → 23.0.2
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 +22 -2
- package/dist/schedules-command-dispatcher +0 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4084,6 +4084,26 @@ async function buildAndPushImage(params) {
|
|
|
4084
4084
|
}
|
|
4085
4085
|
);
|
|
4086
4086
|
}
|
|
4087
|
+
function resolveDaemonContextDir(options, daemon) {
|
|
4088
|
+
const contextDir = import_node_path22.default.join(options.workPath, daemon.root);
|
|
4089
|
+
const real = (p) => {
|
|
4090
|
+
try {
|
|
4091
|
+
return (0, import_node_fs16.realpathSync)(p);
|
|
4092
|
+
} catch {
|
|
4093
|
+
return import_node_path22.default.resolve(p);
|
|
4094
|
+
}
|
|
4095
|
+
};
|
|
4096
|
+
const relative3 = import_node_path22.default.relative(
|
|
4097
|
+
real(options.repoRootPath || options.workPath),
|
|
4098
|
+
real(contextDir)
|
|
4099
|
+
);
|
|
4100
|
+
if (import_node_path22.default.isAbsolute(relative3) || relative3 === ".." || relative3.startsWith(`..${import_node_path22.default.sep}`)) {
|
|
4101
|
+
throw new Error(
|
|
4102
|
+
`Daemon "${daemon.name}" has root "${daemon.root}", which is outside the repository.`
|
|
4103
|
+
);
|
|
4104
|
+
}
|
|
4105
|
+
return contextDir;
|
|
4106
|
+
}
|
|
4087
4107
|
async function resolveImageHandler(options, source, buildahClient, span, schedulesCommand) {
|
|
4088
4108
|
const { config, meta } = options;
|
|
4089
4109
|
const { daemon } = config;
|
|
@@ -4157,8 +4177,8 @@ async function resolveImageHandler(options, source, buildahClient, span, schedul
|
|
|
4157
4177
|
options.service?.name ?? import_node_path22.default.basename(dockerfileRel).split(".")[0]
|
|
4158
4178
|
);
|
|
4159
4179
|
const tag = resolveImageTag();
|
|
4160
|
-
const contextDir = schedulesCommand ? import_node_path22.default.join(options.workPath, schedulesCommand.root) : import_node_path22.default.dirname(dockerfilePath);
|
|
4161
|
-
const contextIsRoot = Boolean(schedulesCommand) || import_node_path22.default.dirname(import_node_path22.default.normalize(
|
|
4180
|
+
const contextDir = daemon ? resolveDaemonContextDir(options, daemon) : schedulesCommand ? import_node_path22.default.join(options.workPath, schedulesCommand.root) : import_node_path22.default.dirname(dockerfilePath);
|
|
4181
|
+
const contextIsRoot = Boolean(daemon || schedulesCommand) || import_node_path22.default.dirname(import_node_path22.default.normalize(dockerfileRel)) === ".";
|
|
4162
4182
|
const buildArgs = buildArgsFromEnv(meta?.buildEnv);
|
|
4163
4183
|
span?.setAttributes({
|
|
4164
4184
|
"container.mode": "build_and_push",
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/container",
|
|
3
|
-
"version": "23.0.
|
|
3
|
+
"version": "23.0.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"homepage": "https://vercel.com/docs",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"tar": "7.5.11"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@vercel/build-utils": "15.1.
|
|
20
|
+
"@vercel/build-utils": "15.1.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "20.11.0",
|
|
24
24
|
"vitest": "4.1.10",
|
|
25
|
-
"@vercel-internals/ipc-proxy": "1.1.
|
|
26
|
-
"@vercel/build-utils": "15.1.
|
|
25
|
+
"@vercel-internals/ipc-proxy": "1.1.1",
|
|
26
|
+
"@vercel/build-utils": "15.1.1"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|