Commit Graph

10 Commits

Author SHA1 Message Date
Will Jones 47fa329ad3
Improve TypeDocs for `sdk/nodejs` ()
This commit improves the TypeScript TypeDocs for the remaining modules
in the NodeJS SDK. Specifically:

* It adds documentation to interfaces, properties, etc. that are missing
it.

* It transforms would-be TypeDoc comments erroneously written using
either `/*` (a single asterisk) or `//` (a normal line comment) to
actual TypeDoc comments.

* It standardises on TypeDoc's `{@link Name}` syntax for linking
identifiers, as opposed to the mixture of backticks and square brackets
we have today.

* It fixes typos and generally cleans up the formatting here and there,
as well as introducing more consistency where the same concepts crop up
in multiple places.

---------

Co-authored-by: Thomas Gummerer <t.gummerer@gmail.com>
2024-07-15 09:05:28 +00:00
bfraterman-tkhsecurity 25f1e5278d
feat: enable imports from nodejs provider resources ()
# Description
I was writing a typescript resource provider, but got errors that the
the plugin didn't support imports, while the `read` method was
implemented on the provider.
This PR also sets the `Inputs` on the `ReadResponse`, so imports will be
supported.

Fixes # (issue)
Could not find existing issue

## Checklist

- [ ] I have run `make tidy` to update any new dependencies
- [ ] I have run `make lint` to verify my code passes the lint check
- [ ] I have formatted my code using `gofumpt`
(None of the above, since the change is in js code)

- [ ] I have added tests that prove my fix is effective or that my
feature works
There are no existing tests for the `server.ts` file. If really required
for merging I could maybe take a look at a test for this use-case.

- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change

- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
2023-11-30 16:22:51 +00:00
Robbie McKinstry e05a3bd81c
Apply autoformat
This commit applies the Rome autoformatter to the Node SDK.
These changes are automatically produced. To reproduce these
changes, run `make format` from inside sdk/nodejs.
2023-04-28 18:27:10 -04:00
Daniel Bradley 350274c996
Tidy Nodejs SDK imports ()
* Remove unused nodejs SDK imports

Quick audit to find all unused imports in files

- Remove unused `protobufjs` dependency - we use `google-protobuf` and `@grpc/grpc-js`.

* Eliminate additional unused code
2022-05-30 09:31:28 +01:00
Fraser Waters a584c69040
Remove sequence numbers from dynamic providers ()
* Remove sequence numbers from dynamic providers

* Add to changelog

* Remove from dynamic provider

* Remove from server
2022-01-27 20:34:12 +00:00
Fraser Waters ec3ef44841
Make resource autonames determinstic ()
* Start adding SequenceNumber

* Start adding sequence number to state

* New generate functions

* notes

* Don't increment if unknown

* Deterministic name test

* Check replace

* typo

* lint

* Increment on targetted replace

* Some comments and external fixes

* Add test for resetting sequence number after replace

* Reset sequence numbers after replace

* assert check we never pass -1 to check

* Add to dynamic providers

* lint

* Add to changelog
2022-01-20 11:18:54 +00:00
Horace Lee a92a005d68
Use ESlint instead of TSlint ()
Migrated TSlint configs to ESlint ones using [tslint-to-eslint-config](https://github.com/typescript-eslint/tslint-to-eslint-config) tool, and refined the configs to better match the current coding style.

Changes:
- [member-delimiter-style](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/member-delimiter-style.md#options) that as suggested default for type definition to be  with `semicolon`
- Indentation fixes that is enforced by [eslint-indent](https://eslint.org/docs/rules/indent#options)
- Added dependencies for ESlint with Typescript
- Removed TSlint
2021-08-10 11:31:59 -07:00
Justin Van Patten 84b574f0df
Initial support for resource methods (authoring from Node.js, calling from Python) ()
Adds initial support for resource methods (via a new `Call` gRPC method similar to `Invoke`), with support for authoring methods from Node.js, and calling methods from Python.
2021-06-30 07:48:56 -07:00
Justin Van Patten f973fbcf58
[sdk/nodejs|python] Add GetSchema support to providers () 2021-05-19 07:11:18 -07:00
Pat Gavlin 2585b86aa4
Initial support for remote component construction. ()
These changes add initial support for the construction of remote
components. For now, this support is limited to the NodeJS SDK;
follow-up changes will implement support for the other SDKs.

Remote components are component resources that are constructed and
managed by plugins rather than by Pulumi programs. In this sense, they
are a bit like cloud resources, and are supported by the same
distribution and plugin loading mechanisms and described by the same
schema system.

The construction of a remote component is initiated by a
`RegisterResourceRequest` with the new `remote` field set to `true`.
When the resource monitor receives such a request, it loads the plugin
that implements the component resource and calls the `Construct`
method added to the resource provider interface as part of these
changes. This method accepts the information necessary to construct the
component and its children: the component's name, type, resource
options, inputs, and input dependencies. It is responsible for
dispatching to the appropriate component factory to create the
component, then returning its URN, resolved output properties, and
output property dependencies. The dependency information is necessary to
support features such as delete-before-replace, which rely on precise
dependency information for custom resources.

These changes also add initial support for more conveniently
implementing resource providers in NodeJS. The interface used to
implement such a provider is similar to the dynamic provider interface
(and may be unified with that interface in the future).

An example of a NodeJS program constructing a remote component resource
also implemented in NodeJS can be found in
`tests/construct_component/nodejs`.

This is the core of .
2020-09-07 19:33:55 -07:00