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

Function getServiceQueueTopicConfigs

packages/build-utils/src/types.ts:697–708  ·  view source on GitHub ↗
(config: {
  type?: ServiceType;
  topics?: ServiceTopics;
})

Source from the content-addressed store, hash-verified

695}
696
697export function getServiceQueueTopicConfigs(config: {
698 type?: ServiceType;
699 topics?: ServiceTopics;
700}): ServiceQueueTopic[] {
701 if (Array.isArray(config.topics) && config.topics.length > 0) {
702 return typeof config.topics[0] === 'string'
703 ? (config.topics as string[]).map(topic => ({ topic }))
704 : (config.topics as ServiceQueueTopic[]);
705 }
706
707 return config.type === 'worker' ? [{ topic: 'default' }] : [];
708}
709
710export function getServiceQueueTopics(config: {
711 type?: ServiceType;

Callers 2

constructorMethod · 0.90
getServiceQueueTopicsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected