pulumi/sdk/nodejs/cmd
Sean Gillespie 679f55c355
Validate type tokens before using them (#1904)
* Validate type tokens before using them

When registering or reading a resource, we take the type token given to
us from the language host and assume that it's valid, which resulted in
assertion failures in various places in the engine. This commit
validates the format of type tokens given to us from the language host
and issues an appropriate error if it's not valid.

Along the way, this commit also improves the way that fatal exceptions
are rendered in the Node language host.

* Pre-allocate an exception for ReadResource

* Fix integration test

* CR Feedback

This commit is a lower-impact change that fixes the bugs associated with
invalid types on component resources and only checks that a type is
valid on custom resources.

* CR Take 2: Fix up IsProviderType instead of fixing call sites

* Please gometalinter
2018-09-07 15:19:18 -07:00
..
dynamic-provider Reimplement refresh. (#1814) 2018-08-22 17:52:46 -07:00
pulumi-language-nodejs Use require.resolve to find @pulumi/pulumi/cmd/run 2018-09-07 11:30:54 -07:00
run Validate type tokens before using them (#1904) 2018-09-07 15:19:18 -07:00