@vercel/build-utils 7.9.1 → 7.10.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 7.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Allow environment variables to be specified for `EdgeFunction` ([#11029](https://github.com/vercel/vercel/pull/11029))
8
+
3
9
  ## 7.9.1
4
10
 
5
11
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import type { Files, FunctionFramework } from './types';
1
+ import type { Env, Files, FunctionFramework } from './types';
2
2
  /**
3
3
  * An Edge Functions output
4
4
  */
@@ -18,6 +18,10 @@ export declare class EdgeFunction {
18
18
  * The entrypoint for the edge function.
19
19
  */
20
20
  entrypoint: string;
21
+ /**
22
+ * Environment variables for the edge function to use at runtime.
23
+ */
24
+ environment?: Env;
21
25
  /**
22
26
  * The list of files to be included in the edge function bundle.
23
27
  */
@@ -31,6 +31,7 @@ class EdgeFunction {
31
31
  this.assets = params.assets;
32
32
  this.regions = params.regions;
33
33
  this.framework = params.framework;
34
+ this.environment = params.environment;
34
35
  }
35
36
  }
36
37
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.js CHANGED
@@ -22466,6 +22466,7 @@ var EdgeFunction = class {
22466
22466
  this.assets = params.assets;
22467
22467
  this.regions = params.regions;
22468
22468
  this.framework = params.framework;
22469
+ this.environment = params.environment;
22469
22470
  }
22470
22471
  };
22471
22472
 
package/dist/lambda.d.ts CHANGED
@@ -1,8 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { Files, Config, FunctionFramework } from './types';
3
- interface Environment {
4
- [key: string]: string;
5
- }
2
+ import type { Config, Env, Files, FunctionFramework } from './types';
6
3
  export type LambdaOptions = LambdaOptionsWithFiles | LambdaOptionsWithZipBuffer;
7
4
  export type LambdaArchitecture = 'x86_64' | 'arm64';
8
5
  export interface LambdaOptionsBase {
@@ -11,7 +8,7 @@ export interface LambdaOptionsBase {
11
8
  architecture?: LambdaArchitecture;
12
9
  memory?: number;
13
10
  maxDuration?: number;
14
- environment?: Environment;
11
+ environment?: Env;
15
12
  allowQuery?: string[];
16
13
  regions?: string[];
17
14
  supportsMultiPayloads?: boolean;
@@ -55,7 +52,7 @@ export declare class Lambda {
55
52
  architecture?: LambdaArchitecture;
56
53
  memory?: number;
57
54
  maxDuration?: number;
58
- environment: Environment;
55
+ environment: Env;
59
56
  allowQuery?: string[];
60
57
  regions?: string[];
61
58
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "7.9.1",
3
+ "version": "7.10.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",