pulumi/pkg/cmd/pulumi
Abhinav Gupta 661f98d18d
cmd/stack output: Introduce a Writer abstraction
There's a bit of branching and duplication
between the JSON and the default case.

    (with --json + without) x (with an argument + without)

That branching will only get worse with the upcoming `--shell` flag
(#2632).

This change defines an stackOutputWriter interface
that handles the actual printing,
with two implementations: one for JSON, one for user-readable output.

Note that all writers currently write directly to stdout.
In a future change, these may begin using `io.Writer`s.

In service to #2632
2023-01-25 12:03:43 -08:00
..
convert_testdata Refactor convert command to add entrypoint for pulumi convert debugging 2022-10-01 15:40:17 -07:00
pcl_convert_testdata Support PCL as a convert input (and output) 2022-11-11 10:45:40 +00:00
about.go Repair tests expecting nil slices 2023-01-11 21:53:04 -08:00
about_test.go Move about information to language plugins (#10392) 2022-08-15 14:55:04 +01:00
cancel.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
config.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
config_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
console.go [cli] fix `pulumi console` command (#10509) 2022-08-26 15:09:15 -07:00
convert-trace.go Add a convert-trace command. (#7319) 2021-06-17 14:46:05 -07:00
convert.go all: Drop ioutil 2023-01-06 16:35:14 -08:00
convert_test.go Example of usage and test injection 2022-12-14 15:41:42 +01:00
crypto.go Move cloud methods to pkg/secrets 2023-01-13 10:39:16 +00:00
destroy.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
env.go Add `pulumi env` commmand 2022-12-14 15:41:42 +01:00
errors.go Be more consistent about using ` for quoting commands (#10434) 2022-08-18 15:31:22 +01:00
gen_completion.go Expose `gen-completion` command when running `pulumi --help` (#10218) 2022-07-22 09:36:16 -07:00
gen_markdown.go all: Drop ioutil 2023-01-06 16:35:14 -08:00
import.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
login.go refactor: create a LoginManager interface for encapsulating backend logins. 2022-09-14 10:17:03 -07:00
logout.go added confirmation string to `pulumi logout` (#9641) 2022-05-20 11:50:00 -07:00
logs.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
logs_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
main.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
main_1.17_test.go [pkg] Enable main_test to compile on go 1.17 and go 1.18 (#9771) 2022-06-09 16:47:49 -07:00
main_1.18_test.go [pkg] Enable main_test to compile on go 1.17 and go 1.18 (#9771) 2022-06-09 16:47:49 -07:00
main_test.go [pkg] Enable main_test to compile on go 1.17 and go 1.18 (#9771) 2022-06-09 16:47:49 -07:00
new.go cli/new: Ignore VCS directories 2023-01-09 09:02:03 -08:00
new_smoke_test.go all: Drop ioutil 2023-01-06 16:35:14 -08:00
new_test.go Merge #11804 2023-01-09 17:43:40 +00:00
org.go Thread context through cmd more consistently (#10393) 2022-08-16 12:35:39 +01:00
package.go Fix executable checks for windows 2022-12-20 09:08:42 +00:00
package_extract_schema.go Add gen-sdk sub-command 2022-09-14 17:07:05 +02:00
package_gen_sdk.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
plugin.go Engine and Golang support for shimless providers 2022-11-14 11:25:41 +00:00
plugin_install.go Fix executable checks for windows 2022-12-20 09:08:42 +00:00
plugin_ls.go Split PluginInfo in Info and Spec (#10501) 2022-08-26 15:51:14 +01:00
plugin_rm.go Update error handling (#8406) 2021-11-12 18:37:17 -08:00
policy.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy_disable.go Thread context through cmd more consistently (#10393) 2022-08-16 12:35:39 +01:00
policy_enable.go Thread context through cmd more consistently (#10393) 2022-08-16 12:35:39 +01:00
policy_group_ls.go Thread context through cmd more consistently (#10393) 2022-08-16 12:35:39 +01:00
policy_ls.go Thread context through cmd more consistently (#10393) 2022-08-16 12:35:39 +01:00
policy_new.go cli: Clean up previous yamlutil package, update new commands 2022-12-10 12:29:33 -08:00
policy_new_smoke_test.go test: use T.TempDir to create temporary test directory 2022-12-03 15:17:08 +08:00
policy_new_test.go test: use T.TempDir to create temporary test directory 2022-12-03 15:17:08 +08:00
policy_publish.go refactor: create a LoginManager interface for encapsulating backend logins. 2022-09-14 10:17:03 -07:00
policy_rm.go Thread context through cmd more consistently (#10393) 2022-08-16 12:35:39 +01:00
policy_validate.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
preview.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
pulumi.go Add `pulumi env` commmand 2022-12-14 15:41:42 +01:00
pulumi_test.go ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
query.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
refresh.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
replay_events.go [display] Factor out the low-level progress renderer. 2022-10-31 07:59:14 -07:00
schema.go [codegen/schema] Add a schema checker (#7865) 2021-08-30 19:29:24 -07:00
schema_check.go all: Drop ioutil 2023-01-06 16:35:14 -08:00
stack.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_change_secrets_provider.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_export.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_graph.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_history.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_import.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_init.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_ls.go Thread context through cmd more consistently (#10393) 2022-08-16 12:35:39 +01:00
stack_ls_test.go Qualify name 2022-11-29 14:07:20 -08:00
stack_output.go cmd/stack output: Introduce a Writer abstraction 2023-01-25 12:03:43 -08:00
stack_output_test.go cmd/stack output: Inject requireStack and test output 2023-01-24 16:21:39 -08:00
stack_rename.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_rm.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_select.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_tag.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_unselect.go include error in formatted message and explicitly check for an empty stack 2022-03-14 11:32:33 +01:00
state.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
state_delete.go Add `pulumi state delete --target-dependents` 2022-10-27 11:23:56 -07:00
state_rename.go Thread context through cmd more consistently (#10393) 2022-08-16 12:35:39 +01:00
state_unprotect.go Thread context through cmd more consistently (#10393) 2022-08-16 12:35:39 +01:00
terminal.go crypto/ssh/terminal is deprecated 2023-01-12 09:07:34 -08:00
terminal_test.go Fix negative page size panic (#10475) 2022-08-23 16:45:47 -04:00
up.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
up_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
util.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
util_remote.go [auto] Add SkipInstallDependencies option for remote workspaces 2022-12-19 10:27:01 -05:00
util_remote_test.go [cli] Experimental support for remote operations 2022-10-27 16:15:59 -07:00
util_test.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
version.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
view-trace.go golangci-lint: Opt into nolintlint 2023-01-06 10:17:55 -08:00
watch.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
whoami.go Thread context through cmd more consistently (#10393) 2022-08-16 12:35:39 +01:00