Skip to content

Commit

Permalink
unhandled handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bn-l committed Apr 4, 2024
1 parent 7cccd4a commit d5abaed
Show file tree
Hide file tree
Showing 6 changed files with 259 additions and 180 deletions.
6 changes: 3 additions & 3 deletions coverage/coverage.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files | 100 | 94.2 | 100 | 100 |
cli.mts | 100 | 100 | 100 | 100 |
main.mts | 100 | 92.15 | 100 | 100 | 154-155
All files | 99.04 | 93.24 | 100 | 99.04 |
cli.mts | 97.98 | 95 | 100 | 97.98 | 139-141
main.mts | 100 | 92.59 | 100 | 100 | 156-157
----------|---------|----------|---------|---------|-------------------
68 changes: 58 additions & 10 deletions coverage/lcov-report/cli.mts.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ <h1><a href="index.html">All files</a> cli.mts</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">97.98% </span>
<span class="quiet">Statements</span>
<span class='fraction'>133/133</span>
<span class='fraction'>146/149</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">95% </span>
<span class="quiet">Branches</span>
<span class='fraction'>18/18</span>
<span class='fraction'>19/20</span>
</div>


Expand All @@ -44,9 +44,9 @@ <h1><a href="index.html">All files</a> cli.mts</h1>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">97.98% </span>
<span class="quiet">Lines</span>
<span class='fraction'>133/133</span>
<span class='fraction'>146/149</span>
</div>


Expand Down Expand Up @@ -196,7 +196,23 @@ <h1><a href="index.html">All files</a> cli.mts</h1>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a>
<a name='L138'></a><a href='#L138'>138</a>
<a name='L139'></a><a href='#L139'>139</a>
<a name='L140'></a><a href='#L140'>140</a>
<a name='L141'></a><a href='#L141'>141</a>
<a name='L142'></a><a href='#L142'>142</a>
<a name='L143'></a><a href='#L143'>143</a>
<a name='L144'></a><a href='#L144'>144</a>
<a name='L145'></a><a href='#L145'>145</a>
<a name='L146'></a><a href='#L146'>146</a>
<a name='L147'></a><a href='#L147'>147</a>
<a name='L148'></a><a href='#L148'>148</a>
<a name='L149'></a><a href='#L149'>149</a>
<a name='L150'></a><a href='#L150'>150</a></td><td class="line-coverage quiet"><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-yes">1x</span>
Expand Down Expand Up @@ -272,6 +288,12 @@ <h1><a href="index.html">All files</a> cli.mts</h1>
<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-yes">1x</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-yes">1x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
Expand Down Expand Up @@ -324,6 +346,16 @@ <h1><a href="index.html">All files</a> cli.mts</h1>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">191x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">191x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</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>
Expand Down Expand Up @@ -357,11 +389,14 @@ <h1><a href="index.html">All files</a> cli.mts</h1>
export enum Option {
dest = "dest",
list = "list",
prefix = "prefix",
colors = "colors",
caseInsensitive = "caseInsensitive",
conflictsOnly = "conflictsOnly",
keepIf = "keepIf",
quiet = "quiet",
help = "help",
version = "version",
}
&nbsp;
export const helpText = `
Expand All @@ -378,6 +413,8 @@ <h1><a href="index.html">All files</a> cli.mts</h1>
-l, --list List files. Useful as a dry run and with fzf. Does not
download. Will show show conflicts for the current
working directory if -d / --dest is not specified.
-p, --prefix Append the owner/repo prefix to the path in list output
Useful for feeding back into ${ name }.
-c, --conflicts-only Only show conflicts when listing.
-d, --dest &lt;folder&gt; Destination folder. Defaults to the current directory.
-i, --case-insensitive Ignores case when checking for conflicts. Default is
Expand Down Expand Up @@ -413,6 +450,10 @@ <h1><a href="index.html">All files</a> cli.mts</h1>
type: "boolean",
shortFlag: "l",
},
[Option.prefix]: {
type: "boolean",
shortFlag: "p",
},
[Option.colors]: {
type: "boolean",
default: !noColor(),
Expand All @@ -434,11 +475,11 @@ <h1><a href="index.html">All files</a> cli.mts</h1>
type: "string",
choices: ["newer", "existing"],
},
help: {
[Option.help]: {
type: "boolean",
shortFlag: "h",
},
version: {
[Option.version]: {
type: "boolean",
shortFlag: "v",
},
Expand All @@ -455,6 +496,13 @@ <h1><a href="index.html">All files</a> cli.mts</h1>
// to undefined--which the spread operator ignores.
...(argv &amp;&amp; { argv }),
});
&nbsp;
for (const flag of Object.keys(cli.flags)) {
if (!(flag in Option)) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
<span class="cstat-no" title="statement not covered" > console.error(`\nError: Uknown flag "${ flag }". Run ${ name } -h to show help.\n`);</span>
<span class="cstat-no" title="statement not covered" > process.exit(1);</span>
<span class="cstat-no" title="statement not covered" > }</span>
}
&nbsp;
if (cli.input.length === 0) {
console.error(`\nError: Need at least one path. Run ${ name } -h to show help.\n`);
Expand All @@ -469,7 +517,7 @@ <h1><a href="index.html">All files</a> cli.mts</h1>
<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 2024-04-03T19:40:07.452Z
at 2024-04-04T11:23:42.734Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
38 changes: 19 additions & 19 deletions coverage/lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ <h1>All files</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">99.04% </span>
<span class="quiet">Statements</span>
<span class='fraction'>296/296</span>
<span class='fraction'>311/314</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">94.2% </span>
<span class="strong">93.24% </span>
<span class="quiet">Branches</span>
<span class='fraction'>65/69</span>
<span class='fraction'>69/74</span>
</div>


Expand All @@ -44,9 +44,9 @@ <h1>All files</h1>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="strong">99.04% </span>
<span class="quiet">Lines</span>
<span class='fraction'>296/296</span>
<span class='fraction'>311/314</span>
</div>


Expand Down Expand Up @@ -80,17 +80,17 @@ <h1>All files</h1>
</thead>
<tbody><tr>
<td class="file high" data-value="cli.mts"><a href="cli.mts.html">cli.mts</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
<td data-value="97.98" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 97%"></div><div class="cover-empty" style="width: 3%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="133" class="abs high">133/133</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="18" class="abs high">18/18</td>
<td data-value="97.98" class="pct high">97.98%</td>
<td data-value="149" class="abs high">146/149</td>
<td data-value="95" class="pct high">95%</td>
<td data-value="20" class="abs high">19/20</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="11" class="abs high">11/11</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="133" class="abs high">133/133</td>
<td data-value="97.98" class="pct high">97.98%</td>
<td data-value="149" class="abs high">146/149</td>
</tr>

<tr>
Expand All @@ -99,13 +99,13 @@ <h1>All files</h1>
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="163" class="abs high">163/163</td>
<td data-value="92.15" class="pct high">92.15%</td>
<td data-value="51" class="abs high">47/51</td>
<td data-value="165" class="abs high">165/165</td>
<td data-value="92.59" class="pct high">92.59%</td>
<td data-value="54" class="abs high">50/54</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="163" class="abs high">163/163</td>
<td data-value="165" class="abs high">165/165</td>
</tr>

</tbody>
Expand All @@ -116,7 +116,7 @@ <h1>All files</h1>
<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 2024-04-03T19:40:07.452Z
at 2024-04-04T11:23:42.734Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
Loading

0 comments on commit d5abaed

Please sign in to comment.