<p dir="auto">The idea is to expose the mentioned paths in the Deno namespace as a const.</p>
<p dir="auto"><code class="notranslate">Deno.DENO_DIR</code> maybe.</p>
<p dir="auto">or maybe some sort of const or function that has/return an object as its value. This object would contain the three mentioned<br>
<code class="notranslate">{ deno_dir, remote_modules, typescript_compiler_cache }</code></p>
<p dir="auto">Currently "deno info <a href="https://deno.land/std/http/file_server.ts" rel="nofollow">https://deno.land/std/http/file_server.ts</a>" will display a dependency graph of the specified module. It would be nice to be able to access this information in a programmatic way.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let depTree = await Deno.deps(&quot;https://deno.land/std/http/file_server.ts&quot;)"><pre class="notranslate"><code class="notranslate">let depTree = await Deno.deps("https://deno.land/std/http/file_server.ts")
</code></pre></div>
<p dir="auto">Where depTree would be some JSON encodable object similar to the current output.</p>
<p dir="auto">The first step to exposing this would be pure rust functionality of turning a <code class="notranslate">Deps</code> structure into a JSON string: </p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/denoland/deno/blob/960ee5257a7b38c6b3b59a3dca670c7c1771996f/cli/modules.rs#L188">deno/cli/modules.rs</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 188
      in
      <a data-pjax="true" class="commit-tease-sha" href="/denoland/deno/commit/960ee5257a7b38c6b3b59a3dca670c7c1771996f">960ee52</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L188" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="188"></td>
          <td id="LC188" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">Deps</span> <span class="pl-kos">{</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>