MCPcopy Create free account
hub / github.com/compozy/agh / bundleCatalogBundle

Function bundleCatalogBundle

internal/cli/bundle.go:284–335  ·  view source on GitHub ↗
(items []BundleCatalogRecord)

Source from the content-addressed store, hash-verified

282}
283
284func bundleCatalogBundle(items []BundleCatalogRecord) outputBundle {
285 return listBundle(
286 struct {
287 Bundles []BundleCatalogRecord `json:"bundles"`
288 }{Bundles: items},
289 items,
290 "Bundle Catalog",
291 []string{
292 bridgeExtensionValue,
293 bundleBundleValue,
294 "Profiles",
295 "Agents",
296 "Jobs",
297 "Triggers",
298 "Bridges",
299 },
300 "bundles",
301 []string{
302 bundleExtensionKey,
303 bundleBundleKey,
304 "profiles",
305 "agents",
306 "jobs",
307 "triggers",
308 "bridges",
309 },
310 func(item BundleCatalogRecord) []string {
311 agents, jobs, triggers, bridges := bundleCatalogCounts(item)
312 return []string{
313 stringOrDash(item.ExtensionName),
314 stringOrDash(item.BundleName),
315 strings.Join(bundleProfileNames(item), ","),
316 strconv.Itoa(agents),
317 strconv.Itoa(jobs),
318 strconv.Itoa(triggers),
319 strconv.Itoa(bridges),
320 }
321 },
322 func(item BundleCatalogRecord) []string {
323 agents, jobs, triggers, bridges := bundleCatalogCounts(item)
324 return []string{
325 item.ExtensionName,
326 item.BundleName,
327 strings.Join(bundleProfileNames(item), "|"),
328 strconv.Itoa(agents),
329 strconv.Itoa(jobs),
330 strconv.Itoa(triggers),
331 strconv.Itoa(bridges),
332 }
333 },
334 )
335}
336
337func bundleActivationListBundle(items []BundleActivationRecord) outputBundle {
338 return listBundle(

Callers 1

newBundleCatalogCommandFunction · 0.85

Calls 4

listBundleFunction · 0.85
bundleCatalogCountsFunction · 0.85
stringOrDashFunction · 0.85
bundleProfileNamesFunction · 0.85

Tested by

no test coverage detected