mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-07-19 03:47:12 +01:00
cbac5f9a95
Express was bumped 4.21.2 -> 5.2.1, whose router uses path-to-regexp v8 which removed inline-regex route params. The route /pull/:pr(\d+) threw PathError at startup. Switch to /pull/:pr (handler already validates with /^\d+\$/ and returns 400). Also update deploy runtime to NODE:22-lts and drop the stray 'node' and unused top-level 'path-to-regexp' dependencies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7793a516-0204-44e1-bed5-d8ad91b9400a
Cosmos Explorer Preview
Cosmos Explorer Preview makes it possible to try a working version of any commit on master or in a PR. No need to run the app locally or deploy to staging.
Initial support is for Hosted (Connection string only) or the Azure Portal. Examples:
Connection string URLs: https://dataexplorer-preview.azurewebsites.net/commit/COMMIT_SHA/hostedExplorer.html Portal URLs: https://ms.portal.azure.com/?dataExplorerSource=https://dataexplorer-preview.azurewebsites.net/commit/COMMIT_SHA/explorer.html#home
In both cases replace COMMIT_SHA with the commit you want to view. It must have already completed its build on GitHub Actions.
Architechture
- This folder contains a NodeJS app deployed to Azure App Service that powers preview URLs:
- Paths starting with
/commit/are proxied to an Azure Storage account containing build artifacts - Paths starting with
/proxy/are proxied dynamically to Cosmos account endpoints. Required otherwise CORS would need to be configured for every account accessed. - Paths starting with
/api/are proxied to Portal APIs that do not support CORS.
- Paths starting with
- On GitHub Actions build completion:
- All files in dist are uploaded to an Azure Storage account namespaced by the SHA of the commit
/preview/config.jsonis uploaded to the same folder with preview specific configuration