posit-dev / publisher

MIT License
3 stars 0 forks source link

Add dir parameter to files API #1904

Closed mmarchetti closed 16 hours ago

mmarchetti commented 3 days ago

Intent

This PR adds the dir parameter to the configuration-specific Files API.

Type of Change

Approach

Same as the other APIs (#1860, #1873).

Automated Tests

Added unit tests.

Directions for Reviewers

Run the agent in a parent directory (one or more levels up from your deployable projects). Access the Files API from subdirectories:

$publisher ui -vv --listen=localhost:9001 &
curl localhost:9001/api/configuration/$NAME/files?dir=test/sample-content/quarto-proj-py | jq
curl localhost:9001/api/configuration/$NAME/files?dir=test/sample-content/quarto-proj-none | jq