bicep
bicep copied to clipboard
Add loadDirectoryFileInformation function
Description
Fixes #3607
Add loadDirectoryFileInformation function to retrieve basic information about a directory's content
Checklist
- [x] I have read and adhere to the contribution guide.
Microsoft Reviewers: Open in CodeFlow
Any news on this one? Really important PR and new function.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 9.37%. Comparing base (108d816) to head (a360dbd).
:warning: Report is 2946 commits behind head on main.
:exclamation: There is a different number of reports uploaded between BASE (108d816) and HEAD (a360dbd). Click for more details.
HEAD has 4 uploads less than BASE
Flag BASE (108d816) HEAD (a360dbd) dotnet 4 0
Additional details and impacted files
@@ Coverage Diff @@
## main #17241 +/- ##
===========================================
- Coverage 94.28% 9.37% -84.91%
===========================================
Files 1113 7 -1106
Lines 100791 288 -100503
Branches 8734 123 -8611
===========================================
- Hits 95028 27 -95001
+ Misses 4595 261 -4334
+ Partials 1168 0 -1168
| Flag | Coverage Δ | |
|---|---|---|
| dotnet | ? |
|
| typescript | 9.37% <ø> (+1.66%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more. see 1103 files with indirect coverage changes
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Sorry about the delay reviewing! I've left some comments.
Test this change out locally with the following install scripts (Action run 16993909457)
VSCode
- Mac/Linux
bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 16993909457 - Windows
iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 16993909457"
Azure CLI
- Mac/Linux
bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 16993909457 - Windows
iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 16993909457"
Content PR - https://github.com/MicrosoftDocs/azure-docs-pr/pull/305500
@anthony-c-martin I don't know if there is documentation for this already, but I am confused about this function. What are the use cases for this?
I am asking this, because I wonder if this new function can be used in DeploymentScripts, to upload more than on script? Which could solve #17513?
Thanks
@anthony-c-martin I don't know if there is documentation for this already, but I am confused about this function. What are the use cases for this?
I am asking this, because I wonder if this new function can be used in DeploymentScripts, to upload more than on script? Which could solve #17513?
Thanks
This function is executed locally when Bicep creates the .json file, so there's unfortunately no ability to influnce the behavior of deploymentScripts with it.
@anthony-c-martin what are the use cases for this? doesn't seem like it's possible to use the resulting array to e.g. import all files in a folder, or loadJsonContent() from all files in a folder or anything similar to that -- it only exposes file names/paths literally without there being an obvious use case to consume them?
@anthony-c-martin what are the use cases for this? doesn't seem like it's possible to use the resulting array to e.g. import all files in a folder, or loadJsonContent() from all files in a folder or anything similar to that -- it only exposes file names/paths literally without there being an obvious use case to consume them?
Yeah, I understand we cannot use in DeploymentScripts, but still didn't understand the use cases for this new function.