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

Function getServiceDescriptionInfo

packages/cli/src/util/input/display-services.ts:84–109  ·  view source on GitHub ↗
(
  service: ExperimentalService
)

Source from the content-addressed store, hash-verified

82};
83
84function getServiceDescriptionInfo(
85 service: ExperimentalService
86): ServiceDescriptionInfo {
87 if (
88 service.type === 'worker' ||
89 service.type === 'job' ||
90 service.type === 'cron'
91 ) {
92 const typeLabel =
93 service.type === 'worker'
94 ? 'Worker'
95 : (jobTriggerLabels[service.trigger ?? ''] ?? 'Job');
96 const typeColorFn = service.type === 'worker' ? chalk.magenta : chalk.cyan;
97
98 if (service.runtime) {
99 const runtimeName =
100 service.runtime.charAt(0).toUpperCase() + service.runtime.slice(1);
101 const runtimeColorFn = runtimeColors[service.runtime] || chalk.yellow;
102 const label = `${typeLabel}${chalk.white('/')}${runtimeColorFn(runtimeName)}`;
103 return { label, colorFn: typeColorFn };
104 }
105 return { label: typeLabel, colorFn: typeColorFn };
106 }
107
108 return getFrameworkRuntimeBuilderInfo(service);
109}
110
111function getFrameworkRuntimeBuilderInfo(service: {
112 framework?: string;

Callers 1

buildServiceRowsV1Function · 0.85

Calls 1

Tested by

no test coverage detected