new deploy: 2023-09-18T22:05:34+00:00

This commit is contained in:
Aravinth Manivannan 2023-09-18 22:05:34 +00:00 committed by realaravinth
parent ac68a39a11
commit 17703835a3
7 changed files with 102 additions and 105 deletions

View file

@ -57,7 +57,7 @@
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
<li class="tsd-signature tsd-anchor-link" id="constructor.new_default"><span class="tsd-kind-constructor-signature">new default</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">url</span>, <span class="tsd-kind-parameter">username</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="default.html" class="tsd-signature-type tsd-kind-class">default</a><a href="#constructor.new_default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
<li class="tsd-signature tsd-anchor-link" id="constructor.new_default"><span class="tsd-kind-constructor-signature">new default</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">url</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="default.html" class="tsd-signature-type tsd-kind-class">default</a><a href="#constructor.new_default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Represents a Forgejo instance.</p>
</div>
@ -68,16 +68,11 @@
<h5><span class="tsd-kind-parameter">url</span>: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography"><p>The URL of the Forgejo instance</p>
</div>
<div class="tsd-comment tsd-typography"></div></li>
<li>
<h5><span class="tsd-kind-parameter">username</span>: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography"><p>username of the logged in user</p>
</div>
<div class="tsd-comment tsd-typography"></div></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="default.html" class="tsd-signature-type tsd-kind-class">default</a></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in index.ts:22</li></ul></aside></li></ul></section></section>
<li>Defined in index.ts:21</li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member"><a id="token" class="tsd-anchor"></a>
@ -301,7 +296,7 @@
<section class="tsd-panel tsd-member"><a id="setTokenAuth" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>set<wbr/>Token<wbr/>Auth</span><a href="#setTokenAuth" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
<li class="tsd-signature tsd-anchor-link" id="setTokenAuth.setTokenAuth-1"><span class="tsd-kind-call-signature">set<wbr/>Token<wbr/>Auth</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">token</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setTokenAuth.setTokenAuth-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
<li class="tsd-signature tsd-anchor-link" id="setTokenAuth.setTokenAuth-1"><span class="tsd-kind-call-signature">set<wbr/>Token<wbr/>Auth</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">token</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#setTokenAuth.setTokenAuth-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Authenticate with token</p>
</div>
@ -313,10 +308,10 @@
<div class="tsd-comment tsd-typography"><p>access token</p>
</div>
<div class="tsd-comment tsd-typography"></div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in index.ts:31</li></ul></aside></li></ul></section></section></div>
<li>Defined in index.ts:29</li></ul></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">

View file

@ -1,26 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1695073159265" clover="3.2.0">
<project timestamp="1695073159265" name="All files">
<metrics statements="77" coveredstatements="67" conditionals="15" coveredconditionals="11" methods="20" coveredmethods="18" elements="112" coveredelements="96" complexity="0" loc="77" ncloc="77" packages="1" files="2" classes="2"/>
<coverage generated="1695074728201" clover="3.2.0">
<project timestamp="1695074728201" name="All files">
<metrics statements="78" coveredstatements="67" conditionals="15" coveredconditionals="10" methods="20" coveredmethods="18" elements="113" coveredelements="95" complexity="0" loc="78" ncloc="78" packages="1" files="2" classes="2"/>
<file name="auth.ts" path="/woodpecker/src/git.batsense.net/realaravinth/forgejo-notifications-core/src/auth.ts">
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/>
<line num="8" count="2" type="stmt"/>
<line num="12" count="21" type="stmt"/>
<line num="16" count="2" type="stmt"/>
<line num="8" count="1" type="stmt"/>
<line num="12" count="22" type="stmt"/>
<line num="16" count="1" type="stmt"/>
</file>
<file name="index.ts" path="/woodpecker/src/git.batsense.net/realaravinth/forgejo-notifications-core/src/index.ts">
<metrics statements="74" coveredstatements="64" conditionals="15" coveredconditionals="11" methods="18" coveredmethods="16"/>
<metrics statements="75" coveredstatements="64" conditionals="15" coveredconditionals="10" methods="18" coveredmethods="16"/>
<line num="5" count="1" type="stmt"/>
<line num="23" count="2" type="stmt"/>
<line num="24" count="2" type="stmt"/>
<line num="32" count="2" type="stmt"/>
<line num="39" count="22" type="cond" truecount="2" falsecount="0"/>
<line num="40" count="21" type="stmt"/>
<line num="42" count="1" type="stmt"/>
<line num="50" count="20" type="stmt"/>
<line num="57" count="1" type="stmt"/>
<line num="58" count="1" type="stmt"/>
<line num="63" count="1" type="stmt"/>
<line num="22" count="1" type="stmt"/>
<line num="30" count="1" type="stmt"/>
<line num="31" count="1" type="stmt"/>
<line num="32" count="1" type="stmt"/>
<line num="39" count="22" type="cond" truecount="1" falsecount="1"/>
<line num="40" count="22" type="stmt"/>
<line num="42" count="0" type="stmt"/>
<line num="50" count="21" type="stmt"/>
<line num="57" count="2" type="stmt"/>
<line num="58" count="2" type="stmt"/>
<line num="63" count="2" type="stmt"/>
<line num="70" count="3" type="stmt"/>
<line num="71" count="3" type="stmt"/>
<line num="77" count="3" type="stmt"/>
@ -83,7 +84,7 @@
<line num="234" count="4" type="stmt"/>
<line num="237" count="6" type="stmt"/>
<line num="239" count="6" type="stmt"/>
<line num="243" count="2" type="stmt"/>
<line num="243" count="1" type="stmt"/>
</file>
</project>
</coverage>

