<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>cosmos-explorer</title> <meta name="description" content="Documentation for cosmos-explorer"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="assets/css/main.css"> <script async src="assets/js/search.js" id="search-script"></script> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base="."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="index.html" class="title">cosmos-explorer</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <h1>cosmos-explorer</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <div class="tsd-panel tsd-typography"> <a href="#cosmos-db-explorer" id="cosmos-db-explorer" style="color: inherit; text-decoration: none;"> <h1>Cosmos DB Explorer</h1> </a> <p>UI for Azure Cosmos DB. Powers the <a href="https://portal.azure.com/">Azure Portal</a>, <a href="https://cosmos.azure.com/">https://cosmos.azure.com/</a>, and the <a href="https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator">Cosmos DB Emulator</a></p> <p><img src="https://sdkctlstore.blob.core.windows.net/exe/dataexplorer.gif" alt=""></p> <a href="#getting-started" id="getting-started" style="color: inherit; text-decoration: none;"> <h2>Getting Started</h2> </a> <ul> <li><code>npm install</code></li> <li><code>npm run build</code></li> </ul> <a href="#developing" id="developing" style="color: inherit; text-decoration: none;"> <h2>Developing</h2> </a> <a href="#watch-mode" id="watch-mode" style="color: inherit; text-decoration: none;"> <h3>Watch mode</h3> </a> <p>Run <code>npm start</code> to start the development server and automatically rebuild on changes</p> <a href="#hosted-development-httpscosmosazurecom" id="hosted-development-httpscosmosazurecom" style="color: inherit; text-decoration: none;"> <h3>Hosted Development (<a href="https://cosmos.azure.com">https://cosmos.azure.com</a>)</h3> </a> <ul> <li>Visit: <code>https://localhost:1234/hostedExplorer.html</code></li> <li>The default webpack dev server configuration will proxy requests to the production portal backend: <code>https://main.documentdb.ext.azure.com</code>. This will allow you to use production connection strings on your local machine.</li> </ul> <a href="#emulator-development" id="emulator-development" style="color: inherit; text-decoration: none;"> <h3>Emulator Development</h3> </a> <ul> <li>Start the Cosmos Emulator</li> <li>Visit: <a href="https://localhost:1234/index.html">https://localhost:1234/index.html</a></li> </ul> <a href="#setting-up-a-remote-emulator" id="setting-up-a-remote-emulator" style="color: inherit; text-decoration: none;"> <h4>Setting up a Remote Emulator</h4> </a> <p>The Cosmos emulator currently only runs in Windows environments. You can still develop on a non-Windows machine by setting up an emulator on a windows box and exposing its ports publicly:</p> <ol> <li><p>Expose these ports publicly: 8081, 8900, 8979, 10250, 10251, 10252, 10253, 10254, 10255, 10256</p> </li> <li><p>Download and install the emulator: <a href="https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator">https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator</a></p> </li> <li><p>Start the emulator from PowerShell:</p> </li> </ol> <pre><code><span style="color: #000000">> </span><span style="color: #001080">cd</span><span style="color: #000000"> C:/</span> <span style="color: #000000">> .\</span><span style="color: #001080">CosmosDB</span><span style="color: #000000">.</span><span style="color: #001080">Emulator</span><span style="color: #000000">.</span><span style="color: #001080">exe</span><span style="color: #000000"> -</span><span style="color: #001080">AllowNetworkAccess</span><span style="color: #000000"> -</span><span style="color: #001080">Key</span><span style="color: #000000">=</span><span style="color: #A31515">"<EMULATOR MASTER KEY>"</span> </code></pre> <a href="#portal-development" id="portal-development" style="color: inherit; text-decoration: none;"> <h3>Portal Development</h3> </a> <ul> <li>Visit: <a href="https://ms.portal.azure.com/?dataExplorerSource=https%3A%2F%2Flocalhost%3A1234%2Fexplorer.html">https://ms.portal.azure.com/?dataExplorerSource=https%3A%2F%2Flocalhost%3A1234%2Fexplorer.html</a></li> <li>You may have to manually visit <a href="https://localhost:1234/explorer.html">https://localhost:1234/explorer.html</a> first and click through any SSL certificate warnings</li> </ul> <a href="#testing" id="testing" style="color: inherit; text-decoration: none;"> <h3>Testing</h3> </a> <a href="#unit-tests" id="unit-tests" style="color: inherit; text-decoration: none;"> <h4>Unit Tests</h4> </a> <p>Unit tests are located adjacent to the code under test and run with <a href="https://jestjs.io/">Jest</a>:</p> <p><code>npm run test</code></p> <a href="#end-to-end-ci-tests" id="end-to-end-ci-tests" style="color: inherit; text-decoration: none;"> <h4>End to End CI Tests</h4> </a> <p>Jest and Puppeteer are used for end to end browser based tests and are contained in <code>test/</code>. To run these tests locally:</p> <ol> <li>Copy .env.example to .env</li> <li>Update the values in .env including your local data explorer endpoint (ask a teammate/codeowner for help with .env values)</li> <li>Make sure all packages are installed <code>npm install</code></li> <li>Run the server <code>npm run start</code> and wait for it to start</li> <li>Run <code>npm run test:e2e</code></li> </ol> <a href="#releasing" id="releasing" style="color: inherit; text-decoration: none;"> <h3>Releasing</h3> </a> <p>We generally adhere to the release strategy <a href="https://azure.github.io/azure-sdk/policies_repobranching.html#release-branches">documented by the Azure SDK Guidelines</a>. Most releases should happen from the master branch. If master contains commits that cannot be released, you may create a release from a <code>release/</code> or <code>hotfix/</code> branch. See linked documentation for more details.</p> <a href="#architecture" id="architecture" style="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C0tLT4gc3FsIC0tPiBkYXRhcGxhbmVcbiAgcG9ydGFsVG9rZW4gLS0tPiBwcm94eVxuICBwcm94eSAtLT4gZGF0YXBsYW5lXG4gIGNvbm5lY3Rpb25TdHJpbmcgLS0-IHNxbCAmIG1vbmdvICYgY2Fzc2FuZHJhICYgZ3JhZiAmIHRhYmxlc1xuICBzcWwgLS0-IGRhdGFwbGFuZVxuICB0YWJsZXMgLS0-IGRhdGFwbGFuZVxuICBtb25nbyAtLT4gcHJveHlcbiAgY2Fzc2FuZHJhIC0tPiBwcm94eVxuICBncmFmIC0tPiBwcm94eVxuXG5cdFx0IiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifSwidXBkYXRlRWRpdG9yIjpmYWxzZX0" alt=""></a></p> <a href="#contributing" id="contributing" style="color: inherit; text-decoration: none;"> <h1>Contributing</h1> </a> <p>Please read the <a href="./CONTRIBUTING.md">contribution guidelines</a>.</p> </div> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class=" "> <a href="modules.html">Modules</a> </li> <li class=" tsd-kind-module"> <a href="modules/selfserve.html">Self<wbr>Serve</a> </li> <li class=" tsd-kind-module"> <a href="modules/selfserve___what_is_currently_supported_.html">Self<wbr>Serve -<wbr> <wbr>What is currently supported?</a> </li> <li class=" tsd-kind-module"> <a href="modules/selfserve_decorators.html">Self<wbr>Serve/<wbr>Decorators</a> </li> <li class=" tsd-kind-module"> <a href="modules/selfserve_selfservetelemetryprocessor.html">Self<wbr>Serve/<wbr>Self<wbr>Serve<wbr>Telemetry<wbr>Processor</a> </li> <li class=" tsd-kind-module"> <a href="modules/selfserve_selfservetypes.html">Self<wbr>Serve/<wbr>Self<wbr>Serve<wbr>Types</a> </li> <li class=" tsd-kind-module"> <a href="modules/selfserve_selfserveutils.html">Self<wbr>Serve/<wbr>Self<wbr>Serve<wbr>Utils</a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> </ul> </nav> </div> </div> </div> <footer class="with-border-bottom"> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li> <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> </ul> </div> </div> </footer> <div class="container tsd-generator"> <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p> </div> <div class="overlay"></div> <script src="assets/js/main.js"></script> </body> </html>