Skip to content

Commit

Permalink
publish typedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorten authored and github-actions[bot] committed Jan 28, 2024
1 parent 2d1630c commit 16bbe63
Show file tree
Hide file tree
Showing 27 changed files with 106 additions and 145 deletions.
2 changes: 1 addition & 1 deletion docs/assets/js/search.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions docs/classes/_steps_sendproxyreq_.timeouterror.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L11">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:11</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L11">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:11</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -152,7 +152,7 @@ <h3>code</h3>
<div class="tsd-signature tsd-kind-icon">code<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;ECONTIMEDOUT&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L5">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:5</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L5">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:5</a></li>
</ul>
</aside>
</section>
Expand All @@ -163,7 +163,7 @@ <h3>message</h3>
<aside class="tsd-sources">
<p>Overrides Error.message</p>
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L13">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:13</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L13">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:13</a></li>
</ul>
</aside>
</section>
Expand All @@ -174,7 +174,7 @@ <h3>name</h3>
<aside class="tsd-sources">
<p>Overrides Error.name</p>
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L6">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:6</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L6">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:6</a></li>
</ul>
</aside>
</section>
Expand All @@ -184,7 +184,7 @@ <h3>ok</h3>
<div class="tsd-signature tsd-kind-icon">ok<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L7">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:7</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L7">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:7</a></li>
</ul>
</aside>
</section>
Expand All @@ -194,7 +194,7 @@ <h3>redirected</h3>
<div class="tsd-signature tsd-kind-icon">redirected<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L8">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:8</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L8">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:8</a></li>
</ul>
</aside>
</section>
Expand All @@ -215,7 +215,7 @@ <h3>status</h3>
<div class="tsd-signature tsd-kind-icon">status<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 408</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L9">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:9</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L9">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:9</a></li>
</ul>
</aside>
</section>
Expand All @@ -225,7 +225,7 @@ <h3>status<wbr>Text</h3>
<div class="tsd-signature tsd-kind-icon">status<wbr>Text<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;ECONTIMEDOUT&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L10">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:10</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L10">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:10</a></li>
</ul>
</aside>
</section>
Expand All @@ -235,7 +235,7 @@ <h3>type</h3>
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;error&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L11">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:11</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L11">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:11</a></li>
</ul>
</aside>
</section>
Expand All @@ -245,7 +245,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> url</h3>
<div class="tsd-signature tsd-kind-icon">url<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/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L13">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:13</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L13">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:13</a></li>
</ul>
</aside>
</section>
Expand All @@ -272,7 +272,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> type</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/steps/sendProxyReq.ts#L17">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:17</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/steps/sendProxyReq.ts#L17">home/runner/work/opine-http-proxy/opine-http-proxy/src/steps/sendProxyReq.ts:17</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
Expand Down
16 changes: 12 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h1>opine-http-proxy</h1>
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opineHttpProxy/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fupdates%2Fx%2FopineHttpProxy%2Fmod.ts" alt="opine-http-proxy dependency outdatedness" /></a>
<a href="https://deno-visualizer.danopia.net/dependencies-of/https/deno.land/x/opineHttpProxy/mod.ts"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Fcache-size%2Fx%2FopineHttpProxy%2Fmod.ts" alt="opine-http-proxy cached size" /></a>
</p>
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { proxy } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://deno.land/x/opineHttpProxy@3.1.0/mod.ts&quot;</span>;
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { proxy } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://deno.land/x/opineHttpProxy@3.2.0/mod.ts&quot;</span>;
<span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://deno.land/x/opine@2.3.1/mod.ts&quot;</span>;

