posit-dev / posit-dev/posit-sdk-py
Add `nodejs` to the `Environments` Protocol type signature
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18
- Forks
- 14
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 4
Description
The Environments.create() Protocol in src/posit/connect/environments.py lists explicit keyword arguments for python, r, quarto, and tensorflow installations, but not nodejs.
Connect is adding support for nodejs.installations as an option for execution environments.
POST /v1/environmentsaccepts itPUT /v1/environments/{guid}also accepts it- and
GETalways returns it.
At runtime the underlying _ResourceSequence.create(**attributes) happily POSTs a nodejs=... kwarg, so the SDK works against the new field today.
The gap is purely typing: static type-checkers and IDE autocomplete flag nodejs=... as unexpected.
Suggested change
Add nodejs: Installations | None = ... alongside the other language kwargs in three places in src/posit/connect/environments.py:
Environment.updateEnvironments.createEnvironments.find_by
Node.js content support is currently behind EarlyAccess.NodeJs` in Connect, but the field shape mirrors the other languages exactly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the Environments protocol definitions in src/posit/connect/environments.py, focusing on Environment.update, Environments.create, and Environments.find_by and their existing installation arguments. Add the nodejs parameter consistently, then run the project's type checks or tests to confirm nodejs is accepted by static tooling in all three entry points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100