Skip to content

Commit 197048a

Browse files
committed
Updated docs, latest release (0.7.4)
1 parent b319eb4 commit 197048a

14 files changed

+36
-29
lines changed

Router.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,7 @@ <h5>Example</h5>
18621862
<br class="clear">
18631863

18641864
<footer>
1865-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Apr 21 2023 13:18:31 GMT-0700 (Pacific Daylight Time) using the Minami theme.
1865+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Oct 04 2023 15:55:39 GMT-0700 (Pacific Daylight Time) using the Minami theme.
18661866
</footer>
18671867

18681868
<script>prettyPrint();</script>

Router.js.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1 class="page-title">Router.js</h1>
374374
*/
375375
function getRoutes(dir, files = []) {
376376
fs.readdirSync(dir).forEach(function(file) {
377-
const filePath = path.join(dir, file);
377+
const filePath = path.join(dir, file); // nosemgrep
378378

379379
if (fs.lstatSync(filePath).isDirectory()) {
380380

@@ -401,7 +401,7 @@ <h1 class="page-title">Router.js</h1>
401401
<br class="clear">
402402

403403
<footer>
404-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Apr 21 2023 13:18:31 GMT-0700 (Pacific Daylight Time) using the Minami theme.
404+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Oct 04 2023 15:55:39 GMT-0700 (Pacific Daylight Time) using the Minami theme.
405405
</footer>
406406

407407
<script>prettyPrint();</script>

RouterRequest.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2284,7 +2284,7 @@ <h5>Returns:</h5>
22842284
<br class="clear">
22852285

22862286
<footer>
2287-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Apr 21 2023 13:18:31 GMT-0700 (Pacific Daylight Time) using the Minami theme.
2287+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Oct 04 2023 15:55:39 GMT-0700 (Pacific Daylight Time) using the Minami theme.
22882288
</footer>
22892289

22902290
<script>prettyPrint();</script>

RouterResponse.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ <h5>Returns:</h5>
991991
<br class="clear">
992992

993993
<footer>
994-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Apr 21 2023 13:18:31 GMT-0700 (Pacific Daylight Time) using the Minami theme.
994+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Oct 04 2023 15:55:39 GMT-0700 (Pacific Daylight Time) using the Minami theme.
995995
</footer>
996996

997997
<script>prettyPrint();</script>

RouterStack.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ <h5>Example</h5>
545545
<br class="clear">
546546

547547
<footer>
548-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Apr 21 2023 13:18:31 GMT-0700 (Pacific Daylight Time) using the Minami theme.
548+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Oct 04 2023 15:55:39 GMT-0700 (Pacific Daylight Time) using the Minami theme.
549549
</footer>
550550

551551
<script>prettyPrint();</script>

global.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ <h5>Example</h5>
552552
<br class="clear">
553553

554554
<footer>
555-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Apr 21 2023 13:18:31 GMT-0700 (Pacific Daylight Time) using the Minami theme.
555+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Oct 04 2023 15:55:39 GMT-0700 (Pacific Daylight Time) using the Minami theme.
556556
</footer>
557557

558558
<script>prettyPrint();</script>

index.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
<section class="readme">
5151
<article><h1>L³ router</h1>
52-
<p><a href="https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter"><img src="https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter.svg" alt="npm version"></a> <a href="https://www.npmjs.com/package/@lambda-lambda-lambda/router"><img src="https://img.shields.io/npm/dm/@lambda-lambda-lambda/router.svg" alt=""></a> <a href="https://app.travis-ci.com/github/lambda-lambda-lambda/router"><img src="https://api.travis-ci.com/lambda-lambda-lambda/router.svg?branch=master" alt="Build Status"></a> <a href="https://coveralls.io/r/lambda-lambda-lambda/router?branch=master"><img src="https://coveralls.io/repos/lambda-lambda-lambda/router/badge.svg?branch=master" alt="Coverage"></a></p>
52+
<p><a href="https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter"><img src="https://badge.fury.io/js/@lambda-lambda-lambda%2Frouter.svg" alt="npm version"></a> <a href="https://www.npmjs.com/package/@lambda-lambda-lambda/router"><img src="https://img.shields.io/npm/dm/@lambda-lambda-lambda/router.svg" alt=""></a> <a href="https://app.travis-ci.com/github/lambda-lambda-lambda/router"><img src="https://api.travis-ci.com/lambda-lambda-lambda/router.svg?branch=master" alt="Build Status"></a> <a href="https://coveralls.io/r/lambda-lambda-lambda/router?branch=master"><img src="https://coveralls.io/repos/lambda-lambda-lambda/router/badge.svg?branch=master" alt="Coverage"></a> <a href="https://packagephobia.com/result?p=@lambda-lambda-lambda/router"><img src="https://packagephobia.com/badge?p=@lambda-lambda-lambda/router" alt="Install size"></a></p>
5353
<p>AWS <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html">CloudFront Lambda@Edge</a> serverless application router.</p>
5454
<p><img src="https://raw.githubusercontent.com/lambda-lambda-lambda/router/master/package.png" alt="lambda-lambda-lambda"></p>
5555
<h2>Features</h2>
@@ -61,6 +61,10 @@ <h2>Features</h2>
6161
<li>Open Source, <a href="https://github.com/lambda-lambda-lambda/router/blob/master/LICENSE">MIT licensed</a>, FREE.</li>
6262
<li>Lightweight (<strong>no dependencies</strong>).</li>
6363
</ul>
64+
<h2>How does it work?</h2>
65+
<p>In its most basic form the library provides helper methods that translate the <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html">CloudFront Lambda@Edge</a> <code>origin-request</code> allowing you to handle response processing <strong>without the need to construct complex Lambda dependent responses</strong>.</p>
66+
<p>To better visualize how L³ fits in the current AWS ecosystem the following high-level graph describes the <em>HTTP Request/Response lifecycle</em> and role of each AWS provided service.</p>
67+
<p><img src="https://raw.githubusercontent.com/lambda-lambda-lambda/manual/master/images/Request-Response-Lifecycle.png" alt="HTTP Request/Response lifecycle"></p>
6468
<h2>Getting started</h2>
6569
<p>The easiest way to created an application, without the need to <a href="#manual-installation">manually install</a> this package, is to use the <a href="https://marketplace.visualstudio.com/items?itemName=Nuxy.vscode-lambda-lambda-lambda">L³ Visual Studio Code extension</a>. Doing so allows you to..</p>
6670
<ul>
@@ -94,7 +98,7 @@ <h2>Versioning</h2>
9498
<p>This package is maintained under the <a href="https://semver.org">Semantic Versioning</a> guidelines.</p>
9599
<h2>License and Warranty</h2>
96100
<p>This package is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.</p>
97-
<p><em>@lambda-lambda-lambda/router</em> is provided under the terms of the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a></p>
101+
<p><em>lambda-lambda-lambda/router</em> is provided under the terms of the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a></p>
98102
<p><a href="https://aws.amazon.com">AWS</a> is a registered trademark of Amazon Web Services, Inc.</p>
99103
<h2>Author</h2>
100104
<p><a href="https://github.com/nuxy">Marc S. Brooks</a></p></article>
@@ -110,7 +114,7 @@ <h2>Author</h2>
110114
<br class="clear">
111115

112116
<footer>
113-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Apr 21 2023 13:18:31 GMT-0700 (Pacific Daylight Time) using the Minami theme.
117+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Oct 04 2023 15:55:39 GMT-0700 (Pacific Daylight Time) using the Minami theme.
114118
</footer>
115119

116120
<script>prettyPrint();</script>

module-router_Common.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ <h4 class="name" id=".getResourceId"><span class="type-signature">(static) </spa
118118

119119
<dt class="tag-source">Source:</dt>
120120
<dd class="tag-source"><ul class="dummy"><li>
121-
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line124">line 124</a>
121+
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line127">line 127</a>
122122
</li></ul></dd>
123123

124124

@@ -311,7 +311,7 @@ <h4 class="name" id=".isAsyncFunc"><span class="type-signature">(static) </span>
311311

312312
<dt class="tag-source">Source:</dt>
313313
<dd class="tag-source"><ul class="dummy"><li>
314-
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line26">line 26</a>
314+
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line29">line 29</a>
315315
</li></ul></dd>
316316

317317

@@ -475,7 +475,7 @@ <h4 class="name" id=".isPromise"><span class="type-signature">(static) </span>is
475475

476476
<dt class="tag-source">Source:</dt>
477477
<dd class="tag-source"><ul class="dummy"><li>
478-
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line47">line 47</a>
478+
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line50">line 50</a>
479479
</li></ul></dd>
480480

481481

@@ -644,7 +644,7 @@ <h4 class="name" id=".isValidFunc"><span class="type-signature">(static) </span>
644644

645645
<dt class="tag-source">Source:</dt>
646646
<dd class="tag-source"><ul class="dummy"><li>
647-
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line79">line 79</a>
647+
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line82">line 82</a>
648648
</li></ul></dd>
649649

650650

@@ -808,7 +808,7 @@ <h4 class="name" id=".isValidPath"><span class="type-signature">(static) </span>
808808

809809
<dt class="tag-source">Source:</dt>
810810
<dd class="tag-source"><ul class="dummy"><li>
811-
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line63">line 63</a>
811+
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line66">line 66</a>
812812
</li></ul></dd>
813813

814814

@@ -972,7 +972,7 @@ <h4 class="name" id=".isValidRoute"><span class="type-signature">(static) </span
972972

973973
<dt class="tag-source">Source:</dt>
974974
<dd class="tag-source"><ul class="dummy"><li>
975-
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line101">line 101</a>
975+
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line104">line 104</a>
976976
</li></ul></dd>
977977

978978

@@ -1188,7 +1188,7 @@ <h4 class="name" id=".moduleParent"><span class="type-signature">(static) </span
11881188

11891189
<dt class="tag-source">Source:</dt>
11901190
<dd class="tag-source"><ul class="dummy"><li>
1191-
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line159">line 159</a>
1191+
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line162">line 162</a>
11921192
</li></ul></dd>
11931193

11941194

@@ -1300,7 +1300,7 @@ <h4 class="name" id=".promiseEvents"><span class="type-signature">(static) </spa
13001300

13011301
<dt class="tag-source">Source:</dt>
13021302
<dd class="tag-source"><ul class="dummy"><li>
1303-
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line191">line 191</a>
1303+
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line194">line 194</a>
13041304
</li></ul></dd>
13051305

13061306

@@ -1477,7 +1477,7 @@ <h4 class="name" id=".setFuncName"><span class="type-signature">(static) </span>
14771477

14781478
<dt class="tag-source">Source:</dt>
14791479
<dd class="tag-source"><ul class="dummy"><li>
1480-
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line146">line 146</a>
1480+
<a href="router_Common.js.html">router/Common.js</a>, <a href="router_Common.js.html#line149">line 149</a>
14811481
</li></ul></dd>
14821482

14831483

@@ -1617,7 +1617,7 @@ <h5>Example</h5>
16171617
<br class="clear">
16181618

16191619
<footer>
1620-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Apr 21 2023 13:18:31 GMT-0700 (Pacific Daylight Time) using the Minami theme.
1620+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Oct 04 2023 15:55:39 GMT-0700 (Pacific Daylight Time) using the Minami theme.
16211621
</footer>
16221622

16231623
<script>prettyPrint();</script>

module-router_Route.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ <h5>Example</h5>
191191
<br class="clear">
192192

193193
<footer>
194-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Apr 21 2023 13:18:31 GMT-0700 (Pacific Daylight Time) using the Minami theme.
194+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Oct 04 2023 15:55:39 GMT-0700 (Pacific Daylight Time) using the Minami theme.
195195
</footer>
196196

197197
<script>prettyPrint();</script>

router_Common.js.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ <h1 class="page-title">router/Common.js</h1>
5252

5353
'use strict';
5454

55+
// Local reference.
56+
const Config = this;
57+
5558
/**
5659
* Check if value is an async function.
5760
*
@@ -140,8 +143,8 @@ <h1 class="page-title">router/Common.js</h1>
140143
* // true
141144
*/
142145
exports.isValidRoute = function(uri, path, func) {
143-
if (module.exports.isValidFunc(func) &amp;&amp; !/^route:/.test(func.name)) {
144-
return !!uri.match(new RegExp(`^${path}(\/[a-z0-9-_]+)?$`, 'i'));
146+
if (Config.isValidFunc(func) &amp;&amp; !/^route:/.test(func.name)) {
147+
return !!uri.match(new RegExp(`^${path}(\/[a-z0-9-_]+)?$`, 'i')); // nosemgrep
145148
}
146149

147150
return (uri === path);
@@ -163,7 +166,7 @@ <h1 class="page-title">router/Common.js</h1>
163166
* // abc123
164167
*/
165168
exports.getResourceId = function(uri, path) {
166-
const fragment = uri.replace(new RegExp(`^(?:${path}(?:\/([a-z0-9-_]+))?)$`, 'i'), '$1');
169+
const fragment = uri.replace(new RegExp(`^(?:${path}(?:\/([a-z0-9-_]+))?)$`, 'i'), '$1'); // nosemgrep
167170
if (fragment !== uri) {
168171
return fragment;
169172
}
@@ -246,7 +249,7 @@ <h1 class="page-title">router/Common.js</h1>
246249
<br class="clear">
247250

248251
<footer>
249-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Apr 21 2023 13:18:31 GMT-0700 (Pacific Daylight Time) using the Minami theme.
252+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Oct 04 2023 15:55:39 GMT-0700 (Pacific Daylight Time) using the Minami theme.
250253
</footer>
251254

252255
<script>prettyPrint();</script>

0 commit comments

Comments
 (0)