@vistagenic/vista 0.3.2 → 0.3.4
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/bin/vista.js +79 -109
- package/dist/ai/embeddings.d.ts +11 -11
- package/dist/ai/embeddings.js +71 -71
- package/dist/ai/index.d.ts +10 -10
- package/dist/ai/index.js +26 -26
- package/dist/ai/providers/base.js +85 -85
- package/dist/ai/react/react-server.d.ts +1 -1
- package/dist/ai/react/react-server.js +17 -17
- package/dist/ai/react/use-agent.js +138 -138
- package/dist/auth/core.d.ts +140 -140
- package/dist/auth/core.js +165 -165
- package/dist/auth/index.d.ts +20 -20
- package/dist/auth/index.js +369 -369
- package/dist/auth/react-server.d.ts +1 -1
- package/dist/auth/react-server.js +10 -10
- package/dist/auth/react.d.ts +18 -18
- package/dist/auth/react.js +71 -71
- package/dist/bin/build-rsc-flashpack.js +6 -0
- package/dist/bin/build-rsc.js +555 -492
- package/dist/bin/build.js +365 -353
- package/dist/bin/generate.js +513 -510
- package/dist/bin/webpack.config.d.ts +3 -1
- package/dist/bin/webpack.config.js +7 -4
- package/dist/build/manifest.d.ts +169 -169
- package/dist/build/manifest.js +423 -423
- package/dist/build/rsc/client-manifest.d.ts +62 -62
- package/dist/build/rsc/client-manifest.js +295 -295
- package/dist/build/rsc/compiler.d.ts +3 -1
- package/dist/build/rsc/compiler.js +12 -7
- package/dist/build/rsc/native-scanner.d.ts +135 -135
- package/dist/build/rsc/native-scanner.js +203 -203
- package/dist/build/rsc/react-client-reference-manifest.d.ts +35 -28
- package/dist/build/rsc/react-client-reference-manifest.js +366 -240
- package/dist/build/standalone.js +260 -254
- package/dist/client/dynamic.react-server.d.ts +2 -2
- package/dist/client/dynamic.react-server.js +23 -23
- package/dist/client/link.js +1 -1
- package/dist/client/link.react-server.d.ts +2 -2
- package/dist/client/link.react-server.js +11 -11
- package/dist/client/navigation.js +2 -2
- package/dist/client/navigation.react-server.d.ts +1 -1
- package/dist/client/navigation.react-server.js +17 -17
- package/dist/client/router.react-server.d.ts +1 -1
- package/dist/client/router.react-server.js +17 -17
- package/dist/client/rsc-router.d.ts +1 -3
- package/dist/client/rsc-router.js +98 -45
- package/dist/client/rsc-router.react-server.d.ts +1 -1
- package/dist/client/rsc-router.react-server.js +17 -17
- package/dist/client/script.react-server.d.ts +2 -2
- package/dist/client/script.react-server.js +23 -23
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -7
- package/dist/deploy/adapters/cloudflare.js +42 -41
- package/dist/deploy/adapters/docker.d.ts +1 -0
- package/dist/deploy/adapters/docker.js +5 -4
- package/dist/deploy/adapters/netlify.js +60 -27
- package/dist/deploy/adapters/vercel.js +80 -50
- package/dist/deploy/preflight.js +4 -3
- package/dist/deploy/runtime-pack.d.ts +11 -0
- package/dist/deploy/runtime-pack.js +300 -0
- package/dist/deploy/utils.d.ts +7 -1
- package/dist/deploy/utils.js +95 -3
- package/dist/flashpack/command.js +1 -0
- package/dist/flashpack/runtime.js +2 -1
- package/dist/image/get-img-props.js +21 -11
- package/dist/image/image-config.d.ts +2 -0
- package/dist/image/image-config.js +17 -0
- package/dist/image/index.d.ts +18 -3
- package/dist/image/index.js +1 -1
- package/dist/image/react-server.d.ts +1 -2
- package/dist/image/react-server.js +1 -1
- package/dist/index.d.ts +23 -23
- package/dist/index.js +61 -61
- package/dist/server/app-dir.d.ts +22 -0
- package/dist/server/app-dir.js +77 -0
- package/dist/server/app-router-runtime.d.ts +1 -0
- package/dist/server/app-router-runtime.js +34 -9
- package/dist/server/cookie-parse.d.ts +4 -4
- package/dist/server/cookie-parse.js +14 -14
- package/dist/server/engine.js +5 -5
- package/dist/server/hydration-chunks.d.ts +7 -0
- package/dist/server/hydration-chunks.js +49 -0
- package/dist/server/image-optimizer.js +2 -1
- package/dist/server/index.d.ts +109 -109
- package/dist/server/index.js +315 -315
- package/dist/server/middleware-runner.d.ts +125 -125
- package/dist/server/middleware-runner.js +607 -615
- package/dist/server/middleware-security.d.ts +36 -36
- package/dist/server/middleware-security.js +183 -183
- package/dist/server/module-compile-hook.js +706 -695
- package/dist/server/root-resolver.js +6 -5
- package/dist/server/rsc-engine-flashpack.d.ts +3 -1
- package/dist/server/rsc-engine-flashpack.js +12 -1
- package/dist/server/rsc-engine.d.ts +6 -1
- package/dist/server/rsc-engine.js +217 -280
- package/dist/server/rsc-upstream.js +900 -892
- package/dist/server/ssr-webpack-shim.d.ts +6 -0
- package/dist/server/ssr-webpack-shim.js +29 -0
- package/dist/server/static-generator.d.ts +2 -0
- package/dist/server/static-generator.js +33 -32
- package/dist/server/structure-validator.js +2 -1
- package/dist/server/structure-watch.js +2 -0
- package/dist/server/typed-api-runtime.js +639 -635
- package/dist/server/vista-import-map.js +134 -134
- package/dist/stack/index.d.ts +34 -34
- package/dist/stack/index.js +49 -49
- package/dist/stack/server/caller.d.ts +13 -13
- package/dist/stack/server/caller.js +42 -42
- package/dist/stack/server/executor.d.ts +40 -40
- package/dist/stack/server/executor.js +222 -222
- package/dist/stack/server/index.d.ts +11 -11
- package/dist/stack/server/index.js +24 -24
- package/dist/stack/server/procedure.d.ts +20 -20
- package/dist/stack/server/procedure.js +66 -66
- package/dist/stack/server/types.d.ts +113 -113
- package/dist/theme/react-server.d.ts +10 -10
- package/dist/theme/react-server.js +16 -16
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import webpack from 'webpack';
|
|
2
|
-
import type { VistaEngineVariant } from '../config';
|
|
2
|
+
import type { DeployOutput, VistaEngineVariant } from '../config';
|
|
3
3
|
export interface WebpackConfigOptions {
|
|
4
4
|
cwd: string;
|
|
5
5
|
isDev: boolean;
|
|
6
6
|
engineVariant?: VistaEngineVariant;
|
|
7
7
|
cacheComponentsEnabled?: boolean;
|
|
8
|
+
imagesUnoptimized?: boolean;
|
|
9
|
+
deployOutput?: DeployOutput;
|
|
8
10
|
}
|
|
9
11
|
export declare function createWebpackConfig(options: WebpackConfigOptions): webpack.Configuration;
|
|
@@ -11,8 +11,9 @@ const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plug
|
|
|
11
11
|
const server_component_plugin_1 = require("./server-component-plugin");
|
|
12
12
|
const vista_flight_plugin_1 = require("../build/webpack/plugins/vista-flight-plugin");
|
|
13
13
|
const constants_1 = require("../constants");
|
|
14
|
+
const app_dir_1 = require("../server/app-dir");
|
|
14
15
|
function createWebpackConfig(options) {
|
|
15
|
-
const { cwd, isDev, engineVariant = 'default', cacheComponentsEnabled = false } = options;
|
|
16
|
+
const { cwd, isDev, engineVariant = 'default', cacheComponentsEnabled = false, imagesUnoptimized = false, deployOutput, } = options;
|
|
16
17
|
const vistaDir = path_1.default.join(cwd, constants_1.BUILD_DIR);
|
|
17
18
|
const flashDir = path_1.default.join(cwd, constants_1.FLASH_DIR);
|
|
18
19
|
const entryPoint = path_1.default.join(vistaDir, 'client.tsx');
|
|
@@ -147,12 +148,12 @@ function createWebpackConfig(options) {
|
|
|
147
148
|
plugins: [
|
|
148
149
|
// Server Component enforcement - runs on every compile
|
|
149
150
|
new server_component_plugin_1.VistaServerComponentPlugin({
|
|
150
|
-
appDir:
|
|
151
|
-
componentsDir:
|
|
151
|
+
appDir: (0, app_dir_1.resolveAppDir)(cwd),
|
|
152
|
+
componentsDir: (0, app_dir_1.resolveComponentsDir)(cwd),
|
|
152
153
|
cacheComponentsEnabled,
|
|
153
154
|
}),
|
|
154
155
|
// Vista Flight Plugin - RSC bundle separation and manifest
|
|
155
|
-
new vista_flight_plugin_1.VistaFlightPlugin({ appDir:
|
|
156
|
+
new vista_flight_plugin_1.VistaFlightPlugin({ appDir: (0, app_dir_1.resolveAppDir)(cwd), dev: isDev }),
|
|
156
157
|
...(isDev
|
|
157
158
|
? [
|
|
158
159
|
new webpack_1.default.HotModuleReplacementPlugin(),
|
|
@@ -165,6 +166,8 @@ function createWebpackConfig(options) {
|
|
|
165
166
|
'process.env.NODE_ENV': JSON.stringify(isDev ? 'development' : 'production'),
|
|
166
167
|
'process.env.VISTA_ENGINE': JSON.stringify(engineVariant),
|
|
167
168
|
'process.env.VISTA_ENGINE_VARIANT': JSON.stringify(engineVariant),
|
|
169
|
+
'process.env.VISTA_IMAGES_UNOPTIMIZED': JSON.stringify(imagesUnoptimized ? '1' : ''),
|
|
170
|
+
'process.env.VISTA_DEPLOY_OUTPUT': JSON.stringify(deployOutput || ''),
|
|
168
171
|
}),
|
|
169
172
|
new mini_css_extract_plugin_1.default({
|
|
170
173
|
filename: isDev ? 'modules.css' : 'modules-[contenthash:8].css',
|
package/dist/build/manifest.d.ts
CHANGED
|
@@ -1,169 +1,169 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vista Build Utilities
|
|
3
|
-
*
|
|
4
|
-
* Generates build manifests, BUILD_ID, and manages .vista output structure.
|
|
5
|
-
*/
|
|
6
|
-
import type { VistaEngineVariant } from '../config';
|
|
7
|
-
import type { ImageConfig } from '../image/image-config';
|
|
8
|
-
/**
|
|
9
|
-
* Generate a unique build ID based on timestamp and random bytes.
|
|
10
|
-
*/
|
|
11
|
-
export declare function generateBuildId(): string;
|
|
12
|
-
/**
|
|
13
|
-
* Read existing BUILD_ID or generate a new one.
|
|
14
|
-
*/
|
|
15
|
-
export declare function getBuildId(vistaDir: string, forceNew?: boolean): string;
|
|
16
|
-
export interface VistaDirs {
|
|
17
|
-
root: string;
|
|
18
|
-
cache: string;
|
|
19
|
-
imageCache: string;
|
|
20
|
-
server: string;
|
|
21
|
-
static: string;
|
|
22
|
-
chunks: string;
|
|
23
|
-
css: string;
|
|
24
|
-
media: string;
|
|
25
|
-
types: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Create the .vista directory structure.
|
|
29
|
-
* In legacy mode, only creates root (no empty server/static dirs).
|
|
30
|
-
* In RSC mode, creates the full structure for server/client bundles.
|
|
31
|
-
*/
|
|
32
|
-
export declare function createVistaDirectories(cwd: string, mode?: 'legacy' | 'rsc'): VistaDirs;
|
|
33
|
-
export interface BuildManifest {
|
|
34
|
-
buildId: string;
|
|
35
|
-
polyfillFiles: string[];
|
|
36
|
-
devFiles: string[];
|
|
37
|
-
lowPriorityFiles: string[];
|
|
38
|
-
rootMainFiles: string[];
|
|
39
|
-
pages: Record<string, string[]>;
|
|
40
|
-
}
|
|
41
|
-
export interface ArtifactManifest {
|
|
42
|
-
schemaVersion: number;
|
|
43
|
-
buildId: string;
|
|
44
|
-
generatedAt: string;
|
|
45
|
-
/** Integrity watermark — framework identity + hash token */
|
|
46
|
-
__integrity?: string;
|
|
47
|
-
manifests: {
|
|
48
|
-
buildManifest: string;
|
|
49
|
-
routesManifest: string;
|
|
50
|
-
appPathRoutesManifest: string;
|
|
51
|
-
prerenderManifest: string;
|
|
52
|
-
requiredServerFiles: string;
|
|
53
|
-
reactClientManifest: string;
|
|
54
|
-
reactServerManifest: string;
|
|
55
|
-
serverManifest?: string;
|
|
56
|
-
runtimeManifest?: string;
|
|
57
|
-
fileTrace?: string;
|
|
58
|
-
standaloneServer?: string;
|
|
59
|
-
types?: string;
|
|
60
|
-
trace?: string;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Generate build-manifest.json
|
|
65
|
-
*/
|
|
66
|
-
export declare function generateBuildManifest(vistaDir: string, buildId: string, pages?: Record<string, string[]>): BuildManifest;
|
|
67
|
-
interface RouteLike {
|
|
68
|
-
pattern: string;
|
|
69
|
-
pagePath: string;
|
|
70
|
-
type?: 'static' | 'dynamic' | 'catch-all';
|
|
71
|
-
}
|
|
72
|
-
export interface RouteHandlerLike {
|
|
73
|
-
pattern: string;
|
|
74
|
-
filePath: string;
|
|
75
|
-
type?: 'static' | 'dynamic' | 'catch-all';
|
|
76
|
-
methods?: string[];
|
|
77
|
-
runtime?: string;
|
|
78
|
-
}
|
|
79
|
-
export declare function generateAppPathRoutesManifest(vistaDir: string, routes?: RouteLike[], routeHandlers?: RouteHandlerLike[]): Record<string, string>;
|
|
80
|
-
export declare function writeVistaTypes(vistaDir: string, routes?: string[]): void;
|
|
81
|
-
export declare function writeVistaTrace(vistaDir: string, fileTrace?: {
|
|
82
|
-
schemaVersion?: number;
|
|
83
|
-
copiedFiles?: unknown[];
|
|
84
|
-
generatedAt?: string;
|
|
85
|
-
}): void;
|
|
86
|
-
export declare function generatePrerenderManifest(vistaDir: string): void;
|
|
87
|
-
export declare function generateRequiredServerFilesManifest(cwd: string, vistaDir: string, extraFiles?: string[], appDir?: string): void;
|
|
88
|
-
export declare function ensureJsonFile(vistaDir: string, relativePath: string, fallback?: unknown): void;
|
|
89
|
-
export declare function writeArtifactManifest(vistaDir: string, buildId: string, extraManifestEntries?: Partial<ArtifactManifest['manifests']>): ArtifactManifest;
|
|
90
|
-
export declare function writeCanonicalVistaArtifacts(cwd: string, vistaDir: string, buildId: string, routes?: RouteLike[], routeHandlers?: RouteHandlerLike[]): ArtifactManifest;
|
|
91
|
-
interface WriteReservedVistaArtifactsOptions {
|
|
92
|
-
buildId: string;
|
|
93
|
-
engineVariant?: VistaEngineVariant;
|
|
94
|
-
imagesConfig?: Partial<ImageConfig> | undefined;
|
|
95
|
-
}
|
|
96
|
-
export declare function writeReservedVistaArtifacts(vistaDir: string, options: WriteReservedVistaArtifactsOptions): void;
|
|
97
|
-
export interface RouteInfo {
|
|
98
|
-
page: string;
|
|
99
|
-
regex: string;
|
|
100
|
-
routeKeys: Record<string, string>;
|
|
101
|
-
namedRegex?: string;
|
|
102
|
-
}
|
|
103
|
-
/** A file-based API route handler (`app/**\/route.*`) as recorded in the manifest. */
|
|
104
|
-
export interface RouteHandlerInfo {
|
|
105
|
-
page: string;
|
|
106
|
-
regex: string;
|
|
107
|
-
namedRegex: string;
|
|
108
|
-
routeKeys: Record<string, string>;
|
|
109
|
-
methods: string[];
|
|
110
|
-
runtime?: string;
|
|
111
|
-
}
|
|
112
|
-
export interface RoutesManifest {
|
|
113
|
-
version: number;
|
|
114
|
-
basePath: string;
|
|
115
|
-
redirects: any[];
|
|
116
|
-
rewrites: any[];
|
|
117
|
-
headers: any[];
|
|
118
|
-
staticRoutes: RouteInfo[];
|
|
119
|
-
dynamicRoutes: RouteInfo[];
|
|
120
|
-
/**
|
|
121
|
-
* File-based API route handlers, kept in their own list so consumers that expect
|
|
122
|
-
* `staticRoutes`/`dynamicRoutes` to be page routes keep working unchanged.
|
|
123
|
-
*/
|
|
124
|
-
routeHandlers: RouteHandlerInfo[];
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Generate routes-manifest.json from route tree.
|
|
128
|
-
*/
|
|
129
|
-
export declare function generateRoutesManifest(vistaDir: string, staticRoutes?: RouteInfo[], dynamicRoutes?: RouteInfo[], routeHandlers?: RouteHandlerLike[]): RoutesManifest;
|
|
130
|
-
export interface ClientComponentInfo {
|
|
131
|
-
filePath: string;
|
|
132
|
-
chunkName: string;
|
|
133
|
-
exports: string[];
|
|
134
|
-
}
|
|
135
|
-
export interface ClientComponentsManifest {
|
|
136
|
-
buildId: string;
|
|
137
|
-
clientModules: Record<string, ClientComponentInfo>;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Generate manifest of client components (files with 'use client').
|
|
141
|
-
*/
|
|
142
|
-
export declare function generateClientComponentsManifest(vistaDir: string, buildId: string, clientModules?: Record<string, ClientComponentInfo>): ClientComponentsManifest;
|
|
143
|
-
export interface ServerComponentInfo {
|
|
144
|
-
filePath: string;
|
|
145
|
-
hasMetadata: boolean;
|
|
146
|
-
hasGenerateMetadata: boolean;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Generate manifest of server components.
|
|
150
|
-
*/
|
|
151
|
-
export declare function generateServerComponentsManifest(vistaDir: string, serverModules?: Record<string, ServerComponentInfo>): void;
|
|
152
|
-
/**
|
|
153
|
-
* Get Webpack cache configuration for persistent caching.
|
|
154
|
-
*/
|
|
155
|
-
export declare function getWebpackCacheConfig(vistaDir: string, buildId: string, name: string, engineVariant?: VistaEngineVariant, cwd?: string): {
|
|
156
|
-
type: "filesystem";
|
|
157
|
-
version: string;
|
|
158
|
-
cacheDirectory: string;
|
|
159
|
-
name: string;
|
|
160
|
-
buildDependencies: {
|
|
161
|
-
config: string[];
|
|
162
|
-
};
|
|
163
|
-
};
|
|
164
|
-
/**
|
|
165
|
-
* Clean old cache entries (keeps last N builds).
|
|
166
|
-
*/
|
|
167
|
-
export declare function cleanOldCache(vistaDir: string, keepBuilds?: number): void;
|
|
168
|
-
export declare function pruneEmptyVistaDirectories(vistaDir: string): void;
|
|
169
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Vista Build Utilities
|
|
3
|
+
*
|
|
4
|
+
* Generates build manifests, BUILD_ID, and manages .vista output structure.
|
|
5
|
+
*/
|
|
6
|
+
import type { VistaEngineVariant } from '../config';
|
|
7
|
+
import type { ImageConfig } from '../image/image-config';
|
|
8
|
+
/**
|
|
9
|
+
* Generate a unique build ID based on timestamp and random bytes.
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateBuildId(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Read existing BUILD_ID or generate a new one.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getBuildId(vistaDir: string, forceNew?: boolean): string;
|
|
16
|
+
export interface VistaDirs {
|
|
17
|
+
root: string;
|
|
18
|
+
cache: string;
|
|
19
|
+
imageCache: string;
|
|
20
|
+
server: string;
|
|
21
|
+
static: string;
|
|
22
|
+
chunks: string;
|
|
23
|
+
css: string;
|
|
24
|
+
media: string;
|
|
25
|
+
types: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Create the .vista directory structure.
|
|
29
|
+
* In legacy mode, only creates root (no empty server/static dirs).
|
|
30
|
+
* In RSC mode, creates the full structure for server/client bundles.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createVistaDirectories(cwd: string, mode?: 'legacy' | 'rsc'): VistaDirs;
|
|
33
|
+
export interface BuildManifest {
|
|
34
|
+
buildId: string;
|
|
35
|
+
polyfillFiles: string[];
|
|
36
|
+
devFiles: string[];
|
|
37
|
+
lowPriorityFiles: string[];
|
|
38
|
+
rootMainFiles: string[];
|
|
39
|
+
pages: Record<string, string[]>;
|
|
40
|
+
}
|
|
41
|
+
export interface ArtifactManifest {
|
|
42
|
+
schemaVersion: number;
|
|
43
|
+
buildId: string;
|
|
44
|
+
generatedAt: string;
|
|
45
|
+
/** Integrity watermark — framework identity + hash token */
|
|
46
|
+
__integrity?: string;
|
|
47
|
+
manifests: {
|
|
48
|
+
buildManifest: string;
|
|
49
|
+
routesManifest: string;
|
|
50
|
+
appPathRoutesManifest: string;
|
|
51
|
+
prerenderManifest: string;
|
|
52
|
+
requiredServerFiles: string;
|
|
53
|
+
reactClientManifest: string;
|
|
54
|
+
reactServerManifest: string;
|
|
55
|
+
serverManifest?: string;
|
|
56
|
+
runtimeManifest?: string;
|
|
57
|
+
fileTrace?: string;
|
|
58
|
+
standaloneServer?: string;
|
|
59
|
+
types?: string;
|
|
60
|
+
trace?: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Generate build-manifest.json
|
|
65
|
+
*/
|
|
66
|
+
export declare function generateBuildManifest(vistaDir: string, buildId: string, pages?: Record<string, string[]>): BuildManifest;
|
|
67
|
+
interface RouteLike {
|
|
68
|
+
pattern: string;
|
|
69
|
+
pagePath: string;
|
|
70
|
+
type?: 'static' | 'dynamic' | 'catch-all';
|
|
71
|
+
}
|
|
72
|
+
export interface RouteHandlerLike {
|
|
73
|
+
pattern: string;
|
|
74
|
+
filePath: string;
|
|
75
|
+
type?: 'static' | 'dynamic' | 'catch-all';
|
|
76
|
+
methods?: string[];
|
|
77
|
+
runtime?: string;
|
|
78
|
+
}
|
|
79
|
+
export declare function generateAppPathRoutesManifest(vistaDir: string, routes?: RouteLike[], routeHandlers?: RouteHandlerLike[]): Record<string, string>;
|
|
80
|
+
export declare function writeVistaTypes(vistaDir: string, routes?: string[]): void;
|
|
81
|
+
export declare function writeVistaTrace(vistaDir: string, fileTrace?: {
|
|
82
|
+
schemaVersion?: number;
|
|
83
|
+
copiedFiles?: unknown[];
|
|
84
|
+
generatedAt?: string;
|
|
85
|
+
}): void;
|
|
86
|
+
export declare function generatePrerenderManifest(vistaDir: string): void;
|
|
87
|
+
export declare function generateRequiredServerFilesManifest(cwd: string, vistaDir: string, extraFiles?: string[], appDir?: string): void;
|
|
88
|
+
export declare function ensureJsonFile(vistaDir: string, relativePath: string, fallback?: unknown): void;
|
|
89
|
+
export declare function writeArtifactManifest(vistaDir: string, buildId: string, extraManifestEntries?: Partial<ArtifactManifest['manifests']>): ArtifactManifest;
|
|
90
|
+
export declare function writeCanonicalVistaArtifacts(cwd: string, vistaDir: string, buildId: string, routes?: RouteLike[], routeHandlers?: RouteHandlerLike[]): ArtifactManifest;
|
|
91
|
+
interface WriteReservedVistaArtifactsOptions {
|
|
92
|
+
buildId: string;
|
|
93
|
+
engineVariant?: VistaEngineVariant;
|
|
94
|
+
imagesConfig?: Partial<ImageConfig> | undefined;
|
|
95
|
+
}
|
|
96
|
+
export declare function writeReservedVistaArtifacts(vistaDir: string, options: WriteReservedVistaArtifactsOptions): void;
|
|
97
|
+
export interface RouteInfo {
|
|
98
|
+
page: string;
|
|
99
|
+
regex: string;
|
|
100
|
+
routeKeys: Record<string, string>;
|
|
101
|
+
namedRegex?: string;
|
|
102
|
+
}
|
|
103
|
+
/** A file-based API route handler (`app/**\/route.*`) as recorded in the manifest. */
|
|
104
|
+
export interface RouteHandlerInfo {
|
|
105
|
+
page: string;
|
|
106
|
+
regex: string;
|
|
107
|
+
namedRegex: string;
|
|
108
|
+
routeKeys: Record<string, string>;
|
|
109
|
+
methods: string[];
|
|
110
|
+
runtime?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface RoutesManifest {
|
|
113
|
+
version: number;
|
|
114
|
+
basePath: string;
|
|
115
|
+
redirects: any[];
|
|
116
|
+
rewrites: any[];
|
|
117
|
+
headers: any[];
|
|
118
|
+
staticRoutes: RouteInfo[];
|
|
119
|
+
dynamicRoutes: RouteInfo[];
|
|
120
|
+
/**
|
|
121
|
+
* File-based API route handlers, kept in their own list so consumers that expect
|
|
122
|
+
* `staticRoutes`/`dynamicRoutes` to be page routes keep working unchanged.
|
|
123
|
+
*/
|
|
124
|
+
routeHandlers: RouteHandlerInfo[];
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Generate routes-manifest.json from route tree.
|
|
128
|
+
*/
|
|
129
|
+
export declare function generateRoutesManifest(vistaDir: string, staticRoutes?: RouteInfo[], dynamicRoutes?: RouteInfo[], routeHandlers?: RouteHandlerLike[]): RoutesManifest;
|
|
130
|
+
export interface ClientComponentInfo {
|
|
131
|
+
filePath: string;
|
|
132
|
+
chunkName: string;
|
|
133
|
+
exports: string[];
|
|
134
|
+
}
|
|
135
|
+
export interface ClientComponentsManifest {
|
|
136
|
+
buildId: string;
|
|
137
|
+
clientModules: Record<string, ClientComponentInfo>;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Generate manifest of client components (files with 'use client').
|
|
141
|
+
*/
|
|
142
|
+
export declare function generateClientComponentsManifest(vistaDir: string, buildId: string, clientModules?: Record<string, ClientComponentInfo>): ClientComponentsManifest;
|
|
143
|
+
export interface ServerComponentInfo {
|
|
144
|
+
filePath: string;
|
|
145
|
+
hasMetadata: boolean;
|
|
146
|
+
hasGenerateMetadata: boolean;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Generate manifest of server components.
|
|
150
|
+
*/
|
|
151
|
+
export declare function generateServerComponentsManifest(vistaDir: string, serverModules?: Record<string, ServerComponentInfo>): void;
|
|
152
|
+
/**
|
|
153
|
+
* Get Webpack cache configuration for persistent caching.
|
|
154
|
+
*/
|
|
155
|
+
export declare function getWebpackCacheConfig(vistaDir: string, buildId: string, name: string, engineVariant?: VistaEngineVariant, cwd?: string): {
|
|
156
|
+
type: "filesystem";
|
|
157
|
+
version: string;
|
|
158
|
+
cacheDirectory: string;
|
|
159
|
+
name: string;
|
|
160
|
+
buildDependencies: {
|
|
161
|
+
config: string[];
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* Clean old cache entries (keeps last N builds).
|
|
166
|
+
*/
|
|
167
|
+
export declare function cleanOldCache(vistaDir: string, keepBuilds?: number): void;
|
|
168
|
+
export declare function pruneEmptyVistaDirectories(vistaDir: string): void;
|
|
169
|
+
export {};
|