File diff suppressed because one or more lines are too long

View file

@ -86,15 +86,15 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// SPDX-FileCopyrightText: 2023 Aravinth Manivannan &lt;realaravinth@batsense.net&gt;
//
// SPDX-License-Identifier: AGPL-3.0-or-later
@ -118,7 +118,7 @@ export default Auth;
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-18T21:39:19.258Z
at 2023-09-18T22:05:28.192Z
</div>
<script src="prettify.js"></script>
<script>

View file

@ -23,16 +23,16 @@
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">87.34% </span>
<span class="strong">86.25% </span>
<span class="quiet">Statements</span>
<span class='fraction'>69/79</span>
<span class='fraction'>69/80</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">73.33% </span>
<span class="strong">66.66% </span>
<span class="quiet">Branches</span>
<span class='fraction'>11/15</span>
<span class='fraction'>10/15</span>
</div>
@ -44,9 +44,9 @@
<div class='fl pad1y space-right2'>
<span class="strong">87.01% </span>
<span class="strong">85.89% </span>
<span class="quiet">Lines</span>
<span class='fraction'>67/77</span>
<span class='fraction'>67/78</span>
</div>
@ -95,17 +95,17 @@
<tr>
<td class="file high" data-value="index.ts"><a href="index.ts.html">index.ts</a></td>
<td data-value="86.66" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 86%"></div><div class="cover-empty" style="width: 14%"></div></div>
<td data-value="85.52" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 85%"></div><div class="cover-empty" style="width: 15%"></div></div>
</td>
<td data-value="86.66" class="pct high">86.66%</td>
<td data-value="75" class="abs high">65/75</td>
<td data-value="73.33" class="pct medium">73.33%</td>
<td data-value="15" class="abs medium">11/15</td>
<td data-value="85.52" class="pct high">85.52%</td>
<td data-value="76" class="abs high">65/76</td>
<td data-value="66.66" class="pct medium">66.66%</td>
<td data-value="15" class="abs medium">10/15</td>
<td data-value="88.88" class="pct high">88.88%</td>
<td data-value="18" class="abs high">16/18</td>
<td data-value="86.48" class="pct high">86.48%</td>
<td data-value="74" class="abs high">64/74</td>
<td data-value="85.33" class="pct high">85.33%</td>
<td data-value="75" class="abs high">64/75</td>
</tr>
</tbody>
@ -116,7 +116,7 @@
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-18T21:39:19.258Z
at 2023-09-18T22:05:28.192Z
</div>
<script src="prettify.js"></script>
<script>

View file

