Remote variable array to support multiple variable files. #1697
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request enhances the handling of remote variable files by allowing multiple
--remote-variablesflags, enabling users to fetch and merge several variable files from different remote Git repositories. The changes update both the CLI interface and the internal logic to support arrays of remote variable sources and ensure the merged variables are correctly processed.Support for multiple remote variable files:
--remote-variablesCLI option now accepts multiple values (as an array), allowing users to specify more than one remote variable file. (src/index.ts,src/argv.ts,README.md) [1] [2] [3]VariablesFromFilesiterates over each provided remote variable source, fetches the variable files, and merges them usingdeepmergeto combine all variables into a single object. (src/variables-from-files.ts) [1] [2]Testing and documentation:
remoteVariables, ensuring the new behavior is covered. (tests/test-cases/remote-variables-file/integration.test.ts)README.mdwas updated to explain how to use multiple--remote-variablesflags.(the code was not generated with AI ;))