Skip to content

Add nodejs to the Environments Protocol type signature #477

Description

@dotNomad

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/environments accepts it
  • PUT /v1/environments/{guid} also accepts it
  • and GET always 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.update
  • Environments.create
  • Environments.find_by

Node.js content support is currently behind EarlyAccess.NodeJs` in Connect, but the field shape mirrors the other languages exactly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsdkUsed for automation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions