MCPcopy Create free account
hub / github.com/vercel/vercel / buildServiceRowsV1

Function buildServiceRowsV1

packages/cli/src/util/input/display-services.ts:177–199  ·  view source on GitHub ↗
(services: ExperimentalService[])

Source from the content-addressed store, hash-verified

175}
176
177function buildServiceRowsV1(services: ExperimentalService[]): string[][] {
178 const outputOrder: Record<string, number> = {
179 web: 0,
180 cron: 1,
181 job: 1,
182 worker: 2,
183 };
184 const sorted = [...services].sort(
185 (a, b) => (outputOrder[a.type] ?? 3) - (outputOrder[b.type] ?? 3)
186 );
187
188 return sorted.map(service => {
189 const descInfo = getServiceDescriptionInfo(service);
190 const target = getServiceTarget(service);
191
192 return [
193 `• ${service.name}`,
194 descInfo.colorFn(`[${descInfo.label}]`),
195 chalk.dim('→'),
196 target,
197 ];
198 });
199}
200
201function buildServiceRowsV2(services: ExperimentalServiceV2[]): string[][] {
202 return services.map(service => {

Callers 1

displayDetectedServicesFunction · 0.85

Calls 3

getServiceTargetFunction · 0.85
sortMethod · 0.80

Tested by

no test coverage detected