@vercel/container 8.3.1 → 9.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 +19 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1230,8 +1230,8 @@ var distribution_default = {
|
|
|
1230
1230
|
buildpacks: {
|
|
1231
1231
|
ruby: {
|
|
1232
1232
|
id: "vercel/ruby",
|
|
1233
|
-
version: "0.
|
|
1234
|
-
sha256: "
|
|
1233
|
+
version: "0.2.0",
|
|
1234
|
+
sha256: "d46d7d825b8e57636957125859c2637545892dc0f3cf93117b16c748bb4f35c5"
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
1237
|
};
|
|
@@ -2119,6 +2119,7 @@ var VERSION_FILE_RE = /^ruby[\s-]*(?:=\s*)?["']?([^\s#"']+)["']?/m;
|
|
|
2119
2119
|
var VERSION_RE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?$/;
|
|
2120
2120
|
var GEMFILE_RUBY_CALL_RE = /^\s*ruby\b(?!\s*:)/;
|
|
2121
2121
|
var GEMFILE_RUBY_LINE_RE = /^\s*ruby(?:\s*\(\s*("[^"]*"|'[^']*')\s*\)|\s*("[^"]*"|'[^']*'))\s*(?:#.*)?$/;
|
|
2122
|
+
var GEMFILE_RAILS_GEM_RE = /^\s*gem\s+["']rails["']/m;
|
|
2122
2123
|
var ruby = {
|
|
2123
2124
|
runtime: "ruby",
|
|
2124
2125
|
projectMarkers: ["Gemfile"],
|
|
@@ -2127,6 +2128,18 @@ var ruby = {
|
|
|
2127
2128
|
const version2 = selectRubyVersion(workPath) ?? DEFAULT_RUBY_VERSION;
|
|
2128
2129
|
const image = `${RUBY_IMAGE_REPOSITORY}:${version2}`;
|
|
2129
2130
|
return { version: version2, buildImage: image, runImage: image };
|
|
2131
|
+
},
|
|
2132
|
+
validate({ workPath, buildEnv }) {
|
|
2133
|
+
const gemfile = (0, import_node_path8.join)(workPath, "Gemfile");
|
|
2134
|
+
if (!(0, import_node_fs8.existsSync)(gemfile))
|
|
2135
|
+
return;
|
|
2136
|
+
if (!GEMFILE_RAILS_GEM_RE.test((0, import_node_fs8.readFileSync)(gemfile, "utf8")))
|
|
2137
|
+
return;
|
|
2138
|
+
if (buildEnv?.SECRET_KEY_BASE)
|
|
2139
|
+
return;
|
|
2140
|
+
throw new Error(
|
|
2141
|
+
"Rails requires SECRET_KEY_BASE at runtime, but it is not set in the project's environment variables. Add SECRET_KEY_BASE to the project's environment variables and deploy again."
|
|
2142
|
+
);
|
|
2130
2143
|
}
|
|
2131
2144
|
};
|
|
2132
2145
|
function isValidVersion(version2) {
|
|
@@ -2201,6 +2214,10 @@ async function buildAndPushBuildpack(params) {
|
|
|
2201
2214
|
`The ${params.buildpack.runtime} buildpack was selected, but no supported project marker was found in the service sources. Add ${params.buildpack.projectMarkers.join(" or ")}, or add a Dockerfile.vercel to control the image build.`
|
|
2202
2215
|
);
|
|
2203
2216
|
}
|
|
2217
|
+
params.buildpack.validate?.({
|
|
2218
|
+
workPath: sourceDir,
|
|
2219
|
+
buildEnv: params.buildEnv
|
|
2220
|
+
});
|
|
2204
2221
|
const prereleaseUrl = getPrereleaseUrl();
|
|
2205
2222
|
const buildpack = prereleaseUrl ? await withPrereleaseBuildpack(params.buildpack, prereleaseUrl) : params.buildpack;
|
|
2206
2223
|
const image = await buildpack.resolveImage(sourceDir);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/container",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.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.11.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.11.0"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|