@vercel/build-utils 13.2.15 → 13.2.16

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
+ ## 13.2.16
4
+
5
+ ### Patch Changes
6
+
7
+ - Add maxConcurrency to experimentalTriggers ([#14725](https://github.com/vercel/vercel/pull/14725))
8
+
9
+ - Add maxConcurrency trigger field ([#14725](https://github.com/vercel/vercel/pull/14725))
10
+
3
11
  ## 13.2.15
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -24454,6 +24454,16 @@ var Lambda = class {
24454
24454
  `${prefix}.initialDelaySeconds must be a non-negative number`
24455
24455
  );
24456
24456
  }
24457
+ if (trigger.maxConcurrency !== void 0) {
24458
+ (0, import_assert4.default)(
24459
+ typeof trigger.maxConcurrency === "number",
24460
+ `${prefix}.maxConcurrency must be a number`
24461
+ );
24462
+ (0, import_assert4.default)(
24463
+ Number.isInteger(trigger.maxConcurrency) && trigger.maxConcurrency >= 1,
24464
+ `${prefix}.maxConcurrency must be at least 1`
24465
+ );
24466
+ }
24457
24467
  }
24458
24468
  }
24459
24469
  if (supportsCancellation !== void 0) {
@@ -26412,6 +26422,10 @@ var triggerEventSchema = {
26412
26422
  initialDelaySeconds: {
26413
26423
  type: "number",
26414
26424
  minimum: 0
26425
+ },
26426
+ maxConcurrency: {
26427
+ type: "number",
26428
+ minimum: 1
26415
26429
  }
26416
26430
  },
26417
26431
  required: ["type", "topic", "consumer"],
package/dist/lambda.js CHANGED
@@ -208,6 +208,16 @@ class Lambda {
208
208
  `${prefix}.initialDelaySeconds must be a non-negative number`
209
209
  );
210
210
  }
211
+ if (trigger.maxConcurrency !== void 0) {
212
+ (0, import_assert.default)(
213
+ typeof trigger.maxConcurrency === "number",
214
+ `${prefix}.maxConcurrency must be a number`
215
+ );
216
+ (0, import_assert.default)(
217
+ Number.isInteger(trigger.maxConcurrency) && trigger.maxConcurrency >= 1,
218
+ `${prefix}.maxConcurrency must be at least 1`
219
+ );
220
+ }
211
221
  }
212
222
  }
213
223
  if (supportsCancellation !== void 0) {
package/dist/schemas.d.ts CHANGED
@@ -62,6 +62,10 @@ export declare const functionsSchema: {
62
62
  type: string;
63
63
  minimum: number;
64
64
  };
65
+ maxConcurrency: {
66
+ type: string;
67
+ minimum: number;
68
+ };
65
69
  };
66
70
  required: string[];
67
71
  additionalProperties: boolean;
package/dist/schemas.js CHANGED
@@ -48,6 +48,10 @@ const triggerEventSchema = {
48
48
  initialDelaySeconds: {
49
49
  type: "number",
50
50
  minimum: 0
51
+ },
52
+ maxConcurrency: {
53
+ type: "number",
54
+ minimum: 1
51
55
  }
52
56
  },
53
57
  required: ["type", "topic", "consumer"],
package/dist/types.d.ts CHANGED
@@ -548,6 +548,12 @@ export interface TriggerEvent {
548
548
  * Behavior when not specified depends on the server's default configuration.
549
549
  */
550
550
  initialDelaySeconds?: number;
551
+ /**
552
+ * Maximum number of concurrent executions for this consumer (OPTIONAL)
553
+ * Must be at least 1 if specified.
554
+ * Behavior when not specified depends on the server's default configuration.
555
+ */
556
+ maxConcurrency?: number;
551
557
  }
552
558
  export type ServiceRuntime = 'node' | 'python' | 'go' | 'rust' | 'ruby';
553
559
  export type ServiceType = 'web' | 'cron' | 'worker';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "13.2.15",
3
+ "version": "13.2.16",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",