(deps commandDeps)
| 76 | } |
| 77 | |
| 78 | func 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 | |
| 100 | func newBundleActivateCommand(deps commandDeps) *cobra.Command { |
| 101 | flags := bundleActivationFlags{scope: bundleGlobalKey} |
no test coverage detected