@vercel/build-utils 10.6.2 → 10.6.3

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,13 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 10.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - make POST method required ([#13518](https://github.com/vercel/vercel/pull/13518))
8
+
9
+ - Update more handling for experimentalTriggers ([#13517](https://github.com/vercel/vercel/pull/13517))
10
+
3
11
  ## 10.6.2
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -22533,13 +22533,10 @@ var Lambda = class {
22533
22533
  binding.mode === "structured",
22534
22534
  `${bindingPrefix}.mode must be "structured"`
22535
22535
  );
22536
- if (binding.method !== void 0) {
22537
- const validMethods = ["GET", "POST", "HEAD"];
22538
- (0, import_assert4.default)(
22539
- validMethods.includes(binding.method),
22540
- `${bindingPrefix}.method must be one of: ${validMethods.join(", ")}`
22541
- );
22542
- }
22536
+ (0, import_assert4.default)(
22537
+ binding.method === "POST",
22538
+ `${bindingPrefix}.method must be "POST"`
22539
+ );
22543
22540
  if (binding.pathname !== void 0) {
22544
22541
  (0, import_assert4.default)(
22545
22542
  typeof binding.pathname === "string",
@@ -22682,7 +22679,8 @@ async function getLambdaOptionsFromFunction({
22682
22679
  return {
22683
22680
  architecture: fn.architecture,
22684
22681
  memory: fn.memory,
22685
- maxDuration: fn.maxDuration
22682
+ maxDuration: fn.maxDuration,
22683
+ experimentalTriggers: fn.experimentalTriggers
22686
22684
  };
22687
22685
  }
22688
22686
  }
@@ -24417,7 +24415,7 @@ var cloudEventTriggerSchema = {
24417
24415
  },
24418
24416
  method: {
24419
24417
  type: "string",
24420
- enum: ["GET", "POST", "HEAD"]
24418
+ const: "POST"
24421
24419
  },
24422
24420
  pathname: {
24423
24421
  type: "string",
@@ -24425,7 +24423,7 @@ var cloudEventTriggerSchema = {
24425
24423
  pattern: "^/"
24426
24424
  }
24427
24425
  },
24428
- required: ["mode"],
24426
+ required: ["mode", "method"],
24429
24427
  additionalProperties: false
24430
24428
  },
24431
24429
  queue: {
package/dist/lambda.d.ts CHANGED
@@ -110,4 +110,4 @@ export declare class Lambda {
110
110
  */
111
111
  export declare function createLambda(opts: LambdaOptions): Promise<Lambda>;
112
112
  export declare function createZip(files: Files): Promise<Buffer>;
113
- export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'architecture' | 'memory' | 'maxDuration'>>;
113
+ export declare function getLambdaOptionsFromFunction({ sourceFile, config, }: GetLambdaOptionsFromFunctionOptions): Promise<Pick<LambdaOptions, 'architecture' | 'memory' | 'maxDuration' | 'experimentalTriggers'>>;
package/dist/lambda.js CHANGED
@@ -202,13 +202,10 @@ class Lambda {
202
202
  binding.mode === "structured",
203
203
  `${bindingPrefix}.mode must be "structured"`
204
204
  );
205
- if (binding.method !== void 0) {
206
- const validMethods = ["GET", "POST", "HEAD"];
207
- (0, import_assert.default)(
208
- validMethods.includes(binding.method),
209
- `${bindingPrefix}.method must be one of: ${validMethods.join(", ")}`
210
- );
211
- }
205
+ (0, import_assert.default)(
206
+ binding.method === "POST",
207
+ `${bindingPrefix}.method must be "POST"`
208
+ );
212
209
  if (binding.pathname !== void 0) {
213
210
  (0, import_assert.default)(
214
211
  typeof binding.pathname === "string",
@@ -351,7 +348,8 @@ async function getLambdaOptionsFromFunction({
351
348
  return {
352
349
  architecture: fn.architecture,
353
350
  memory: fn.memory,
354
- maxDuration: fn.maxDuration
351
+ maxDuration: fn.maxDuration,
352
+ experimentalTriggers: fn.experimentalTriggers
355
353
  };
356
354
  }
357
355
  }
package/dist/schemas.d.ts CHANGED
@@ -59,7 +59,7 @@ export declare const functionsSchema: {
59
59
  };
60
60
  method: {
61
61
  type: string;
62
- enum: string[];
62
+ const: string;
63
63
  };
64
64
  pathname: {
65
65
  type: string;
package/dist/schemas.js CHANGED
@@ -46,7 +46,7 @@ const cloudEventTriggerSchema = {
46
46
  },
47
47
  method: {
48
48
  type: "string",
49
- enum: ["GET", "POST", "HEAD"]
49
+ const: "POST"
50
50
  },
51
51
  pathname: {
52
52
  type: "string",
@@ -54,7 +54,7 @@ const cloudEventTriggerSchema = {
54
54
  pattern: "^/"
55
55
  }
56
56
  },
57
- required: ["mode"],
57
+ required: ["mode", "method"],
58
58
  additionalProperties: false
59
59
  },
60
60
  queue: {
package/dist/types.d.ts CHANGED
@@ -516,8 +516,8 @@ export interface CloudEventTriggerBase<T extends string = string> {
516
516
  httpBinding: {
517
517
  /** HTTP binding mode - only structured mode is supported (REQUIRED) */
518
518
  mode: 'structured';
519
- /** HTTP method for this trigger endpoint (OPTIONAL, default: 'POST') */
520
- method?: 'GET' | 'POST' | 'HEAD';
519
+ /** HTTP method for this trigger endpoint - only POST is supported (REQUIRED) */
520
+ method: 'POST';
521
521
  /** HTTP pathname for this trigger endpoint (OPTIONAL) */
522
522
  pathname?: string;
523
523
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "10.6.2",
3
+ "version": "10.6.3",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",