<span class="hljs-keyword">const</span> app = opine();
Expand All @@ -98,7 +98,7 @@ <h2>Installation</h2>
repo and via the <a href="https://deno.land/x">Deno Registry</a>.</p>
<p>Before importing, <a href="https://deno.land/#installation">download and install Deno</a>.</p>
<p>You can then import opine-http-proxy straight into your project:</p>
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { proxy } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://deno.land/x/opineHttpProxy@3.1.0/mod.ts&quot;</span>;
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { proxy } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://deno.land/x/opineHttpProxy@3.2.0/mod.ts&quot;</span>;
</code></pre>
<a href="#docs" id="docs" style="color: inherit; text-decoration: none;">
<h2>Docs</h2>
Expand Down Expand Up @@ -128,6 +128,14 @@ <h3>URL</h3>
proxy(<span class="hljs-function">() =&gt;</span> <span class="hljs-keyword">new</span> URL(<span class="hljs-string">&quot;http://google.com&quot;</span>)),
);
</code></pre>
<a href="#streaming" id="streaming" style="color: inherit; text-decoration: none;">
<h3>Streaming</h3>
</a>
<p>Proxy requests and user responses are piped/streamed/chunked by default.</p>
<p>If you define a response modifier (<code>srcResDecorator</code>, <code>srcResHeaderDecorator</code>),
or need to inspect the response before continuing (<code>filterRes</code>), streaming is
disabled, and the request and response are buffered. This can cause performance
issues with large payloads.</p>
<a href="#proxy-options" id="proxy-options" style="color: inherit; text-decoration: none;">
<h3>Proxy Options</h3>
</a>
Expand Down Expand Up @@ -318,7 +326,7 @@ <h4>proxyReqUrlDecorator(url, req) (supports Promise form)</h4>
<pre><code class="language-ts">app.use(
<span class="hljs-string">&quot;/proxy&quot;</span>,
proxy(<span class="hljs-string">&quot;localhost:3000&quot;</span>, {
<span class="hljs-function"><span class="hljs-title">proxyReqOptDecorator</span>(<span class="hljs-params">url, req</span>)</span> {
<span class="hljs-function"><span class="hljs-title">proxyReqUrlDecorator</span>(<span class="hljs-params">url, req</span>)</span> {
<span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>(<span class="hljs-function">(<span class="hljs-params">resolve, reject</span>) =&gt;</span> {
<span class="hljs-keyword">if</span> (url.pathname === <span class="hljs-string">&quot;/login&quot;</span>) {
url.port = <span class="hljs-number">8080</span>;
Expand Down Expand Up @@ -354,7 +362,7 @@ <h4>proxyReqInitDecorator(proxyReqOpts, req) (supports Promise form)</h4>
<pre><code class="language-ts">app.use(
<span class="hljs-string">&quot;/proxy&quot;</span>,
proxy(<span class="hljs-string">&quot;www.google.com&quot;</span>, {
<span class="hljs-function"><span class="hljs-title">proxyReqOptDecorator</span>(<span class="hljs-params">proxyReqOpts, srcReq</span>)</span> {
<span class="hljs-function"><span class="hljs-title">proxyReqInitDecorator</span>(<span class="hljs-params">proxyReqOpts, srcReq</span>)</span> {
<span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>(<span class="hljs-function">(<span class="hljs-params">resolve, reject</span>) =&gt;</span> {
proxyReqOpts.headers.set(<span class="hljs-string">&quot;Content-Type&quot;</span>, <span class="hljs-string">&quot;text/html&quot;</span>);

Expand Down
10 changes: 5 additions & 5 deletions docs/interfaces/_createstate_.proxy.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> req</h3>
<div class="tsd-signature tsd-kind-icon">req<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Request</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/createState.ts#L24">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:24</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/createState.ts#L24">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:24</a></li>
</ul>
</aside>
</section>
Expand All @@ -110,7 +110,7 @@ <h3>req<wbr>Init</h3>
<div class="tsd-signature tsd-kind-icon">req<wbr>Init<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">RequestInit</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/createState.ts#L27">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:27</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/createState.ts#L27">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:27</a></li>
</ul>
</aside>
</section>
Expand All @@ -120,7 +120,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> res</h3>
<div class="tsd-signature tsd-kind-icon">res<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Response</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/createState.ts#L25">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:25</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/createState.ts#L25">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:25</a></li>
</ul>
</aside>
</section>
Expand All @@ -130,7 +130,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> res<wbr>Data</h3>
<div class="tsd-signature tsd-kind-icon">res<wbr>Data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/createState.ts#L26">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:26</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/createState.ts#L26">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:26</a></li>
</ul>
</aside>
</section>
Expand All @@ -140,7 +140,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> url</h3>
<div class="tsd-signature tsd-kind-icon">url<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">URL</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/createState.ts#L28">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:28</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/createState.ts#L28">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:28</a></li>
</ul>
</aside>
</section>
Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/_createstate_.proxyparams.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h3>options</h3>
<div class="tsd-signature tsd-kind-icon">options<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Opts</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/createState.ts#L14">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:14</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/createState.ts#L14">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:14</a></li>
</ul>
</aside>
</section>
Expand All @@ -121,7 +121,7 @@ <h3>url</h3>
<div class="tsd-signature tsd-kind-icon">url<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ProxyUrl</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/a41a7df/src/createState.ts#L13">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:13</a></li>
<li>Defined in <a href="https://github.com/cmorten/opine-http-proxy/blob/2d1630c/src/createState.ts#L13">home/runner/work/opine-http-proxy/opine-http-proxy/src/createState.ts:13</a></li>
</ul>
</aside>
</section>
Expand Down
Loading

0 comments on commit 16bbe63

Please sign in to comment.