pulumi/sdk/go/common
Luke Hoban 4db5fe3520 Support `pulumi new <ai-url>`
This adds support for Pulumi AI URLs as sources for `pulumi new`.   This can support both conversations and answers URLs, such as https://www.pulumi.com/ai/answers/6c060c2d-e754-47d2-af8c-0d6a761634e3.

This implementation is likely not what we ultimately want to ship.  It builds out the fake "template" from the content of the HTML page from within the Pulumi CLI.  Instead, we almost certainly want to push this logic into the Pulumi AI service itself, and only generalize the CLI slightly beyond it's current support to allow pulling a ZIP or other simpler asset in place of a Git repo.

But the end result shows what is possible:

```
$ pulumi new https://www.pulumi.com/ai/answers/6c060c2d-e754-47d2-af8c-0d6a761634e3
```

A few challenges:
* This needs to support templating in all languages, and ideally without re-creating all the login in the existing language templates
* The code is scraped to infer the package.json dependencies needed (without knowing versions) and also to guess what required config should be specified (like `aws:region`). (TypeScript only currently)
* The code itself is scraped out of the HTML in a way that may not be guarnteed to work going forward.
2023-09-24 21:29:43 -07:00
..
apitype Addresses initial Org Search feedback (#13920) 2023-09-12 00:18:43 +00:00
constant Send update metadata about update plans 2022-10-12 22:55:59 +01:00
diag [sdk] Update uniseg 2023-05-25 22:24:13 -07:00
encoding all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
env Kp/adds root pulumi ai command (#13808) 2023-09-05 23:18:03 +00:00
resource [sdk/go] Ensure Assets of AssetArchive are non-nil when creating and deserializing (#14007) 2023-09-22 15:46:19 +00:00
slice Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
testing address comments: use os.UserHomeDir() and disable parallel tests 2023-06-26 13:53:58 +02:00
tokens Use fallback project name rather than "pulum" (#13953) 2023-09-18 18:01:37 +00:00
tools all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
util cmdutil: Support errors.Join-based multi-errors (#13813) 2023-09-01 19:01:16 +00:00
version move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
workspace Support `pulumi new <ai-url>` 2023-09-24 21:29:43 -07:00