a92101cd49
This new method is used to return the state of the resource monitor for a deployment directly to a client. This helps with three major areas: 1) `Construct` and `Call` no longer need to be kept up to date with any new features added to `Run`. All they need is the resource monitor target and can use `GetState` to fetch all other information. 2) We no longer need to find a way to pass all the information from `Run` from the runtime host to the runtime SDKs. Instead all we need to pass is the (again) the resource monitor target, and on startup the SDK can fetch the rest of the information over gRPC. In fact we don't even need to add new information to `Run`, as the language runtime host can also just use `GetState` to fetch the latest information. 3) Features are now a safe enumeration lookup rather than a set of strings that could be typo'd. Further you don't need to make multiple roundtrips to see all features supported, the entire set is returned at once. A few things need pointing out about this change. Firstly SDKs that use this _also_ need to have a fallback to using the old envvar based approch because they might be running against an old engine version. Secondly this PR doesn't update any of the SDKs to use this. The most obvious candidate to update first is YAML as that doesn't actually have an SDK, just the host and the host _doesn't_ need to be backward compatible because we always tie host and engine versions together in a single release. |
||
---|---|---|
.. | ||
asset | ||
automation | ||
cmd | ||
dist | ||
dynamic | ||
iterable | ||
log | ||
npm | ||
proto | ||
provider | ||
queryable | ||
runtime | ||
tests | ||
tests_with_mocks | ||
.eslintrc.js | ||
.gitignore | ||
Makefile | ||
README.md | ||
config.ts | ||
errors.ts | ||
index.ts | ||
invoke.ts | ||
metadata.ts | ||
output.ts | ||
package.json | ||
resource.ts | ||
rome.json | ||
stackReference.ts | ||
tsconfig.json | ||
tsutils.ts | ||
utils.ts | ||
version.ts | ||
yarn.lock |
README.md
Pulumi Node.js SDK
The Pulumi Node.js SDK lets you write cloud programs in JavaScript.
Installation
Using npm:
$ npm install --save @pulumi/pulumi
Using yarn:
$ yarn add @pulumi/pulumi
This SDK is meant for use with the Pulumi CLI. Visit Pulumi's Download & Install to install the CLI.
Building and Testing
For anybody who wants to build from source, here is how you do it.
Prerequisites
This SDK uses Node.js and we support any of the Current, Active and Maintenance LTS versions. We support both NPM and Yarn for package management.
At the moment, we only support building on macOS and Linux, where standard GNU tools like make
are available.
Make Targets
To build the SDK, simply run make
from the root directory (where this README
lives, at sdk/nodejs/
from the repo's
root). This will build the code, run tests, and install the package and its supporting artifacts.
At the moment, for local development, we install everything into $HOME/.dev-pulumi
. You will want this on your $PATH
.
The tests will verify that everything works, but feel free to try running pulumi preview
and/or pulumi up
from
the examples/minimal/
directory. Remember to run tsc
first, since pulumi
expects JavaScript, not TypeScript.