-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Description:
Currently, local.json does not support referencing different HubSpot CLI config profiles' variables. Variables defined in hsprofile.*.json are not being recognized when used in local.json file.
Use case:
When working with multiple HubSpot accounts (e.g., development, staging, production), developers need an easy way to specify which config profile should be used and have environment-specific variables properly resolved.
Example:
in hsprofile.*.json:
{
"accountId": 123,
"variables": {
"BACKEND_URL": "https://my-dev-backend.example.com",
}
}
In local.json:
{
"proxy" {
"${BACKEND_URL}": "https://localhost:446"
}
}
In app .hsmeta file:
{
"permittedUrls": {
"fetch": ["${BACKEND_URL}"]
}
}
Actual behavior:
Running hs project dev produces the error:
[WARNING] The key "${BACKEND_URL}" in "local.json" is an invalid url
But it is resolved as a valid URL in permittedUrls.fetch
Expected behavior:
The ${BACKEND_URL} variable should be resolved in local.json from hsprofile.*.json