@vercel/build-utils 13.32.1 → 13.32.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 +12 -0
- package/dist/index.js +5 -1
- package/dist/lambda.d.ts +1 -1
- package/dist/lambda.js +5 -1
- package/dist/types.d.ts +23 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 13.32.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7b30856: Add `vercel dev` support for Python queue subscribers defined in `pyproject.toml`.
|
|
8
|
+
|
|
9
|
+
## 13.32.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 6b49a17: Apply per-service `functions` config when building experimental V2 services. Previously, function configuration declared under `services.<name>.functions` in `vercel.json` (`experimentalTriggers`, `maxDuration`, `memory`, `architecture`, `regions`, `functionFailoverRegions`, `supportsCancellation`) was dropped at build time — only the top-level `functions` map was honored. The build now feeds each service's `functions` to its lambdas for both single-lambda builders (`@vercel/node`, etc., via `writeBuildResultV3`) and framework builders that read `config.functions` (e.g. `@vercel/next`, via the builder config). Derived `queue/v2beta` consumer groups are now scoped by the owning service name so two services that declare the same function path + topic no longer collide.
|
|
14
|
+
|
|
3
15
|
## 13.32.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -35511,14 +35511,18 @@ async function getLambdaOptionsFromFunction({
|
|
|
35511
35511
|
config
|
|
35512
35512
|
}) {
|
|
35513
35513
|
if (config?.functions) {
|
|
35514
|
+
const serviceName = typeof config.serviceName === "string" && config.serviceName !== "" ? config.serviceName : void 0;
|
|
35514
35515
|
for (const [pattern, fn] of Object.entries(config.functions)) {
|
|
35515
35516
|
if (sourceFile === pattern || (0, import_minimatch.default)(sourceFile, pattern)) {
|
|
35517
|
+
const consumer = sanitizeConsumerName(
|
|
35518
|
+
serviceName ? `${serviceName}~${pattern}` : pattern
|
|
35519
|
+
);
|
|
35516
35520
|
const experimentalTriggers = fn.experimentalTriggers?.map(
|
|
35517
35521
|
(trigger) => {
|
|
35518
35522
|
if (trigger.type === "queue/v2beta") {
|
|
35519
35523
|
return {
|
|
35520
35524
|
...trigger,
|
|
35521
|
-
consumer
|
|
35525
|
+
consumer
|
|
35522
35526
|
};
|
|
35523
35527
|
}
|
|
35524
35528
|
return trigger;
|
package/dist/lambda.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export interface LambdaOptionsWithZipBuffer extends LambdaOptionsBase {
|
|
|
81
81
|
}
|
|
82
82
|
interface GetLambdaOptionsFromFunctionOptions {
|
|
83
83
|
sourceFile: string;
|
|
84
|
-
config?: Pick<Config, 'functions'>;
|
|
84
|
+
config?: Pick<Config, 'functions' | 'serviceName'>;
|
|
85
85
|
}
|
|
86
86
|
export declare class Lambda {
|
|
87
87
|
type: 'Lambda';
|
package/dist/lambda.js
CHANGED
|
@@ -349,14 +349,18 @@ async function getLambdaOptionsFromFunction({
|
|
|
349
349
|
config
|
|
350
350
|
}) {
|
|
351
351
|
if (config?.functions) {
|
|
352
|
+
const serviceName = typeof config.serviceName === "string" && config.serviceName !== "" ? config.serviceName : void 0;
|
|
352
353
|
for (const [pattern, fn] of Object.entries(config.functions)) {
|
|
353
354
|
if (sourceFile === pattern || (0, import_minimatch.default)(sourceFile, pattern)) {
|
|
355
|
+
const consumer = sanitizeConsumerName(
|
|
356
|
+
serviceName ? `${serviceName}~${pattern}` : pattern
|
|
357
|
+
);
|
|
354
358
|
const experimentalTriggers = fn.experimentalTriggers?.map(
|
|
355
359
|
(trigger) => {
|
|
356
360
|
if (trigger.type === "queue/v2beta") {
|
|
357
361
|
return {
|
|
358
362
|
...trigger,
|
|
359
|
-
consumer
|
|
363
|
+
consumer
|
|
360
364
|
};
|
|
361
365
|
}
|
|
362
366
|
return trigger;
|
package/dist/types.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ export interface Config {
|
|
|
44
44
|
framework?: string | null;
|
|
45
45
|
nodeVersion?: string;
|
|
46
46
|
middleware?: boolean;
|
|
47
|
+
/** Owning service name; scopes per-function config such as the v2beta consumer. */
|
|
48
|
+
serviceName?: string;
|
|
47
49
|
[key: string]: unknown;
|
|
48
50
|
}
|
|
49
51
|
export type { HasField };
|
|
@@ -407,6 +409,24 @@ export interface ProjectSettings {
|
|
|
407
409
|
gitForkProtection?: boolean;
|
|
408
410
|
commandForIgnoringBuildStep?: string | null;
|
|
409
411
|
}
|
|
412
|
+
export interface GetDevSidecarsOptions {
|
|
413
|
+
workPath: string;
|
|
414
|
+
/** Original build configuration before source expansion or dev filtering. */
|
|
415
|
+
build: Builder;
|
|
416
|
+
}
|
|
417
|
+
export interface DevSubscriber {
|
|
418
|
+
type: 'subscriber';
|
|
419
|
+
name: string;
|
|
420
|
+
consumer: string;
|
|
421
|
+
workspace: string;
|
|
422
|
+
framework?: string;
|
|
423
|
+
runtime?: string;
|
|
424
|
+
builder: Builder;
|
|
425
|
+
topics: ServiceTopics;
|
|
426
|
+
}
|
|
427
|
+
export type DevSidecar = DevSubscriber;
|
|
428
|
+
/** Returns additional processes that a builder needs alongside its primary dev server. */
|
|
429
|
+
export type GetDevSidecars = (options: GetDevSidecarsOptions) => Promise<DevSidecar[]>;
|
|
410
430
|
export interface BuilderVX {
|
|
411
431
|
version: -1;
|
|
412
432
|
build: BuildVX;
|
|
@@ -414,6 +434,7 @@ export interface BuilderVX {
|
|
|
414
434
|
prepareCache?: PrepareCache;
|
|
415
435
|
shouldServe?: ShouldServe;
|
|
416
436
|
startDevServer?: StartDevServer;
|
|
437
|
+
getDevSidecars?: GetDevSidecars;
|
|
417
438
|
}
|
|
418
439
|
export interface BuilderV2 {
|
|
419
440
|
version: 2;
|
|
@@ -422,6 +443,7 @@ export interface BuilderV2 {
|
|
|
422
443
|
prepareCache?: PrepareCache;
|
|
423
444
|
shouldServe?: ShouldServe;
|
|
424
445
|
startDevServer?: StartDevServer;
|
|
446
|
+
getDevSidecars?: GetDevSidecars;
|
|
425
447
|
}
|
|
426
448
|
export interface BuilderV3 {
|
|
427
449
|
version: 3;
|
|
@@ -430,6 +452,7 @@ export interface BuilderV3 {
|
|
|
430
452
|
prepareCache?: PrepareCache;
|
|
431
453
|
shouldServe?: ShouldServe;
|
|
432
454
|
startDevServer?: StartDevServer;
|
|
455
|
+
getDevSidecars?: GetDevSidecars;
|
|
433
456
|
}
|
|
434
457
|
type ImageFormat = 'image/avif' | 'image/webp';
|
|
435
458
|
type ImageContentDispositionType = 'inline' | 'attachment';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/build-utils",
|
|
3
|
-
"version": "13.32.
|
|
3
|
+
"version": "13.32.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.js",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"vitest": "2.0.1",
|
|
56
56
|
"typescript": "4.9.5",
|
|
57
57
|
"yazl": "2.5.1",
|
|
58
|
-
"@vercel/
|
|
59
|
-
"@vercel/
|
|
58
|
+
"@vercel/error-utils": "2.2.0",
|
|
59
|
+
"@vercel/routing-utils": "6.4.0"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "node build.mjs",
|