@@ -35,12 +35,24 @@ export async function loadConfig(root: string, projectRoot: string): Promise<Nex
3535 return await loadConfig ( PHASE_PRODUCTION_BUILD , root ) ;
3636}
3737
38+ /**
39+ * Loads the route manifest from the standalone directory.
40+ * @param standalonePath The path to the standalone directory.
41+ * @param distDir The path to the dist directory.
42+ * @returns The route manifest.
43+ */
3844export function loadRouteManifest ( standalonePath : string , distDir : string ) : RoutesManifest {
3945 const manifestPath = join ( standalonePath , distDir , ROUTES_MANIFEST ) ;
4046 const json = readFileSync ( manifestPath , "utf-8" ) ;
4147 return JSON . parse ( json ) as RoutesManifest ;
4248}
4349
50+ /**
51+ * Loads the middleware manifest from the standalone directory.
52+ * @param standalonePath The path to the standalone directory.
53+ * @param distDir The path to the dist directory.
54+ * @returns The middleware manifest.
55+ */
4456export function loadMiddlewareManifest (
4557 standalonePath : string ,
4658 distDir : string ,
@@ -50,6 +62,12 @@ export function loadMiddlewareManifest(
5062 return JSON . parse ( json ) as MiddlewareManifest ;
5163}
5264
65+ /**
66+ * Writes the route manifest to the standalone directory.
67+ * @param standalonePath The path to the standalone directory.
68+ * @param distDir The path to the dist directory.
69+ * @param customManifest The route manifest to write.
70+ */
5371export async function writeRouteManifest (
5472 standalonePath : string ,
5573 distDir : string ,
0 commit comments