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

Function newBundlePreviewCommand

internal/cli/bundle.go:78–98  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

76}
77
78func newBundlePreviewCommand(deps commandDeps) *cobra.Command {
79 flags := bundleActivationFlags{scope: bundleGlobalKey}
80 cmd := &cobra.Command{
81 Use: "preview",
82 Short: "Preview a bundle activation without writing resources",
83 RunE: func(cmd *cobra.Command, _ []string) error {
84 client, err := clientFromDeps(deps)
85 if err != nil {
86 return err
87 }
88 request := bundleActivationRequestFromFlags(flags)
89 item, err := client.PreviewBundleActivation(cmd.Context(), request)
90 if err != nil {
91 return err
92 }
93 return writeCommandOutput(cmd, bundleActivationBundle(item))
94 },
95 }
96 addBundleActivationFlags(cmd, &flags)
97 return cmd
98}
99
100func newBundleActivateCommand(deps commandDeps) *cobra.Command {
101 flags := bundleActivationFlags{scope: bundleGlobalKey}

Callers 1

newBundleCommandFunction · 0.85

Calls 6

clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
bundleActivationBundleFunction · 0.85
addBundleActivationFlagsFunction · 0.85

Tested by

no test coverage detected