@ -23,16 +23,16 @@
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">86.66% </span>
<span class="strong">85.52% </span>
<span class="quiet">Statements</span>
<span class='fraction'>65/75</span>
<span class='fraction'>65/76</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">73.33% </span>
<span class="strong">66.66% </span>
<span class="quiet">Branches</span>
<span class='fraction'>11/15</span>
<span class='fraction'>10/15</span>
</div>
@ -44,9 +44,9 @@
<div class='fl pad1y space-right2'>
<span class="strong">86.48% </span>
<span class="strong">85.33% </span>
<span class="quiet">Lines</span>
<span class='fraction'>64/74</span>
<span class='fraction'>64/75</span>
</div>
@ -327,9 +327,7 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -337,7 +335,9 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -345,30 +345,30 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@ -548,7 +548,7 @@
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// SPDX-FileCopyrightText: 2023 Aravinth Manivannan &lt;realaravinth@batsense.net&gt;
//
// SPDX-License-Identifier: AGPL-3.0-or-later
@ -568,19 +568,19 @@ class Forgejo {
* Represents a Forgejo instance.
* @constructor
* @param {string} url - The URL of the Forgejo instance
* @param {string} username - username of the logged in user
*/
constructor(url: string, username: string) {
constructor(url: string) {
this.url = new URL(url);
this.username = username;
}
&nbsp;
/**
* Authenticate with token
* @param {Auth} token - access token
*/
setTokenAuth(token: string) {
async setTokenAuth(token: string) {
this.token = new Auth(token);
let res = await this.getUser();
this.username = res.username;
}
&nbsp;
/**
@ -589,8 +589,8 @@ class Forgejo {
getTokenAuth(): Auth {
if (this.token) {
return this.token;
} else {
throw new Error("set authentication token before use");
} else <span class="missing-if-branch" title="else path not taken" >E</span>{
<span class="cstat-no" title="statement not covered" > throw new Error("set authentication token before use");</span>
}
}
&nbsp;
@ -799,7 +799,7 @@ export default Forgejo;
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-09-18T21:39:19.258Z
at 2023-09-18T22:05:28.192Z
</div>
<script src="prettify.js"></script>
<script>

View file

@ -4,11 +4,11 @@ FN:7,(anonymous_1)
FN:11,(anonymous_2)
FNF:2
FNH:2
FNDA:2,(anonymous_1)
FNDA:21,(anonymous_2)
DA:8,2
DA:12,21
DA:16,2
FNDA:1,(anonymous_1)
FNDA:22,(anonymous_2)
DA:8,1
DA:12,22
DA:16,1
LF:3
LH:3
BRF:0
@ -16,8 +16,8 @@ BRH:0
end_of_record
TN:
SF:src/index.ts
FN:22,(anonymous_2)
FN:31,(anonymous_3)
FN:21,(anonymous_2)
FN:29,(anonymous_3)
FN:38,(anonymous_4)
FN:49,(anonymous_5)
FN:56,(anonymous_6)
@ -36,11 +36,11 @@ FN:213,(anonymous_18)
FN:224,(anonymous_19)
FNF:18
FNH:16
FNDA:2,(anonymous_2)
FNDA:2,(anonymous_3)
FNDA:1,(anonymous_2)
FNDA:1,(anonymous_3)
FNDA:22,(anonymous_4)
FNDA:20,(anonymous_5)
FNDA:1,(anonymous_6)
FNDA:21,(anonymous_5)
FNDA:2,(anonymous_6)
FNDA:3,(anonymous_7)
FNDA:1,(anonymous_8)
FNDA:1,(anonymous_9)
@ -55,16 +55,17 @@ FNDA:7,(anonymous_17)
FNDA:6,(anonymous_18)
FNDA:4,(anonymous_19)
DA:5,1
DA:23,2
DA:24,2
DA:32,2
DA:22,1
DA:30,1
DA:31,1
DA:32,1
DA:39,22
DA:40,21
DA:42,1
DA:50,20
DA:57,1
DA:58,1
DA:63,1
DA:40,22
DA:42,0
DA:50,21
DA:57,2
DA:58,2
DA:63,2
DA:70,3
DA:71,3
DA:77,3
@ -127,11 +128,11 @@ DA:231,4
DA:234,4
DA:237,6
DA:239,6
DA:243,2
LF:74
DA:243,1
LF:75
LH:64
BRDA:39,0,0,21
BRDA:39,0,1,1
BRDA:39,0,0,22
BRDA:39,0,1,0
BRDA:129,1,0,5
BRDA:135,2,0,2
BRDA:139,3,0,0
@ -146,5 +147,5 @@ BRDA:225,11,0,4
BRDA:229,12,0,4
BRDA:230,13,0,4
BRF:15
BRH:11
BRH:10
end_of_record