Skip to content

Commit

Permalink
chore: modify function name
Browse files Browse the repository at this point in the history
  • Loading branch information
zllkjc committed Dec 11, 2024
1 parent 451ecf5 commit 7a81a92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export const getServerRoutes = (
const toPosix = (pathStr: string) =>
pathStr.split(path.sep).join(path.posix.sep);

export const getServerRoutesServe = (distDirectory: string) => {
export const getProdServerRoutes = (distDirectory: string) => {
const routeJSON = path.join(distDirectory, ROUTE_SPEC_FILE);
try {
const { routes } = fs.readJSONSync(routeJSON);
Expand Down
6 changes: 3 additions & 3 deletions packages/solutions/app-tools/src/plugins/analyze/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ export default ({
);
await hooks.addRuntimeExports.call();

const [{ getServerRoutesServe }] = await Promise.all([
const [{ getProdServerRoutes }] = await Promise.all([
import('./getServerRoutes.js'),
]);

if (apiOnly) {
const routes: ServerRoute[] = [];
if (checkIsServeCommand()) {
routes.push(...getServerRoutesServe(appContext.distDirectory));
routes.push(...getProdServerRoutes(appContext.distDirectory));
} else {
const { routes: modifiedRoutes } =
await hooks.modifyServerRoutes.call({
Expand Down Expand Up @@ -96,7 +96,7 @@ export default ({

const routes: ServerRoute[] = [];
if (checkIsServeCommand()) {
routes.push(...getServerRoutesServe(appContext.distDirectory));
routes.push(...getProdServerRoutes(appContext.distDirectory));
} else {
const initialRoutes = getServerRoutes(entrypoints, {
appContext,
Expand Down

0 comments on commit 7a81a92

Please sign in to comment.