@vercel/build-utils 13.24.0 → 13.26.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 +17 -0
- package/dist/index.js +3 -0
- package/dist/trace/constants.d.ts +1 -0
- package/dist/trace/constants.js +5 -2
- package/dist/trace/index.d.ts +1 -1
- package/dist/trace/index.js +2 -0
- package/dist/types.d.ts +43 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 13.26.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 137e5d1: Allow builder V2 to expose startDevServer.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- bb61428: Include framework slug in output/config.json
|
|
12
|
+
|
|
13
|
+
## 13.25.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- fb0cb8d: Add normalized entrypoint detector for runtime builders.
|
|
18
|
+
- 4fc110b: [services] add preDeployCommand for experimentalServices
|
|
19
|
+
|
|
3
20
|
## 13.24.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -34489,6 +34489,7 @@ __export(src_exports, {
|
|
|
34489
34489
|
BACKEND_FRAMEWORKS: () => BACKEND_FRAMEWORKS,
|
|
34490
34490
|
BUILDER_COMPILE_STEP: () => BUILDER_COMPILE_STEP,
|
|
34491
34491
|
BUILDER_INSTALLER_STEP: () => BUILDER_INSTALLER_STEP,
|
|
34492
|
+
BUILDER_PRE_DEPLOY_STEP: () => BUILDER_PRE_DEPLOY_STEP,
|
|
34492
34493
|
BunVersion: () => BunVersion,
|
|
34493
34494
|
ENV_WRAPPER_SUPPORTED_FAMILIES: () => ENV_WRAPPER_SUPPORTED_FAMILIES,
|
|
34494
34495
|
EdgeFunction: () => EdgeFunction,
|
|
@@ -38944,6 +38945,7 @@ var Span = class _Span {
|
|
|
38944
38945
|
// src/trace/constants.ts
|
|
38945
38946
|
var BUILDER_INSTALLER_STEP = "vc.builder.install";
|
|
38946
38947
|
var BUILDER_COMPILE_STEP = "vc.builder.build";
|
|
38948
|
+
var BUILDER_PRE_DEPLOY_STEP = "vc.builder.preDeploy";
|
|
38947
38949
|
|
|
38948
38950
|
// src/get-installed-package-version.ts
|
|
38949
38951
|
async function getInstalledPackageVersion(packageName, path8) {
|
|
@@ -40282,6 +40284,7 @@ function getExtendedPayload({
|
|
|
40282
40284
|
BACKEND_FRAMEWORKS,
|
|
40283
40285
|
BUILDER_COMPILE_STEP,
|
|
40284
40286
|
BUILDER_INSTALLER_STEP,
|
|
40287
|
+
BUILDER_PRE_DEPLOY_STEP,
|
|
40285
40288
|
BunVersion,
|
|
40286
40289
|
ENV_WRAPPER_SUPPORTED_FAMILIES,
|
|
40287
40290
|
EdgeFunction,
|
package/dist/trace/constants.js
CHANGED
|
@@ -19,13 +19,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var constants_exports = {};
|
|
20
20
|
__export(constants_exports, {
|
|
21
21
|
BUILDER_COMPILE_STEP: () => BUILDER_COMPILE_STEP,
|
|
22
|
-
BUILDER_INSTALLER_STEP: () => BUILDER_INSTALLER_STEP
|
|
22
|
+
BUILDER_INSTALLER_STEP: () => BUILDER_INSTALLER_STEP,
|
|
23
|
+
BUILDER_PRE_DEPLOY_STEP: () => BUILDER_PRE_DEPLOY_STEP
|
|
23
24
|
});
|
|
24
25
|
module.exports = __toCommonJS(constants_exports);
|
|
25
26
|
const BUILDER_INSTALLER_STEP = "vc.builder.install";
|
|
26
27
|
const BUILDER_COMPILE_STEP = "vc.builder.build";
|
|
28
|
+
const BUILDER_PRE_DEPLOY_STEP = "vc.builder.preDeploy";
|
|
27
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
28
30
|
0 && (module.exports = {
|
|
29
31
|
BUILDER_COMPILE_STEP,
|
|
30
|
-
BUILDER_INSTALLER_STEP
|
|
32
|
+
BUILDER_INSTALLER_STEP,
|
|
33
|
+
BUILDER_PRE_DEPLOY_STEP
|
|
31
34
|
});
|
package/dist/trace/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Span } from './trace';
|
|
2
|
-
export { BUILDER_COMPILE_STEP, BUILDER_INSTALLER_STEP } from './constants';
|
|
2
|
+
export { BUILDER_COMPILE_STEP, BUILDER_INSTALLER_STEP, BUILDER_PRE_DEPLOY_STEP, } from './constants';
|
|
3
3
|
export type { SpanId, TraceEvent, Reporter } from './trace';
|
package/dist/trace/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var trace_exports = {};
|
|
|
20
20
|
__export(trace_exports, {
|
|
21
21
|
BUILDER_COMPILE_STEP: () => import_constants.BUILDER_COMPILE_STEP,
|
|
22
22
|
BUILDER_INSTALLER_STEP: () => import_constants.BUILDER_INSTALLER_STEP,
|
|
23
|
+
BUILDER_PRE_DEPLOY_STEP: () => import_constants.BUILDER_PRE_DEPLOY_STEP,
|
|
23
24
|
Span: () => import_trace.Span
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(trace_exports);
|
|
@@ -29,5 +30,6 @@ var import_constants = require("./constants");
|
|
|
29
30
|
0 && (module.exports = {
|
|
30
31
|
BUILDER_COMPILE_STEP,
|
|
31
32
|
BUILDER_INSTALLER_STEP,
|
|
33
|
+
BUILDER_PRE_DEPLOY_STEP,
|
|
32
34
|
Span
|
|
33
35
|
});
|
package/dist/types.d.ts
CHANGED
|
@@ -97,6 +97,12 @@ export interface BuildOptions {
|
|
|
97
97
|
* fully processed
|
|
98
98
|
*/
|
|
99
99
|
buildCallback?: (opts: Omit<BuildOptions, 'buildCallback'>) => Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* Called by the builder to register a callback that will execute the
|
|
102
|
+
* service's pre-deploy command. The CLI collects these and invokes
|
|
103
|
+
* them only after every builder has succeeded.
|
|
104
|
+
*/
|
|
105
|
+
registerPreDeploy?: (callback: () => Promise<void>) => void;
|
|
100
106
|
/**
|
|
101
107
|
* The current trace state from the internal vc tracing
|
|
102
108
|
*/
|
|
@@ -407,6 +413,7 @@ export interface BuilderV2 {
|
|
|
407
413
|
diagnostics?: Diagnostics;
|
|
408
414
|
prepareCache?: PrepareCache;
|
|
409
415
|
shouldServe?: ShouldServe;
|
|
416
|
+
startDevServer?: StartDevServer;
|
|
410
417
|
}
|
|
411
418
|
export interface BuilderV3 {
|
|
412
419
|
version: 3;
|
|
@@ -518,6 +525,7 @@ export interface Service {
|
|
|
518
525
|
runtime?: string;
|
|
519
526
|
buildCommand?: string;
|
|
520
527
|
installCommand?: string;
|
|
528
|
+
preDeployCommand?: string;
|
|
521
529
|
routePrefix?: string;
|
|
522
530
|
routePrefixSource?: 'configured' | 'generated';
|
|
523
531
|
subdomain?: string;
|
|
@@ -567,6 +575,7 @@ export interface BuildResultV2Typical {
|
|
|
567
575
|
value: string;
|
|
568
576
|
}>;
|
|
569
577
|
framework?: {
|
|
578
|
+
slug: string;
|
|
570
579
|
version: string;
|
|
571
580
|
};
|
|
572
581
|
flags?: {
|
|
@@ -805,3 +814,37 @@ export type Services = Record<string, ServiceConfig>;
|
|
|
805
814
|
* }
|
|
806
815
|
*/
|
|
807
816
|
export type ExperimentalServiceGroups = Record<string, string[]>;
|
|
817
|
+
/**
|
|
818
|
+
* Result of a runtime builder's normalized entrypoint detection.
|
|
819
|
+
*
|
|
820
|
+
* - `kind: 'file'` — `entrypoint` is a path relative to the scanned `workPath`
|
|
821
|
+
* (e.g. `"src/index.ts"`, `"main.go"`, `"main.py"`).
|
|
822
|
+
* - `kind: 'py-module:attr'` — `entrypoint` is a Python `module:attr` reference
|
|
823
|
+
* where the module is dot-separated and resolved relative to the scanned
|
|
824
|
+
* `workPath` (e.g. `"main:app"`, `"src.main:app"`).
|
|
825
|
+
*
|
|
826
|
+
* @experimental This feature is experimental and may change.
|
|
827
|
+
*/
|
|
828
|
+
export type DetectedEntrypoint = {
|
|
829
|
+
kind: 'file';
|
|
830
|
+
entrypoint: string;
|
|
831
|
+
} | {
|
|
832
|
+
kind: 'py-module:attr';
|
|
833
|
+
entrypoint: string;
|
|
834
|
+
} | null;
|
|
835
|
+
/**
|
|
836
|
+
* Input to a runtime builder's normalized entrypoint detector.
|
|
837
|
+
* @experimental This feature is experimental and may change.
|
|
838
|
+
*/
|
|
839
|
+
export interface DetectEntrypointOptions {
|
|
840
|
+
/** Path to the candidate service directory relative to project root. */
|
|
841
|
+
workPath: string;
|
|
842
|
+
/** Framework slug detected for this directory, if any. */
|
|
843
|
+
framework?: string;
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* Normalized entrypoint detector signature, implemented by each runtime builder
|
|
847
|
+
* and consumed by services auto-detection to populate suggested service configs.
|
|
848
|
+
* @experimental This feature is experimental and may change.
|
|
849
|
+
*/
|
|
850
|
+
export type DetectEntrypointFn = (opts: DetectEntrypointOptions) => Promise<DetectedEntrypoint>;
|