Skip to content

TSP Template script creates const for envvars - suggest alias to support string interpolation #15017

@andrewconnell

Description

@andrewconnell

Describe the bug
When declared as a constant, the envvar can't be used in string concatenation (string interpolation). For example, say you have an authenticated endpoint. When envvars are constants, you can't use it when creating an alias.

The problem is the script in the template, ./scripts/generate-env.js, generates const for each envvar, but it should be an alias.

To Reproduce
Steps to reproduce the behavior:

  1. In a new DA - TSP project, try to concat an envvar with a string... observe error

    Image
  2. Change the variable to a constant, but when used in some TSP objects, like OAuth2Auth... observe error

    Image

Expected behavior
If the envvar generated was an alias, all works:

Image

VS Code Extension Information (please complete the following information):

  • OS: macOS
  • Version v26.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions