@vercel/backends 0.0.24 → 0.0.25
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/dist/index.d.mts +100 -2
- package/dist/index.mjs +822 -56674
- package/dist/introspection/express.d.mts +4 -0
- package/dist/introspection/express.mjs +90 -0
- package/dist/introspection/hono.d.mts +9 -0
- package/dist/introspection/hono.mjs +59 -0
- package/dist/introspection/loaders/cjs.cjs +168 -0
- package/dist/introspection/loaders/cjs.d.cts +1 -0
- package/dist/introspection/loaders/esm.d.mts +1 -0
- package/dist/introspection/loaders/esm.mjs +7 -0
- package/dist/introspection/loaders/hooks.d.mts +5 -0
- package/dist/introspection/loaders/hooks.mjs +50 -0
- package/dist/introspection/loaders/rolldown-esm.d.mts +1 -0
- package/dist/introspection/loaders/rolldown-esm.mjs +7 -0
- package/dist/introspection/loaders/rolldown-hooks.d.mts +31 -0
- package/dist/introspection/loaders/rolldown-hooks.mjs +272 -0
- package/package.json +23 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,106 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import * as _vercel_build_utils0 from "@vercel/build-utils";
|
|
3
|
+
import { BuildOptions, BuildV2, Files, PrepareCache, Span } from "@vercel/build-utils";
|
|
4
|
+
import { ParseArgsConfig } from "node:util";
|
|
2
5
|
|
|
6
|
+
//#region src/cervel/find-entrypoint.d.ts
|
|
7
|
+
declare const findEntrypoint: (cwd: string, options?: {
|
|
8
|
+
ignoreRegex?: boolean;
|
|
9
|
+
}) => Promise<string>;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/cervel/types.d.ts
|
|
12
|
+
/**
|
|
13
|
+
* Core path options derived from BuildOptions.
|
|
14
|
+
* - workPath: the workspace/project directory (where package.json is)
|
|
15
|
+
* - repoRootPath: the root of the monorepo/repo
|
|
16
|
+
*/
|
|
17
|
+
type PathOptions = Pick<BuildOptions, 'workPath' | 'repoRootPath'>;
|
|
18
|
+
/**
|
|
19
|
+
* Options for the cervel build function.
|
|
20
|
+
*/
|
|
21
|
+
type CervelBuildOptions = PathOptions & {
|
|
22
|
+
entrypoint?: string;
|
|
23
|
+
out: string;
|
|
24
|
+
span?: Span;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Options for the cervel serve function.
|
|
28
|
+
*/
|
|
29
|
+
type CervelServeOptions = Pick<BuildOptions, 'workPath'> & {
|
|
30
|
+
rest: Record<string, string | boolean | undefined>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Options for node file tracing.
|
|
34
|
+
*/
|
|
35
|
+
type NodeFileTraceOptions = PathOptions & {
|
|
36
|
+
keepTracedPaths: boolean;
|
|
37
|
+
outDir: string;
|
|
38
|
+
tracedPaths: string[];
|
|
39
|
+
span: Span;
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/cervel/node-file-trace.d.ts
|
|
43
|
+
declare const nodeFileTrace: (args: NodeFileTraceOptions) => Promise<Files>;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/cervel/index.d.ts
|
|
46
|
+
type ParseArgsOptionsConfig = NonNullable<ParseArgsConfig['options']>;
|
|
47
|
+
declare const getBuildSummary: (outputDir: string) => Promise<any>;
|
|
48
|
+
declare const build$1: (args: CervelBuildOptions) => Promise<{
|
|
49
|
+
rolldownResult: {
|
|
50
|
+
handler: string;
|
|
51
|
+
outputDir: string;
|
|
52
|
+
outputFiles: _vercel_build_utils0.Files;
|
|
53
|
+
};
|
|
54
|
+
}>;
|
|
55
|
+
declare const serve: (args: CervelServeOptions) => Promise<void>;
|
|
56
|
+
declare const srvxOptions: ParseArgsOptionsConfig;
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/introspection/index.d.ts
|
|
59
|
+
declare const introspectApp: (args: {
|
|
60
|
+
dir: string;
|
|
61
|
+
handler: string;
|
|
62
|
+
framework: string | null | undefined;
|
|
63
|
+
env: Record<string, string | undefined>;
|
|
64
|
+
span: Span;
|
|
65
|
+
}) => Promise<{
|
|
66
|
+
routes: ({
|
|
67
|
+
handle: string;
|
|
68
|
+
src?: undefined;
|
|
69
|
+
dest?: undefined;
|
|
70
|
+
} | {
|
|
71
|
+
src: string;
|
|
72
|
+
dest: string;
|
|
73
|
+
handle?: undefined;
|
|
74
|
+
})[];
|
|
75
|
+
framework: {
|
|
76
|
+
slug: string;
|
|
77
|
+
version: string;
|
|
78
|
+
};
|
|
79
|
+
} | {
|
|
80
|
+
routes: ({
|
|
81
|
+
src: string;
|
|
82
|
+
dest: string;
|
|
83
|
+
methods: string[];
|
|
84
|
+
} | {
|
|
85
|
+
handle: string;
|
|
86
|
+
src?: undefined;
|
|
87
|
+
dest?: undefined;
|
|
88
|
+
} | {
|
|
89
|
+
src: string;
|
|
90
|
+
dest: string;
|
|
91
|
+
handle?: undefined;
|
|
92
|
+
})[];
|
|
93
|
+
framework: {
|
|
94
|
+
slug: string;
|
|
95
|
+
version: string;
|
|
96
|
+
};
|
|
97
|
+
additionalFolders: string[];
|
|
98
|
+
additionalDeps: string[];
|
|
99
|
+
}>;
|
|
100
|
+
//#endregion
|
|
3
101
|
//#region src/index.d.ts
|
|
4
102
|
declare const version = 2;
|
|
5
103
|
declare const build: BuildV2;
|
|
6
104
|
declare const prepareCache: PrepareCache;
|
|
7
105
|
//#endregion
|
|
8
|
-
export { build, prepareCache, version };
|
|
106
|
+
export { type CervelBuildOptions, type CervelServeOptions, type PathOptions, build, build$1 as cervelBuild, serve as cervelServe, findEntrypoint, getBuildSummary, introspectApp, nodeFileTrace, prepareCache, srvxOptions, version };
|