Skip to content

Commit

Permalink
refactoring to use xml2js instead of xml2json because xml2json fails …
Browse files Browse the repository at this point in the history
…to compile on some EC2 instances
  • Loading branch information
RIAEvangelist committed Mar 12, 2021
1 parent a071920 commit 3361865
Show file tree
Hide file tree
Showing 57 changed files with 146 additions and 248 deletions.
20 changes: 10 additions & 10 deletions coverage/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions coverage/lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h1>All files</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">94.94% </span>
<span class="strong">94.93% </span>
<span class="quiet">Statements</span>
<span class='fraction'>1465/1543</span>
<span class='fraction'>1459/1537</span>
</div>


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


<div class='fl pad1y space-right2'>
<span class="strong">94.94% </span>
<span class="strong">94.93% </span>
<span class="quiet">Lines</span>
<span class='fraction'>1465/1543</span>
<span class='fraction'>1459/1537</span>
</div>


Expand Down Expand Up @@ -104,17 +104,17 @@ <h1>All files</h1>

<tr>
<td class="file high" data-value="node-dominos-pizza-api/utils"><a href="node-dominos-pizza-api/utils/index.html">node-dominos-pizza-api/utils</a></td>
<td data-value="97.71" class="pic high">
<td data-value="97.67" 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="97.71" class="pct high">97.71%</td>
<td data-value="350" class="abs high">342/350</td>
<td data-value="97.67" class="pct high">97.67%</td>
<td data-value="344" class="abs high">336/344</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="32" class="abs high">32/32</td>
<td data-value="85.71" class="pct high">85.71%</td>
<td data-value="28" class="abs high">24/28</td>
<td data-value="97.71" class="pct high">97.71%</td>
<td data-value="350" class="abs high">342/350</td>
<td data-value="97.67" class="pct high">97.67%</td>
<td data-value="344" class="abs high">336/344</td>
</tr>

</tbody>
Expand All @@ -125,7 +125,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">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/node-dominos-pizza-api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h1><a href="../index.html">All files</a> node-dominos-pizza-api</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/node-dominos-pizza-api/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">node-dominos-pi
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
&nbsp;
this.dominosAPIResult=await getSoap(url);
&nbsp;
//console.log(this.dominosAPIResult);
//console.dir(this.dominosAPIResult,{depth:10});
&nbsp;
is.object(this.dominosAPIResult['soap:Envelope']);
is.object(this.dominosAPIResult['soap:Envelope']['soap:Body']);
is.object(this.dominosAPIResult['soap:Envelope']['soap:Body'].GetTrackerDataResponse);
is.object(this.dominosAPIResult['soap:Envelope']['soap:Body'][0].GetTrackerDataResponse);
&nbsp;
this.orders=this.dominosAPIResult['soap:Envelope']['soap:Body'].GetTrackerDataResponse.OrderStatuses;
this.query=this.dominosAPIResult['soap:Envelope']['soap:Body'].GetTrackerDataResponse.Query;
this.orders=this.dominosAPIResult['soap:Envelope']['soap:Body'][0].GetTrackerDataResponse[0].OrderStatuses;
this.query=this.dominosAPIResult['soap:Envelope']['soap:Body'][0].GetTrackerDataResponse[0].Query[0];

return this;
}
Expand All @@ -214,7 +214,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ <h1><a href="../../index.html">All files</a> node-dominos-pizza-api/modules</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
34 changes: 8 additions & 26 deletions coverage/lcov-report/node-dominos-pizza-api/utils/api-json.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>85/85</span>
<span class='fraction'>79/79</span>
</div>


Expand All @@ -46,7 +46,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>85/85</span>
<span class='fraction'>79/79</span>
</div>


Expand Down Expand Up @@ -135,13 +135,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<a name='L79'></a><a href='#L79'>79</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 @@ -219,15 +213,9 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<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">1x</span>
<span class="cline-any cline-yes">1x</span></td><td class="text"><pre class="prettyprint lang-js">import fetch from 'node-fetch';
import urls from './urls.js';
import {default as parser} from 'xml2json';
import {default as xml2js} from 'xml2js';
&nbsp;
const post=async function(url, payload) {
const options = {
Expand Down Expand Up @@ -290,16 +278,10 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
);
&nbsp;
//console.log(await res.text());

const parser = new xml2js.Parser;
&nbsp;
return parser.toJson(
await res.text(),
{
coerce: false,
sanitize: false,
object: true,
trim: false
}
);
return await xml2js.parseStringPromise(await res.text())
}
&nbsp;
const old={get,getSoap,post}
Expand All @@ -316,7 +298,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
10 changes: 5 additions & 5 deletions coverage/lcov-report/node-dominos-pizza-api/utils/delay.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">485996x</span>
<span class="cline-any cline-yes">485996x</span>
<span class="cline-any cline-yes">485996x</span>
<span class="cline-any cline-yes">485996x</span>
<span class="cline-any cline-yes">488045x</span>
<span class="cline-any cline-yes">488045x</span>
<span class="cline-any cline-yes">488045x</span>
<span class="cline-any cline-yes">488045x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
Expand Down Expand Up @@ -118,7 +118,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">node-dominos
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Mar 06 2021 17:20:10 GMT-0800 (Pacific Standard Time)
at Thu Mar 11 2021 17:35:47 GMT-0800 (Pacific Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
Expand Down
Loading

0 comments on commit 3361865

Please sign in to comment.