@vercel/build-utils 13.1.1 → 13.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 13.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Support `runtimeLanguage` in build-utils ([#14344](https://github.com/vercel/vercel/pull/14344))
8
+
3
9
  ## 13.1.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -22401,6 +22401,7 @@ var Lambda = class {
22401
22401
  const {
22402
22402
  handler,
22403
22403
  runtime,
22404
+ runtimeLanguage,
22404
22405
  maxDuration,
22405
22406
  architecture,
22406
22407
  memory,
@@ -22431,6 +22432,9 @@ var Lambda = class {
22431
22432
  '"architecture" must be either "x86_64" or "arm64"'
22432
22433
  );
22433
22434
  }
22435
+ if (runtimeLanguage !== void 0) {
22436
+ (0, import_assert4.default)(runtimeLanguage === "rust", '"runtimeLanguage" must be "rust"');
22437
+ }
22434
22438
  if ("experimentalAllowBundling" in opts && opts.experimentalAllowBundling !== void 0) {
22435
22439
  (0, import_assert4.default)(
22436
22440
  typeof opts.experimentalAllowBundling === "boolean",
@@ -22554,6 +22558,7 @@ var Lambda = class {
22554
22558
  this.files = "files" in opts ? opts.files : void 0;
22555
22559
  this.handler = handler;
22556
22560
  this.runtime = runtime;
22561
+ this.runtimeLanguage = runtimeLanguage;
22557
22562
  this.architecture = getDefaultLambdaArchitecture(architecture);
22558
22563
  this.memory = memory;
22559
22564
  this.maxDuration = maxDuration;
package/dist/lambda.d.ts CHANGED
@@ -2,10 +2,12 @@
2
2
  import type { Config, Env, Files, FunctionFramework, TriggerEvent } from './types';
3
3
  export type { TriggerEvent };
4
4
  export type LambdaOptions = LambdaOptionsWithFiles | LambdaOptionsWithZipBuffer;
5
+ export type LambdaExecutableRuntimeLanguages = 'rust';
5
6
  export type LambdaArchitecture = 'x86_64' | 'arm64';
6
7
  export interface LambdaOptionsBase {
7
8
  handler: string;
8
9
  runtime: string;
10
+ runtimeLanguage?: LambdaExecutableRuntimeLanguages;
9
11
  architecture?: LambdaArchitecture;
10
12
  memory?: number;
11
13
  maxDuration?: number;
@@ -70,6 +72,11 @@ export declare class Lambda {
70
72
  files?: Files;
71
73
  handler: string;
72
74
  runtime: string;
75
+ /**
76
+ * When using a generic runtime such as "executable" or "provided" (custom runtimes),
77
+ * this field can be used to specify the language the executable was compiled with.
78
+ */
79
+ runtimeLanguage?: LambdaExecutableRuntimeLanguages;
73
80
  architecture: LambdaArchitecture;
74
81
  memory?: number;
75
82
  maxDuration?: number;
package/dist/lambda.js CHANGED
@@ -60,6 +60,7 @@ class Lambda {
60
60
  const {
61
61
  handler,
62
62
  runtime,
63
+ runtimeLanguage,
63
64
  maxDuration,
64
65
  architecture,
65
66
  memory,
@@ -90,6 +91,9 @@ class Lambda {
90
91
  '"architecture" must be either "x86_64" or "arm64"'
91
92
  );
92
93
  }
94
+ if (runtimeLanguage !== void 0) {
95
+ (0, import_assert.default)(runtimeLanguage === "rust", '"runtimeLanguage" must be "rust"');
96
+ }
93
97
  if ("experimentalAllowBundling" in opts && opts.experimentalAllowBundling !== void 0) {
94
98
  (0, import_assert.default)(
95
99
  typeof opts.experimentalAllowBundling === "boolean",
@@ -213,6 +217,7 @@ class Lambda {
213
217
  this.files = "files" in opts ? opts.files : void 0;
214
218
  this.handler = handler;
215
219
  this.runtime = runtime;
220
+ this.runtimeLanguage = runtimeLanguage;
216
221
  this.architecture = getDefaultLambdaArchitecture(architecture);
217
222
  this.memory = memory;
218
223
  this.maxDuration = maxDuration;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "13.1.1",
3
+ "version": "13.1.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",