feat(javascript): recover commonjs and esm module relationships

This commit is contained in:
N0zoM1z0 committed 2026-07-18 00:02:51 +08:00
1 parent 3ea852323a
commit 6c41791519
68 files changed
+1613 -207

No files matched your search

@@ -14,9 +14,9 @@
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>Values needed to resolve a declaration without filesystem access.</p>
</div></section>
<div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">ResolveArtifactPathInput</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#context">context</a><span class="tsd-signature-symbol">:</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;module-specifier&quot;</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;filesystem-expression&quot;</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;package-entrypoint&quot;</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;html-reference&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#declaredpath">declaredPath</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#files">files</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ReadonlyMap</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <a href="application_JavaScriptArtifactFiles.JavaScriptArtifactFile.html" class="tsd-signature-type tsd-kind-interface">JavaScriptArtifactFile</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#htmlbasehref">htmlBaseHref</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#sourcepath">sourcePath</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources">
<div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">ResolveArtifactPathInput</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#context">context</a><span class="tsd-signature-symbol">:</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;module-specifier&quot;</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;filesystem-expression&quot;</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;package-entrypoint&quot;</span><br/>        <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;html-reference&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#declaredpath">declaredPath</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#files">files</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ReadonlyMap</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <a href="application_JavaScriptArtifactFiles.JavaScriptArtifactFile.html" class="tsd-signature-type tsd-kind-interface">JavaScriptArtifactFile</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#htmlbasehref">htmlBaseHref</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#modulekind">moduleKind</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;require&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;import&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#sourcepath">sourcePath</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L24">src/application/JavaScriptArtifactPathResolution.ts:24</a></li></ul></aside>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L25">src/application/JavaScriptArtifactPathResolution.ts:25</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
@@ -28,6 +28,7 @@
<a href="#declaredpath" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>declared<wbr/>Path</span></a>
<a href="#files" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>files</span></a>
<a href="#htmlbasehref" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>html<wbr/>Base<wbr/>Href?</span></a>
<a href="#modulekind" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>module<wbr/>Kind?</span></a>
<a href="#sourcepath" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>source<wbr/>Path</span></a>
</div></section></div></details></section></section>
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
@@ -37,27 +38,32 @@
<h3 class="tsd-anchor-link" id="context"><code class="tsd-tag">Readonly</code><span>context</span><a href="#context" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">context</span><span class="tsd-signature-symbol">:</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;module-specifier&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;filesystem-expression&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;package-entrypoint&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;html-reference&quot;</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L27">src/application/JavaScriptArtifactPathResolution.ts:27</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L28">src/application/JavaScriptArtifactPathResolution.ts:28</a></li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="declaredpath"><code class="tsd-tag">Readonly</code><span>declared<wbr/>Path</span><a href="#declaredpath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">declaredPath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L25">src/application/JavaScriptArtifactPathResolution.ts:25</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L26">src/application/JavaScriptArtifactPathResolution.ts:26</a></li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="files"><code class="tsd-tag">Readonly</code><span>files</span><a href="#files" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">files</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ReadonlyMap</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <a href="application_JavaScriptArtifactFiles.JavaScriptArtifactFile.html" class="tsd-signature-type tsd-kind-interface">JavaScriptArtifactFile</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L32">src/application/JavaScriptArtifactPathResolution.ts:32</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L33">src/application/JavaScriptArtifactPathResolution.ts:33</a></li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="htmlbasehref"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>html<wbr/>Base<wbr/>Href</span><a href="#htmlbasehref" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">htmlBaseHref</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L33">src/application/JavaScriptArtifactPathResolution.ts:33</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L34">src/application/JavaScriptArtifactPathResolution.ts:34</a></li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="modulekind"><code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>module<wbr/>Kind</span><a href="#modulekind" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">moduleKind</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;require&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;import&quot;</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L35">src/application/JavaScriptArtifactPathResolution.ts:35</a></li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="sourcepath"><code class="tsd-tag">Readonly</code><span>source<wbr/>Path</span><a href="#sourcepath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">sourcePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L26">src/application/JavaScriptArtifactPathResolution.ts:26</a></li></ul></aside></section></section></details></div>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/application/JavaScriptArtifactPathResolution.ts#L27">src/application/JavaScriptArtifactPathResolution.ts:27</a></li></ul></aside></section></section></details></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
@@ -73,7 +79,7 @@
<h3>On This Page</h3></summary>
<div class="tsd-accordion-details">
<details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary>
<div><a href="#context"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>context</span></a><a href="#declaredpath"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>declared<wbr/>Path</span></a><a href="#files"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>files</span></a><a href="#htmlbasehref"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>html<wbr/>Base<wbr/>Href</span></a><a href="#sourcepath"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>source<wbr/>Path</span></a></div></details></div></details></div>
<div><a href="#context"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>context</span></a><a href="#declaredpath"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>declared<wbr/>Path</span></a><a href="#files"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>files</span></a><a href="#htmlbasehref"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>html<wbr/>Base<wbr/>Href</span></a><a href="#modulekind"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>module<wbr/>Kind</span></a><a href="#sourcepath"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>source<wbr/>Path</span></a></div></details></div></details></div>
<div class="site-menu">
<nav class="tsd-navigation"><a href="../index.html">rea-agents - v2.0.0</a>
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">