pulumi/pkg/workspace
Justin Van Patten c7985ed296
Support offline template descriptions (#1044)
Note: This is a minor issue that I didn't get to for M11 that isn't
required for M11 and would be fine merging for post-M11.

When you specify a template name explicitly (e.g.
`pulumi new typescript`), we'll try to download the template tarball
without first downloading the JSON list of available templates. The JSON
includes a description used when replacing the `${DESCRIPTION}` string
in template files. Since we didn't download the JSON, we won't have a
description, so we fallback to a default value (`"A Pulumi project."`).
This also happens when specifying `--offline` to use an existing
template under `~/.pulumi/templates`; we won't have a description for
the template, so we fallback to a default description. The fallback
value happens to be the same as the description for each of our current
templates, so noone will currently notice an issue.

For M11, I included initial support for a template manifest file where
the description (and any future metadata) could be stored, but didn't go
as far as actually reading the file.

This change makes it so the CLI actually reads the description from the
manifest file (if it exists), otherwise falling back to the default
value as is done currently. Some minor related cleanup is included in
this change.
2018-03-13 16:09:25 -07:00
..
creds.go Use os/user for home directory 2018-02-20 15:35:07 -08:00
paths.go Adds a pulumi new command to scaffold a project (#1008) 2018-03-09 15:27:55 -08:00
plugins.go Check plugin cache first; make version mismatch a warning 2018-02-26 11:39:50 -08:00
project.go Introduce config.Key 2018-03-08 10:52:25 -08:00
repository.go Pretty-print some JSON files we persist to disk 2018-01-18 20:35:53 -08:00
settings.go Deprecate old configuration model 2018-02-28 17:25:09 -08:00
templates.go Support offline template descriptions (#1044) 2018-03-13 16:09:25 -07:00
templates_test.go Adds a pulumi new command to scaffold a project (#1008) 2018-03-09 15:27:55 -08:00
workspace.go Rework configuration model 2018-02-28 17:30:50 -08:00