pulumi/sdk/nodejs/cmd/pulumi-language-nodejs
bors[bot] e49c0fee38
Merge #13078
13078: cli(state upgrade): Prompt for project names for detached stacks r=abhinav a=abhinav

When running 'pulumi state upgrade', supply the
ProjectsForDetachedStacks option to the file state backend so that we
get asked to fill in project names for stacks where we could not guess
them automatically.

The implementation of the prompt is straightforward:
For each stack, ask a question with the survey package
and feed the result back to the filestate backend.

Testing this is a bit complicated because terminals are involved.
The test for this uses the go-expect and vt10x libraries
recommended in the documentation for survey.
It uses them to simulate a terminal emulator and acts on the output.
The pty library is used to create a compatible pseduo-terminal.
Unfortunately, these test libraries rely on Unix APIs and are not
available on Windows, so the test will not run on Windows machines.

Resolves #12600

---

Preview

![Kapture 2023-05-31 at 19 25 57](https://github.com/pulumi/pulumi/assets/41730/69fcf37d-0267-40cc-9002-6514f1cf9ad5)


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
2023-06-23 15:38:56 +00:00
..
go.mod chore: post-release go.mod updates 2023-06-22 21:48:48 +00:00
go.sum cli(state upgrade): Prompt for project names for detached stacks 2023-06-22 13:45:13 -07:00
main.go Make convert more lenient 2023-06-08 11:14:31 +01:00
main_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
proxy.go Maintain alias compat for older Node.js SDKs on new CLIs 2023-06-14 08:34:32 -07:00
proxy_unix.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
proxy_windows.go ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00